Esempio n. 1
0
        public override GameWindow CreateWindow(object windowContext = null, int width = 0, int height = 0)
        {
            var window = new GameWindowDesktop();
            window.Initialize(windowContext);

            width = width == 0 ? window.IsForm ? GraphicsDeviceManager.DefaultBackBufferWidth : window.Control.ClientSize.Width : width;
            height = height == 0 ? window.IsForm ? GraphicsDeviceManager.DefaultBackBufferHeight : window.Control.ClientSize.Height : height;
            window.Control.ClientSize = new System.Drawing.Size(width, height);
            return window;
        }
Esempio n. 2
0
        public GamePlatformDesktop(IServiceRegistry services) : base(services)
        {
            // By default, the mouse is hidden
            isMouseVisible = false;
            Cursor.Hide();

            IsBlockingRun = true;
            gameWindowDesktop = new GameWindowDesktop();
            services.AddService(typeof(IGraphicsDeviceFactory), this);
        }
Esempio n. 3
0
        public override GameWindow CreateWindow(object windowContext = null, int width = 0, int height = 0)
        {
            var window = new GameWindowDesktop();

            window.Initialize(windowContext);

            width  = width == 0 ? window.IsForm ? GraphicsDeviceManager.DefaultBackBufferWidth : window.Control.ClientSize.Width : width;
            height = height == 0 ? window.IsForm ? GraphicsDeviceManager.DefaultBackBufferHeight : window.Control.ClientSize.Height : height;
            window.Control.ClientSize = new System.Drawing.Size(width, height);
            return(window);
        }
Esempio n. 4
0
 public GamePlatformDesktop(IServiceRegistry services) : base(services)
 {
     IsBlockingRun = true;
     gameWindowDesktop = new GameWindowDesktop();
     services.AddService(typeof(IGraphicsDeviceFactory), this);
 }
 public GamePlatformDesktop() : base()
 {
     IsBlockingRun = true;
     gameMainWindowDesktop = new GameWindowDesktop();
 }
Esempio n. 6
0
 public GamePlatformDesktop() : base()
 {
     IsBlockingRun         = true;
     gameMainWindowDesktop = new GameWindowDesktop();
 }