private static void OnWindowResized(object sender, WindowResizedEventArgs e)
        {
            Vector2 topLeft = Utility.getTopLeftPositionForCenteringOnScreen(1200, 720);

            ButtonArea       = new Rectangle((int)topLeft.X, (int)topLeft.Y + 180, 144, 104);
            RSVButton.bounds = ButtonArea;
        }
 private void Display_WindowResized(object sender, WindowResizedEventArgs e)
 {
     if (Game1.activeClickableMenu != null && Game1.activeClickableMenu is ItemBagMenu IBM)
     {
         IBM.OnWindowSizeChanged();
     }
 }
Beispiel #3
0
        protected void PublishResizedEvent(WindowResizedEventArgs args)
        {
            // Temporary copy in case of unsubscription during null check.
            EventHandler <WindowResizedEventArgs> e = Resized;

            e?.Invoke(this, args);
        }
Beispiel #4
0
 static void Display_WindowResized(object sender, WindowResizedEventArgs e)
 {
     if (Game1.activeClickableMenu is CarpenterMenu carpenterMenu)
     {
         SetupButtons(carpenterMenu);
     }
 }
Beispiel #5
0
 private void ClydeOnOnWindowResized(WindowResizedEventArgs obj)
 {
     // TODO: Can rework this once https://github.com/space-wizards/RobustToolbox/issues/1392 is done,
     // this is here because there isn't currently a good way to allow the grid to adjust its height based
     // on constraints, otherwise we would use anchors to lay it out
     Grid.MaxHeight = CalcMaxHeight(obj.NewSize);;
 }
Beispiel #6
0
        /// <summary>
        /// Adjust the bar height when resized.
        /// </summary>
        private void OnWindowResized(object sender, WindowResizedEventArgs e)
        {
            if (_barsMovingIn || _barsMovingOut)
            {
                return;
            }

            _barHeight = GetMaxBarHeight(_graphicsDevice);
        }
Beispiel #7
0
        private static void OnWindowResized(object sender, WindowResizedEventArgs e)
        {
            if (!(Game1.activeClickableMenu is CustomItemGrabMenu customItemGrabMenu))
            {
                return;
            }
            var oldBounds = new Rectangle(0, 0, e.OldSize.X, e.OldSize.Y);
            var newBounds = new Rectangle(0, 0, e.NewSize.X, e.NewSize.Y);

            customItemGrabMenu.gameWindowSizeChanged(oldBounds, newBounds);
        }
Beispiel #8
0
        private void Display_WindowResized(object sender, WindowResizedEventArgs e)
        {
            if (!Context.IsWorldReady)
            {
                return;
            }

            UpdateMarkers(true);
            UpdateFarmBuildingLocs();
            Minimap?.CheckOffsetForMap();
        }
Beispiel #9
0
        /// <summary>Raised after the game window is resized.</summary>
        /// <param name="sender">The event sender.</param>
        /// <param name="e">The event data.</param>
        private void OnWindowResized(object sender, WindowResizedEventArgs e)
        {
            Rectangle newViewport = Game1.viewport;

            if (this.LastViewport.Width != newViewport.Width || this.LastViewport.Height != newViewport.Height)
            {
                newViewport = new Rectangle(newViewport.X, newViewport.Y, newViewport.Width, newViewport.Height);

                UpdatePingsPosition = true;

                this.LastViewport = newViewport;
            }
        }
 private static void WindowResized(object sender, WindowResizedEventArgs e)
 {
     UpdatePosition();
 }
 private void WindowResized(object sender, WindowResizedEventArgs e)
 {
 }
Beispiel #12
0
 public void OnWindowResized(object semder, WindowResizedEventArgs args)
 {
     UpdateDispSizes();
 }
Beispiel #13
0
 /// <summary>Raised after the game window is resized.</summary>
 /// <param name="sender">The event sender.</param>
 /// <param name="e">The event arguments.</param>
 private void OnWindowResized(object sender, WindowResizedEventArgs e)
 {
     this.updateButton.bounds.Y = Game1.viewport.Height - 150 - 48;
 }
Beispiel #14
0
 /// <summary>Raised after the game window is resized.</summary>
 /// <param name="sender">The event sender.</param>
 /// <param name="e">The event arguments.</param>
 private void OnWindowResized(object sender, WindowResizedEventArgs e)
 {
     this.currentMenu?.Resize();
 }
 private void ClydeOnOnWindowResized(WindowResizedEventArgs obj)
 {
     ClampAfterDelay();
 }
 /// <summary>Raised after the game window is resized.</summary>
 /// <param name="sender">The event sender.</param>
 /// <param name="e">The event data.</param>
 private void OnWindowResized(object sender, WindowResizedEventArgs e)
 {
     // set flags to notify handler to resize next tick as the menu isn't always recreated
     this.WasResizeEvent = true;
     this.TickResizedOn  = this.CurrentUpdateTick;
 }
Beispiel #17
0
 public override void OnWindowResize(WindowResizedEventArgs args)
 {
     browser.SetSize((int)args.Width / 2, (int)args.Height / 2);
 }
Beispiel #18
0
 private void onWindowResized(object sender, WindowResizedEventArgs e)
 {
     configButton.LocalPosition = new Vector2(configButton.Position.X, Game1.viewport.Height - 100);
 }
 /// <summary>Raised after the game window is resized.</summary>
 /// <param name="sender">The event sender.</param>
 /// <param name="e">The event arguments.</param>
 protected virtual void OnWindowResized(object sender, WindowResizedEventArgs e)
 {
 }