Rework the ChemMaster's output handling (#11207)
* Fix doc comment on FitsInDispenserComponent It's clearly intended to be a doc comment, but wasn't. * Allow the ChemMaster to accept canisters and bottles * Give the ChemMaster an output container slot * Tweak ChemMaster UI layout * Make more ChemMaster UI tweaks * Update ChemMaster SpinBox max handling * Rework the ChemMaster * Apply suggestions from code review Co-authored-by: Flipp Syder <76629141+vulppine@users.noreply.github.com> * Implement PR feedback * Switch ChemMaster to a tabbed UI layout * Rename Amount to Dosage for clarity * Replace Amount with Dosage in messages * Clarify dose in UI Co-authored-by: Flipp Syder <76629141+vulppine@users.noreply.github.com>
This commit is contained in:
@@ -1,76 +1,106 @@
|
||||
<DefaultWindow 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"
|
||||
MinSize="620 670"
|
||||
Title="{Loc 'chem-master-bound-user-interface-title'}">
|
||||
<BoxContainer Orientation="Vertical"
|
||||
Margin="5 5 5 5"
|
||||
SeparationOverride="10">
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<Label Text="{Loc 'chem-master-window-container-label'}" />
|
||||
<Control HorizontalExpand="True" />
|
||||
<Button Name="EjectButton"
|
||||
Access="Public"
|
||||
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"
|
||||
Orientation="Vertical"
|
||||
HorizontalExpand="True">
|
||||
<Label Text="{Loc 'chem-master-window-no-container-loaded-text'}" />
|
||||
<TabContainer Name="Tabs" Margin="0 0 2 0">
|
||||
<BoxContainer Orientation="Vertical"
|
||||
HorizontalExpand="True"
|
||||
Margin="5 5 5 5"
|
||||
SeparationOverride="10">
|
||||
<!-- Input container info -->
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<Label Text="{Loc 'chem-master-window-container-label'}" />
|
||||
<Control HorizontalExpand="True" />
|
||||
<Button Name="InputEjectButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'chem-master-window-eject-button'}" />
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
<Control MinSize="0 10" />
|
||||
<!-- Buffer -->
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<Label Text="{Loc 'chem-master-window-buffer-text'}" />
|
||||
<Control HorizontalExpand="True" />
|
||||
<Button Name="BufferTransferButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'chem-master-window-transfer-button'}" ToggleMode="True"
|
||||
StyleClasses="OpenRight" />
|
||||
<Button Name="BufferDiscardButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'chem-master-window-discard-button'}" ToggleMode="True"
|
||||
StyleClasses="OpenLeft" />
|
||||
</BoxContainer>
|
||||
<!-- Buffer info -->
|
||||
<PanelContainer VerticalExpand="True" SizeFlagsStretchRatio="1" MinSize="0 150">
|
||||
<PanelContainer.PanelOverride>
|
||||
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
|
||||
</PanelContainer.PanelOverride>
|
||||
<!-- Buffer reagent list -->
|
||||
<BoxContainer Name="BufferInfo"
|
||||
Orientation="Vertical"
|
||||
HorizontalExpand="True">
|
||||
<Label Text="{Loc 'chem-master-window-buffer-empty-text'}" />
|
||||
<PanelContainer VerticalExpand="True" 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="InputContainerInfo"
|
||||
Orientation="Vertical"
|
||||
Margin="4 4 4 4"
|
||||
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'}" />
|
||||
<Control HorizontalExpand="True" />
|
||||
<Button Name="BufferTransferButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'chem-master-window-transfer-button'}" ToggleMode="True"
|
||||
StyleClasses="OpenRight" />
|
||||
<Button Name="BufferDiscardButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'chem-master-window-discard-button'}" ToggleMode="True"
|
||||
StyleClasses="OpenLeft" />
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
<!-- Padding -->
|
||||
<Control MinSize="0 10" />
|
||||
<PanelContainer VerticalExpand="True" MinSize="100 100">
|
||||
<!-- Buffer info -->
|
||||
<PanelContainer VerticalExpand="True" MinSize="0 200">
|
||||
<PanelContainer.PanelOverride>
|
||||
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
|
||||
</PanelContainer.PanelOverride>
|
||||
<!-- Buffer reagent list -->
|
||||
<BoxContainer Name="BufferInfo"
|
||||
Orientation="Vertical"
|
||||
Margin="4 4 4 4"
|
||||
HorizontalExpand="True">
|
||||
<Label Text="{Loc 'chem-master-window-buffer-empty-text'}" />
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
</BoxContainer>
|
||||
<BoxContainer Orientation="Vertical"
|
||||
HorizontalExpand="True"
|
||||
Margin="5 5 5 5"
|
||||
SeparationOverride="10">
|
||||
<!-- Output container info -->
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<Label Text="{Loc 'chem-master-window-container-label'}" />
|
||||
<Control HorizontalExpand="True" />
|
||||
<Button Name="OutputEjectButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'chem-master-window-eject-button'}" />
|
||||
</BoxContainer>
|
||||
<PanelContainer VerticalExpand="True" 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="OutputContainerInfo"
|
||||
Orientation="Vertical"
|
||||
Margin="4 4 4 4"
|
||||
HorizontalExpand="True">
|
||||
<Label Text="{Loc 'chem-master-window-no-container-loaded-text'}" />
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
<!-- Padding -->
|
||||
<Control MinSize="0 10" />
|
||||
<!-- Packaging -->
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<Label Text="{Loc 'chem-master-window-packaging-text'}" />
|
||||
<Control HorizontalExpand="True"/>
|
||||
<Label Text="{Loc 'chem-master-window-buffer-label'}" />
|
||||
<Label Name="BufferCurrentVolume" StyleClasses="LabelSecondaryColor" />
|
||||
</BoxContainer>
|
||||
<!-- Wrap the packaging info-->
|
||||
<PanelContainer VerticalExpand="True"
|
||||
SizeFlagsStretchRatio="6"
|
||||
MinSize="0 100">
|
||||
<PanelContainer>
|
||||
<PanelContainer.PanelOverride>
|
||||
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
|
||||
</PanelContainer.PanelOverride>
|
||||
<!-- Packaging Info -->
|
||||
<BoxContainer Orientation="Vertical"
|
||||
HorizontalExpand="True"
|
||||
VerticalExpand="True"
|
||||
SeparationOverride="5">
|
||||
Margin="4 4 4 4"
|
||||
HorizontalExpand="True"
|
||||
VerticalExpand="True"
|
||||
SeparationOverride="5">
|
||||
<!-- Label for output -->
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<Label Text="{Loc 'chem-master-current-text-label'}" />
|
||||
@@ -89,30 +119,38 @@
|
||||
<Label Text="{Loc 'chem-master-window-pills-label'}" />
|
||||
<Control HorizontalExpand="True"
|
||||
MinSize="50 0" />
|
||||
<SpinBox Name="PillAmount"
|
||||
Access="Public"
|
||||
Value="1" />
|
||||
<Label Text="{Loc 'chem-master-window-pills-number-label'}"
|
||||
Margin="5 0 0 0"
|
||||
StyleClasses="LabelSecondaryColor" />
|
||||
<SpinBox Name="PillNumber"
|
||||
Access="Public"
|
||||
Value="0" />
|
||||
<Label Text="{Loc 'chem-master-window-dose-label'}"
|
||||
Margin="5 0 0 0"
|
||||
StyleClasses="LabelSecondaryColor" />
|
||||
<SpinBox Name="PillDosage"
|
||||
Access="Public"
|
||||
Value="1" />
|
||||
<Button Name="CreatePillButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'chem-master-window-create-pill-button'}" />
|
||||
<Label Text="{Loc 'chem-master-window-max-pills-volume-text'}"
|
||||
StyleClasses="LabelSecondaryColor" />
|
||||
Text="{Loc 'chem-master-window-create-button'}" />
|
||||
</BoxContainer>
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<Label Text="{Loc 'chem-master-window-bottles-label'}" />
|
||||
<Control HorizontalExpand="True"
|
||||
MinSize="50 0" />
|
||||
<SpinBox Name="BottleAmount"
|
||||
<Label Text="{Loc 'chem-master-window-dose-label'}"
|
||||
Margin="5 0 0 0"
|
||||
StyleClasses="LabelSecondaryColor" />
|
||||
<SpinBox Name="BottleDosage"
|
||||
Access="Public"
|
||||
Value="1" />
|
||||
Value="0" />
|
||||
<Button Name="CreateBottleButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'chem-master-window-create-bottle-button'}" />
|
||||
<Label Text="{Loc 'chem-master-window-max-bottles-volume-text'}"
|
||||
StyleClasses="LabelSecondaryColor" />
|
||||
Text="{Loc 'chem-master-window-create-button'}" />
|
||||
</BoxContainer>
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
</PanelContainer>
|
||||
</BoxContainer>
|
||||
</BoxContainer>
|
||||
</TabContainer>
|
||||
</DefaultWindow>
|
||||
|
||||
Reference in New Issue
Block a user