当前位置: 首页>>代码示例>>C#>>正文


C# IGumpWriter.AppendLayoutNS方法代码示例

本文整理汇总了C#中IGumpWriter.AppendLayoutNS方法的典型用法代码示例。如果您正苦于以下问题:C# IGumpWriter.AppendLayoutNS方法的具体用法?C# IGumpWriter.AppendLayoutNS怎么用?C# IGumpWriter.AppendLayoutNS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IGumpWriter的用法示例。


在下文中一共展示了IGumpWriter.AppendLayoutNS方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AppendTo

		public override void AppendTo(IGumpWriter disp)
		{
			disp.AppendLayout(m_LayoutName);
			disp.AppendLayout(m_X);
			disp.AppendLayout(m_Y);
			disp.AppendLayout(m_GumpID);

			if (m_Hue != 0)
			{
				disp.AppendLayout(m_HueEquals);
				disp.AppendLayoutNS(m_Hue);
			}
		}
开发者ID:mtPrimo,项目名称:ServUO,代码行数:13,代码来源:GumpImage.cs

示例2: AppendTo

		public override void AppendTo(IGumpWriter disp)
		{
			var x = _X;
			var y = _Y;

			if (_Centering.HasFlag(Axis.Horizontal))
			{
				x -= Width / 2;
			}

			if (_Centering.HasFlag(Axis.Vertical))
			{
				y -= Height / 2;
			}

			var value = _Value.ToString();

			for (int i = 0, s = 0; i < value.Length; i++, s += 20)
			{
				switch (value[i])
				{
					case '-':
					{
						disp.AppendLayout(_Layout1A);
						disp.AppendLayout(x + s);
						disp.AppendLayout(y + 12);
						disp.AppendLayout(1433);

						if (_Hue > 0)
						{
							disp.AppendLayout(_Layout1Hue);
							disp.AppendLayoutNS(FixHue(_Hue));
						}
					}
						continue;
					default:
					{
						disp.AppendLayout(i == 0 ? _Layout1A : _Layout1B);
						disp.AppendLayout(x + s);
						disp.AppendLayout(y);
						disp.AppendLayout(1423 + Byte.Parse(value.Substring(i, 1)));

						if (_Hue > 0)
						{
							disp.AppendLayout(_Layout1Hue);
							disp.AppendLayoutNS(FixHue(_Hue));
						}
					}
						continue;
				}
			}
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:52,代码来源:GumpImageNumber.cs

示例3: AppendTo

		public override void AppendTo(IGumpWriter disp)
		{
			var s = _ShadowAngle.GetPoint2D(_X, _Y, _ShadowOffset);

			disp.AppendLayout(_Layout1A);
			disp.AppendLayout(s.X);
			disp.AppendLayout(s.Y);
			disp.AppendLayout(_ImageID);

			if (_ShadowHue > 0)
			{
				disp.AppendLayout(_Layout1Hue);
				disp.AppendLayoutNS(FixHue(_ShadowHue));
			}

			disp.AppendLayout(_Layout1B);
			disp.AppendLayout(_X);
			disp.AppendLayout(_Y);
			disp.AppendLayout(_ImageID);

			if (_ImageHue > 0)
			{
				disp.AppendLayout(_Layout1Hue);
				disp.AppendLayoutNS(FixHue(_ImageHue));
			}
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:26,代码来源:GumpImageShadow.cs

示例4: AppendTo

        public virtual void AppendTo(IGumpWriter disp, ref string props, ref bool hidePants, ref bool hideHair)
        {
            if (_Items == null || _Items.Count == 0)
            {
                return;
            }

            _Items.SortLayers();

            foreach (var item in _Items.TakeWhile(i => i.Layer.IsOrdered()).Where(i => !_Body.IsGhost || i.ItemID == 8270))
            {
                if (item.ItemID == 0x1411 || item.ItemID == 0x141A) // plate legs
                {
                    hidePants = true;
                }
                else if (hidePants && item.Layer == Layer.Pants)
                {
                    continue;
                }

                if (!hideHair && item.Layer == Layer.Helm)
                {
                    hideHair = true;
                }

                var gump = ArtworkSupport.LookupGump(item.ItemID, _Body.IsFemale);

                if (gump <= 0)
                {
                    continue;
                }

                disp.AppendLayout(_Layout2B);
                disp.AppendLayout(_X);
                disp.AppendLayout(_Y);
                disp.AppendLayout(gump);

                var hue = _SolidHue >= 0 ? _SolidHue : item.Hue;

                if (hue > 0 || (_SolidHue >= 0 && hue == _SolidHue))
                {
                    disp.AppendLayout(_Layout2Hue);
                    disp.AppendLayoutNS(FixHue(hue));
                }

                if (_Properties)
                {
                    props += item.Serial.Value + ",";
                }
            }
        }
开发者ID:Vita-Nex,项目名称:Core,代码行数:51,代码来源:GumpPaperdoll.cs

示例5: AppendTo

		public override void AppendTo(IGumpWriter disp)
		{
			var first = true;

			if (_Background)
			{
				disp.AppendLayout(_Layout1A);
				disp.AppendLayout(_X);
				disp.AppendLayout(_Y);
				disp.AppendLayout(1417);

				if (_BackgroundHue > 0)
				{
					disp.AppendLayout(_Layout1Hue);
					disp.AppendLayoutNS(FixHue(_BackgroundHue));
				}

				first = false;
			}

			if (_Face)
			{
				disp.AppendLayout(first ? _Layout1A : _Layout1B);
				disp.AppendLayout(_X + 33);
				disp.AppendLayout(_Y + 33);
				disp.AppendLayout(1210);

				if (_FaceHue > 0)
				{
					disp.AppendLayout(_Layout1Hue);
					disp.AppendLayoutNS(FixHue(_FaceHue));
				}

				first = false;
			}

			if (_Numbers)
			{
				for (var number = 1; number <= 12; number++)
				{
					AppendTo(disp, ref first, number, _NumbersColor);
				}
			}

			var center = new Point2D(_X + 40, _Y + 40);

			if (_Hours)
			{
				var ha = 2.0f * Math.PI * (_Time.Hour + _Time.Minute / 60.0f) / 12.0f;
				var hl = center.GetLine2D(center.Clone2D((int)(40 * Math.Sin(ha) / 1.5f), (int)(-40 * Math.Cos(ha) / 1.5f)));

				AppendTo(disp, ref first, hl, 3, _HoursColor);
			}

			if (_Minutes)
			{
				var ma = 2.0f * Math.PI * (_Time.Minute + _Time.Second / 60.0f) / 60.0f;
				var ml = center.GetLine2D(center.Clone2D((int)(40 * Math.Sin(ma)), (int)(-40 * Math.Cos(ma))));

				AppendTo(disp, ref first, ml, 3, _MinutesColor);
			}

			if (_Seconds)
			{
				var sa = 2.0f * Math.PI * _Time.Second / 60.0f;
				var sl = center.GetLine2D(center.Clone2D((int)(40 * Math.Sin(sa)), (int)(-40 * Math.Cos(sa))));

				AppendTo(disp, ref first, sl, 1, _SecondsColor);
			}

			if (first)
			{
				disp.AppendLayout(_Layout2A);
				disp.AppendLayout(_X);
				disp.AppendLayout(_Y);
				disp.AppendLayout(Width);
				disp.AppendLayout(Height);
				disp.AppendLayout(Parent.Intern(" ".WrapUOHtmlBG(Color.Transparent)));
				disp.AppendLayout(false);
				disp.AppendLayout(false);
			}
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:82,代码来源:GumpClock.cs


注:本文中的IGumpWriter.AppendLayoutNS方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。