private void ModListBoxOnItemIndexChanged(object sender, EventArgs eventArgs) { if (ModListBox.ItemIndex == 0) { _titleLabel.Text = "Gnomodia"; _infoLabel.Text = "Modding toolkit to add additional features or modify existing features of Gnomoria. Gnomodia is based on a Modding Framework for Gnomoria by Faark (faark.de)."; _versionLabel.Text = string.Format("Version: {0}", typeof(ModDialog).Assembly.GetName().Version); _authorLabel.Text = "Author(s): The Gnomodia Team"; } else { int modIndex = ModListBox.ItemIndex - 1; var modMetadata = _modManager.ModMetadata[modIndex]; _titleLabel.Text = modMetadata.Name; _infoLabel.Text = modMetadata.Description; _versionLabel.Text = string.Format("Version: {0}", modMetadata.Version); _authorLabel.Text = string.Format("Author(s): {0}", modMetadata.Author); } _infoLabel.Height = _infoLabel.FullHeight; }
private void PageChanged(object sender, Game.GUI.Controls.EventArgs e) { if (this.tabControl.SelectedIndex < this.panels.Count) { this.panels[this.tabControl.SelectedIndex].OnActivate(); } }
private void ModsButtonOnClick(object sender, EventArgs eventArgs) { InGameHUD inGameHud = GnomanEmpire.Instance.GuiManager.HUD; bool isOtherWindow = !(inGameHud.ActiveWindow is ModDialogUI); inGameHud.CloseWindow(); if (isOtherWindow) { inGameHud.ShowWindow(new ModDialogUI(_hud.Manager, ModManager)); } }
private void MainMenuModsButtonClick(object sender, EventArgs e) { GnomanEmpire.Instance.GuiManager.MenuStack.PushWindow(new ModsMenu(GnomanEmpire.Instance.GuiManager.Manager, ModManager)); }