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:
parent
65532ea887
commit
bb7bc57e42
19 changed files with 713 additions and 430 deletions
|
|
@ -121,7 +121,7 @@ public partial class HordeMinionFamiliar : BaseFamiliar
|
|||
if (Backpack?.Items.Count > 0)
|
||||
{
|
||||
from.SendGump(
|
||||
new WarningGump(1060635, 30720, 1061672, 32512, 420, 280, okay => ConfirmRelease_Callback(from, okay))
|
||||
new ReleaseFamiliarWarningGump(okay => ConfirmRelease_Callback(from, okay))
|
||||
);
|
||||
}
|
||||
else
|
||||
|
|
@ -185,4 +185,20 @@ public partial class HordeMinionFamiliar : BaseFamiliar
|
|||
|
||||
PackAnimal.GetContextMenuEntries(this, from, list);
|
||||
}
|
||||
|
||||
private class ReleaseFamiliarWarningGump : StaticWarningGump<ReleaseFamiliarWarningGump>
|
||||
{
|
||||
/*
|
||||
* If you release your familiar, everything in its backpack will be destroyed!
|
||||
* Are you sure you want to release your familiar?
|
||||
*/
|
||||
public override int StaticLocalizedContent => 1061672;
|
||||
|
||||
public override int Width => 420;
|
||||
public override int Height => 280;
|
||||
|
||||
public ReleaseFamiliarWarningGump(Action<bool> callback) : base(callback)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1246,7 +1246,7 @@ namespace Server.Mobiles
|
|||
notice = "The server is currently under lockdown. You have sufficient access level to connect.";
|
||||
}
|
||||
|
||||
from.SendGump(new NoticeGump(1060637, 30720, notice, 0xFFC000, 300, 140));
|
||||
from.SendGump(new ServerLockdownNoticeGump(notice));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1257,6 +1257,15 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
|
||||
private class ServerLockdownNoticeGump : StaticNoticeGump<ServerLockdownNoticeGump>
|
||||
{
|
||||
public override int Width => 300;
|
||||
public override int Height => 140;
|
||||
public override string Content { get; }
|
||||
|
||||
public ServerLockdownNoticeGump(string content) => Content = content;
|
||||
}
|
||||
|
||||
public void ValidateEquipment()
|
||||
{
|
||||
if (m_NoDeltaRecursion || Map == null || Map == Map.Internal)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue