using Content.Client.Administration.Managers; using Robust.Client.AutoGenerated; using Robust.Client.Placement; using Robust.Client.ResourceManagement; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Map; using Robust.Shared.Prototypes; namespace Content.Client.Administration.UI.Tabs.AdminbusTab { [GenerateTypedNameReferences] public partial class AdminbusTab : Control { private EntitySpawnWindow? _entitySpawnWindow; private TileSpawnWindow? _tileSpawnWindow; protected override void EnteredTree() { // For the SpawnEntitiesButton and SpawnTilesButton we need to do the press manually // TODO: This will probably need some command check at some point SpawnEntitiesButton.OnPressed += SpawnEntitiesButtonOnOnPressed; SpawnTilesButton.OnPressed += SpawnTilesButtonOnOnPressed; } private void SpawnEntitiesButtonOnOnPressed(BaseButton.ButtonEventArgs obj) { _entitySpawnWindow ??= new EntitySpawnWindow(IoCManager.Resolve(), IoCManager.Resolve(), IoCManager.Resolve()); EntitySystem.Get().OpenCommand(_entitySpawnWindow); } private void SpawnTilesButtonOnOnPressed(BaseButton.ButtonEventArgs obj) { _tileSpawnWindow ??= new TileSpawnWindow(IoCManager.Resolve(), IoCManager.Resolve(), IoCManager.Resolve()); EntitySystem.Get().OpenCommand(_tileSpawnWindow); } } }