Files
wwdpublic/Content.Client/_White/UserInterface/Buttons/WhiteUICommandButton.cs
Spatison 462ecb429e [Tweak] Hud UI (#834)
* combat mode ui

* movement ui

* some fix

* fix

* more fix

* fix
2025-09-13 17:38:24 +03:00

23 lines
608 B
C#

using Robust.Client.UserInterface.CustomControls;
namespace Content.Client._White.UserInterface.Buttons;
public sealed class WhiteUICommandButton : WhiteCommandButton
{
public Type? WindowType { get; set; }
private DefaultWindow? _window;
protected override void Execute(ButtonEventArgs obj)
{
if (WindowType == null)
return;
var windowInstance = IoCManager.Resolve<IDynamicTypeFactory>().CreateInstance(WindowType);
if (windowInstance is not DefaultWindow window)
return;
_window = window;
_window.OpenCentered();
}
}