Oldchat fixes (#12009)

* various fixes

* whoops

* oops

* oop

* removes that call from escape button on unload instead of adding another one

also just moves escape window stuff into the state entered call, as only one is instantiated whenever the state is loaded (and is not dependent on the current screen)
This commit is contained in:
Flipp Syder
2022-10-17 18:01:28 -07:00
committed by GitHub
parent 2cd8bc8489
commit c828c53b91
4 changed files with 39 additions and 47 deletions

View File

@@ -8,7 +8,7 @@ using Robust.Client.UserInterface.Controllers;
namespace Content.Client.UserInterface.Systems.Ghost;
// TODO hud refactor BEFORE MERGE fix ghost gui being too far up
public sealed class GhostUIController : UIController, IOnStateChanged<GameplayState>, IOnSystemChanged<GhostSystem>
public sealed class GhostUIController : UIController, IOnSystemChanged<GhostSystem>
{
[Dependency] private readonly IEntityNetworkManager _net = default!;
@@ -91,7 +91,7 @@ public sealed class GhostUIController : UIController, IOnStateChanged<GameplaySt
_net.SendSystemNetworkMessage(msg);
}
public void OnStateEntered(GameplayState state)
public void LoadGui()
{
if (Gui == null)
return;
@@ -104,7 +104,7 @@ public sealed class GhostUIController : UIController, IOnStateChanged<GameplaySt
UpdateGui();
}
public void OnStateExited(GameplayState state)
public void UnloadGui()
{
if (Gui == null)
return;