Inheritance: Microsoft.Xna.Framework.GamePlatform
Beispiel #1
0
        public GameWindow(Game game, RectangleF frame) : base(frame)
        {
            if (game == null)
            {
                throw new ArgumentNullException("game");
            }
            _game           = game;
            _platform       = (MacGamePlatform)_game.Services.GetService(typeof(MacGamePlatform));
            TouchPanelState = new TouchPanelState(this);

            //LayerRetainsBacking = false;
            //LayerColorFormat	= EAGLColorFormat.RGBA8;
            this.AutoresizingMask = MonoMac.AppKit.NSViewResizingMask.HeightSizable
                                    | MonoMac.AppKit.NSViewResizingMask.MaxXMargin
                                    | MonoMac.AppKit.NSViewResizingMask.MinYMargin
                                    | MonoMac.AppKit.NSViewResizingMask.WidthSizable;

            RectangleF rect = NSScreen.MainScreen.Frame;

            clientBounds = new Rectangle(0, 0, (int)rect.Width, (int)rect.Height);

            // Enable multi-touch
            //MultipleTouchEnabled = true;

            Mouse.Window = this;
        }
Beispiel #2
0
		public GameWindow(Game game, RectangleF frame) : base (frame)
		{
            if (game == null)
                throw new ArgumentNullException("game");
            _game = game;
            _platform = (MacGamePlatform)_game.Services.GetService(typeof(MacGamePlatform));

			//LayerRetainsBacking = false; 
			//LayerColorFormat	= EAGLColorFormat.RGBA8;
			this.AutoresizingMask = MonoMac.AppKit.NSViewResizingMask.HeightSizable
					| MonoMac.AppKit.NSViewResizingMask.MaxXMargin 
					| MonoMac.AppKit.NSViewResizingMask.MinYMargin
					| MonoMac.AppKit.NSViewResizingMask.WidthSizable;
			
			RectangleF rect = NSScreen.MainScreen.Frame;
			
			clientBounds = new Rectangle (0,0,(int)rect.Width,(int)rect.Height);

			// Enable multi-touch
			//MultipleTouchEnabled = true;

			// Initialize GameTime
			_updateGameTime = new GameTime ();
			_drawGameTime = new GameTime (); 

			// Initialize _lastUpdate
			_lastUpdate = DateTime.Now;
		}
Beispiel #3
0
 public MainWindowDelegate(MacGamePlatform owner)
 {
     if (owner == null)
     {
         throw new ArgumentNullException("owner");
     }
     _owner = owner;
 }
Beispiel #4
0
        public GameWindow(Game game, RectF frame) : base (frame)
		{
            if (game == null)
                throw new ArgumentNullException("game");
            _game = game;
            _platform = (MacGamePlatform)_game.Services.GetService(typeof(MacGamePlatform));
            TouchPanelState = new TouchPanelState(this);

			//LayerRetainsBacking = false; 
			//LayerColorFormat	= EAGLColorFormat.RGBA8;
            this.AutoresizingMask = NSViewResizingMaskClass.HeightSizable
                | NSViewResizingMaskClass.MaxXMargin 
                | NSViewResizingMaskClass.MinYMargin
                | NSViewResizingMaskClass.WidthSizable;
			
            var rect = NSScreen.MainScreen.Frame;
			
			clientBounds = new Rectangle (0,0,(int)rect.Width,(int)rect.Height);

			// Enable multi-touch
			//MultipleTouchEnabled = true;
			
			Mouse.Window = this;
		}
Beispiel #5
0
 public MainWindowDelegate(MacGamePlatform owner)
 {
     if (owner == null)
         throw new ArgumentNullException("owner");
     _owner = owner;
 }
			public SynchronousWindowDelegate (MacGamePlatform owner)
				: base(owner)
			{
			}
 public SynchronousWindowDelegate(MacGamePlatform owner)
     : base(owner)
 {
 }