bool Game::showMainMenu() { Graphics::Aurora::GUIQuad top("introscr_top" , 0.0f, 0.0f, kScreenWidth, kScreenHeight, 0.0f, 1.0f, 1.0f, 0.0f); Graphics::Aurora::GUIQuad bot("startupscrbot", 0.0f, 0.0f, kScreenWidth, kScreenHeight, 0.0f, 1.0f, 1.0f, 0.0f); top.setPosition(kTopScreenX , kTopScreenY , 0.0f); bot.setPosition(kBottomScreenX, kBottomScreenY, 0.0f); top.show(); bot.show(); Graphics::Aurora::TextureHandle buttonTexture = loadNCGR("main_pnl_off", "gui_main_pnl", 8, 2, "00", "01", "02", "03", "04", (const char *) 0, (const char *) 0, (const char *) 0, "10", "11", "12", "13", "14", "15", "16", "17"); Graphics::Aurora::GUIQuad button(buttonTexture, 0.0f, 0.0f, 240.0f, 48.0f, 0.0f, 1.0f, 1.0f, 0.0f); button.setPosition(-120.0f, -120.0f, -1.0f); button.show(); Graphics::Aurora::Text buttonText(_guiFont, TalkMan.getString(15860)); float buttonX, buttonY, buttonZ; button.getPosition(buttonX, buttonY, buttonZ); const float buttonTextX = buttonX + ((button.getWidth() - buttonText.getWidth()) / 2.0f); const float buttonTextY = buttonY + ((button.getHeight() - buttonText.getHeight()) / 2.0f); buttonText.setPosition(buttonTextX, buttonTextY, -2.0f); buttonText.show(); Graphics::Aurora::Text helpText(_guiFont, TalkMan.getString(18707)); const float helpTextX = kBottomScreenX + ((kScreenWidth - helpText.getWidth()) / 2.0f); const float helpTextY = kBottomScreenY; helpText.setPosition(helpTextX, helpTextY, -2.0f); helpText.show(); GfxMan.unlockFrame(); if (!waitClick()) return false; GfxMan.lockFrame(); helpText.hide(); buttonText.hide(); button.hide(); top.hide(); bot.hide(); return true; }
bool Game::showMainMenu() { Graphics::Aurora::GUIQuad top("introscr_top" , 0.0f, 0.0f, kScreenWidth, kScreenHeight, 0.0f, 1.0f, 1.0f, 0.0f); Graphics::Aurora::GUIQuad bot("startupscrbot", 0.0f, 0.0f, kScreenWidth, kScreenHeight, 0.0f, 1.0f, 1.0f, 0.0f); top.setPosition(kTopScreenX , kTopScreenY , 0.0f); bot.setPosition(kBottomScreenX, kBottomScreenY, 0.0f); top.show(); bot.show(); Graphics::Aurora::TextureHandle buttonTexture = loadNCGR("main_pnl_off", "gui_main_pnl", 8, 2, "00", "01", "02", "03", "04", (const char *) 0, (const char *) 0, (const char *) 0, "10", "11", "12", "13", "14", "15", "16", "17"); Graphics::Aurora::GUIQuad button(buttonTexture, 0.0f, 0.0f, 240.0f, 48.0f, 0.0f, 1.0f, 1.0f, 0.0f); button.setPosition(-120.0f, -120.0f, -1.0f); button.show(); Graphics::Aurora::Text buttonText(_guiFont, 240.0f, 48.0f, TalkMan.getString(15860), 1.0f, 1.0f, 1.0f, 1.0f, Graphics::Aurora::kHAlignCenter, Graphics::Aurora::kVAlignMiddle); buttonText.setPosition(-120.0f, -120.0f, -2.0f); buttonText.show(); Graphics::Aurora::Text helpText(_guiFont, kScreenWidth, kScreenHeight, TalkMan.getString(18707), 1.0f, 1.0f, 1.0f, 1.0f, Graphics::Aurora::kHAlignCenter, Graphics::Aurora::kVAlignBottom); helpText.setPosition(kBottomScreenX, kBottomScreenY, -2.0f); helpText.show(); GfxMan.unlockFrame(); if (!waitClick()) return false; GfxMan.lockFrame(); helpText.hide(); buttonText.hide(); button.hide(); top.hide(); bot.hide(); return true; }