Ashen hud item status slot fix (#31411)
* new patchMargin variable added, horizontals fixed * All sides now work, system is fully integarated --------- Co-authored-by: Zachary Yona <magicalusf@gmail.com>
This commit is contained in:
@@ -38,6 +38,7 @@ public sealed partial class ItemStatusPanel : Control
|
||||
StyleBox.Margin cutOut;
|
||||
StyleBox.Margin flat;
|
||||
Thickness contentMargin;
|
||||
Thickness patchMargin;
|
||||
|
||||
switch (location)
|
||||
{
|
||||
@@ -61,15 +62,23 @@ public sealed partial class ItemStatusPanel : Control
|
||||
|
||||
Contents.Margin = contentMargin;
|
||||
|
||||
//Important to note for patchMargin!
|
||||
//Because of hand ui flipping, left and right instead correspond to outside and inside respectively.
|
||||
patchMargin = MarginFromThemeColor("_itemstatus_patch_margin");
|
||||
|
||||
var panel = (StyleBoxTexture) Panel.PanelOverride!;
|
||||
panel.Texture = texture;
|
||||
panel.SetPatchMargin(flat, 4);
|
||||
panel.SetPatchMargin(cutOut, 7);
|
||||
panel.SetPatchMargin(cutOut, patchMargin.Left);
|
||||
panel.SetPatchMargin(flat, patchMargin.Right);
|
||||
panel.SetPatchMargin(StyleBox.Margin.Top, patchMargin.Top);
|
||||
panel.SetPatchMargin(StyleBox.Margin.Bottom, patchMargin.Bottom);
|
||||
|
||||
var panelHighlight = (StyleBoxTexture) HighlightPanel.PanelOverride!;
|
||||
panelHighlight.Texture = textureHighlight;
|
||||
panelHighlight.SetPatchMargin(flat, 4);
|
||||
panelHighlight.SetPatchMargin(cutOut, 7);
|
||||
panelHighlight.SetPatchMargin(cutOut, patchMargin.Left);
|
||||
panelHighlight.SetPatchMargin(flat, patchMargin.Right);
|
||||
panelHighlight.SetPatchMargin(StyleBox.Margin.Top, patchMargin.Top);
|
||||
panelHighlight.SetPatchMargin(StyleBox.Margin.Bottom, patchMargin.Bottom);
|
||||
|
||||
_side = location;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
disabledFore: "#5A5A5A"
|
||||
_itemstatus_content_margin_right: "#06060404"
|
||||
_itemstatus_content_margin_left: "#04060604"
|
||||
_itemstatus_patch_margin: "#07060404"
|
||||
- type: uiTheme
|
||||
id: SS14PlasmafireTheme
|
||||
path: /Textures/Interface/Plasmafire/
|
||||
@@ -30,6 +31,7 @@
|
||||
disabledFore: "#FFF5EE"
|
||||
_itemstatus_content_margin_right: "#06060404"
|
||||
_itemstatus_content_margin_left: "#04060604"
|
||||
_itemstatus_patch_margin: "#07060404"
|
||||
- type: uiTheme
|
||||
id: SS14SlimecoreTheme
|
||||
path: /Textures/Interface/Slimecore/
|
||||
@@ -46,6 +48,7 @@
|
||||
disabledFore: "#FFF5EE"
|
||||
_itemstatus_content_margin_right: "#06060404"
|
||||
_itemstatus_content_margin_left: "#04060604"
|
||||
_itemstatus_patch_margin: "#07060404"
|
||||
- type: uiTheme
|
||||
id: SS14ClockworkTheme
|
||||
path: /Textures/Interface/Clockwork/
|
||||
@@ -62,6 +65,7 @@
|
||||
disabledFore: "#FFF5EE"
|
||||
_itemstatus_content_margin_right: "#06060404"
|
||||
_itemstatus_content_margin_left: "#04060604"
|
||||
_itemstatus_patch_margin: "#07060404"
|
||||
- type: uiTheme
|
||||
id: SS14RetroTheme
|
||||
path: /Textures/Interface/Retro/
|
||||
@@ -78,6 +82,7 @@
|
||||
disabledFore: "#FFF5EE"
|
||||
_itemstatus_content_margin_right: "#06060404"
|
||||
_itemstatus_content_margin_left: "#04060604"
|
||||
_itemstatus_patch_margin: "#07060404"
|
||||
- type: uiTheme
|
||||
id: SS14MinimalistTheme
|
||||
path: /Textures/Interface/Minimalist/
|
||||
@@ -94,6 +99,7 @@
|
||||
disabledFore: "#5A5A5A"
|
||||
_itemstatus_content_margin_right: "#06060604"
|
||||
_itemstatus_content_margin_left: "#06060604"
|
||||
_itemstatus_patch_margin: "#07060404"
|
||||
- type: uiTheme
|
||||
id: SS14AshenTheme
|
||||
path: /Textures/Interface/Ashen/
|
||||
@@ -110,3 +116,4 @@
|
||||
disabledFore: "#FFF5EE"
|
||||
_itemstatus_content_margin_right: "#06060604"
|
||||
_itemstatus_content_margin_left: "#06060604"
|
||||
_itemstatus_patch_margin: "#07060505"
|
||||
|
||||
Reference in New Issue
Block a user