本文整理汇总了C#中Server.TextDefinition类的典型用法代码示例。如果您正苦于以下问题:C# TextDefinition类的具体用法?C# TextDefinition怎么用?C# TextDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TextDefinition类属于Server命名空间,在下文中一共展示了TextDefinition类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: AddHtmlText
public void AddHtmlText( int x, int y, int width, int height, TextDefinition text, bool back, bool scroll )
{
if ( text != null && text.Number > 0 )
AddHtmlLocalized( x, y, width, height, text.Number, back, scroll );
else if ( text != null && text.String != null )
AddHtml( x, y, width, height, text.String, back, scroll );
}
开发者ID:Godkong,项目名称:Origins,代码行数:7,代码来源:FactionGump.cs
示例2: ImageTileButtonInfo
public ImageTileButtonInfo( int itemID, int hue, TextDefinition label, int localizedTooltip )
{
m_Hue = hue;
m_ItemID = itemID;
m_Label = label;
m_LocalizedTooltip = localizedTooltip;
}
开发者ID:Godkong,项目名称:RunUO,代码行数:7,代码来源:BaseImageTileButtonsGump.cs
示例3: AddTo
public static void AddTo( ObjectPropertyList list, TextDefinition def )
{
if ( def != null && def.m_Number > 0 )
list.Add( def.m_Number );
else if ( def != null && def.m_String != null )
list.Add( def.m_String );
}
开发者ID:PepeBiondi,项目名称:runsa,代码行数:7,代码来源:TextDefinition.cs
示例4: SendMessageTo
public static void SendMessageTo( Mobile m, TextDefinition def )
{
if ( def.Number > 0 )
m.SendLocalizedMessage( def.Number );
else if ( def.String != null )
m.SendMessage( def.String );
}
开发者ID:greeduomacro,项目名称:xrunuo,代码行数:7,代码来源:TextDefinition.cs
示例5: HuntTrophyAddon
public HuntTrophyAddon(string name, MeasuredBy measuredBy, int measurement, int id, string killed, string location, TextDefinition species)
{
m_SouthID = id;
m_Owner = name;
m_Species = species;
m_Location = location;
m_DateKilled = killed;
m_MeasuredBy = measuredBy;
m_Measurement = measurement;
//TODO: CHeck this
switch (measuredBy)
{
case MeasuredBy.Weight:
Weight = measurement;
break;
case MeasuredBy.Length:
case MeasuredBy.Wingspan:
Weight = 5.0;
break;
}
AddComponent(new HuntTrophyComponent(SouthID), 0, 0, 0);
AddComponent(new HuntTrophyComponent(SouthID + 1), 0, -1, 0);
}
开发者ID:Crome696,项目名称:ServUO,代码行数:25,代码来源:ComplexHuntTrophy.cs
示例6: KillObjective
public KillObjective( int amount, Type[] types, TextDefinition name, QuestArea area )
{
m_DesiredAmount = amount;
m_AcceptedTypes = types;
m_Name = name;
m_Area = area;
}
开发者ID:jackuoll,项目名称:Pre-AOS-RunUO,代码行数:7,代码来源:KillObjective.cs
示例7: CraftInfo
public CraftInfo(
Type t,
TextDefinition group,
TextDefinition name,
double minSkill,
double maxSkill,
IEnumerable<ResourceInfo> resources,
Action<CraftItem> onAdded = null)
{
TypeOf = t;
Group = group.IsNullOrWhiteSpace() ? new TextDefinition("Misc") : group;
Name = name.IsNullOrWhiteSpace() ? new TextDefinition("Unknown") : name;
MinSkill = Math.Max(0.0, Math.Min(minSkill, maxSkill));
MaxSkill = Math.Max(MinSkill, Math.Max(minSkill, maxSkill));
if (resources != null)
{
Resources = resources.Where(r => r.TypeOf != null && r.TypeOf.IsEqualOrChildOf<Item>()).ToArray();
}
if (Resources.Length == 0)
{
Resources = DefResources.Dupe(r => new ResourceInfo(r.TypeOf, r.Name, r.Amount));
}
_OnAdded = onAdded;
}
开发者ID:greeduomacro,项目名称:RuneUO,代码行数:27,代码来源:CraftInfo.cs
示例8: RepairSkillInfo
public RepairSkillInfo( CraftSystem system, Type[] nearbyTypes, TextDefinition notNearbyMessage, TextDefinition name )
{
m_System = system;
m_NearbyTypes = nearbyTypes;
m_NotNearbyMessage = notNearbyMessage;
m_Name = name;
}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:7,代码来源:RepairDeed.cs
示例9: ProximitySpawner
public ProximitySpawner( int amount, int minDelay, int maxDelay, int team, int homeRange, int triggerRange, string spawnMessage, bool instantFlag, string spawnName )
: base( amount, minDelay, maxDelay, team, homeRange, spawnName )
{
m_TriggerRange = triggerRange;
m_SpawnMessage = TextDefinition.Parse( spawnMessage );
m_InstantFlag = instantFlag;
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:7,代码来源:ProximitySpawner.cs
示例10: NewMaginciaMessage
public NewMaginciaMessage(TextDefinition title, TextDefinition body, string args)
{
m_Title = title;
m_Body = body;
m_Args = args;
m_Created = DateTime.UtcNow;
}
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:NewMaginciaMessage.cs
示例11: BasicInfoGump
public BasicInfoGump(TextDefinition body, TextDefinition title)
: base(20, 20)
{
AddBackground(0, 0, 300, 450, 9200);
if (title != null)
{
AddImageTiled(10, 10, 280, 20, 2702);
AddImageTiled(10, 40, 280, 400, 2702);
if (title.Number > 0)
AddHtmlLocalized(12, 10, 275, 20, title.Number, 0xFFFFFF, false, false);
else if (title.String != null)
AddHtml(12, 10, 275, 20, String.Format("<BASEFONT COLOR=WHITE>{0}</BASEFONT>", title.String), false, false);
if (body.Number > 0)
AddHtmlLocalized(12, 40, 275, 390, body.Number, 0xFFFFFF, false, false);
else if (body.String != null)
AddHtml(12, 40, 275, 390, String.Format("<BASEFONT COLOR=WHITE>{0}</BASEFONT>", body.String), false, false);
}
else
{
AddImageTiled(10, 10, 280, 430, 2702);
if (body.Number > 0)
AddHtmlLocalized(12, 10, 275, 425, (int)body, 0xFFFFFF, false, false);
else if (body.String != null)
AddHtml(12, 10, 275, 425, String.Format("<BASEFONT COLOR=WHITE>{0}</BASEFONT>", body.String), false, false);
}
}
开发者ID:Crome696,项目名称:ServUO,代码行数:30,代码来源:BasicInfoGump.cs
示例12: NotifyGumpOption
public NotifyGumpOption(TextDefinition label, Action<GumpButton> callback, Color color, Color fill, Color border)
{
Label = label;
Callback = callback;
LabelColor = color;
FillColor = fill;
BorderColor = border;
}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:9,代码来源:NotifyGump.cs
示例13: HuntingTrophyInfo
public HuntingTrophyInfo(HuntType type, Type creatureType, int id, TextDefinition species, int minMeasurement, int maxMeasurement, MeasuredBy measuredBy, bool complex = false)
{
m_HuntType = type;
m_CreatureType = creatureType;
m_MeasuredBy = measuredBy;
m_SouthID = id;
m_Species = species;
m_MinMeasurement = minMeasurement;
m_MaxMeasurement = maxMeasurement;
m_Complex = complex;
}
开发者ID:Crome696,项目名称:ServUO,代码行数:11,代码来源:HuntingTrophyInfo.cs
示例14: InfoNPCGump
public InfoNPCGump( TextDefinition title, TextDefinition message )
: base( 1060668 ) // INFORMATION
{
RegisterButton( ButtonPosition.Left, ButtonGraphic.Close, 3 );
SetPageCount( 1 );
BuildPage();
TextDefinition.AddHtmlText( this, 160, 108, 250, 16, title, false, false, 0x2710, 0x4AC684 );
TextDefinition.AddHtmlText( this, 98, 156, 312, 180, message, false, true, 0x15F90, 0xBDE784 );
}
开发者ID:nathanvy,项目名称:runuo,代码行数:11,代码来源:InfoNPCGump.cs
示例15: GuardDefinition
public GuardDefinition( Type type, int itemID, int price, int upkeep, int maximum, TextDefinition header, TextDefinition label )
{
m_Type = type;
m_Price = price;
m_Upkeep = upkeep;
m_Maximum = maximum;
m_ItemID = itemID;
m_Header = header;
m_Label = label;
}
开发者ID:Godkong,项目名称:Origins,代码行数:12,代码来源:GuardDefinition.cs
示例16: QuestConversationGump
public QuestConversationGump( MLQuest quest, PlayerMobile pm, TextDefinition text )
: base( 3006156 ) // Quest Conversation
{
CloseOtherGumps( pm );
SetTitle( quest.Title );
RegisterButton( ButtonPosition.Right, ButtonGraphic.Close, 3 );
SetPageCount( 1 );
BuildPage();
AddConversation( text );
}
开发者ID:nathanvy,项目名称:runuo,代码行数:13,代码来源:QuestConversationGump.cs
示例17: CraftItem
public CraftItem( Type type, TextDefinition groupName, TextDefinition name )
{
m_arCraftRes = new CraftResCol();
m_arCraftSkill = new CraftSkillCol();
m_Type = type;
m_GroupNameString = groupName;
m_NameString = name;
m_GroupNameNumber = groupName;
m_NameNumber = name;
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:13,代码来源:CraftItem.cs
示例18: AddHtmlText
public static void AddHtmlText( Server.Gumps.Gump g, int x, int y, int width, int height, TextDefinition text, bool back, bool scroll, int numberColor, int stringColor )
{
if( text != null && text.Number > 0 )
if( numberColor >= 0 )
g.AddHtmlLocalized( x, y, width, height, text.Number, numberColor, back, scroll );
else
g.AddHtmlLocalized( x, y, width, height, text.Number, back, scroll );
else if( text != null && text.String != null )
if( stringColor >= 0 )
g.AddHtml( x, y, width, height, String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", stringColor, text.String ), back, scroll );
else
g.AddHtml( x, y, width, height, text.String, back, scroll );
}
开发者ID:Leodinas,项目名称:uolite,代码行数:13,代码来源:TextDefinition.cs
示例19: CollectObjective
public CollectObjective( int amount, Type type, TextDefinition name )
{
m_DesiredAmount = amount;
m_AcceptedType = type;
m_Name = name;
if ( MLQuestSystem.Debug && ShowDetailed && name.Number > 0 )
{
int itemid = LabelToItemID( name.Number );
if ( itemid <= 0 || itemid > 0x4000 )
Console.WriteLine( "Warning: cliloc {0} is likely giving the wrong item ID", name.Number );
}
}
开发者ID:jackuoll,项目名称:Pre-AOS-RunUO,代码行数:14,代码来源:CollectObjective.cs
示例20: BaseImageTileButtonsGump
public BaseImageTileButtonsGump( TextDefinition header, ImageTileButtonInfo[] buttons ) : base( 10, 10 ) //Coords are 0, o on OSI, intentional difference
{
m_Buttons = buttons;
AddPage( 0 );
int x = XItems * 250;
int y = YItems * 64;
AddBackground( 0, 0, x+20, y+84, 0x13BE );
AddImageTiled( 10, 10, x, 20, 0xA40 );
AddImageTiled( 10, 40, x, y+4, 0xA40 );
AddImageTiled( 10, y+54, x, 20, 0xA40 );
AddAlphaRegion( 10, 10, x, y+64 );
AddButton( 10, y+54, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0 ); //Cancel Button
AddHtmlLocalized( 45, y+56, x-50, 20, 1060051, 0x7FFF, false, false ); // CANCEL
TextDefinition.AddHtmlText( this, 14, 12, x, 20, header, false, false, 0x7FFF, 0xFFFFFF );
AddPage( 1 );
int itemsPerPage = XItems * YItems;
for( int i = 0; i < buttons.Length; i++ )
{
int position = i % itemsPerPage;
int innerX = (position % XItems) * 250 + 14;
int innerY = (position / XItems) * 64 + 44;
int pageNum = i / itemsPerPage + 1;
if( position == 0 && i != 0 )
{
AddButton( x-100, y+54, 0xFA5, 0xFA7, 0, GumpButtonType.Page, pageNum );
AddHtmlLocalized( x-60, y+56, 60, 20, 1043353, 0x7FFF, false, false ); // Next
AddPage( pageNum );
AddButton( x-200, y+54, 0xFAE, 0xFB0, 0, GumpButtonType.Page, pageNum - 1 );
AddHtmlLocalized( x-160, y+56, 60, 20, 1011393, 0x7FFF, false, false ); // Back
}
ImageTileButtonInfo b = buttons[i];
AddImageTiledButton( innerX, innerY, 0x918, 0x919, 100 + i, GumpButtonType.Reply, 0, b.ItemID, b.Hue, 15, 10, b.LocalizedTooltip );
TextDefinition.AddHtmlText( this, innerX + 84, innerY, 250, 60, b.Label, false, false, 0x7FFF, 0xFFFFFF );
}
}
开发者ID:Godkong,项目名称:RunUO,代码行数:49,代码来源:BaseImageTileButtonsGump.cs
注:本文中的Server.TextDefinition类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论