Esempio n. 1
0
        public void OnResize(EventArgs e, Size ClientSize)
        {
            GL.Viewport(0, 0, ClientSize.Width, ClientSize.Height);

            c.OnResize(ClientSize);

            if (InventoryBox != null)
                InventoryBox.Unload();
            InventoryBox = new ColorBox(new Vector2(0, 0), new Vector2(ClientSize.Width, 32), new Color4(96, 96, 96, 128));

            float a = 1.0f;

            if (fadeBox != null)
            {
                a = fadeBox.Color.A;
                fadeBox.Unload();
            }
            fadeBox = new ColorBox(new Vector2(0, 0), new Vector2(ClientSize.Width, ClientSize.Height), new Color4(0, 0, 0, a));
        }
Esempio n. 2
0
        protected override void OnResize(EventArgs e)
        {
            base.OnResize(e);

            curState.OnResize(e, ClientSize);

            if(paper != null)
                paper.Unload();

            float paperHeight = ClientSize.Height - 64;
            float paperWidth = 8.5f * paperHeight / 11.0f;

            paper = new ColorBox(new Vector2(ClientSize.Width / 2 - paperWidth / 2, ClientSize.Height / 2 - paperHeight / 2), new Vector2(paperWidth, paperHeight), Color4.White);
            ink = new QFont("Resources/Fonts/Cousine-Regular-Latin.ttf", ClientSize.Height / 36);
            ink.Options.Colour = Color.Black;
        }