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