當前位置: 首頁>>代碼示例>>C#>>正文


C# Server.TextDefinition類代碼示例

本文整理匯總了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 );
		}
開發者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


注:本文中的Server.TextDefinition類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。