public static void On_GnomanEmpire_PlayGame(GnomanEmpire self) { lbl = new Game.GUI.Controls.Label(self.GuiManager.Manager); lbl.Init(); lbl.Top = 200; lbl.Left = 5; lbl.Width = 1000; lbl.Height = 100; refresh(); self.GuiManager.Add(lbl); btn = new Game.GUI.Controls.Button(self.GuiManager.Manager); btn.Init(); btn.Top = 300; btn.Left = 5; btn.Text = "Dump"; btn.Click += new Game.GUI.Controls.EventHandler(btn_Click); self.GuiManager.Add(btn); }
public static void On_GnomanEmpire_PlayGame(GnomanEmpire self) { lbl = new Game.GUI.Controls.Label(self.GuiManager.Manager); lbl.Init(); lbl.Top = 200; lbl.Left = 5; lbl.Width = 1000; lbl.Height = 100; refresh(); self.GuiManager.Add(lbl); btn = new Game.GUI.Controls.Button(self.GuiManager.Manager); btn.Init(); btn.Top = 300; btn.Left = 5; btn.Text = "Dump"; btn.Click += new Game.GUI.Controls.EventHandler(btn_Click); self.GuiManager.Add(btn); }
public static int HookImportExportListInit(int Y, Game.GUI.ImportExportMenu importExportMenu, Game.GUI.Controls.Manager manager) { AddButton addButton = (string label) => { var button = new Game.GUI.Controls.Button(importExportMenu.Manager); button.Init(); Y += button.Margins.Top; button.Width = 200; button.Top = Y; button.Text = label; importExportMenu.panel_0.Add(button); Y += button.Height + button.Margins.Bottom; return(button); }; if (instance.ExportMenuListInit != null) { instance.ExportMenuListInit(importExportMenu, manager, addButton); } return(Y); }