1
0

UIFragment.cs 760 B

12345678910111213141516171819202122232425
  1. using Robust.Client.GameObjects;
  2. using Robust.Client.UserInterface;
  3. namespace Content.Client.UserInterface.Fragments;
  4. /// <summary>
  5. /// Specific ui fragments need to inherit this class. The subclass is then used in yaml to tell a main ui to use it as a ui fragment.
  6. /// </summary>
  7. /// <example>
  8. /// This is an example from the yaml definition from the notekeeper ui
  9. /// <code>
  10. /// - type: CartridgeUi
  11. /// ui: !type:NotekeeperUi
  12. /// </code>
  13. /// </example>
  14. [ImplicitDataDefinitionForInheritors]
  15. public abstract partial class UIFragment
  16. {
  17. public abstract Control GetUIFragmentRoot();
  18. public abstract void Setup(BoundUserInterface userInterface, EntityUid? fragmentOwner);
  19. public abstract void UpdateState(BoundUserInterfaceState state);
  20. }