public void Init(Game game) { this.GameEngine = game; this.GameEngine.BattleGui = this; Gtk.Application.Init(); this.glade = new Glade.XML(this.GetType().Assembly, GladeResource, "window1", null); this.glade.Autoconnect(this); this.window1.SetDefaultSize(1000, 600); this.addplayer_toolbutton.TooltipText = "Add a player to the mix"; this.rollchar_toolbutton.TooltipText = "Roll attributes for all players"; this.quit_toolbutton.TooltipText = "Quit BattleGui client"; this.console_textview.ModifyBase(StateType.Normal, new Gdk.Color(0, 0, 0)); this.console_textview.ModifyText(StateType.Normal, new Gdk.Color(196, 196, 196)); this.window1.Icon = Gdk.Pixbuf.LoadFromResource(BattleIconRes); // event handler config this.window1.DeleteEvent += HandleWindow1DeleteEvent; this.addplayer_toolbutton.Clicked += HandleAddplayer_toolbuttonClicked; this.rollchar_toolbutton.Clicked += HandleRollchar_toolbuttonClicked; this.battle_toolbutton.Clicked += HandleBattle_toolbuttonClicked; this.quit_toolbutton.Clicked += HandleQuit_toolbuttonClicked; this.statusbar1.Push(0, "Ready"); }
private void button1_Click(object sender, EventArgs e) { var name = textBox1.Text; mainGame = new Game(name); ourPlayer = mainGame.HostingPlayer; gameMap1.OurPlayer = ourPlayer; timer1.Enabled = true; }
public void Init(Game game) { this.GameEngine = game; this.GameEngine.BattleGui = this; Gtk.Application.Init (); this.glade = new Glade.XML (this.GetType ().Assembly, GladeResource, "window1", null); this.glade.Autoconnect (this); this.window1.SetDefaultSize (1000, 600); this.addplayer_toolbutton.TooltipText = "Add a player to the mix"; this.rollchar_toolbutton.TooltipText = "Roll attributes for all players"; this.quit_toolbutton.TooltipText = "Quit BattleGui client"; this.console_textview.ModifyBase (StateType.Normal, new Gdk.Color (0, 0, 0)); this.console_textview.ModifyText (StateType.Normal, new Gdk.Color (196, 196, 196)); this.window1.Icon = Gdk.Pixbuf.LoadFromResource (BattleIconRes); // event handler config this.window1.DeleteEvent += HandleWindow1DeleteEvent; this.addplayer_toolbutton.Clicked += HandleAddplayer_toolbuttonClicked; this.rollchar_toolbutton.Clicked += HandleRollchar_toolbuttonClicked; this.battle_toolbutton.Clicked += HandleBattle_toolbuttonClicked; this.quit_toolbutton.Clicked += HandleQuit_toolbuttonClicked; this.statusbar1.Push (0, "Ready"); }
public void InitEngine() { Console.WriteLine ("loading BattleEngine ..."); this.game = new Game (); }