Add ban list window (#12574)
This commit is contained in:
@@ -10,8 +10,6 @@ namespace Content.Client.Administration.UI.Notes;
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class AdminNotesControl : Control
|
||||
{
|
||||
[Dependency] private readonly IUserInterfaceManager _ui = default!;
|
||||
|
||||
public event Action<int, string>? OnNoteChanged;
|
||||
public event Action<string>? OnNewNoteEntered;
|
||||
public event Action<int>? OnNoteDeleted;
|
||||
@@ -53,7 +51,7 @@ public sealed partial class AdminNotesControl : Control
|
||||
OnNoteChanged?.Invoke(input.Id, text);
|
||||
}
|
||||
|
||||
private bool NoteRightClicked(AdminNotesLine line)
|
||||
private bool NoteClicked(AdminNotesLine line)
|
||||
{
|
||||
ClosePopup();
|
||||
|
||||
@@ -69,7 +67,7 @@ public sealed partial class AdminNotesControl : Control
|
||||
};
|
||||
_popup.OnDeletePressed += noteId => OnNoteDeleted?.Invoke(noteId);
|
||||
|
||||
var box = UIBox2.FromDimensions(_ui.MousePositionScaled.Position, (1, 1));
|
||||
var box = UIBox2.FromDimensions(UserInterfaceManager.MousePositionScaled.Position, (1, 1));
|
||||
_popup.Open(box);
|
||||
|
||||
return true;
|
||||
@@ -102,7 +100,7 @@ public sealed partial class AdminNotesControl : Control
|
||||
|
||||
input = new AdminNotesLine(note);
|
||||
input.OnSubmitted += NoteSubmitted;
|
||||
input.OnRightClicked += NoteRightClicked;
|
||||
input.OnClicked += NoteClicked;
|
||||
Notes.AddChild(input);
|
||||
Inputs[note.Id] = input;
|
||||
}
|
||||
@@ -136,7 +134,7 @@ public sealed partial class AdminNotesControl : Control
|
||||
|
||||
if (_popup != null)
|
||||
{
|
||||
_ui.PopupRoot.RemoveChild(_popup);
|
||||
UserInterfaceManager.PopupRoot.RemoveChild(_popup);
|
||||
}
|
||||
|
||||
OnNoteChanged = null;
|
||||
|
||||
Reference in New Issue
Block a user