Пример #1
0
 public bool WindowResized(WindowResizeEvent e)
 {
     windowHeight = e.Height;
     windowWidth  = e.Width;
     ImGui.GetIO().DisplaySize = new System.Numerics.Vector2(e.Width, e.Height);
     return(false);
 }
Пример #2
0
        public Control()
        {
            pBox=	new Box(Point.ORIGIN, Size.NO_SIZE);
            pParent=	null;
            children=	new List<Control>();
            oldMouse=	new MouseState();
            bHover=	false;
            click=	0;
            pVisible=	true;
            pEnabled=	true;
            pBackColors=	ColorPacket.DEFAULT;

            eonRelocate=	null;
            eonResize=	null;
            eonParentChanged=	null;
            eonBoxChanged=	null;
            eonWindowResize=	null;
            eonGuiAdded=	null;
            eonMouseEnter=	null;
            eonMouseLeave=	null;
            eonMouseClick=	null;
            eonMouseHover=	null;
            eonKeyPress=	null;
            eonEnabledChanged=	null;
            eonVisibleChanged=	null;
            eonGuiOpen=	null;
            eonGuiClose=	null;
        }
        private unsafe void OnWindowResizeEvent(WindowResizeEvent e)
        {
            var io = ImGui.GetIO();

            io.DisplaySize             = new System.Numerics.Vector2(e.GetWidth(), e.GetHeight());
            io.DisplayFramebufferScale = new System.Numerics.Vector2(1.0f, 1.0f);
            GL.Viewport(0, 0, e.GetWidth(), e.GetHeight());
        }
Пример #4
0
        private bool OnWindowResize(WindowResizeEvent e)
        {
            if (e.Width == 0 || e.Height == 0)
            {
                _isMinimized = true;
                return(false);
            }

            _isMinimized = false;

            return(false);
        }
Пример #5
0
 internal void ResizeSwapchain(WindowResizeEvent we)
 {
     // Necessary logic to deal with DirectX framebuffer recreation
     if (activeCamera.RenderTarget == _gd.SwapchainFramebuffer)
     {
         Application.App.Window.GraphicsDevice.MainSwapchain.Resize((uint)we.Width, (uint)we.Height);
         activeCamera.RenderTarget = _gd.SwapchainFramebuffer;
     }
     else
     {
         Application.App.Window.GraphicsDevice.MainSwapchain.Resize((uint)we.Width, (uint)we.Height);
     }
 }
Пример #6
0
        private bool OnWindowResize(WindowResizeEvent e)
        {
            // Basically if window is minimized
            if (e.Size.X == 0 || e.Size.Y == 0)
            {
                _minimized = true;
                return(false);
            }

            _minimized = false;

            _renderCommandDispatcher.OnWindowResize(e.Size);

            return(false);
        }
        private bool OnWindowResize(WindowResizeEvent e)
        {
            AXProfiler.Capture(() => { OnFramebufferResize(e.Size.X, e.Size.Y); });

            return(false);
        }
Пример #8
0
 public void OnResize(WindowResizeEvent evnt)
 {
     _renderContext.SetViewport(evnt.Width, evnt.Height);
 }
Пример #9
0
        private void OnResize(Vector2D <int> size)
        {
            var windowResizeEvent = new WindowResizeEvent(size);

            EventCallback(windowResizeEvent);
        }
Пример #10
0
 private void Resize(WindowResizeEvent args)
 {
     Width    = args.Width;
     Height   = args.Height;
     _resized = true;
 }
Пример #11
0
 bool OnWindowResize(WindowResizeEvent e)
 {
     Renderer.Resize(0, 0, e.Width, e.Height);
     return(false);
 }