Cleaner BoundUserInterfaces (#17736)
This commit is contained in:
@@ -6,9 +6,10 @@ namespace Content.Client.MagicMirror;
|
||||
|
||||
public sealed class MagicMirrorBoundUserInterface : BoundUserInterface
|
||||
{
|
||||
[ViewVariables]
|
||||
private MagicMirrorWindow? _window;
|
||||
|
||||
public MagicMirrorBoundUserInterface(ClientUserInterfaceComponent owner, Enum uiKey) : base(owner, uiKey)
|
||||
public MagicMirrorBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -20,13 +21,13 @@ public sealed class MagicMirrorBoundUserInterface : BoundUserInterface
|
||||
|
||||
_window.OnHairSelected += tuple => SelectHair(MagicMirrorCategory.Hair, tuple.id, tuple.slot);
|
||||
_window.OnHairColorChanged += args => ChangeColor(MagicMirrorCategory.Hair, args.marking, args.slot);
|
||||
_window.OnHairSlotAdded += delegate() { AddSlot(MagicMirrorCategory.Hair); };
|
||||
_window.OnHairSlotAdded += delegate () { AddSlot(MagicMirrorCategory.Hair); };
|
||||
_window.OnHairSlotRemoved += args => RemoveSlot(MagicMirrorCategory.Hair, args);
|
||||
|
||||
_window.OnFacialHairSelected += tuple => SelectHair(MagicMirrorCategory.FacialHair, tuple.id, tuple.slot);
|
||||
_window.OnFacialHairColorChanged +=
|
||||
args => ChangeColor(MagicMirrorCategory.FacialHair, args.marking, args.slot);
|
||||
_window.OnFacialHairSlotAdded += delegate() { AddSlot(MagicMirrorCategory.FacialHair); };
|
||||
_window.OnFacialHairSlotAdded += delegate () { AddSlot(MagicMirrorCategory.FacialHair); };
|
||||
_window.OnFacialHairSlotRemoved += args => RemoveSlot(MagicMirrorCategory.FacialHair, args);
|
||||
|
||||
_window.OpenCentered();
|
||||
|
||||
Reference in New Issue
Block a user