Exemplo 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);
        }
Exemplo 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);
        }
Exemplo 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);
            }
        }
Exemplo 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();
        }
Exemplo 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);
        }