Change ChemMaster 4000 UI to use XAML UI (#5025)

This commit is contained in:
Ygg01
2021-10-27 08:22:02 +01:00
committed by GitHub
parent 0862e5ae5a
commit 03b1fed47d
6 changed files with 335 additions and 441 deletions

View File

@@ -0,0 +1,111 @@
<SS14Window xmlns="https://spacestation14.io"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
MinSize="400 525"
Title="{Loc 'chem-master-bound-user-interface-title'}">
<BoxContainer Name="Contents"
Access="Internal"
Orientation="Vertical"
Margin="5 5 5 5"
SeparationOverride="10">
<!-- Container -->
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'chem-master-window-container-label'}"></Label>
<Control HorizontalExpand="True"></Control>
<Button Name="EjectButton"
Access="Internal"
Text="{Loc 'chem-master-window-eject-button'}" />
</BoxContainer>
<PanelContainer VerticalExpand="True" SizeFlagsStretchRatio="6" MinSize="0 200">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
</PanelContainer.PanelOverride>
<!-- Initially empty, when server sends state data this will have container contents and fill volume.-->
<BoxContainer Name="ContainerInfo"
Access="Internal"
Orientation="Vertical"
HorizontalExpand="True">
<Label Text="{Loc 'chem-master-window-no-container-loaded-text'}" />
</BoxContainer>
</PanelContainer>
<!-- Padding -->
<Control MinSize="0 10" />
<!-- Buffer -->
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'chem-master-window-buffer-text'}"></Label>
<Control HorizontalExpand="True" />
<Button Name="BufferTransferButton"
Access="Internal"
Text="{Loc 'chem-master-window-transfer-button'}" ToggleMode="True"
StyleClasses="OpenRight" />
<Button Name="BufferDiscardButton"
Access="Internal"
Text="{Loc 'chem-master-window-discard-button'}" ToggleMode="True"
StyleClasses="OpenLeft" />
</BoxContainer>
<!-- Buffer info -->
<PanelContainer VerticalExpand="True" SizeFlagsStretchRatio="6" MinSize="0 100">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
</PanelContainer.PanelOverride>
<!-- Buffer reagent list -->
<BoxContainer Name="BufferInfo"
Access="Internal"
Orientation="Vertical"
HorizontalExpand="True">
<Label Text="{Loc 'chem-master-window-buffer-empty-text'}" />
</BoxContainer>
</PanelContainer>
<!-- Padding -->
<Control MinSize="0 10" />
<PanelContainer VerticalExpand="True" MinSize="100 100">
<!-- Packaging -->
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'chem-master-window-packaging-text'}" />
</BoxContainer>
<!-- Wrap the packaging info-->
<PanelContainer VerticalExpand="True" SizeFlagsStretchRatio="6" MinSize="0 100">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
</PanelContainer.PanelOverride>
<!-- Packaging options -->
<BoxContainer Orientation="Vertical"
HorizontalExpand="True">
<!-- Packaging Info -->
<BoxContainer Name="PackagingInfo"
Access="Internal"
Orientation="Vertical"
HorizontalExpand="True">
<BoxContainer Name="PillInfo"
Access="Internal"
Orientation="Horizontal">
<Label Text="{Loc 'chem-master-window-pills-label'}"></Label>
<Control HorizontalExpand="True"
MinSize="50 0">
</Control>
<SpinBox Name="PillAmount" Access="Internal" Value="1" />
<Button Name="CreatePillButton"
Access="Internal"
Text="{Loc 'chem-master-window-create-pill-button'}" />
<Label Text="{Loc 'chem-master-window-max-pills-volume-text'}"
StyleClasses="LabelSecondaryColor" />
</BoxContainer>
<BoxContainer Name="BottleInfo"
Access="Internal"
Orientation="Horizontal">
<Label Text="{Loc 'chem-master-window-bottles-label'}" />
<Control HorizontalExpand="True"
MinSize="50 0" />
<SpinBox Name="BottleAmount" Access="Internal" Value="1" />
<Button Name="CreateBottleButton"
Access="Internal"
Text="{Loc 'chem-master-window-create-bottle-button'}" />
<Label Text="{Loc 'chem-master-window-max-bottles-volume-text'}"
StyleClasses="LabelSecondaryColor" />
</BoxContainer>
</BoxContainer>
</BoxContainer>
</PanelContainer>
</PanelContainer>
</BoxContainer>
</SS14Window>