Files
tbd-station-14/Content.Client/CartridgeLoader/Cartridges/CrewManifestUiFragment.xaml.cs
metalgearsloth a89d4c750b Power stuff (#31314)
* Power stuff

- Add shared IsPowered
- Add shared ResolveApc
- Move PowerChangedEvent to shared for now
- Add SlimPoweredLight that actually functions how you'd expect a PoweredLight to function it id didn't have a bunch of bloat on it.

* big update

* boing
2024-08-25 22:18:42 +10:00

36 lines
996 B
C#

using Content.Client.CrewManifest.UI;
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);
}
}