Esempio n. 1
0
        public void ButtonPressOptions(object sender, EventArgs args)
        {
            if (OptionsWindow == null)
            {
                OptionsWindow = new OptionsWindow(Constants.GameWindowWidth, Constants.GameWindowHeight);
                UserInterfaceManager.Add(OptionsWindow);
            }
            else
            {
                OptionsWindow.IsVisible = true;
            }

            // Transition to options window
            Transition(OptionsWindow);
        }
Esempio n. 2
0
        public void ButtonPressContributors(object sender, EventArgs args)
        {
            if (ContributorsWindow == null)
            {
                ContributorsWindow = new ContributorsWindow(Constants.GameWindowWidth, Constants.GameWindowHeight);
                UserInterfaceManager.Add(ContributorsWindow);
            }
            else
            {
                ContributorsWindow.IsVisible = true;
            }

            // Transition to contributors window
            Transition(ContributorsWindow);
        }
Esempio n. 3
0
        private void OpenHelpWindow()
        {
            var helpWindow = UserInterfaceManager.Get <HelpWindow>();

            if (helpWindow == null)
            {
                helpWindow = new HelpWindow(Constants.Windows.HelpWidth, Constants.Windows.HelpHeight);
                UserInterfaceManager.Add(helpWindow);
                this.FullTransition(helpWindow);
            }
            else
            {
                this.FullTransition(helpWindow);
            }
        }
Esempio n. 4
0
        public static void Show()
        {
            var mainMenu = UserInterfaceManager.Get <MainMenuWindow>();

            if (mainMenu == null)
            {
                mainMenu = new MainMenuWindow(Constants.GameWindowWidth, Constants.GameWindowHeight);
                mainMenu.InitializeButtons();
                UserInterfaceManager.Add(mainMenu);
            }
            else
            {
                mainMenu.IsVisible        = true;
                mainMenu.IsFocused        = true;
                mainMenu.IsCursorDisabled = false;
            }
            Global.CurrentScreen = mainMenu;

            Game.Reset();
        }
Esempio n. 5
0
        public static TitleWindow Show()
        {
            var titleWindow = UserInterfaceManager.Get <TitleWindow>();

            if (titleWindow == null)
            {
                titleWindow = new TitleWindow(Constants.Windows.TitleWidth, Constants.Windows.TitleHeight);
                UserInterfaceManager.Add(titleWindow);
            }
            else
            {
                titleWindow.IsVisible = true;
                titleWindow.IsFocused = true;
            }

            titleWindow.IsVisible = true;
            titleWindow.IsFocused = true;

            Global.CurrentScreen = titleWindow;

            return(titleWindow);
        }