Fixes gumps (#112)
This commit is contained in:
parent
c116dff3e8
commit
3e715bcb60
4 changed files with 41 additions and 48 deletions
|
|
@ -108,7 +108,7 @@ namespace Server.Gumps
|
||||||
Add(new GumpGroup(group));
|
Add(new GumpGroup(group));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddTooltip(int number, string args)
|
public void AddTooltip(int number, string args = null)
|
||||||
{
|
{
|
||||||
Add(new GumpTooltip(number, args));
|
Add(new GumpTooltip(number, args));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,16 +35,13 @@ namespace Server.Gumps
|
||||||
private static readonly byte[] m_LayoutNameColor = Gump.StringToBuffer("xmfhtmlgumpcolor");
|
private static readonly byte[] m_LayoutNameColor = Gump.StringToBuffer("xmfhtmlgumpcolor");
|
||||||
private static readonly byte[] m_LayoutNameArgs = Gump.StringToBuffer("xmfhtmltok");
|
private static readonly byte[] m_LayoutNameArgs = Gump.StringToBuffer("xmfhtmltok");
|
||||||
|
|
||||||
private int m_Width, m_Height;
|
|
||||||
private int m_X, m_Y;
|
|
||||||
|
|
||||||
public GumpHtmlLocalized(int x, int y, int width, int height, int number,
|
public GumpHtmlLocalized(int x, int y, int width, int height, int number,
|
||||||
bool background = false, bool scrollbar = false)
|
bool background = false, bool scrollbar = false)
|
||||||
{
|
{
|
||||||
m_X = x;
|
X = x;
|
||||||
m_Y = y;
|
Y = y;
|
||||||
m_Width = width;
|
Width = width;
|
||||||
m_Height = height;
|
Height = height;
|
||||||
Number = number;
|
Number = number;
|
||||||
Background = background;
|
Background = background;
|
||||||
Scrollbar = scrollbar;
|
Scrollbar = scrollbar;
|
||||||
|
|
@ -55,10 +52,10 @@ namespace Server.Gumps
|
||||||
public GumpHtmlLocalized(int x, int y, int width, int height, int number, int color,
|
public GumpHtmlLocalized(int x, int y, int width, int height, int number, int color,
|
||||||
bool background = false, bool scrollbar = false)
|
bool background = false, bool scrollbar = false)
|
||||||
{
|
{
|
||||||
m_X = x;
|
X = x;
|
||||||
m_Y = y;
|
Y = y;
|
||||||
m_Width = width;
|
Width = width;
|
||||||
m_Height = height;
|
Height = height;
|
||||||
Number = number;
|
Number = number;
|
||||||
Color = color;
|
Color = color;
|
||||||
Background = background;
|
Background = background;
|
||||||
|
|
@ -72,10 +69,10 @@ namespace Server.Gumps
|
||||||
{
|
{
|
||||||
// Are multiple arguments unsupported? And what about non ASCII arguments?
|
// Are multiple arguments unsupported? And what about non ASCII arguments?
|
||||||
|
|
||||||
m_X = x;
|
X = x;
|
||||||
m_Y = y;
|
Y = y;
|
||||||
m_Width = width;
|
Width = width;
|
||||||
m_Height = height;
|
Height = height;
|
||||||
Number = number;
|
Number = number;
|
||||||
Args = args;
|
Args = args;
|
||||||
Color = color;
|
Color = color;
|
||||||
|
|
@ -126,10 +123,10 @@ namespace Server.Gumps
|
||||||
{
|
{
|
||||||
disp.AppendLayout(m_LayoutNamePlain);
|
disp.AppendLayout(m_LayoutNamePlain);
|
||||||
|
|
||||||
disp.AppendLayout(m_X);
|
disp.AppendLayout(X);
|
||||||
disp.AppendLayout(m_Y);
|
disp.AppendLayout(Y);
|
||||||
disp.AppendLayout(m_Width);
|
disp.AppendLayout(Width);
|
||||||
disp.AppendLayout(m_Height);
|
disp.AppendLayout(Height);
|
||||||
disp.AppendLayout(Number);
|
disp.AppendLayout(Number);
|
||||||
disp.AppendLayout(Background);
|
disp.AppendLayout(Background);
|
||||||
disp.AppendLayout(Scrollbar);
|
disp.AppendLayout(Scrollbar);
|
||||||
|
|
@ -141,10 +138,10 @@ namespace Server.Gumps
|
||||||
{
|
{
|
||||||
disp.AppendLayout(m_LayoutNameColor);
|
disp.AppendLayout(m_LayoutNameColor);
|
||||||
|
|
||||||
disp.AppendLayout(m_X);
|
disp.AppendLayout(X);
|
||||||
disp.AppendLayout(m_Y);
|
disp.AppendLayout(Y);
|
||||||
disp.AppendLayout(m_Width);
|
disp.AppendLayout(Width);
|
||||||
disp.AppendLayout(m_Height);
|
disp.AppendLayout(Height);
|
||||||
disp.AppendLayout(Number);
|
disp.AppendLayout(Number);
|
||||||
disp.AppendLayout(Background);
|
disp.AppendLayout(Background);
|
||||||
disp.AppendLayout(Scrollbar);
|
disp.AppendLayout(Scrollbar);
|
||||||
|
|
@ -157,10 +154,10 @@ namespace Server.Gumps
|
||||||
{
|
{
|
||||||
disp.AppendLayout(m_LayoutNameArgs);
|
disp.AppendLayout(m_LayoutNameArgs);
|
||||||
|
|
||||||
disp.AppendLayout(m_X);
|
disp.AppendLayout(X);
|
||||||
disp.AppendLayout(m_Y);
|
disp.AppendLayout(Y);
|
||||||
disp.AppendLayout(m_Width);
|
disp.AppendLayout(Width);
|
||||||
disp.AppendLayout(m_Height);
|
disp.AppendLayout(Height);
|
||||||
disp.AppendLayout(Background);
|
disp.AppendLayout(Background);
|
||||||
disp.AppendLayout(Scrollbar);
|
disp.AppendLayout(Scrollbar);
|
||||||
disp.AppendLayout(Color);
|
disp.AppendLayout(Color);
|
||||||
|
|
|
||||||
|
|
@ -25,15 +25,13 @@ namespace Server.Gumps
|
||||||
public class GumpImageTiled : GumpEntry
|
public class GumpImageTiled : GumpEntry
|
||||||
{
|
{
|
||||||
private static readonly byte[] m_LayoutName = Gump.StringToBuffer("gumppictiled");
|
private static readonly byte[] m_LayoutName = Gump.StringToBuffer("gumppictiled");
|
||||||
private int m_Width, m_Height;
|
|
||||||
private int m_X, m_Y;
|
|
||||||
|
|
||||||
public GumpImageTiled(int x, int y, int width, int height, int gumpID)
|
public GumpImageTiled(int x, int y, int width, int height, int gumpID)
|
||||||
{
|
{
|
||||||
m_X = x;
|
X = x;
|
||||||
m_Y = y;
|
Y = y;
|
||||||
m_Width = width;
|
Width = width;
|
||||||
m_Height = height;
|
Height = height;
|
||||||
GumpID = gumpID;
|
GumpID = gumpID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -52,10 +50,10 @@ namespace Server.Gumps
|
||||||
public override void AppendTo(NetState ns, IGumpWriter disp)
|
public override void AppendTo(NetState ns, IGumpWriter disp)
|
||||||
{
|
{
|
||||||
disp.AppendLayout(m_LayoutName);
|
disp.AppendLayout(m_LayoutName);
|
||||||
disp.AppendLayout(m_X);
|
disp.AppendLayout(X);
|
||||||
disp.AppendLayout(m_Y);
|
disp.AppendLayout(Y);
|
||||||
disp.AppendLayout(m_Width);
|
disp.AppendLayout(Width);
|
||||||
disp.AppendLayout(m_Height);
|
disp.AppendLayout(Height);
|
||||||
disp.AppendLayout(GumpID);
|
disp.AppendLayout(GumpID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,15 +25,13 @@ namespace Server.Gumps
|
||||||
public class GumpTextEntryLimited : GumpEntry
|
public class GumpTextEntryLimited : GumpEntry
|
||||||
{
|
{
|
||||||
private static readonly byte[] m_LayoutName = Gump.StringToBuffer("textentrylimited");
|
private static readonly byte[] m_LayoutName = Gump.StringToBuffer("textentrylimited");
|
||||||
private int m_Width, m_Height;
|
|
||||||
private int m_X, m_Y;
|
|
||||||
|
|
||||||
public GumpTextEntryLimited(int x, int y, int width, int height, int hue, int entryID, string initialText, int size = 0)
|
public GumpTextEntryLimited(int x, int y, int width, int height, int hue, int entryID, string initialText, int size = 0)
|
||||||
{
|
{
|
||||||
m_X = x;
|
X = x;
|
||||||
m_Y = y;
|
Y = y;
|
||||||
m_Width = width;
|
Width = width;
|
||||||
m_Height = height;
|
Height = height;
|
||||||
Hue = hue;
|
Hue = hue;
|
||||||
EntryID = entryID;
|
EntryID = entryID;
|
||||||
InitialText = initialText;
|
InitialText = initialText;
|
||||||
|
|
@ -62,10 +60,10 @@ namespace Server.Gumps
|
||||||
public override void AppendTo(NetState ns, IGumpWriter disp)
|
public override void AppendTo(NetState ns, IGumpWriter disp)
|
||||||
{
|
{
|
||||||
disp.AppendLayout(m_LayoutName);
|
disp.AppendLayout(m_LayoutName);
|
||||||
disp.AppendLayout(m_X);
|
disp.AppendLayout(X);
|
||||||
disp.AppendLayout(m_Y);
|
disp.AppendLayout(Y);
|
||||||
disp.AppendLayout(m_Width);
|
disp.AppendLayout(Width);
|
||||||
disp.AppendLayout(m_Height);
|
disp.AppendLayout(Height);
|
||||||
disp.AppendLayout(Hue);
|
disp.AppendLayout(Hue);
|
||||||
disp.AppendLayout(EntryID);
|
disp.AppendLayout(EntryID);
|
||||||
disp.AppendLayout(Parent.Intern(InitialText));
|
disp.AppendLayout(Parent.Intern(InitialText));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue