Example #1
0
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);

            GL.Viewport(0, 0, Size.X, Size.Y);
            _camera.AspectRatio = Size.X / (float)Size.Y;
        }
Example #2
0
 protected override void OnResize(ResizeEventArgs e)
 {
     GL.Viewport(0, 0, Size.X, Size.Y);
     // We need to update the aspect ratio once the window has been resized
     _camera.AspectRatio = Size.X / (float)Size.Y;
     base.OnResize(e);
 }
        protected override void OnResize(ResizeEventArgs e)
        {
            renderer.Resize(e.Width, e.Height);
            canvas.SetSize(e.Width, e.Height);

            base.OnResize(e);
        }
Example #4
0
 /// <summary>
 /// Called whenever the window is resized
 /// </summary>
 /// <param name="e">Information about the new window</param>
 protected override void OnResize(ResizeEventArgs e)
 {
     // Call GL.viewport to resize OpenGL's viewport to match the new size
     GL.Viewport(0, 0, Size.X, Size.Y);
     camera.AspectRatio = Size.X / (float)Size.Y;
     base.OnResize(e);
 }
Example #5
0
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);

            UpdateProjectionMatrix();
            GL.Viewport(0, 0, Size.X, Size.Y);
        }
Example #6
0
 protected virtual void OnResize(ResizeEventArgs e)
 {
     if (Child != null)
     {
         Child.InjectResize(e);
     }
 }
Example #7
0
        protected override void OnResize(ResizeEventArgs e)
        {
            _renderer.MainCamera.AspectRatio = (float)Size.X / Size.Y;

            GL.Viewport(0, 0, e.Width, e.Height);
            base.OnResize(e);
        }
Example #8
0
        // Is called when the window was resized
        public override void Resize(ResizeEventArgs e)
        {
            _resizeScaleFactor = new float2((100 / _initWidth * Width) / 100, (100 / _initHeight * Height) / 100);

            _canvasHeight = UserInterfaceHelper.CanvasHeightInit * _resizeScaleFactor.y;
            _canvasWidth  = UserInterfaceHelper.CanvasWidthInit * _resizeScaleFactor.x;
        }
Example #9
0
 void _ResizeChangedMethod(object sender, ResizeEventArgs e)
 {
     if (null != ResizeChanged)
     {
         ResizeChanged(sender, e);
     }
 }
Example #10
0
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);

            GL.Viewport(0, 0, Size.X, Size.Y);
            Render();
        }
Example #11
0
        protected override void OnResize(ResizeEventArgs e)
        {
            //TODO: Setup renderer to updates its render surface width and height
            GL.Viewport(0, 0, Size.X, Size.Y);

            base.OnResize(e);
        }
Example #12
0
 protected override void OnResize(ResizeEventArgs e)
 {
     GL.Viewport(0, 0, e.Width, e.Height);
     DrawBuffer.Resize(e.Width, e.Height);
     _target.Dispose();
     _target = new MultisampleRenderTarget(e.Width, e.Height);
 }
Example #13
0
 protected override void OnResize(ResizeEventArgs e)
 {
     // When the window gets resized, we have to call GL.Viewport to resize OpenGL's viewport to match the new size.
     // If we don't, the NDC will no longer be correct.
     GL.Viewport(0, 0, Size.X, Size.Y);
     base.OnResize(e);
 }
Example #14
0
 private void MainWindowResize(ResizeEventArgs obj)
 {
     lock (_resizeWindowLock)
     {
         _openGLSceneProcessor.ResizeRenderWindow(obj.Width, obj.Height);
     }
 }
Example #15
0
File: Game.cs Project: vjoensen/A6k
 protected override void OnResize(ResizeEventArgs e)
 {
     GL.Viewport(0, 0, e.Width, e.Height);
     view.viewSize.X = e.Width;
     view.viewSize.Y = e.Height;
     base.OnResize(e);
 }
Example #16
0
 protected virtual void OnResize(ResizeEventArgs e)
 {
     if (Resize != null)
     {
         Resize(this, e);
     }
 }
Example #17
0
 private void onResize(object sender, ResizeEventArgs e)
 {
     foreach (Panel panel in panels)
     {
         panel.onScreenResize(sender, e);
     }
 }
Example #18
0
 protected override void OnResize(ResizeEventArgs e)
 {
     base.OnResize(e);
     GL.Viewport(0, 0, ClientSize.X, ClientSize.Y);
     scene.Update(ClientSize.X, ClientSize.Y);
     imGuiController.WindowResized(ClientSize.X, ClientSize.Y);
 }
Example #19
0
        /// <summary>
        /// OnResize override to reposition the control properly.
        /// </summary>
        /// <param name="e"></param>
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);

            // Adjust the controls..
            this.CalculateScrolling();
            this.PositionControls();
        }
        protected virtual void OnWindowResize(ResizeEventArgs args)
        {
            // int deltaW = size.Width - m_ClientRect.Width;
            int deltaH = args.NewSize.Height - m_ClientRect.Height;

            m_ClientRect.Width  = args.NewSize.Width;
            m_ClientRect.Height = args.NewSize.Height;
        }
Example #21
0
 protected override void OnResize(ResizeEventArgs e)
 {
     ScreenSize = new vec2(e.Width, e.Height);
     GL.Viewport(0, 0, e.Width, e.Height);
     //camera.OnResize(e.Width, e.Height);
     camera.OnResize(1, 1);
     base.OnResize(e);
 }
Example #22
0
 // This is called when the window is resized.  I also set the camera's aspect
 // here, too.
 protected override void OnResize(ResizeEventArgs e)
 {
     GL.Viewport(0, 0, Width, Height);
     if (view != null)                                                     // it will be null on the first call -- JC
     {
         view.pviewpointcritter().setAspect((float)Width / (float)Height); // width/height ratio
     }
 }
        protected override void OnResize(ResizeEventArgs e)
        {
            GL.Viewport(0, 0, e.Width, e.Height);

            CameraManager.AspectRatio = ClientSize.X / (float)ClientSize.Y;

            base.OnResize(e);
        }
Example #24
0
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);

            AppScreen.Resolution = new Entygine.Mathematics.Vec2i(Size.X, Size.Y);

            Ogl.Viewport(0, 0, Size.X, Size.Y);
        }
Example #25
0
        // Is called when the window was resized
        public override void Resize(ResizeEventArgs e)
        {
            _aspectRatio = Width / (float)Height;

            _resizeScaleFactor = new float2((100 / _initWidth * Width) / 100, (100 / _initHeight * Height) / 100);

            _canvasHeight = UIHelper.CanvasHeightInit * _resizeScaleFactor.y;
            _canvasWidth  = UIHelper.CanvasWidthInit * _resizeScaleFactor.x;
        }
Example #26
0
        /// <summary>
        /// Handle window resize
        /// </summary>
        protected override void OnResize(ResizeEventArgs e)
        {
            var newSize = new Size(this.Size.X, this.Size.Y);

            GL.Viewport(0, 0, newSize.Width, newSize.Height);
            this.Projection.Refresh(newSize);
            this.OnReshape(newSize);
            base.OnResize(e);
        }
Example #27
0
        void RaiseResize(ResizeEventArgs e)
        {
            OnResize(e);

            if (Resize != null)
            {
                Resize(this, e);
            }
        }
Example #28
0
        protected override void OnResize(ResizeEventArgs e)
        {
            resizeNeeded    = true;
            (width, height) = (e.Width, e.Height);

            projectionMatrix.Value = Matrix4.CreatePerspectiveFieldOfView(
                MathF.PI / 4, (float)e.Width / e.Height, .1f, 100f);
            pixelSizeUniform.Value = new Vector2(1f / e.Width, 1f / e.Height);
        }
Example #29
0
 private void Resize(object sender, ResizeEventArgs args)
 {
     _done = false;
     foreach (Menu menu in Common.Screens.Where(x => x is Menu && (x as Menu).Id == "MainMenu"))
     {
         menu.X = ((Width - 120) / 2) + 3;
         menu.Y = Height - 55;
     }
 }
Example #30
0
        protected override void OnResize(ResizeEventArgs e)
        {
            _engine.Resize(e.Width, e.Height);
            _fontRenderer.UpdateProjection(e.Width, e.Height);



            base.OnResize(e);
        }
Example #31
0
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);

            if (clientArea != null)
            {
                clientArea.Left = ClientLeft;
                clientArea.Top = ClientTop;
                clientArea.Width = ClientWidth;
                clientArea.Height = ClientHeight;
            }
        }
Example #32
0
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);

            if (btnDown != null)
            {
                btnDown.Width = 16;
                btnDown.Height = Height - Skin.Layers[0].ContentMargins.Vertical;
                btnDown.Top = Skin.Layers[0].ContentMargins.Top;
                btnDown.Left = Width - btnDown.Width - 2;
            }
        }
Example #33
0
 protected override void OnResize(ResizeEventArgs e)
 {
     SetMovableArea();
     base.OnResize(e);
 }
 public void OnResize(ResizeEventArgs e)
 {
     mode.Width = e.Width;
     mode.Height = e.Height;
     if (this.Resize != null)
         this.Resize(this, e);
 }
Example #35
0
 protected virtual void OnDeviceResize(object sender,ResizeEventArgs e)
 {
     Camera.Reset();
     Scene.Tree.Reset();
     Hud.BeginDesign();
     Hud.Size = e.NewSize;
     Hud.EndDesign();
 }
        protected override void OnResized(ResizeEventArgs resizeEventArgs)
        {
            base.OnResized(resizeEventArgs);

            this.hScrollbar.Position = new Vector2(0, this.Height - ScrollBar.DEFAULT_SCROLLBAR_SIZE);
            this.hScrollbar.Size = new Vector2(this.Width - ScrollBar.DEFAULT_SCROLLBAR_SIZE, ScrollBar.DEFAULT_SCROLLBAR_SIZE);

            this.vScrollbar.Position = new Vector2(this.Width - ScrollBar.DEFAULT_SCROLLBAR_SIZE, 0);
            this.vScrollbar.Size = new Vector2(ScrollBar.DEFAULT_SCROLLBAR_SIZE, this.Height - ScrollBar.DEFAULT_SCROLLBAR_SIZE);

            this.FixScrollbarMinMax();
        }
Example #37
0
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);
            CalcScrolling();

            // Crappy fix to certain scrolling issue
            //if (sbVert != null) sbVert.Value -= 1;
            //if (sbHorz != null) sbHorz.Value -= 1;
        }
Example #38
0
 private void Bars_Resize(object sender, ResizeEventArgs e)
 {
     AdjustMargins();
 }
Example #39
0
		void webView_ResizeComplete(object sender, ResizeEventArgs e)
		{

		}
Example #40
0
 protected override void OnResize(ResizeEventArgs e)
 {
     base.OnResize(e);
     ItemsChanged();
 }
Example #41
0
 protected override void OnResize(ResizeEventArgs e)
 {
     CalcLayout();
     base.OnResize(e);
 }
Example #42
0
 protected override void OnResize(ResizeEventArgs e)
 {
     base.OnResize(e);
     selection.Clear();
     SetupBars();
 }
Example #43
0
 protected override void OnResize(ResizeEventArgs e)
 {
     base.OnResize(e);
 }
 private void OnResize(ResizeEventArgs e)
 {
     mode.Width = e.Width;
     mode.Height = e.Height;
     if (this.Resize != null)
     {
         this.Resize(this, e);
     }
 }