Skip to content

Commit

Permalink
Shuttle consoloations
Browse files Browse the repository at this point in the history
  • Loading branch information
Just-a-Unity-Dev committed Dec 18, 2023
1 parent 377b9fc commit 1a4f8a3
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions Content.Client/Shuttles/UI/ShuttleConsoleWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,31 +106,33 @@ private void UpdateFTL(List<(NetEntity Entity, string Destination, bool Enabled)
HyperspaceDestinations.DisposeAllChildren();
_destinations.Clear();

if (destinations.Count == 0)
{
HyperspaceDestinations.AddChild(new Label()
{
Text = Loc.GetString("shuttle-console-hyperspace-none"),
HorizontalAlignment = HAlignment.Center,
});
}
else
{
destinations.Sort((x, y) => string.Compare(x.Destination, y.Destination, StringComparison.Ordinal));

foreach (var destination in destinations)
{
var button = new Button()
{
Disabled = !destination.Enabled,
Text = destination.Destination,
};

_destinations[button] = destination.Entity;
button.OnPressed += OnHyperspacePressed;
HyperspaceDestinations.AddChild(button);
}
}
// BEGIN EKRIXI MODIFICATION
// if (destinations.Count == 0)
// {
// HyperspaceDestinations.AddChild(new Label()
// {
// Text = Loc.GetString("shuttle-console-hyperspace-none"),
// HorizontalAlignment = HAlignment.Center,
// });
// }
// else
// {
// destinations.Sort((x, y) => string.Compare(x.Destination, y.Destination, StringComparison.Ordinal));
//
// foreach (var destination in destinations)
// {
// var button = new Button()
// {
// Disabled = !destination.Enabled,
// Text = destination.Destination,
// };
//
// _destinations[button] = destination.Entity;
// button.OnPressed += OnHyperspacePressed;
// HyperspaceDestinations.AddChild(button);
// }
// }
// END EKRIXI MODIFICATION

string stateText;

Expand Down

0 comments on commit 1a4f8a3

Please sign in to comment.