1
0

SetOutfitEui.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using Content.Client.Eui;
  2. using Content.Shared.Administration;
  3. using Content.Shared.Eui;
  4. using JetBrains.Annotations;
  5. namespace Content.Client.Administration.UI.SetOutfit
  6. {
  7. [UsedImplicitly]
  8. public sealed class SetOutfitEui : BaseEui
  9. {
  10. private readonly SetOutfitMenu _window;
  11. private IEntityManager _entManager;
  12. public SetOutfitEui()
  13. {
  14. _entManager = IoCManager.Resolve<IEntityManager>();
  15. _window = new SetOutfitMenu();
  16. _window.OnClose += OnClosed;
  17. }
  18. private void OnClosed()
  19. {
  20. SendMessage(new CloseEuiMessage());
  21. }
  22. public override void Opened()
  23. {
  24. _window.OpenCentered();
  25. }
  26. public override void Closed()
  27. {
  28. base.Closed();
  29. _window.Close();
  30. }
  31. public override void HandleState(EuiStateBase state)
  32. {
  33. var outfitState = (SetOutfitEuiState) state;
  34. _window.TargetEntityId = outfitState.TargetNetEntity;
  35. }
  36. }
  37. }