fix: Adds static warning/notice gumps. (#1741)

### Summary
* Adds `StaticNoticeGump<T>` and `StaticWarningGump<T>`
* Converts NoticeGump/WarningGump to use `DynamicGump`
* Changes various uses of notice gump and warning gump to their static counterpart.
This commit is contained in:
Kamron Batman 2024-04-26 17:19:16 -07:00 • committed by GitHub
parent 65532ea887
commit bb7bc57e42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 713 additions and 430 deletions

View file

@ -251,13 +251,8 @@ namespace Server.Commands
);
from.SendGump(
new WarningGump(
1060635,
30720,
$"You are about to delete {list.Count} object{(list.Count == 1 ? "" : "s")} from this facet. Do you really wish to continue?",
0xFFC000,
360,
260,
new DeleteObjectsNoticeGump(
list.Count,
okay => DeleteList_Callback(from, okay, list)
)
);
@ -268,6 +263,17 @@ namespace Server.Commands
}
}
private class DeleteObjectsNoticeGump : StaticWarningGump<DeleteObjectsNoticeGump>
{
public override int Header => 1060635; // <CENTER>WARNING</CENTER>
public override int Width => 360;
public override int Height => 260;
public override string Content { get; }
public DeleteObjectsNoticeGump(int count, Action<bool> callback) : base(callback) =>
Content = $"You are about to delete {count} object{(count == 1 ? "" : "s")} from this facet. Do you really wish to continue?";
}
[Usage("GetFollowers")]
[Description("Teleports all pets of a targeted player to your location.")]
public static void GetFollowers_OnCommand(CommandEventArgs e)