Esempio n. 1
0
        private void InitAttackMenu(ScreenConstants screen, GUIManager manager)
        {
            moveWidget.SetCoordinates(
                X: screen.ScreenWidth / 2.0f,
                Y: 2.0f * screen.ScreenHeight / 3.0f,
                width: screen.ScreenWidth - screen.ScreenWidth / 2.0f,
                height: screen.ScreenHeight - 2.0f * screen.ScreenHeight / 3.0f
            );

            moveWidget.ItemSelected += AttackMenu_ItemSelected;
            moveWidget.ExitRequested += BackToMain;
            moveWidget.ExitRequested += delegate { moveWidget.ResetSelection(); };

            moveWidget.IsVisible = false;
            manager.AddWidget(moveWidget);
        }
Esempio n. 2
0
        private void InitPKMNMenu(ScreenConstants screen, GUIManager manager)
        {
            pokemonWidget.XPosition = 0;
            pokemonWidget.YPosition = 0;
            pokemonWidget.Width = screen.ScreenWidth;
            pokemonWidget.Height = 2.0f * screen.ScreenHeight / 3.0f;

            pokemonWidget.ItemSelected += PKMNMenu_ItemSelected;
            pokemonWidget.ExitRequested += BackToMain;
            pokemonWidget.ExitRequested += delegate { pokemonWidget.ResetSelection(); };

            pokemonWidget.IsVisible = false;

            manager.AddWidget(pokemonWidget);
        }
Esempio n. 3
0
        private void InitMainMenu(ScreenConstants screen, GUIManager manager)
        {
            mainWidget.XPosition = 0.5f * screen.ScreenWidth;
            mainWidget.YPosition = 2.0f * screen.ScreenHeight / 3.0f;
            mainWidget.Width = screen.ScreenWidth - mainWidget.XPosition;
            mainWidget.Height = screen.ScreenHeight - mainWidget.YPosition;

            mainWidget.ItemSelected += MainMenu_ItemSelected;
            //mainWidget.ExitRequested += delegate { manager.Exit(); };

            mainWidget.IsVisible = true;
            manager.AddWidget(mainWidget);
        }
Esempio n. 4
0
        private void InitMessageBox(ScreenConstants screen, GUIManager manager)
        {
            messageFrame.AddWidget(messageBox);
            messageFrame.XPosition = 0;
            messageFrame.YPosition = 2.0f * screen.ScreenHeight / 3.0f;
            messageFrame.Width = screen.ScreenWidth;
            messageFrame.Height = screen.ScreenHeight - messageFrame.YPosition;

            messageFrame.IsVisible = true;
            manager.AddWidget(messageFrame);

            messageBox.OnAllLineShowed += AllLineShowedHandler;
        }
Esempio n. 5
0
        private void InitItemMenu(ScreenConstants screen, GUIManager manager)
        {
            itemWidget.XPosition = 3.0f * screen.ScreenWidth / 8.0f;
            itemWidget.YPosition = 1.0f * screen.ScreenHeight / 8.0f;

            itemWidget.Width = screen.ScreenWidth - itemWidget.XPosition;
            itemWidget.Height = (2.0f * screen.ScreenHeight / 3.0f) - itemWidget.YPosition;

            itemWidget.ItemSelected += ItemMenu_ItemSelected;
            itemWidget.ExitRequested += BackToMain;
            itemWidget.ExitRequested += delegate { itemWidget.ResetSelection(); };

            itemWidget.IsVisible = false;

            manager.AddWidget(itemWidget);
        }