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