Cleanup various admin buttons (#36312)

cleanup
This commit is contained in:
beck-thompson
2025-04-16 18:02:41 -07:00
committed by GitHub
parent 5a69877fe7
commit b41ee53dbd
7 changed files with 11 additions and 96 deletions

View File

@@ -13,7 +13,6 @@ public sealed partial class ObjectsTabEntry : PanelContainer
public Action<NetEntity>? OnTeleport;
public Action<NetEntity>? OnDelete;
private readonly Dictionary<Button, ConfirmationData> _confirmations = new();
public ObjectsTabEntry(IClientAdminManager manager, string name, NetEntity nent, StyleBox styleBox)
{
@@ -28,13 +27,6 @@ public sealed partial class ObjectsTabEntry : PanelContainer
DeleteButton.Disabled = !manager.CanCommand("delete");
TeleportButton.OnPressed += _ => OnTeleport?.Invoke(nent);
DeleteButton.OnPressed += _ =>
{
if (!AdminUIHelpers.TryConfirm(DeleteButton, _confirmations))
{
return;
}
OnDelete?.Invoke(nent);
};
DeleteButton.OnPressed += _ => OnDelete?.Invoke(nent);
}
}