public MenusParent(Device device) { MenuBackGround back = new MenuBackGround(device); elements = new List <ControlElement>(); elements.Add(back); result = MenuResult.None; }
void device_DeviceReset(object sender, EventArgs e) { this.elements.Clear(); MenuBackGround tobecontinue = new MenuBackGround(this.device); tobecontinue.Texture = TextureLoader.FromFile(device, @"Resources/ToBeContinue.dds"); MenuButton exitButton = new MenuButton(device, MenuResult.Exit, " Exit", new System.Drawing.Point(device.Viewport.Width - 190, device.Viewport.Height - 90)); this.elements.Add(tobecontinue); this.elements.Add(exitButton); }
void device_DeviceReset(object sender, EventArgs e) { this.elements.Clear(); MenuBackGround gameover = new MenuBackGround(this.device); gameover.Texture = TextureLoader.FromFile(device, @"Resources/gameover.dds"); MenuButton restartButton = new MenuButton(device, MenuResult.Restart, " Restart", new System.Drawing.Point(device.Viewport.Width - 350, device.Viewport.Height - 160)); MenuButton exitButton = new MenuButton(device, MenuResult.Exit, " Exit", new System.Drawing.Point(device.Viewport.Width - 350, device.Viewport.Height - 90)); this.elements.Add(gameover); this.elements.Add(restartButton); this.elements.Add(exitButton); }