ModernUO/Projects/UOContent.Tests/Tests/Gumps/TestGumps/LegacyTestGump.cs
Guflly 64e6fe5da8
fix: Warn when sending empty gumps (#2563)
### Summary

Generates a console warning when users receive an empty gump. This will help prevent client side leaks.
2026-08-08 00:55:12 -07:00

31 lines
810 B
C#

using Server.Gumps;
namespace Server.Tests.Gumps;
public sealed class LegacyTestGump : Gump
{
public bool HasVisualElementsForTest => HasVisualElements;
public LegacyTestGump(string petName) : base(50, 50)
{
Serial = (Serial)0x123;
TypeID = 0x5345;
AddPage(0);
AddBackground(10, 10, 265, 140, 0x242C);
AddItem(205, 40, 0x4);
AddItem(227, 40, 0x5);
AddItem(180, 78, 0xCAE);
AddItem(195, 90, 0xCAD);
AddItem(218, 95, 0xCB0);
AddHtml(30, 30, 150, 75, "<div align=center>Wilt thou sanctify the resurrection of:</div>");
AddHtml(30, 70, 150, 25, $"<CENTER>{petName}</CENTER>", true);
AddButton(40, 105, 0x81A, 0x81B, 0x1); // Okay
AddButton(110, 105, 0x819, 0x818, 0x2); // Cancel
}
}