diff --git a/Content.Client/Ghost/GhostSystem.cs b/Content.Client/Ghost/GhostSystem.cs index f4f7e3459fb..1dd4a560ced 100644 --- a/Content.Client/Ghost/GhostSystem.cs +++ b/Content.Client/Ghost/GhostSystem.cs @@ -180,5 +180,12 @@ public void ToggleGhostVisibility(bool? visibility = null) { GhostVisibility = visibility ?? !GhostVisibility; } + + // Corvax-Next-GhostBar-Start + public void GhostBarSpawn() + { + RaiseNetworkEvent(new GhostBarSpawnEvent()); + } + // Corvax-Next-GhostBar-End } } diff --git a/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs b/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs index 53779ea41c1..437dd6124e8 100644 --- a/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs +++ b/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs @@ -127,6 +127,8 @@ public void LoadGui() Gui.GhostRolesPressed += GhostRolesPressed; Gui.TargetWindow.WarpClicked += OnWarpClicked; Gui.TargetWindow.OnGhostnadoClicked += OnGhostnadoClicked; + Gui.GhostBarPressed += GhostBarPressed; // Corvax-Next-GhostBar + Gui.GhostBarWindow.SpawnButtonPressed += GhostBarSpawnPressed; // Corvax-Next-GhostBar UpdateGui(); } @@ -140,6 +142,8 @@ public void UnloadGui() Gui.ReturnToBodyPressed -= ReturnToBody; Gui.GhostRolesPressed -= GhostRolesPressed; Gui.TargetWindow.WarpClicked -= OnWarpClicked; + Gui.GhostBarPressed -= GhostBarPressed; // Corvax-Next-GhostBar + Gui.GhostBarWindow.SpawnButtonPressed -= GhostBarSpawnPressed; // Corvax-Next-GhostBar Gui.Hide(); } @@ -160,4 +164,16 @@ private void GhostRolesPressed() { _system?.OpenGhostRoles(); } + + // Corvax-Next-GhostBar-Start + private void GhostBarPressed() + { + Gui?.GhostBarWindow.OpenCentered(); + } + + private void GhostBarSpawnPressed() + { + _system?.GhostBarSpawn(); + } + // Corvax-Next-GhostBar-End } diff --git a/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml b/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml index 0f65debb4e7..784cc6bc07d 100644 --- a/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml +++ b/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml @@ -5,5 +5,6 @@