本文整理汇总了C#中SuperGumpLayout.AddReplace方法的典型用法代码示例。如果您正苦于以下问题:C# SuperGumpLayout.AddReplace方法的具体用法?C# SuperGumpLayout.AddReplace怎么用?C# SuperGumpLayout.AddReplace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SuperGumpLayout
的用法示例。
在下文中一共展示了SuperGumpLayout.AddReplace方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CompileLayout
protected override void CompileLayout(SuperGumpLayout layout)
{
base.CompileLayout(layout);
layout.Remove("html/body/info");
layout.Remove("background/body/base");
layout.Remove("background/header/base");
layout.Remove("label/header/title");
layout.Add("background/body/base1", () => AddBackground(28, 0, Width, 150, 9270));
layout.AddReplace("image/body/icon", () => AddImage(42, 47, Icon));
layout.Add("image/body/doodad", () => AddImage(0, 6, 1227));
layout.Add("image/body/waxseal", () => AddImage(57, 123, 9005));
layout.Add(
"label/body/content",
() =>
{
AddLabel(116, 54, 2049, "Would you like to join the queue");
AddLabel(116, 75, 2049, "for this battle?");
});
layout.Add("background/header/base1", () => AddBackground(28, 0, Width, 40, 9270));
layout.Add("label/header/title1", () => AddLabel(44, 10, 52, Title));
layout.AddReplace(
"button/header/cancel",
() =>
{
AddButton(295, 6, 2640, 2641, OnCancel);
AddTooltip(1006045);
});
layout.AddReplace(
"button/body/cancel",
() =>
{
AddButton(250, 108, 2119, 2120, OnCancel);
AddTooltip(1006045);
});
layout.AddReplace(
"button/body/accept",
() =>
{
AddButton(176, 108, 2128, 2129, OnAccept);
AddTooltip(1006044);
});
}
示例2: CompileLayout
protected override void CompileLayout(SuperGumpLayout layout)
{
base.CompileLayout(layout);
Width = 275;
Height = 250;
//Adds are not displaying properly unless they come before removes
layout.Add("label/body/title", () => AddLabel(25, 75, 0, Title));
if (_Value is Title)
{
CompileTitleLayout(layout, (Title)_Value);
}
else if (_Value is TitleHue)
{
CompileHueLayout(layout, (TitleHue)_Value);
}
layout.Remove("background/header/base");
layout.Remove("html/body/info");
layout.Remove("label/header/title");
layout.AddReplace("background/body/base", () => AddBackground(0, 50, Width, Height, 5170));
layout.AddReplace("image/body/icon", () => AddImage(20, 100, Icon));
layout.AddReplace(
"button/body/cancel",
() =>
{
AddButton(Width - 90, Height - 10, 4018, 4019, OnCancel);
AddTooltip(1006045);
});
layout.AddReplace(
"button/body/accept",
() =>
{
AddButton(Width - 50, Height - 10, 4015, 4016, OnAccept);
AddTooltip(1006044);
});
}
示例3: CompileLayout
protected override void CompileLayout(SuperGumpLayout layout)
{
base.CompileLayout(layout);
if(Minimized)
{
return;
}
layout.AddReplace(
"background/body/base",
() =>
{
AddBackground(0, 55, 420, 210, 9270);
AddImageTiled(10, 65, 400, 190, 2624);
});
}
示例4: CompileLayout
protected override void CompileLayout(SuperGumpLayout layout)
{
base.CompileLayout(layout);
layout.AddReplace(
"buttongrid/base",
() =>
{
HardwareInfo hi = ((Account)User.Account).HardwareInfo;
int w = (hi != null ? hi.ScreenWidth : 1920) / 20;
int h = (hi != null ? hi.ScreenHeight : 1080) / 20;
for (int x = 0; x < w; x++)
{
for (int y = 0; y < h; y++)
{
AddButton(x * 20, y * 20, 9028, 9021, OnSelectPoint);
}
}
});
layout.AddReplace("image/marker", () => AddImage(Value.X + 5, Value.Y, 9009));
}
示例5: CompileLayout
protected override void CompileLayout(SuperGumpLayout layout)
{
base.CompileLayout(layout);
layout.AddReplace(
"background/header/base",
() =>
{
AddBackground(0, 0, 970, 50, 9270);
AddImageTiled(10, 10, 950, 30, 2624);
});
layout.AddReplace("label/header/close", () => AddLabel(900, 15, 1287, "Close"));
layout.AddReplace("button/header/minimize", () => AddButton(940, 20, 10740, 10742, Close));
layout.AddReplace(
"label/header/winners",
() => AddLabel(400, 14, HighlightHue, "Winners: " + String.Join(", ", Winners.Select(t => t.Name))));
if (Minimized)
{
return;
}
layout.AddReplace("imagetiled/body/spacer", () => AddImageTiled(0, 50, 970, 10, 9274));
Dictionary<int, KeyValuePair<PlayerMobile, PvPProfileHistoryEntry>> range = GetListRange();
if (range.Count == 0)
{
layout.AddReplace(
"background/body/base",
() =>
{
AddBackground(0, 55, 960, 820, 9270);
AddImageTiled(10, 65, 940, 800, 2624);
});
layout.Remove("imagetiled/body/vsep/0");
}
else
{
layout.AddReplace(
"background/body/base",
() =>
{
AddBackground(0, 55, 970, 47 + (range.Count * 30), 9270);
AddImageTiled(10, 65, 950, 25 + (range.Count * 30), 2624);
});
layout.Add(
"sort/header/crystalpoints",
() => AddButton(
440,
70,
0x7d3,
0x7d3,
b =>
{
SortType = 6;
Refresh(true);
}));
layout.Add("imagetiled/header/crystalpoints", () => AddImageTiled(440, 70, 130, 24, 2624));
layout.Add("label/header/crystalpoints", () => AddLabel(440, 70, GetSelectedHue(6), "Crystal Points"));
layout.Add(
"sort/header/crystalassaults",
() => AddButton(
555,
70,
0x7d3,
0x7d3,
b =>
{
SortType = 7;
Refresh(true);
}));
layout.Add("imagetiled/header/crystalassaults", () => AddImageTiled(555, 70, 130, 24, 2624));
layout.Add("label/header/crystalassaults", () => AddLabel(555, 70, GetSelectedHue(7), "Crystal Assaults"));
layout.AddReplace(
"sort/header/brazierassault",
() => AddButton(
680,
70,
0x7d3,
0x7d3,
b =>
{
SortType = 8;
Refresh(true);
}));
layout.AddReplace("imagetiled/header/brazierassault", () => AddImageTiled(680, 70, 130, 24, 2624));
//.........这里部分代码省略.........
示例6: CompileEntryLayout
protected override void CompileEntryLayout(
SuperGumpLayout layout,
int length,
int index,
int pIndex,
int yOffset,
KeyValuePair<PlayerMobile, PvPProfileHistoryEntry> entry)
{
base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry);
yOffset += 30;
layout.Add(
"label/list/entry/crystalpoints/" + index,
() => AddLabel(440, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Crystal Points"].ToString("#,0")));
layout.Add(
"label/list/entry/crystalassaults/" + index,
() => AddLabel(555, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Crystal Steals"].ToString("#,0")));
layout.Add(
"label/list/entry/brazierassaults/" + index,
() => AddLabel(680, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Brazier Captures"].ToString("#,0")));
layout.Add(
"label/list/entry/wallscast/" + index,
() => AddLabel(800, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Walls Cast"].ToString("#,0")));
layout.AddReplace(
"label/list/entry/pointsgained/" + index,
() =>
AddLabel(
890,
yOffset,
GetLabelHue(index, pIndex, entry),
(entry.Value.PointsGained - entry.Value.PointsLost).ToString("#,0")));
}
示例7: CompileEntryLayout
protected override void CompileEntryLayout(
SuperGumpLayout layout,
int length,
int index,
int pIndex,
int yOffset,
KeyValuePair<PlayerMobile, PvPProfileHistoryEntry> entry)
{
base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry);
yOffset += 30;
layout.Add(
"label/list/entry/flagscaptured/" + index,
() => AddLabel(440, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Flags Captured"].ToString("#,0")));
layout.Add(
"label/list/entry/flagsassaulted/" + index,
() => AddLabel(555, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Flags Stolen"].ToString("#,0")));
layout.Add(
"label/list/entry/flagsdefended/" + index,
() => AddLabel(670, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Flags Returned"].ToString("#,0")));
layout.Add(
"label/list/entry/wallscast/" + index,
() => AddLabel(785, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Walls Cast"].ToString("#,0")));
layout.AddReplace(
"label/list/entry/pointsgained/" + index,
() =>
AddLabel(
880,
yOffset,
GetLabelHue(index, pIndex, entry),
(entry.Value.PointsGained - entry.Value.PointsLost).ToString("#,0")));
}
示例8: CompileEntryLayout
protected override void CompileEntryLayout(
SuperGumpLayout layout, int length, int index, int pIndex, int yOffset, SkillName entry)
{
int xOffset = 0;
if(pIndex < 6)
{
xOffset = 10;
}
else if(pIndex < 12)
{
xOffset = 145;
yOffset = 70 + (pIndex - 6) * 30;
}
else if(pIndex < EntriesPerPage)
{
xOffset = 280;
yOffset = 70 + (pIndex - 12) * 30;
}
layout.AddReplace(
"check/list/select/" + index,
() => AddButton(
xOffset,
yOffset,
5033,
5033,
b =>
{
if(SelectedSkills.Contains(entry))
{
SelectedSkills.Remove(entry);
}
else
{
if(SelectedSkills.Count < Limit)
{
SelectedSkills.Add(entry);
}
else
{
new NoticeDialogGump(
User,
Refresh(true),
title: "Limit Reached",
html:
"You have selected the maximum of " + Limit +
" skills.\nIf you are happy with your selection, click the 'Okay' button.").Send();
return;
}
}
Refresh(true);
}));
if(SelectedSkills.Contains(entry))
{
layout.Add(
"imagetiled/list/entry/" + index,
() =>
{
AddImageTiled(xOffset, yOffset, 128, 28, 3004);
AddImageTiled(4 + xOffset, 4 + yOffset, 120, 20, 2624);
});
}
else
{
layout.Add("imagetiled/list/entry/" + index, () => AddImageTiled(xOffset, yOffset, 128, 28, 2624));
}
layout.Add(
"html/list/entry/" + index,
() =>
AddHtml(
4 + xOffset,
4 + yOffset,
120,
20,
GetLabelText(index, pIndex, entry).WrapUOHtmlTag("center").WrapUOHtmlColor(DefaultHtmlColor),
false,
false));
}