uichange Crew Monitor (#14235)
This commit is contained in:
@@ -1,23 +1,16 @@
|
|||||||
<DefaultWindow xmlns="https://spacestation14.io"
|
<controls:FancyWindow xmlns="https://spacestation14.io"
|
||||||
Title="{Loc 'crew-monitoring-user-interface-title'}"
|
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
|
||||||
SetSize="775 400">
|
Title="{Loc 'crew-monitoring-user-interface-title'}"
|
||||||
<ScrollContainer HorizontalExpand="True"
|
SetSize="775 400">
|
||||||
VerticalExpand="True">
|
<ScrollContainer HorizontalExpand="True" VerticalExpand="True" Margin="5">
|
||||||
<GridContainer Name="SensorsTable"
|
<GridContainer Name="SensorsTable" HorizontalExpand="True" VerticalExpand="True" HSeparationOverride="5" VSeparationOverride="20" Columns="4">
|
||||||
HorizontalExpand="True"
|
<!-- Category Headers -->
|
||||||
VerticalExpand="True"
|
<Label Text="{Loc 'crew-monitoring-user-interface-name'}" StyleClasses="LabelHeading"/>
|
||||||
HSeparationOverride="5"
|
<Label Text="{Loc 'crew-monitoring-user-interface-job'}" StyleClasses="LabelHeading"/>
|
||||||
VSeparationOverride="20"
|
<Label Text="{Loc 'crew-monitoring-user-interface-status'}" StyleClasses="LabelHeading"/>
|
||||||
Columns="3">
|
<Label Text="{Loc 'crew-monitoring-user-interface-location'}" StyleClasses="LabelHeading"/>
|
||||||
<!-- Table header -->
|
|
||||||
<Label Text="{Loc 'crew-monitoring-user-interface-name'}"
|
|
||||||
StyleClasses="LabelHeading"/>
|
|
||||||
<Label Text="{Loc 'crew-monitoring-user-interface-status'}"
|
|
||||||
StyleClasses="LabelHeading"/>
|
|
||||||
<Label Text="{Loc 'crew-monitoring-user-interface-location'}"
|
|
||||||
StyleClasses="LabelHeading"/>
|
|
||||||
|
|
||||||
<!-- Table rows are filled by code -->
|
<!-- Additional table rows are filled by code -->
|
||||||
</GridContainer>
|
</GridContainer>
|
||||||
</ScrollContainer>
|
</ScrollContainer>
|
||||||
</DefaultWindow>
|
</controls:FancyWindow>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ using static Robust.Client.UserInterface.Controls.BoxContainer;
|
|||||||
namespace Content.Client.Medical.CrewMonitoring
|
namespace Content.Client.Medical.CrewMonitoring
|
||||||
{
|
{
|
||||||
[GenerateTypedNameReferences]
|
[GenerateTypedNameReferences]
|
||||||
public sealed partial class CrewMonitoringWindow : DefaultWindow
|
public sealed partial class CrewMonitoringWindow : FancyWindow
|
||||||
{
|
{
|
||||||
private List<Control> _rowsContent = new();
|
private List<Control> _rowsContent = new();
|
||||||
private List<(DirectionIcon Icon, Vector2 Position)> _directionIcons = new();
|
private List<(DirectionIcon Icon, Vector2 Position)> _directionIcons = new();
|
||||||
@@ -41,16 +41,26 @@ namespace Content.Client.Medical.CrewMonitoring
|
|||||||
// add a row for each sensor
|
// add a row for each sensor
|
||||||
foreach (var sensor in stSensors.OrderBy(a => a.Name))
|
foreach (var sensor in stSensors.OrderBy(a => a.Name))
|
||||||
{
|
{
|
||||||
// add users name and job
|
// add users name
|
||||||
// format: UserName (Job)
|
// format: UserName
|
||||||
var nameLabel = new Label()
|
var nameLabel = new Label()
|
||||||
{
|
{
|
||||||
Text = $"{sensor.Name} ({sensor.Job})"
|
Text = sensor.Name,
|
||||||
|
HorizontalExpand = true
|
||||||
};
|
};
|
||||||
nameLabel.HorizontalExpand = true;
|
|
||||||
SensorsTable.AddChild(nameLabel);
|
SensorsTable.AddChild(nameLabel);
|
||||||
_rowsContent.Add(nameLabel);
|
_rowsContent.Add(nameLabel);
|
||||||
|
|
||||||
|
// add users job
|
||||||
|
// format: JobName
|
||||||
|
var jobLabel = new Label()
|
||||||
|
{
|
||||||
|
Text = sensor.Job,
|
||||||
|
HorizontalExpand = true
|
||||||
|
};
|
||||||
|
SensorsTable.AddChild(jobLabel);
|
||||||
|
_rowsContent.Add(jobLabel);
|
||||||
|
|
||||||
// add users status and damage
|
// add users status and damage
|
||||||
// format: IsAlive (TotalDamage)
|
// format: IsAlive (TotalDamage)
|
||||||
var statusText = Loc.GetString(sensor.IsAlive ?
|
var statusText = Loc.GetString(sensor.IsAlive ?
|
||||||
@@ -122,7 +132,7 @@ namespace Content.Client.Medical.CrewMonitoring
|
|||||||
{
|
{
|
||||||
foreach (var child in _rowsContent)
|
foreach (var child in _rowsContent)
|
||||||
{
|
{
|
||||||
SensorsTable.RemoveChild(child);
|
SensorsTable.RemoveChild(child);
|
||||||
}
|
}
|
||||||
_rowsContent.Clear();
|
_rowsContent.Clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,11 +3,10 @@
|
|||||||
crew-monitoring-user-interface-title = Crew Monitoring
|
crew-monitoring-user-interface-title = Crew Monitoring
|
||||||
|
|
||||||
crew-monitoring-user-interface-name = Name
|
crew-monitoring-user-interface-name = Name
|
||||||
|
crew-monitoring-user-interface-job = Job
|
||||||
crew-monitoring-user-interface-status = Status
|
crew-monitoring-user-interface-status = Status
|
||||||
crew-monitoring-user-interface-location = Location
|
crew-monitoring-user-interface-location = Location
|
||||||
|
|
||||||
crew-monitoring-user-interface-alive = Alive
|
crew-monitoring-user-interface-alive = Alive
|
||||||
crew-monitoring-user-interface-dead = Dead
|
crew-monitoring-user-interface-dead = Dead
|
||||||
crew-monitoring-user-interface-no-info = N/A
|
crew-monitoring-user-interface-no-info = N/A
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user