Adds missing gas canisters and improves the UI (#2794)

* Adds missing gas canisters and improves the UI

* Pad the label
This commit is contained in:
ike709
2020-12-21 04:52:50 -06:00
committed by GitHub
parent 5b60d24dcb
commit d9d168a324
3 changed files with 113 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using Content.Shared.GameObjects.Components.Disposal;
@@ -54,7 +54,7 @@ namespace Content.Client.GameObjects.Components.Atmos
{
Children =
{
new Label(){ Text = Loc.GetString("Label") },
new Label(){ Text = Loc.GetString("Label: ") },
(LabelInput = new LineEdit() { Text = Name, Editable = false,
CustomMinimumSize = new Vector2(200, 30)}),
(EditLabelBtn = new Button()),
@@ -64,7 +64,7 @@ namespace Content.Client.GameObjects.Components.Atmos
{
Children =
{
new Label {Text = Loc.GetString("Pressure:")},
new Label {Text = Loc.GetString("Pressure: ")},
(_pressure = new Label())
}
},
@@ -76,7 +76,7 @@ namespace Content.Client.GameObjects.Components.Atmos
{
Children =
{
new Label() {Text = Loc.GetString("Release pressure:")},
new Label() {Text = Loc.GetString("Release pressure: ")},
(_releasePressure = new Label())
}
},
@@ -100,8 +100,8 @@ namespace Content.Client.GameObjects.Components.Atmos
{
Children =
{
new Label { Text = Loc.GetString("Valve") },
(ToggleValve = new CheckButton() { Text = Loc.GetString("Open") })
new Label { Text = Loc.GetString("Valve: ") },
(ToggleValve = new CheckButton() { Text = Loc.GetString("Closed") })
}
}
},
@@ -121,7 +121,6 @@ namespace Content.Client.GameObjects.Components.Atmos
LabelInputEditable = false;
}
/// <summary>
/// Update the UI based on <see cref="GasCanisterBoundUserInterfaceState"/>
/// </summary>
@@ -140,6 +139,14 @@ namespace Content.Client.GameObjects.Components.Atmos
LabelInputEditable = false;
ToggleValve.Pressed = state.ValveOpened;
if (ToggleValve.Pressed)
{
ToggleValve.Text = Loc.GetString("Open");
}
else
{
ToggleValve.Text = Loc.GetString("Closed");
}
}
}