Exemplo n.º 1
0
		public override Rectangle2D GenerateGump(TriggerObject trigObject, UberScriptGump gump, int originX, int originY)
		{
			if (m_Condition != null && GetCondition(trigObject) == false)
			{
				return new Rectangle2D();
			}

			int randomButtonID = gump.GetRandomButtonID();
			int size = GetSize(trigObject);

			gump.ButtonMap.Add(randomButtonID, GetName(trigObject));

			if (size > -1)
			{
				gump.AddTextEntry(
					originX + GetX(trigObject),
					originY + GetY(trigObject),
					GetWidth(trigObject),
					GetHeight(trigObject),
					GetHue(trigObject),
					randomButtonID,
					GetDefault(trigObject),
					size);
			}
			else
			{
				gump.AddTextEntry(
					originX + GetX(trigObject),
					originY + GetY(trigObject),
					GetWidth(trigObject),
					GetHeight(trigObject),
					GetHue(trigObject),
					randomButtonID,
					GetDefault(trigObject));
			}

			if (gump.CurrentList != null && gump.CurrentListObject != null)
			{
				gump.AddListIDMapping(gump.CurrentList, gump.CurrentListObject, randomButtonID);
			}

			return new Rectangle2D(GetX(trigObject), GetY(trigObject), GetWidth(trigObject), GetHeight(trigObject));
		}
Exemplo n.º 2
0
		public override Rectangle2D GenerateGump(TriggerObject trigObject, UberScriptGump gump, int originX, int originY)
		{
			if (m_Condition != null && GetCondition(trigObject) == false)
			{
				return new Rectangle2D();
			}

			int randomButtonID = gump.GetRandomButtonID();

			gump.ButtonMap.Add(randomButtonID, GetName(trigObject));
			gump.AddButton(
				originX + GetX(trigObject),
				originY + GetY(trigObject),
				GetNormalID(trigObject),
				GetPressedID(trigObject),
				randomButtonID,
				GumpButtonType.Reply,
				0);

			if (gump.CurrentList != null && gump.CurrentListObject != null)
			{
				gump.AddListIDMapping(gump.CurrentList, gump.CurrentListObject, randomButtonID);
			}

			return new Rectangle2D(GetX(trigObject), GetY(trigObject), GetWidth(trigObject), GetHeight(trigObject));
		}