本文整理汇总了C#中Server.TextDefinition类的典型用法代码示例。如果您正苦于以下问题:C# TextDefinition类的具体用法?C# TextDefinition怎么用?C# TextDefinition使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TextDefinition类属于Server命名空间,在下文中一共展示了TextDefinition类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 );
}
示例2: ImageTileButtonInfo
public ImageTileButtonInfo( int itemID, int hue, TextDefinition label, int localizedTooltip )
{
m_Hue = hue;
m_ItemID = itemID;
m_Label = label;
m_LocalizedTooltip = localizedTooltip;
}
示例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 );
}
示例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 );
}
示例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);
}
示例6: KillObjective
public KillObjective( int amount, Type[] types, TextDefinition name, QuestArea area )
{
m_DesiredAmount = amount;
m_AcceptedTypes = types;
m_Name = name;
m_Area = area;
}
示例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;
}
示例8: RepairSkillInfo
public RepairSkillInfo( CraftSystem system, Type[] nearbyTypes, TextDefinition notNearbyMessage, TextDefinition name )
{
m_System = system;
m_NearbyTypes = nearbyTypes;
m_NotNearbyMessage = notNearbyMessage;
m_Name = name;
}
示例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;
}
示例10: NewMaginciaMessage
public NewMaginciaMessage(TextDefinition title, TextDefinition body, string args)
{
m_Title = title;
m_Body = body;
m_Args = args;
m_Created = DateTime.UtcNow;
}
示例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);
}
}
示例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;
}
示例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;
}
示例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 );
}
示例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;
}