CatStation/Content.Client/UserInterface/Systems/Inventory/Controls/ItemStatusPanel.xaml
Samuka 3672a6ed62
Custom icon ammo counter (#44368)
* CustomBulletRenderer

* CustomIconStatusControl

* custom ammo counter system

* custom sprite ammo counter comp

* client custom ammo counter system

* need to register the component

* have tiles show in the ammo counter for the tile gun

* comment

* more sprites

* dont try to make 2 controls

* update mini tile sprite

* add horizontal mult

* remove horizontal mult and fix the math

* ensure there is no errors

* replace magical number

* simpler to understand

* remove unecessary stuff

* remove HasComp<CustomSpriteAmmoCounterComponent

* forgot those

* add important stuff back

* explanation

* damn, so simple

* make it better

* use item instead of icon

* remove useless comment

* set number of rows

* fix odd number

* component to hide the name

* update ammo capacity

* set the aligment to vertical

* add 2 px of margin

* move the margin up (that fixes things somehow)

* comment good
2026-07-02 20:31:20 +00:00

29 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="2 6 2 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>