public void CloseGui() { // Close gui ActiveGui.OnClose(); // Restore parent gui ActiveGui = (GuiForm)ActiveGui.Parent; Mode = ActiveGui == null ? GameMode.InGame : GameMode.Gui; }
internal void OpenGui(GuiForm gui) { // Save parent gui.Parent = ActiveGui; // Open new gui ActiveGui = gui; gui.Show(); Mode = GameMode.Gui; }