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


C# Gump.AddHtmlLocalized方法代碼示例

本文整理匯總了C#中Server.Gumps.Gump.AddHtmlLocalized方法的典型用法代碼示例。如果您正苦於以下問題:C# Gump.AddHtmlLocalized方法的具體用法?C# Gump.AddHtmlLocalized怎麽用?C# Gump.AddHtmlLocalized使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Gumps.Gump的用法示例。


在下文中一共展示了Gump.AddHtmlLocalized方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: WriteToGump

		public override void WriteToGump( Gump g, ref int y )
		{
			string amount = m_DesiredAmount.ToString();

			g.AddHtmlLocalized( 98, y, 312, 16, 1072204, 0x15F90, false, false ); // Slay
			g.AddLabel( 133, y, 0x481, amount );

			if ( m_Name.Number > 0 )
				g.AddHtmlLocalized( 133 + amount.Length * 15, y, 190, 18, m_Name.Number, 0x77BF, false, false );
			else if ( m_Name.String != null )
				g.AddLabel( 133 + amount.Length * 15, y, 0x481, m_Name.String );

			y += 16;

			#region Location
			if ( m_Area != null )
			{
				g.AddHtmlLocalized( 103, y, 312, 20, 1018327, 0x15F90, false, false ); // Location

				if ( m_Area.Name.Number > 0 )
					g.AddHtmlLocalized( 223, y, 312, 20, m_Area.Name.Number, 0xFFFFFF, false, false );
				else if ( m_Area.Name.String != null )
					g.AddLabel( 223, y, 0x481, m_Area.Name.String );

				y += 16;
			}
			#endregion
		}
開發者ID:greeduomacro,項目名稱:last-wish,代碼行數:28,代碼來源:KillObjective.cs

示例2: WriteToGump

		public override void WriteToGump( Gump g, ref int y )
		{
			if ( ShowDetailed )
			{
				string amount = m_DesiredAmount.ToString();

				g.AddHtmlLocalized( 98, y, 350, 16, 1072205, 0x15F90, false, false ); // Obtain
				g.AddLabel( 143, y, 0x481, amount );

				if ( m_Name.Number > 0 )
				{
					g.AddHtmlLocalized( 143 + amount.Length * 15, y, 190, 18, m_Name.Number, 0x77BF, false, false );
					g.AddItem( 350, y, LabelToItemID( m_Name.Number ) );
				}
				else if ( m_Name.String != null )
				{
					g.AddLabel( 143 + amount.Length * 15, y, 0x481, m_Name.String );
				}
			}
			else
			{
				if ( m_Name.Number > 0 )
					g.AddHtmlLocalized( 98, y, 312, 32, m_Name.Number, 0x15F90, false, false );
				else if ( m_Name.String != null )
					g.AddLabel( 98, y, 0x481, m_Name.String );
			}

			y += 32;
		}
開發者ID:greeduomacro,項目名稱:last-wish,代碼行數:29,代碼來源:CollectObjective.cs

示例3: WriteToGump

		public override void WriteToGump( Gump g, ref int y )
		{
			g.AddHtmlLocalized( 98, y, 312, 16, 1072206, 0x15F90, false, false ); // Escort to

			if ( m_Destination.Name.Number > 0 )
				g.AddHtmlLocalized( 173, y, 312, 20, m_Destination.Name.Number, 0xFFFFFF, false, false );
			else if ( m_Destination.Name.String != null )
				g.AddLabel( 173, y, 0x481, m_Destination.Name.String );

			y += 16;
		}
開發者ID:greeduomacro,項目名稱:last-wish,代碼行數:11,代碼來源:EscortObjective.cs

示例4: WriteToGump

		public override void WriteToGump( Gump g, ref int y )
		{
			m_Objective.WriteToGump( g, ref y );
			y -= 16;

			if ( m_Objective.ShowDetailed )
			{
				base.WriteToGump( g, ref y );

				g.AddHtmlLocalized( 103, y, 120, 16, 3000087, 0x15F90, false, false ); // Total
				g.AddLabel( 223, y, 0x481, GetCurrentTotal().ToString() );
				y += 16;

				g.AddHtmlLocalized( 103, y, 120, 16, 1074782, 0x15F90, false, false ); // Return to
				g.AddLabel( 223, y, 0x481, QuesterNameAttribute.GetQuesterNameFor( Instance.QuesterType ) );
				y += 16;
			}
		}
開發者ID:jackuoll,項目名稱:Pre-AOS-RunUO,代碼行數:18,代碼來源:CollectObjective.cs

示例5: AddHtmlText

        public static void AddHtmlText( Gump g, int x, int y, int width, int height, TextDefinition def, bool back, bool scroll, int numberColor, int stringColor )
        {
            if ( def == null )
                return;

            if ( def.m_Number > 0 )
            {
                if ( numberColor >= 0 ) // 5 bits per RGB component (15 bit RGB)
                    g.AddHtmlLocalized( x, y, width, height, def.m_Number, numberColor, back, scroll );
                else
                    g.AddHtmlLocalized( x, y, width, height, def.m_Number, back, scroll );
            }
            else if ( def.m_String != null )
            {
                if ( stringColor >= 0 ) // 8 bits per RGB component (24 bit RGB)
                    g.AddHtml( x, y, width, height, String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", stringColor, def.m_String ), back, scroll );
                else
                    g.AddHtml( x, y, width, height, def.m_String, back, scroll );
            }
        }
開發者ID:svvota,項目名稱:runuo,代碼行數:20,代碼來源:TextDefinition.cs

示例6: WriteToGump

		public override void WriteToGump( Gump g, ref int y )
		{
			int skillLabel = AosSkillBonuses.GetLabel( m_Skill );
			string args;

			if ( m_ThresholdFixed % 10 == 0 )
				args = String.Format( "#{0}\t{1}", skillLabel, m_ThresholdFixed / 10 ); // as seen on OSI
			else
				args = String.Format( "#{0}\t{1:0.0}", skillLabel, (double)m_ThresholdFixed / 10 ); // for non-integer skill levels

			g.AddHtmlLocalized( 98, y, 312, 16, 1077485, args, 0x15F90, false, false ); // Increase ~1_SKILL~ to ~2_VALUE~
			y += 16;
		}
開發者ID:Leorgrium,項目名稱:runuo,代碼行數:13,代碼來源:GainSkillObjective.cs

示例7: WriteToGump

		public override void WriteToGump( Gump g, ref int y )
		{
			string amount = m_Amount.ToString();

			g.AddHtmlLocalized( 98, y, 312, 16, 1072207, 0x15F90, false, false ); // Deliver
			g.AddLabel( 143, y, 0x481, amount );

			if ( m_Name.Number > 0 )
			{
				g.AddHtmlLocalized( 143 + amount.Length * 15, y, 190, 18, m_Name.Number, 0x77BF, false, false );
				g.AddItem( 350, y, CollectObjective.LabelToItemID( m_Name.Number ) );
			}
			else if ( m_Name.String != null )
			{
				g.AddLabel( 143 + amount.Length * 15, y, 0x481, m_Name.String );
			}

			y += 32;

			g.AddHtmlLocalized( 103, y, 120, 16, 1072379, 0x15F90, false, false ); // Deliver to
			g.AddLabel( 223, y, 0x481, QuesterNameAttribute.GetQuesterNameFor( m_Destination ) );

			y += 16;
		}
開發者ID:nathanvy,項目名稱:runuo,代碼行數:24,代碼來源:DeliverObjective.cs

示例8: WriteTimeRemaining

		public static void WriteTimeRemaining( Gump g, ref int y, TimeSpan timeRemaining )
		{
			g.AddHtmlLocalized( 103, y, 120, 16, 1062379, 0x15F90, false, false ); // Est. time remaining:
			g.AddLabel( 223, y, 0x481, timeRemaining.TotalSeconds.ToString( "F0" ) );
			y += 16;
		}
開發者ID:Leorgrium,項目名稱:runuo,代碼行數:6,代碼來源:BaseObjective.cs

示例9: AddHtmlText

		public static void AddHtmlText( 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:FreeReign,項目名稱:imaginenation,代碼行數:13,代碼來源:TextDefinition.cs


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