Files
tbd-station-14/Content.Client/UserInterface/Systems/Inventory/Controls/ItemStatusPanel.xaml
Pieter-Jan Briers 7b90c08a2c Various item status fixes/tweaks (#27267)
* Always display item status panel fully

Initial feedback from the UI changes seems to be that a lot of people go "why is there empty space" so let's fix that.

* Fix item status middle hand being on the wrong side

I think I switched this around when fixing the left/right being inverted in the UI code.

* Minor status panel UI tweaks

Bottom-align contents now that the panel itself doesn't dynamically expand, prevent weird gaps.

Clip contents for panel

* Fix clipping on implanters and network configurators.

Made them take less space. For implanters the name has to be cut off, which I did by adding a new ClipControl to achieve that in rich text.

* Update visibility of item status panels based on whether you have hands at all.

This avoids UI for borgs looking silly.

Added a new "HandUILocation" enum that doesn't have middle hands to avoid confusion in UI code.

* Use BulletRender for laser guns too.

Provides all the benefits like fixing layout overflow and allowing multi-line stuff. Looks great now.

This involved generalizing BulletRender a bit so it can be used for not-just-bullets.

* Fix geiger word wrapping if you're really fucked
2024-04-25 00:01:31 +10:00

30 lines
1.4 KiB
XML

<controls:ItemStatusPanel
xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Systems.Inventory.Controls"
xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
VerticalAlignment="Bottom"
HorizontalAlignment="Center">
<PanelContainer Name="Panel">
<PanelContainer.PanelOverride>
<graphics:StyleBoxTexture
PatchMarginBottom="4"
PatchMarginTop="6"
TextureScale="2 2"
Mode="Tile"/>
</PanelContainer.PanelOverride>
</PanelContainer>
<PanelContainer Name="HighlightPanel">
<PanelContainer.PanelOverride>
<graphics:StyleBoxTexture PatchMarginBottom="4" PatchMarginTop="6" TextureScale="2 2">
</graphics:StyleBoxTexture>
</PanelContainer.PanelOverride>
</PanelContainer>
<BoxContainer Name="Contents" Orientation="Vertical" Margin="0 6 0 4" RectClipContent="True">
<BoxContainer Name="StatusContents" Orientation="Vertical" VerticalExpand="True" VerticalAlignment="Bottom" />
<Control>
<Label Name="NoItemLabel" ClipText="True" StyleClasses="ItemStatusNotHeld" Align="Left" Text="{Loc 'item-status-not-held'}" />
<Label Name="ItemNameLabel" ClipText="True" StyleClasses="ItemStatus" Align="Left" Visible="False" />
</Control>
</BoxContainer>
</controls:ItemStatusPanel>