chore: Removes dead gump code (#2403)
This commit is contained in:
parent
5b6ea0c3b5
commit
c0d75562be
28 changed files with 460 additions and 724 deletions
|
|
@ -7,12 +7,6 @@ namespace Server.Gumps;
|
|||
|
||||
public class GoGump : Gump
|
||||
{
|
||||
private const int PrevLabelOffsetX = PrevWidth + 1;
|
||||
private const int PrevLabelOffsetY = 0;
|
||||
|
||||
private const int NextLabelOffsetX = -29;
|
||||
private const int NextLabelOffsetY = 0;
|
||||
|
||||
private const int EntryWidth = 180;
|
||||
private const int EntryCount = 15;
|
||||
|
||||
|
|
@ -52,87 +46,38 @@ public class GoGump : Gump
|
|||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, BackWidth, BorderSize + totalHeight + BorderSize, BackGumpID);
|
||||
AddImageTiled(
|
||||
BorderSize,
|
||||
BorderSize,
|
||||
TotalWidth - (OldStyle ? SetWidth + OffsetSize : 0),
|
||||
totalHeight,
|
||||
OffsetGumpID
|
||||
);
|
||||
AddImageTiled(BorderSize, BorderSize, TotalWidth, totalHeight, OffsetGumpID);
|
||||
|
||||
if (OldStyle)
|
||||
{
|
||||
AddImageTiled(x, y, TotalWidth - OffsetSize * 3 - SetWidth, EntryHeight, HeaderGumpID);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddImageTiled(x, y, PrevWidth, EntryHeight, HeaderGumpID);
|
||||
}
|
||||
AddImageTiled(x, y, PrevWidth, EntryHeight, HeaderGumpID);
|
||||
|
||||
if (node.Parent != null)
|
||||
{
|
||||
AddButton(x + PrevOffsetX, y + PrevOffsetY, PrevButtonID1, PrevButtonID2, 1);
|
||||
|
||||
if (PrevLabel)
|
||||
{
|
||||
AddLabel(x + PrevLabelOffsetX, y + PrevLabelOffsetY, TextHue, "Previous");
|
||||
}
|
||||
}
|
||||
|
||||
x += PrevWidth + OffsetSize;
|
||||
|
||||
var emptyWidth = TotalWidth - PrevWidth * 2 - NextWidth - OffsetSize * 5 -
|
||||
(OldStyle ? SetWidth + OffsetSize : 0);
|
||||
|
||||
if (!OldStyle)
|
||||
{
|
||||
AddImageTiled(
|
||||
x - (OldStyle ? OffsetSize : 0),
|
||||
y,
|
||||
emptyWidth + (OldStyle ? OffsetSize * 2 : 0),
|
||||
EntryHeight,
|
||||
EntryGumpID
|
||||
);
|
||||
}
|
||||
const int emptyWidth = TotalWidth - PrevWidth * 2 - NextWidth - OffsetSize * 5;
|
||||
AddImageTiled(x, y, emptyWidth, EntryHeight, EntryGumpID);
|
||||
|
||||
AddHtml(x + TextOffsetX, y, emptyWidth - TextOffsetX, EntryHeight, $"<center>{node.Name}</center>");
|
||||
|
||||
x += emptyWidth + OffsetSize;
|
||||
|
||||
if (OldStyle)
|
||||
{
|
||||
AddImageTiled(x, y, TotalWidth - OffsetSize * 3 - SetWidth, EntryHeight, HeaderGumpID);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddImageTiled(x, y, PrevWidth, EntryHeight, HeaderGumpID);
|
||||
}
|
||||
AddImageTiled(x, y, PrevWidth, EntryHeight, HeaderGumpID);
|
||||
|
||||
if (page > 0)
|
||||
{
|
||||
AddButton(x + PrevOffsetX, y + PrevOffsetY, PrevButtonID1, PrevButtonID2, 2);
|
||||
|
||||
if (PrevLabel)
|
||||
{
|
||||
AddLabel(x + PrevLabelOffsetX, y + PrevLabelOffsetY, TextHue, "Previous");
|
||||
}
|
||||
}
|
||||
|
||||
x += PrevWidth + OffsetSize;
|
||||
|
||||
if (!OldStyle)
|
||||
{
|
||||
AddImageTiled(x, y, NextWidth, EntryHeight, HeaderGumpID);
|
||||
}
|
||||
AddImageTiled(x, y, NextWidth, EntryHeight, HeaderGumpID);
|
||||
|
||||
if ((page + 1) * EntryCount < node.Categories.Length + node.Locations.Length)
|
||||
{
|
||||
AddButton(x + NextOffsetX, y + NextOffsetY, NextButtonID1, NextButtonID2, 3, GumpButtonType.Reply, 1);
|
||||
|
||||
if (NextLabel)
|
||||
{
|
||||
AddLabel(x + NextLabelOffsetX, y + NextLabelOffsetY, TextHue, "Next");
|
||||
}
|
||||
}
|
||||
|
||||
var totalEntryCount = node.Categories.Length + node.Locations.Length;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue