public GameWindow() : base(Gtk.WindowType.Toplevel) { BorderWidth = 8; var monitor = Screen.GetMonitorGeometry(Screen.GetMonitorAtWindow(GdkWindow)); _absolute_size = (int)(Math.Round(Math.Min(monitor.Width, monitor.Height) / 200.0)) * 100; _size = (int)(Math.Round(Math.Min(Screen.Width, Screen.Height) / 200.0)) * 100; _area = new Drawing.GameArea(_size, _size); Add(_area); Title = "DIKUArcade"; Drawing.Scaler.InitScale(_area.Pixmap); SetSizeRequest(_size, _size); _area.SetSizeRequest(_absolute_size, _absolute_size); WindowPosition = WindowPosition.Center; KeyPressEvent += KeyPressEventHandler; DeleteEvent += OnDeleteEvent; _timerDelegate = new System.Threading.TimerCallback(TimerCallback); DrawTimer = new Timer(_timerDelegate, this, 0, 100); // set timer to 200 ms (8-bit style) }
public override void OnDrawScene(Drawing.GameArea area) { if (_SpaceBackground != null) { _win.Area.Pixmap.DrawImage(_SpaceBackground); } this.DrawLabelCentered(_pickGameLabel, 50); }
public GameFactory(Drawing.GameArea area) { _area = area; }
public SpaceTaxiFactory(Drawing.GameArea area) : base(area) { }
public GalagaGameFactory(Drawing.GameArea area) : base(area) { // All the work is done in the base-class constructor. }