本文整理汇总了C#中Server.Gumps.Gump.AddLabelCropped方法的典型用法代码示例。如果您正苦于以下问题:C# Gump.AddLabelCropped方法的具体用法?C# Gump.AddLabelCropped怎么用?C# Gump.AddLabelCropped使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Gumps.Gump
的用法示例。
在下文中一共展示了Gump.AddLabelCropped方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Gump
//.........这里部分代码省略.........
gump.AddRadio(435, 190, 208, 209, (Params.SelectedLocation.Key.Map == Map.Trammel), 111);
gump.AddRadio(570, 190, 208, 209, (Params.SelectedLocation.Key.Map == Map.Malas), 112);
gump.AddRadio(435, 215, 208, 209, (Params.SelectedLocation.Key.Map == Map.Felucca), 113);
gump.AddRadio(570, 215, 208, 209, (Params.SelectedLocation.Key.Map == Map.Ilshenar), 114);
gump.AddRadio(435, 240, 208, 209, (Params.SelectedLocation.Key.Map == Map.Tokuno), 115);
gump.AddLabel(460, 192, 1153, "Tram");
gump.AddLabel(530, 192, 1153, "Malas");
gump.AddLabel(460, 217, 1153, "Fel");
gump.AddLabel(542, 217, 1153, "Ilsh");
gump.AddLabel(460, 242, 1153, "Tokuno");
gump.AddLabel(465, 282, 1153, "Young?");
gump.AddCheck(440, 280, 210, 211, Params.SelectedLocation.Key.GetFlag(EntryFlag.Young), 120);
gump.AddLabel(465, 307, 1153, "Gen?");
gump.AddCheck(440, 305, 210, 211, Params.SelectedLocation.Key.GetFlag(EntryFlag.Generate), 116);
gump.AddLabel(515, 307, 1153, "Staff?");
gump.AddCheck(565, 305, 210, 211, Params.SelectedLocation.Key.GetFlag(EntryFlag.StaffOnly), 117);
gump.AddLabel(465, 332, 1153, "Reds?");
gump.AddCheck(440, 330, 210, 211, Params.SelectedLocation.Key.GetFlag(EntryFlag.Reds), 118);
gump.AddLabel(522, 332, 1153, "Chrg?");
gump.AddCheck(565, 330, 210, 211, Params.SelectedLocation.Key.GetFlag(EntryFlag.Charge), 119);
}
else
{
gump.AddButton(550, 265, 2642, 2643, 104, GumpButtonType.Reply, 0); //Apply Category
gump.AddImage(440, 110, 2501);
gump.AddTextEntry(446, 110, 130, 20, 0, 105, Params.SelectedCategory.Key.Name);
gump.AddImage(445, 160, 2443);
gump.AddTextEntry(450, 160, 53, 20, 0, 110, Params.SelectedCategory.Key.Cost.ToString());
gump.AddLabel(435, 162, 1153, "C");
gump.AddLabel(465, 282, 1153, "Young?");
gump.AddCheck(440, 280, 210, 211, Params.SelectedCategory.Key.GetFlag(EntryFlag.Young), 120);
gump.AddLabel(465, 307, 1153, "Gen?");
gump.AddCheck(440, 305, 210, 211, Params.SelectedCategory.Key.GetFlag(EntryFlag.Generate), 116);
gump.AddLabel(515, 307, 1153, "Staff?");
gump.AddCheck(565, 305, 210, 211, Params.SelectedCategory.Key.GetFlag(EntryFlag.StaffOnly), 117);
gump.AddLabel(465, 332, 1153, "Reds?");
gump.AddCheck(440, 330, 210, 211, Params.SelectedCategory.Key.GetFlag(EntryFlag.Reds), 118);
gump.AddLabel(522, 332, 1153, "Chrg?");
gump.AddCheck(565, 330, 210, 211, Params.SelectedCategory.Key.GetFlag(EntryFlag.Charge), 119);
}
}
break;
}
#endregion //Manage Gump Code
#region Import Gump Code
case (int)Pages.Import:
{//Import
if (!Directory.Exists("ACC Exports"))
{
from.SendMessage("There are no files to import!");
return;
}
gump.AddButton(195, 65, 2445, 2445, 124, GumpButtonType.Reply, 0); //Switch to Systems
gump.AddLabel(220, 66, 1153, "Systems");
gump.AddButton(310, 65, 2445, 2445, 125, GumpButtonType.Reply, 0); //Switch to Categories
gump.AddLabel(328, 66, 1153, "Categories");
gump.AddButton(425, 65, 2445, 2445, 126, GumpButtonType.Reply, 0); //Switch to Locations
gump.AddLabel(447, 66, 1153, "Locations");
switch ((int)Params.ImportSelection)
{
case (int)ImportSelections.Systems: { Dirs = Directory.GetFiles("ACC Exports/", "*.pgs"); break; }
case (int)ImportSelections.Categories: { Dirs = Directory.GetFiles("ACC Exports/", "*.pgc"); break; }
case (int)ImportSelections.Locations: { Dirs = Directory.GetFiles("ACC Exports/", "*.pgl"); break; }
default: { return; }
}
if (Dirs == null || Dirs.Length == 0)
{
from.SendMessage("There are no files of that type!");
return;
}
for (int i = 0, r = 0, c = 0; i < Dirs.Length && c < 3; i++)
{
string s = Dirs[i];
s = s.Remove(0, 12);
s = s.Remove(s.Length - 4, 4);
if (Params.ImportSelection == ImportSelections.Systems)
s = s.Remove(0, 9);
gump.AddButton(120 + c * 150, 100 + r * 30, 2501, 2501, 300 + i, GumpButtonType.Reply, 0);
gump.AddLabelCropped(125 + c * 150, 101 + r * 30, 140, 30, 1153, s);
c += (r == 7 ? 1 : 0);
r += (r == 7 ? -7 : 1);
}
break;
}
#endregion //Import Gump Code
}
}