Crew manifest as a PDA cartridge program (#18498)

Co-authored-by: Phill101 <holypics4@gmail.com>
This commit is contained in:
Phill101
2023-08-05 13:37:08 +05:00
committed by GitHub
parent 0df383d7e1
commit 600621e7ee
18 changed files with 418 additions and 180 deletions

View File

@@ -0,0 +1,34 @@
using Content.Shared.CrewManifest;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
namespace Content.Client.CartridgeLoader.Cartridges;
[GenerateTypedNameReferences]
public sealed partial class CrewManifestUiFragment : BoxContainer
{
public CrewManifestUiFragment()
{
RobustXamlLoader.Load(this);
StationName.AddStyleClass("LabelBig");
Orientation = LayoutOrientation.Vertical;
HorizontalExpand = true;
VerticalExpand = true;
}
public void UpdateState(string stationName, CrewManifestEntries? entries)
{
CrewManifestListing.DisposeAllChildren();
CrewManifestListing.RemoveAllChildren();
StationNameContainer.Visible = entries != null;
StationName.Text = stationName;
if (entries == null)
return;
CrewManifestListing.AddCrewManifestEntries(entries);
}
}