private void InitializeComponent() { //internal properties this.ForeColor = Color.White; this.BackColor = Color.FromArgb(100, Color.LightGoldenrodYellow); this.BackColor2 = Color.FromArgb(100, Color.DarkGoldenrod); this.Size = new Size(800, 150); this.Location = new Point(0, 575); //start button this.startButton = new DXButton(this.ControlHost, this); this.startButton.Text = DirectXClientResources.StartButtonText; this.startButton.Size = new Size(50, 20); this.startButton.Location = new Point(10, 10); this.startButton.Click += new System.EventHandler(this.StartMenuPressed); this.Controls.Add(this.startButton); //start menu this.startMenu = new DXMenu(this.ControlHost, this.Parent); this.startMenu.Location = new Point(2, this.Parent.Size.Height - this.startMenu.Size.Height - this.Size.Height - 5); this.startMenu.HighlightColor = Color.White; this.startMenu.BackColor = Color.Tan; this.startMenu.BackColor2 = Color.Tan; this.startMenu.Hide(); ((DXContainerControl)Parent).Controls.Add(this.startMenu); //start panel this.panel = new DXPanel(this.ControlHost, this); this.panel.Location = new Point(200, 2); this.panel.Size = new Size(100, 24); this.Controls.Add(this.panel); //quick save item this.quickSaveItem = new DXMenuItem(this.ControlHost, this.startMenu); this.quickSaveItem.Text = DirectXClientResources.MenuItemQuickSave; this.quickSaveItem.Clicked += new System.EventHandler(this.OnQuickSave); this.quickSaveItem.Icon = Icons.SaveIcon; this.startMenu.MenuItems.Add(this.quickSaveItem); //save Item this.saveItem = new DXMenuItem(this.ControlHost, this.startMenu); this.saveItem.Text = DirectXClientResources.MenuItemSaveGame; this.saveItem.Clicked += new System.EventHandler(this.OnSave); this.saveItem.Icon = Icons.SaveIcon; this.startMenu.MenuItems.Add(this.saveItem); //help Item this.helpItem = new DXMenuItem(this.ControlHost, this.startMenu); this.helpItem.Text = DirectXClientResources.MenuItemHelp; this.helpItem.Clicked += new System.EventHandler(this.OnHelp); this.helpItem.Icon = Icons.HelpIcon; this.startMenu.MenuItems.Add(this.helpItem); //quitItem this.quitItem = new DXMenuItem(this.ControlHost, this.startMenu); this.quitItem.Text = DirectXClientResources.MenuItemQuitToDesktop; this.quitItem.Clicked += new System.EventHandler(this.OnMenuQuit); this.quitItem.Icon = Icons.ExitGameIcon; this.startMenu.MenuItems.Add(this.quitItem); }
public void Dispose() { DXPanel.Dispose(); Game.Dispose(); }