Size event parameters
Наследование: System.EventArgs
Пример #1
0
 public static void OnResized(object sender, SizeEventArgs e)
 {
     LocalWindow = (RenderWindow) sender;
     LocalWindow.Size = new Vector2u(e.Width, e.Height);
     // ReSharper disable PossibleLossOfFraction
     LocalWindow.SetView(new View(new Vector2f((e.Width)/2, (e.Height)/2), new Vector2f(e.Width, e.Height)));
     // ReSharper restore PossibleLossOfFraction
 }
Пример #2
0
        private void Window_Resized(object sender, SizeEventArgs e)
        {
            //resizes the view but would stretch/pixelate without
            //the adjustments below to rescale the background
            this._view.Size = new Vector2f(e.Width, e.Height);

            this.Game.Background.Position = this.Game.Window.MapPixelToCoords(new Vector2i(0, 0));
            this.Game.Background.Scale =
                new Vector2f((float)e.Width / (float)this.Game.Background.Texture.Size.X,
                             (float)e.Height / (float)this.Game.Background.Texture.Size.Y);
        }
Пример #3
0
 private void window_Resized(object sender, SizeEventArgs e)
 {
     View view = new View(new FloatRect(0, 0, window.Size.X, window.Size.Y));
     window.SetView(view);
 }
Пример #4
0
 /// <summary>
 /// Function called when the window is resized
 /// </summary>
 static void OnResized(object sender, SizeEventArgs e)
 {
     window.Size = new Vector2u(800u, 600u);
 }
Пример #5
0
 private void window_Resized(object sender, SizeEventArgs e)
 {
     window.SetView(new View(new FloatRect(0, 0, e.Width, e.Height)));
 }
Пример #6
0
 public virtual void GameWindow_Resized(object sender, SizeEventArgs e)
 {
     GameWindow.SetView(new View(new FloatRect(0f, 0f, e.Width, e.Height)));
 }
Пример #7
0
 /// <summary>
 /// Function called when the window is resized
 /// </summary>
 static void OnResized(object sender, SizeEventArgs e)
 {
     Gl.glViewport(0, 0, (int)e.Width, (int)e.Height);
 }
Пример #8
0
 /// <summary>
 /// Handles the Resized event of the <see cref="GameBase.RenderWindow"/>.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="SFML.Window.SizeEventArgs"/> instance containing the event data.</param>
 void rw_Resized(object sender, SizeEventArgs e)
 {
     if (Resized != null)
         Resized.Raise(this, e);
 }
Пример #9
0
 /// <summary>
 /// Function called when the window is resized
 /// </summary>
 static void OnResized(object sender, SizeEventArgs e)
 {
     m_Window.SetView(new View(new FloatRect(0f, 0f, e.Width, e.Height)));
     m_Canvas.SetSize((int)e.Width, (int)e.Height);
 }
Пример #10
0
        private void window_Resized(object sender, SizeEventArgs e)
        {
            Event evt = new Event();
            evt.Type = EventType.Resized;
            evt.Size.Height = e.Height;
            evt.Size.Width = e.Width;

            Events.Enqueue(evt);
        }
Пример #11
0
 /// <summary>
 /// Function called when the window is resized
 /// </summary>
 void OnResized(object sender, SizeEventArgs e)
 {
     GuiCanvas.SetSize((int)e.Width, (int)e.Height);
 }
Пример #12
0
 static void OnScreenResize(object sender, SizeEventArgs e)
 {
     VisibleMaxX = (int)RW.Size.X / Program.Data.TileSizeX;
        VisibleMaxY = (int)RW.Size.Y / Program.Data.TileSizeY;
 }
Пример #13
0
        private void _window_Resized(object sender, SizeEventArgs e)
        {
            //this.Window.SetView(new View(new FloatRect(0f, 0f, e.Width, e.Height)));

            //RenderManager.Instance.CurrentResolutionWidth = (int)Window.GetView().Size.X;
            //RenderManager.Instance.CurrentResolutionHeight = (int)Window.GetView().Size.Y;

            //PlayerManager.GetPlayer(PlayerManager.MyIndex).Camera.SetView(this.Window.GetView());
        }
Пример #14
0
 private static void Win_Resized(object sender, SFML.Window.SizeEventArgs e)
 {
     Window.SetView(new View(new FloatRect(0, 0, e.Width, e.Height)));//присваивает новый вид с измененным размером окна
 }
Пример #15
0
 private void window_Resized(object sender, SizeEventArgs e)
 {
 }
        //Handels Resized event
        public static void OnResized(object sender, SizeEventArgs e)
        {
            Logger.Log("Resized Window: " + e.ToString(), Logger.Symbols.Info);

            WIDTH = Convert.ToInt32(e.Width);
            HEIGHT = Convert.ToInt32(e.Height);
            GL.Viewport(0, 0, WIDTH, HEIGHT);
        }
Пример #17
0
 private static void winResized(object sender, SFML.Window.SizeEventArgs e)
 {
     Window.SetView(new View(new FloatRect(0, 0, e.Width, e.Height)));
 }
Пример #18
0
 private void window_Resized(object sender, SizeEventArgs e)
 {
     CurrentScene.HandleResize(new Vector2i((int)e.Width, (int)e.Height));
 }
Пример #19
0
 void render_Resized(object sender, SizeEventArgs e)
 {
     OnGLResize();
 }
Пример #20
0
 public virtual void OnResized(SizeEventArgs E)
 {
 }
Пример #21
0
 private void MainWindowResizeEnd(object sender, SizeEventArgs e)
 {
     var view = new SFML.Graphics.View(
         new SFML.System.Vector2f(e.Width / 2, e.Height / 2),
         new SFML.System.Vector2f(e.Width, e.Height)
         );
     CluwneLib.Screen.SetView(view);
     _stateManager.FormResize();
 }
Пример #22
0
 void window_Resized(object sender, SizeEventArgs e)
 {
     RenderWindow w = (RenderWindow)sender;
 }