* Add shuttle interior drawing back Just do it per-tile she'll be right, at least it's done with 1 draw call. * Revamp shuttle console * Bunch of cleanup work * Lables sortito * dok * Pixel alignment and colours * Fix a bunch of drawing bugs * Shuttle map drawing * Drawing fixes * Map parallax working finally * weh * Commit all my stuff * mic * deez * Update everything * Xamlify everything * uh * Rudimentary blocker range * My enemies have succeeded * Bunch of changes to FTL * Heaps of cleanup * Fix FTL bugs * FTL * weewoo * FTL fallback * wew * weh * Basic FTL working * FTL working * FTL destination fixes * a * Exclusion zones * Fix drawing / FTL * Beacons working * Coordinates drawing * Fix unknown map names * Dorks beginning * State + docking cleanup start * Basic dock drawing * Bunch of drawing fixes * Batching / color fixes * Cleanup and beacons support * weh * weh * Begin pings * First draft at map objects * Map fixup * Faster drawing * Fix perf + FTL * Cached drawing * Fix drawing * Best I got * strips * Back to lists but with caching * Final optimisation * Fix dock bounds * Docking work * stinker * kobolds * Btns * Docking vis working * Fix docking pre-vis * canasses * Helldivers 2 * a * Array life * Fix * Fix TODOs * liltenhead feature club * dorking * Merge artifacts * Last-minute touchup
62 lines
1.5 KiB
C#
62 lines
1.5 KiB
C#
using System.Text;
|
|
using Content.Shared.Shuttles.BUIStates;
|
|
using Content.Shared.Shuttles.Systems;
|
|
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.Graphics;
|
|
using Robust.Client.UserInterface.Controls;
|
|
using Robust.Client.UserInterface.XAML;
|
|
using Robust.Shared.Map;
|
|
|
|
namespace Content.Client.Shuttles.UI;
|
|
|
|
[GenerateTypedNameReferences]
|
|
public sealed partial class DockObject : PanelContainer
|
|
{
|
|
public event Action? UndockPressed;
|
|
public event Action? ViewPressed;
|
|
|
|
public BoxContainer ContentsContainer => Contents;
|
|
|
|
public DockObject()
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
IoCManager.InjectDependencies(this);
|
|
|
|
PanelOverride = new StyleBoxFlat(new Color(30, 30, 34));
|
|
}
|
|
|
|
public void AddDock(DockingPortState state, ShuttleDockControl dockControl)
|
|
{
|
|
var viewButton = new Button()
|
|
{
|
|
Text = Loc.GetString("shuttle-console-view"),
|
|
};
|
|
|
|
viewButton.OnPressed += args =>
|
|
{
|
|
dockControl.SetViewedDock(state);
|
|
};
|
|
|
|
var container = new BoxContainer()
|
|
{
|
|
Orientation = BoxContainer.LayoutOrientation.Vertical,
|
|
Children =
|
|
{
|
|
new Label()
|
|
{
|
|
Text = state.Name,
|
|
HorizontalAlignment = HAlignment.Center,
|
|
},
|
|
viewButton
|
|
}
|
|
};
|
|
|
|
DockContainer.AddChild(container);
|
|
}
|
|
|
|
public void SetName(string value)
|
|
{
|
|
DockedLabel.Text = value;
|
|
}
|
|
}
|