Unstable 1.1.14.0
This commit is contained in:
@@ -142,11 +142,13 @@ namespace Barotrauma
|
||||
public readonly static GUIColor HealthBarColorHigh = new GUIColor("HealthBarColorHigh");
|
||||
public readonly static GUIColor HealthBarColorPoisoned = new GUIColor("HealthBarColorPoisoned");
|
||||
|
||||
private readonly static Point defaultItemFrameMargin = new Point(50, 56);
|
||||
|
||||
public static Point ItemFrameMargin
|
||||
{
|
||||
get
|
||||
{
|
||||
Point size = new Point(50, 56).Multiply(GUI.SlicedSpriteScale);
|
||||
Point size = defaultItemFrameMargin.Multiply(GUI.SlicedSpriteScale);
|
||||
|
||||
var style = GetComponentStyle("ItemUI");
|
||||
var sprite = style?.Sprites[GUIComponent.ComponentState.None].First();
|
||||
@@ -159,6 +161,16 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public static int ItemFrameTopBarHeight
|
||||
{
|
||||
get
|
||||
{
|
||||
var style = GetComponentStyle("ItemUI");
|
||||
var sprite = style?.Sprites[GUIComponent.ComponentState.None].First();
|
||||
return (int)Math.Min(sprite?.Slices[0].Height ?? 0, defaultItemFrameMargin.Y / 2 * GUI.SlicedSpriteScale);
|
||||
}
|
||||
}
|
||||
|
||||
public static Point ItemFrameOffset => new Point(0, 3).Multiply(GUI.SlicedSpriteScale);
|
||||
|
||||
public static GUIComponentStyle GetComponentStyle(string styleName)
|
||||
|
||||
Reference in New Issue
Block a user