Set SpriteView sizes in various controls. (#15935)
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
<BoxContainer Orientation="Horizontal" Margin="0 0 0 2">
|
<BoxContainer Orientation="Horizontal" Margin="0 0 0 2">
|
||||||
<!-- Left column (view of entity) -->
|
<!-- Left column (view of entity) -->
|
||||||
<PanelContainer Margin="2 0 6 0" StyleClasses="Inset" VerticalAlignment="Center" VerticalExpand="True">
|
<PanelContainer Margin="2 0 6 0" StyleClasses="Inset" VerticalAlignment="Center" VerticalExpand="True">
|
||||||
<SpriteView Name="EntityView" OverrideDirection="South" Scale="2 2" />
|
<SpriteView Name="EntityView" OverrideDirection="South" Scale="2 2" SetSize="64 64"/>
|
||||||
</PanelContainer>
|
</PanelContainer>
|
||||||
<!-- Center column (pressure, temperature, alarm state) -->
|
<!-- Center column (pressure, temperature, alarm state) -->
|
||||||
<BoxContainer Orientation="Horizontal" HorizontalExpand="True" Margin="0 0 6 0">
|
<BoxContainer Orientation="Horizontal" HorizontalExpand="True" Margin="0 0 6 0">
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ namespace Content.Client.Examine
|
|||||||
hBox.AddChild(new SpriteView
|
hBox.AddChild(new SpriteView
|
||||||
{
|
{
|
||||||
Sprite = sprite, OverrideDirection = Direction.South,
|
Sprite = sprite, OverrideDirection = Direction.South,
|
||||||
|
SetSize = (32, 32),
|
||||||
Margin = new Thickness(2, 0, 2, 0),
|
Margin = new Thickness(2, 0, 2, 0),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ namespace Content.Client.RoundEnd
|
|||||||
Sprite = sprite,
|
Sprite = sprite,
|
||||||
OverrideDirection = Direction.South,
|
OverrideDirection = Direction.South,
|
||||||
VerticalAlignment = VAlignment.Center,
|
VerticalAlignment = VAlignment.Center,
|
||||||
|
SetSize = (32, 32),
|
||||||
VerticalExpand = true,
|
VerticalExpand = true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ namespace Content.Client.Storage.UI
|
|||||||
{
|
{
|
||||||
HorizontalAlignment = HAlignment.Left,
|
HorizontalAlignment = HAlignment.Left,
|
||||||
VerticalAlignment = VAlignment.Center,
|
VerticalAlignment = VAlignment.Center,
|
||||||
MinSize = new Vector2(32.0f, 32.0f),
|
SetSize = new Vector2(32.0f, 32.0f),
|
||||||
OverrideDirection = Direction.South,
|
OverrideDirection = Direction.South,
|
||||||
Sprite = sprite
|
Sprite = sprite
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -132,12 +132,14 @@ namespace Content.Client.UserInterface.Controls
|
|||||||
AddChild(SpriteView = new SpriteView
|
AddChild(SpriteView = new SpriteView
|
||||||
{
|
{
|
||||||
Scale = (2, 2),
|
Scale = (2, 2),
|
||||||
|
SetSize = (DefaultButtonSize, DefaultButtonSize),
|
||||||
OverrideDirection = Direction.South
|
OverrideDirection = Direction.South
|
||||||
});
|
});
|
||||||
|
|
||||||
AddChild(HoverSpriteView = new SpriteView
|
AddChild(HoverSpriteView = new SpriteView
|
||||||
{
|
{
|
||||||
Scale = (2, 2),
|
Scale = (2, 2),
|
||||||
|
SetSize = (DefaultButtonSize, DefaultButtonSize),
|
||||||
OverrideDirection = Direction.South
|
OverrideDirection = Direction.South
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ public sealed class ActionButton : Control
|
|||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
VerticalExpand = true,
|
VerticalExpand = true,
|
||||||
Scale = (2, 2),
|
Scale = (2, 2),
|
||||||
|
SetSize = (64, 64),
|
||||||
Visible = false,
|
Visible = false,
|
||||||
OverrideDirection = Direction.South,
|
OverrideDirection = Direction.South,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<ScrollContainer>
|
<ScrollContainer>
|
||||||
<BoxContainer Orientation="Vertical">
|
<BoxContainer Orientation="Vertical">
|
||||||
<BoxContainer Orientation="Horizontal">
|
<BoxContainer Orientation="Horizontal">
|
||||||
<SpriteView OverrideDirection="South" Scale="2 2" Name="SpriteView" Access="Public"/>
|
<SpriteView OverrideDirection="South" Scale="2 2" Name="SpriteView" Access="Public" SetSize="64 64"/>
|
||||||
<BoxContainer Orientation="Vertical" VerticalAlignment="Top">
|
<BoxContainer Orientation="Vertical" VerticalAlignment="Top">
|
||||||
<Label Name="NameLabel" Access="Public"/>
|
<Label Name="NameLabel" Access="Public"/>
|
||||||
<Label Name="SubText" VerticalAlignment="Top" StyleClasses="LabelSubText" Access="Public"/>
|
<Label Name="SubText" VerticalAlignment="Top" StyleClasses="LabelSubText" Access="Public"/>
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ namespace Content.Client.Verbs.UI
|
|||||||
var spriteView = new SpriteView()
|
var spriteView = new SpriteView()
|
||||||
{
|
{
|
||||||
OverrideDirection = Direction.South,
|
OverrideDirection = Direction.South,
|
||||||
|
SetSize = (ElementHeight, ElementHeight),
|
||||||
Sprite = entManager.GetComponentOrNull<SpriteComponent>(verb.IconEntity.Value)
|
Sprite = entManager.GetComponentOrNull<SpriteComponent>(verb.IconEntity.Value)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user