StationAiBoundUserInterface.cs 661 B

12345678910111213141516171819202122232425262728
  1. using Content.Shared.Silicons.StationAi;
  2. using Robust.Client.UserInterface;
  3. namespace Content.Client.Silicons.StationAi;
  4. public sealed class StationAiBoundUserInterface : BoundUserInterface
  5. {
  6. private StationAiMenu? _menu;
  7. public StationAiBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
  8. {
  9. }
  10. protected override void Open()
  11. {
  12. base.Open();
  13. _menu = this.CreateWindow<StationAiMenu>();
  14. _menu.Track(Owner);
  15. _menu.OnAiRadial += args =>
  16. {
  17. SendPredictedMessage(new StationAiRadialMessage()
  18. {
  19. Event = args,
  20. });
  21. };
  22. }
  23. }