Update content vectors to numerics (#17759)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Numerics;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Numerics;
|
||||
using System.Threading;
|
||||
using Content.Client.CombatMode;
|
||||
using Content.Client.Gameplay;
|
||||
@@ -171,8 +172,8 @@ namespace Content.Client.ContextMenu.UI
|
||||
// open pop-up adjacent to the parent element. We want the sub-menu elements to align with this element
|
||||
// which depends on the panel container style margins.
|
||||
var altPos = element.GlobalPosition;
|
||||
var pos = altPos + (element.Width + 2 * ContextMenuElement.ElementMargin, -2 * ContextMenuElement.ElementMargin);
|
||||
element.SubMenu.Open(UIBox2.FromDimensions(pos, (1, 1)), altPos);
|
||||
var pos = altPos + new Vector2(element.Width + 2 * ContextMenuElement.ElementMargin, -2 * ContextMenuElement.ElementMargin);
|
||||
element.SubMenu.Open(UIBox2.FromDimensions(pos, new Vector2(1, 1)), altPos);
|
||||
|
||||
// draw on top of other menus
|
||||
element.SubMenu.SetPositionLast();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Client.CombatMode;
|
||||
using Content.Client.Examine;
|
||||
using Content.Client.Gameplay;
|
||||
@@ -94,7 +95,7 @@ namespace Content.Client.ContextMenu.UI
|
||||
Elements.Clear();
|
||||
AddToUI(orderedStates);
|
||||
|
||||
var box = UIBox2.FromDimensions(_userInterfaceManager.MousePositionScaled.Position, (1, 1));
|
||||
var box = UIBox2.FromDimensions(_userInterfaceManager.MousePositionScaled.Position, new Vector2(1, 1));
|
||||
_context.RootMenu.Open(box);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user