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;
}

View File

@@ -1,3 +1,4 @@
using System.Numerics;
using Content.Client.Actions.UI;
using Content.Client.Cooldown;
using Content.Client.Stylesheets;
@@ -65,7 +66,7 @@ public sealed class ActionButton : Control
HighlightRect = new PanelContainer
{
StyleClasses = {StyleNano.StyleClassHandSlotHighlight},
MinSize = (32, 32),
MinSize = new Vector2(32, 32),
Visible = false
};
_bigActionIcon = new TextureRect
@@ -94,8 +95,8 @@ public sealed class ActionButton : Control
Name = "Big Sprite",
HorizontalExpand = true,
VerticalExpand = true,
Scale = (2, 2),
SetSize = (64, 64),
Scale = new Vector2(2, 2),
SetSize = new Vector2(64, 64),
Visible = false,
OverrideDirection = Direction.South,
};
@@ -113,11 +114,11 @@ public sealed class ActionButton : Control
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true,
VerticalExpand = true,
MinSize = (64, 64)
MinSize = new Vector2(64, 64)
};
paddingBoxItemIcon.AddChild(new Control()
{
MinSize = (32, 32),
MinSize = new Vector2(32, 32),
});
paddingBoxItemIcon.AddChild(new Control
{