Files
wwdpublic/Content.Client/_White/UI/Buttons/WhiteUICommandButton.cs
Spatison bc6e4d3ef0 [Port] Lobby / Лобби (#47)
* add: animation background

* add:lobby UI

* tweak

* WD EDIT

* fix

* tweak: button color

* fix

* test

* feat: add changelog button to lobby

---------

Co-authored-by: Remuchi <RemuchiOfficial@gmail.com>
2024-09-12 11:31:46 +07:00

23 lines
597 B
C#

using Robust.Client.UserInterface.CustomControls;
namespace Content.Client._White.UI.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();
}
}