Files
Delta-v/Content.Client/_DV/CartridgeLoader/Cartridges/NanoChatMessageBubble.xaml
T
2025-12-11 02:48:22 +01:00

60 lines
2.3 KiB
XML

<cartridges:NanoChatMessageBubble
xmlns="https://spacestation14.io"
xmlns:nanochatui="clr-namespace:Content.Client._DV.NanoChat.UI"
xmlns:cartridges="clr-namespace:Content.Client._DV.CartridgeLoader.Cartridges"
xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
HorizontalExpand="True">
<BoxContainer Name="MessageContainer"
Orientation="Horizontal"
HorizontalExpand="True">
<!-- Left spacer for other's messages -->
<Control MinSize="12 0" Name="LeftSpacer" />
<!-- Message panel -->
<BoxContainer Name="MessageBox"
Orientation="Vertical"
MaxWidth="320"
HorizontalExpand="True">
<!-- Sender name -->
<Label HorizontalAlignment="Left"
Margin="10,0,10,2"
Name="SenderNameLabel"
StyleClasses="LabelSmall"
Visible="False" />
<PanelContainer Name="MessagePanel"
MaxWidth="320"
HorizontalExpand="True">
<PanelContainer.PanelOverride>
<graphics:StyleBoxFlat BorderThickness="1">
<!-- Colors set in code based on message sender -->
</graphics:StyleBoxFlat>
</PanelContainer.PanelOverride>
<RichTextLabel Name="MessageText"
HorizontalExpand="True"
Margin="10,6,10,6" />
</PanelContainer>
<!-- Delivery failed text -->
<Label Name="DeliveryFailedLabel"
Text="{Loc nano-chat-delivery-failed}"
StyleClasses="LabelSmall"
HorizontalExpand="True"
HorizontalAlignment="Right"
Margin="10 2 10 0"
Visible="False" />
</BoxContainer>
<!-- Right spacer for own messages -->
<Control Name="RightSpacer"
MinSize="12 0" />
<!-- Flexible space for alignment -->
<Control Name="FlexSpace"
HorizontalExpand="True" />
</BoxContainer>
</cartridges:NanoChatMessageBubble>