public void OnLoadContentEvent(MPP.core2d.GameScreenManager.LoadContentEventArgs eventArgs) { background = ScreenUtils.GetTexture("mainMenuBackground"); buttons = new core2d.AnimatedButton[2]; buttons[0] = new AnimatedButton(MenuScreen.START_A_NEW_GAME_BUTTON_LABEL); SetNewGameButtonLabel(); buttons[1] = new AnimatedButton(MenuScreen.SOUND_SETTINGS_BUTTON_LABEL); SetSoundButtonLabel(); /* * buttons[2] = new AnimatedButton(MenuScreen.HELP_BUTTON_LABEL); * buttons[2].SetLabel(Constans.MENU_SELECTED_BUTTON_BACKGROUND_COLOR, Constans.MENU_NON_SELECTED_BUTTON_BACKGROUND_COLOR, Constans.MENU_NON_SELECTED_BUTTON_BACKGROUND_COLOR, * Constans.MENU_NON_ACTIVE_TEXT_COLOR, Constans.MENU_FONT_NAME, * ResourceManager.Instance.GetString(ResourceManager.StringKey.HELP), * Constans.STANDARD_BUTTON_WIDTH, Constans.STANDARD_BUTTON_HEIGHT); */ for (int i = 0; i < buttons.Length; i++) { buttons[i].ButtonPressedListener += this.OnButtonPressed; buttons[i].ButtonTransitionListener += this.OnButtonTransition; transitionButtonCountdown = 0; } }
public void OnLoadContentEvent(MPP.core2d.GameScreenManager.LoadContentEventArgs eventArgs) { background = ScreenUtils.GetTexture(ResourceManager.Instance.GetString(ResourceManager.StringKey.HELP_SCREEN_BACKGROUND)); okButton = new AnimatedButton(HelpScreen.OK_BUTTON_LABEL); okButton.ButtonPressedListener += this.OnButtonPressed; okButton.ButtonTransitionListener += this.OnButtonTransition; }
private void OnLoadContentEvent(GameScreenManager.LoadContentEventArgs eventArgs) { fadeOutOverlay = ScreenUtils.GetTexture("fadeout_overlay"); font = ScreenUtils.GetFont("GameOverFont"); mainMenuButton = new AnimatedButton("mainMenuButton"); mainMenuButton.SetLabel(Constans.MENU_SELECTED_BUTTON_BACKGROUND_COLOR, Constans.MENU_NON_SELECTED_BUTTON_BACKGROUND_COLOR, Constans.MENU_NON_SELECTED_BUTTON_BACKGROUND_COLOR, Constans.MENU_NON_ACTIVE_TEXT_COLOR, Constans.MENU_FONT_NAME, ResourceManager.Instance.GetString(ResourceManager.StringKey.MAIN_MENU_BUTTON_LABEL), Constans.STANDARD_BUTTON_WIDTH, Constans.STANDARD_BUTTON_HEIGHT); mainMenuButton.ButtonPressedListener += OnButtonPressed; mainMenuButton.x = 0; mainMenuButton.y = ScreenUtils.ScreenHeight - Constans.STANDARD_BUTTON_HEIGHT - Constans.STANDARD_BUTTON_HEIGHT / 10; background = ScreenUtils.GetTexture("gameOverBackground"); }
private void OnLoadContentEvent(GameScreenManager.LoadContentEventArgs eventArgs) { background = ScreenUtils.GetTexture("battle_background"); status = new GameStatusBar(ScreenUtils.GetFont("statusbar_font")); int width = ScreenUtils.ScreenWidth; int height = ScreenUtils.ScreenHeight / 8; startBattleButton = new AnimatedButton("start_battle_button"); startBattleButton.SetLabel(Constans.MENU_SELECTED_BUTTON_BACKGROUND_COLOR, Constans.MENU_NON_SELECTED_BUTTON_BACKGROUND_COLOR, Constans.MENU_NON_SELECTED_BUTTON_BACKGROUND_COLOR, Constans.MENU_NON_ACTIVE_TEXT_COLOR, Constans.MENU_FONT_NAME, ResourceManager.Instance.GetString(ResourceManager.StringKey.START_BATTLE), width, height); startBattleButton.ButtonPressedListener += OnButtonPressed; startBattleButton.ButtonTransitionListener += OnButtonMovedIn; startBattleButton.x = -1000; fadeOutOverlay = ScreenUtils.GetTexture("fadeout_overlay"); StartBattle(); }