public Toolbar(ToolbarInfo info) : base(0, 28)
{
Closable = false;
p_Info = info;
p_Commands = info.Entries;
p_Skin = info.Skin;
p_Columns = info.Dimensions[0];
p_Rows = info.Dimensions[1];
int offset = GumpIDs.Misc[(int)GumpIDs.MiscIDs.ButtonOffset].Content[p_Skin,0];
int bx = ((offset * 2) + (Columns * 110)), by = ((offset * 2) + (Rows * 24));
[COLOR="Blue"]int BY = by;
by = 0;[/COLOR]
SetCoords( offset );
AddInitOpts( by, offset );
AddBackground(0, [COLOR="blue"]/*[/COLOR]0[COLOR="Blue"]*/ InitOptsH[/COLOR], bx, [COLOR="Blue"]/*[/COLOR]by[COLOR="blue"]*/ BY[/COLOR], GumpIDs.Misc[(int)GumpIDs.MiscIDs.Background].Content[p_Skin,0]);
int temp = 0, x = 0, y = 0;
for(int i = 0; i < Columns*Rows; i++)
{
x = offset + ((i % Columns) * 110);
y = [COLOR="blue"]InitOptsH + [/COLOR]offset + (int)(Math.Floor((double)(i / Columns)) * 24);
AddButton(x + 1, y, 2445, 2445, temp + 10, GumpButtonType.Reply, 0);
AddBackground(x, y, 110, 24, GumpIDs.Misc[(int)GumpIDs.MiscIDs.Buttonground].Content[p_Skin,0]);
AddLabelCropped(x + 5, y + 3, 100, 20, GumpIDs.Misc[(int)GumpIDs.MiscIDs.Color].Content[p_Skin,0], Commands[temp]);
if( i%Columns == Columns-1 )
temp += 9-Columns;
temp++;
}
/*TEST---
0%5 == 0
1%5 == 1
2%5 == 2
3%5 == 3
4%5 == 4
5%5 == 0
END TEST---*/
AddMinimized( by, offset );
}