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


C# Gump.AddImageTiled方法代碼示例

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


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

示例1: AddTextEntryMinMaxLabel

        // same as above but with two entries side by side and label included
        public static void AddTextEntryMinMaxLabel( Gump g, string s, int imageid, int x, int y, int hue, int entryIdMin, int entryIdMax, string initialText, int size, string name = "")
        {
            //Label
            g.AddLabel(x, y, hue, s);

            // Min
            g.AddImageTiled( (x + 10 -  (StringWitdth(s) / 2)) + 35 , y -1 , /*height*/ 52, /*width*/ 20, imageid);
            g.AddTextEntry( (x + 10 - (StringWitdth(s) / 2))+ 35 , y- 1 , 52, 20, hue, entryIdMin, "Min", size);

            // Max
            g.AddImageTiled( (x + 10 - (StringWitdth(s) / 2)) + 97 , y -1 , 52, 20, imageid);
            g.AddTextEntry( (x + 10 - (StringWitdth(s) / 2)) + 97 , y -1 , 52, 20, hue, entryIdMax, "Max", size );
        }
開發者ID:zerodowned,項目名稱:My-Stuff,代碼行數:14,代碼來源:PreFabGump.cs

示例2: AddTextEntryMinMax

        // same as above but with two entries side by side and label included
        public static void AddTextEntryMinMax( Gump g, string s, int imageid, int labelX, int entryX , int y, int hue, int entryIdMin, int entryIdMax, string initialText, int size, string name = "")
        {
            //Label
            g.AddLabel(labelX, y, hue, s);

            // Min
            g.AddImageTiled( entryX - 1, y - 2, 52 + 2, 20 + 2, 9204);
            g.AddImageTiled( entryX, y -1 , /*height*/ 52, /*width*/ 20, imageid);
            g.AddTextEntry( entryX, y- 1 , 52, 20, hue, entryIdMin, "Min", size );

            // Max
            g.AddImageTiled( entryX + 62 - 1, y - 2, 52 + 2, 20 + 2, 9204);
            g.AddImageTiled( entryX + 62 , y -1 , 52, 20, imageid);
            g.AddTextEntry( entryX + 62 , y -1 , 52, 20, hue, entryIdMax, "Max", size );
        }
開發者ID:zerodowned,項目名稱:My-Stuff,代碼行數:16,代碼來源:PreFabGump.cs

示例3:

        void IHTMLBookGump.DrawToSurface(Gump gump, int x, int y, string page1Text, string page2Text, int page)
        {
            /*gump.AddImage(x, y, m_Book.GumpID);

            gump.AddHtml( 29 + x + m_Book.HTMLOffset.X, 23 + y + m_Book.HTMLOffset.Y, 147, 167, page1Text, (bool)false, (bool)false);
            gump.AddHtml( 186 + x + m_Book.HTMLOffset.X, 23 + y + m_Book.HTMLOffset.Y, 147, 167, page2Text, (bool)false, (bool)false);*/
            gump.AddBackground(x-22+22, y+4, 646, 362, 5120);
            gump.AddBackground(x+22, y+13, 606, 343, 9300);
            if ( page + 2 < m_Book.HTMLContent.CachedHTMLContent.Length )
                gump.AddButton(x+576, y+0, 2469, 2471, (int)Buttons.NextPage, GumpButtonType.Reply, 0);
            if ( page - 2 >= 0 )
                gump.AddButton(x+492, y+0, 2466, 2468, (int)Buttons.PreviousPage, GumpButtonType.Reply, 0);

            gump.AddHtml( x+31, y+26, 274, 314, page1Text, (bool)false, (bool)false);
            gump.AddHtml( x+343, y+26, 274, 314, page2Text, (bool)false, (bool)false);
            gump.AddImage(x+316, y+341, 10204);
            gump.AddImageTiled(x+316, y+28, 17, 318, 10201);
            gump.AddImage(x+316, y+13, 10202);
            gump.AddHtml( x+31, y+333, 274, 20, "<CENTER><SMALL><B>" + (page+1), (bool)false, (bool)false);
            gump.AddHtml( x+343, y+333, 274, 20, "<CENTER><SMALL><B>" + (page+2), (bool)false, (bool)false);

            /*if ( page + 2 < m_Book.HTMLContent.CachedHTMLContent.Length )
                gump.AddButton(294 + x + m_Book.NextPageButtonOffset.X, 4 + y + m_Book.NextPageButtonOffset.Y, 2236, 2236, (int)Buttons.NextPage, GumpButtonType.Reply, 0);

            if ( page - 2 >= 0 )
                gump.AddButton(23 + x + m_Book.PrevPageButtonOffset.X, 5 + y + m_Book.PrevPageButtonOffset.Y, 2235, 2235, (int)Buttons.PreviousPage, GumpButtonType.Reply, 0);
            */
        }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:28,代碼來源:OffsetableBookGump.cs

示例4: AddText

 public virtual void AddText(Gump gump)
 {
     gump.AddLabel(Location.X, Location.Y, Hue, DisplayText);
     if (Underlined)
     {
         gump.AddImageTiled(Location.X, Location.Y + FontHandling.FONT_LINE_HEIGHT - 1, LabelWidthInPixels, HYPERLINK_UNDERLINE_HEIGHT_IN_PIXELS, HyperLinkUnderlineGumpId); //Top Divisor Image
     }
 }
開發者ID:jasegiffin,項目名稱:JustUO,代碼行數:8,代碼來源:HyperLink.cs

示例5: DisplayBackground

		public static void DisplayBackground( Gump gump, BackgroundType color, int x, int y, int width, int height )
		{
			switch ( color )
			{
					case BackgroundType.Alpha:{ gump.AddAlphaRegion( x, y, width, height ); break; }
					case BackgroundType.BlackAlpha:{ gump.AddImageTiled( x, y, width, height, 2624 ); gump.AddAlphaRegion( x, y, width, height ); break; }
					case BackgroundType.Black:{ gump.AddImageTiled( x, y, width, height, 2624 ); break; }
					case BackgroundType.Gray:{ gump.AddImageTiled( x, y, width, height, 5058 ); break; }
					case BackgroundType.Marble:{ gump.AddImageTiled( x, y, width, height, 5104 ); break; }
					case BackgroundType.Offwhite:{ gump.AddImageTiled( x, y, width, height, 3004 ); break; }
					case BackgroundType.DarkGray:{ gump.AddImageTiled( x, y, width, height, 5124 ); break; }
					case BackgroundType.Scroll:{ gump.AddImageTiled( x, y, width, height, 5174 ); break; }
					case BackgroundType.ActiveTextEntry:{ gump.AddImageTiled( x, y, width, height, 2604 ); break; }
					case BackgroundType.InactiveTextEntry:{ gump.AddImageTiled( x, y, width, height, 1416 ); break; }
			}
		}
開發者ID:brodock,項目名稱:genova-project,代碼行數:16,代碼來源:MasterControl.cs

示例6: DisplayStyle

		public static void DisplayStyle( Gump gump, StyleType style, int x, int y, int width, int height )
		{
			switch ( style )
			{
					case StyleType.OriginalBlack:{ gump.AddBackground( x, y, width, height, 0 ); gump.AddImageTiled( x, y, width, height, 2624 ); break; }
					case StyleType.DistroGray:{ gump.AddBackground( x, y, width, height, 5054 ); break; }
					case StyleType.Marble:{ gump.AddBackground( x, y, width, height, 5100 ); break; }
					case StyleType.BlackBorder:{ gump.AddBackground( x, y, width, height, 2620 ); break; }
					case StyleType.GrayEmbroidered:{ gump.AddBackground( x, y, width, height, 2600 ); break; }
					case StyleType.Offwhite:{ gump.AddBackground( x, y, width, height, 3000 ); break; }
					case StyleType.OffwhiteBorder:{ gump.AddBackground( x, y, width, height, 3500 ); break; }
					case StyleType.GrayMultiBorder:{ gump.AddBackground( x, y, width, height, 3600 ); break; }
					case StyleType.DarkGray:{ gump.AddBackground( x, y, width, height, 5120 ); break; }
					case StyleType.Scroll:{ gump.AddBackground( x - 17, y, width + 34, height, 5170 ); break; }
			}
		}
開發者ID:brodock,項目名稱:genova-project,代碼行數:16,代碼來源:MasterControl.cs

示例7: AddSuperButton

		public void AddSuperButton(int x, int y, int height, int width, int overlayID, int underID, int underIDpr, string text, GumpButtonType type, int replyID, int pageNum, Gump g)
		{
			g.AddImageTiledButton(x, y, underID, underIDpr, replyID, type, pageNum, 0, 0, width, height);
			//this.AddButton(x + 1, y+((height - 20) / 2), underID, underIDpr, replyID, type, pageNum);
			g.AddImageTiled(x, y, width, height, overlayID);
			g.AddLabel(x + 5, y + ((height - 18) / 2), Skin.NormalText, text);
		}
開發者ID:greeduomacro,項目名稱:unknown-shard-1,代碼行數:7,代碼來源:ControlBasePages.cs

示例8: BaseSkinByType

		internal void BaseSkinByType(Gump g)
		{
			if (relplug == null)
			{ SkillSettings.DoTell("Base Type is invalid. Cannot skin."); }
			g.AddPage(0);
			string switchby = relplug.getGumpType();
			if (switchby == "Control")
			{
				//this.X = sk.GetCoord("Control", "X", sk ); this.Y = sk.SelectionY;
				g.X = 0; g.Y = 0;
				if (!Skin.WindowInfo.ContainsKey("Control"))
				{ SkillSettings.DoTell("No key for Control gump skin."); return; }
				WindowInfo inf = Skin.WindowInfo["Control"];
				g.X = inf.X; g.Y = inf.Y;
				//this.AddBackground(sk.GetCoord("Control", "X", sk ), sk.SelectionY, sk.GetCoord("Control", "W", sk ), sk.GetCoord("Control", "H", sk ), sk.SelectBGID);				
				g.AddBackground(0, 0, inf.W, inf.H, inf.bgID);
				g.AddImageTiled(Skin.BarSHX, Skin.BarSHY, Skin.BarSHW, Skin.BarSHH, Skin.SelectLineH);
				g.AddHtml(Skin.TMSSX, Skin.TMSSY, 140, 20, "<basefont size=5 face=1 color=#CC0000><Center>TMSS - //4// -</center></basefont>", false, false);
				//<basefont size=5 face=1 color=#CC0000><Center>TM Skill & Stat System v3.0</center></basefont>								
			}
			else if (switchby == "Master")
			{
				g.X = 0; g.Y = 0;
				if (!Skin.WindowInfo.ContainsKey("Master"))
				{ SkillSettings.DoTell("No key for Master gump skin."); return; }
				WindowInfo inf = Skin.WindowInfo["Master"];				
				//this.AddBackground(sk.MasterX, sk.MasterY, sk.MasterW, sk.MasterH, sk.MasterBGID);
				g.X = inf.X; g.Y = inf.Y;
				g.AddBackground(0, 0, inf.W, inf.H, inf.bgID);
				g.AddImageTiled(Skin.BarMHX, Skin.BarMHY, Skin.BarMHW, Skin.BarMHH, Skin.MasterLineH);
				g.AddImageTiled(Skin.BarMVX, Skin.BarMVY, Skin.BarMVW, Skin.BarMVH, Skin.MasterLineV);
				g.AddItem(Skin.IconMX, Skin.IconMY, Skin.IconMID, Skin.IconMColor);				
			}
			else if (switchby == "Underbar")
			{
				g.X = 0; g.Y = 0;
				if (!Skin.WindowInfo.ContainsKey("Underbar"))
				{ SkillSettings.DoTell("No key for Underbar gump skin."); return; }
				WindowInfo inf = Skin.WindowInfo["Underbar"];
				g.X = inf.X; g.Y = inf.Y;
				g.AddBackground(0, 0, inf.W, inf.H, inf.bgID);
				//this.AddBackground(sk.sk.GetCoord("Underbar", "X", );, sk.sk.GetCoord("Underbar", "Y", );, sk.HelpW, sk.HelpH, sk.HelpBGID);				
			}
			else SkillSettings.DoTell("Unknown Gump Type. Cannot apply base skin.");
		}
開發者ID:greeduomacro,項目名稱:unknown-shard-1,代碼行數:45,代碼來源:ControlBasePages.cs

示例9: RenderOutline

        public override void RenderOutline(Gump gump)
        {
            if (!Background)
            {
                gump.AddImageTiled(X, Y,               (int)Width, 1, 2621);
                gump.AddImageTiled(X, Y + (int)Height, (int)Width, 1, 2621);

                gump.AddImageTiled(X,              Y, 1, (int)Height, 2623);
                gump.AddImageTiled(X + (int)Width, Y, 1, (int)Height, 2623); 
            }
        }
開發者ID:jasegiffin,項目名稱:JustUO,代碼行數:11,代碼來源:HtmlElement.cs

示例10: AddTextEntryPreFab

 // text entry with tiled image background
 public static void AddTextEntryPreFab( Gump g, int imageid, int x, int y, int width, int height, int hue, int entryID, string initialText, int size, string name = "")
 {
     g.AddImageTiled( x - 1, y - 1, width + 2, height + 2, 9204);
     g.AddImageTiled( x, y, width, height, imageid);
     g.AddTextEntry( x, y, width, height, hue, entryID, initialText, size );
 }
開發者ID:zerodowned,項目名稱:My-Stuff,代碼行數:7,代碼來源:PreFabGump.cs


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