Update content vectors to numerics (#17759)

This commit is contained in:
metalgearsloth
2023-07-08 14:08:32 +10:00
committed by GitHub
parent 15772478c9
commit 68480af109
383 changed files with 978 additions and 575 deletions

View File

@@ -1,4 +1,5 @@
using System.Linq;
using System.Numerics;
using System.Runtime.InteropServices;
using Content.Client.Actions;
using Content.Client.Construction;
@@ -71,10 +72,10 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
_menuDragHelper = new DragDropHelper<ActionButton>(OnMenuBeginDrag, OnMenuContinueDrag, OnMenuEndDrag);
_dragShadow = new TextureRect
{
MinSize = (64, 64),
MinSize = new Vector2(64, 64),
Stretch = StretchMode.Scale,
Visible = false,
SetSize = (64, 64),
SetSize = new Vector2(64, 64),
MouseFilter = MouseFilterMode.Ignore
};
@@ -738,13 +739,13 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
}
}
LayoutContainer.SetPosition(_dragShadow, UIManager.MousePositionScaled.Position - (32, 32));
LayoutContainer.SetPosition(_dragShadow, UIManager.MousePositionScaled.Position - new Vector2(32, 32));
return true;
}
private bool OnMenuContinueDrag(float frameTime)
{
LayoutContainer.SetPosition(_dragShadow, UIManager.MousePositionScaled.Position - (32, 32));
LayoutContainer.SetPosition(_dragShadow, UIManager.MousePositionScaled.Position - new Vector2(32, 32));
_dragShadow.Visible = true;
return true;
}