Exemplo n.º 1
0
            public CutTimer(Mobile customer, INXHairStylist hairStylist, List <Item> styles, int ticks)  : base(TimeSpan.Zero, TimeSpan.FromMilliseconds(250.0), ticks)
            {
                m_Customer    = customer;
                m_HairStylist = hairStylist;
                m_Styles      = styles;
                m_MaxTicks    = ticks;

                m_HairStylist.FocusMob = m_Customer;

                //If the hair stylist has a chair/item assosiated with it, then that will be the location for the player to "sit".
                if (m_HairStylist.StylistChairLoc != Point3D.Zero)
                {
                    m_StartingLocation = m_LastLocation = m_HairStylist.StylistChairLoc;
                }
                else
                {
                    m_StartingLocation = m_LastLocation = m_Customer.Location;
                }

                m_LastDirection = m_Customer.Direction;

                if (m_Customer.HairItemID == 0)
                {
                    m_BaldCustomer     = true;
                    m_Customer.HairHue = 0;
                }

                if (m_HairStylist.FreezeCustomer)
                {
                    m_Customer.Frozen = true;
                }
            }
Exemplo n.º 2
0
        public HairStylistConfigGump(Mobile from, INXHairStylist hairStylist)
            : base(85, 40)
        {
            m_From         = from;
            m_HairStylist  = hairStylist;
            m_PropertyList = GetPropertyInfoList();

            InitializePage(0);
        }
Exemplo n.º 3
0
 public InternalTarget(PropertyInfo prop, Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, int page)
     : base(-1, true, TargetFlags.None)
 {
     m_Property     = prop;
     m_From         = from;
     m_HairStylist  = hairStylist;
     m_PropertyList = propertyList;
     m_Page         = page;
 }
Exemplo n.º 4
0
        public HairStylistConfigGump(Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, int page)
            : base(85, 40)
        {
            m_From         = from;
            m_HairStylist  = hairStylist;
            m_PropertyList = propertyList;
            m_Page         = page;

            InitializePage(m_Page);
        }
Exemplo n.º 5
0
                public InternalPicker(PropertyInfo prop, Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, int page)
                    : base(((IHued)hairStylist).HuedItemID)
                {
                    m_Property    = prop;
                    m_From        = from;
                    m_HairStylist = hairStylist;

                    m_Page         = page;
                    m_PropertyList = propertyList;
                }
Exemplo n.º 6
0
 public HairStylistSetCustomEnumGump(PropertyInfo prop, Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, string[] names, int page)
     : base(prop, from, hairStylist, null, page, new ArrayList(propertyList), names, null)
 {
     m_Property     = prop;
     m_From         = from;
     m_HairStylist  = hairStylist;
     m_PropertyList = propertyList;
     m_Names        = names;
     m_Page         = page;
 }
Exemplo n.º 7
0
		public ConfigSelectionGump(Mobile from, INXHairStylist hairStylist) : base( 180, 180 )
		{
            m_From = from;
            m_HairStylist  = hairStylist;

			AddPage(0);

			AddImage(105, 131, 3507);
			AddImage(105, 105, 3501);

            AddLabel(135, 121, 0, "Paperdoll");
            AddButton(115, 126, 2362, 2360, (int)GumpChoice.ViewPaperDoll, GumpButtonType.Reply, 0); // button for the paperdoll
			
            AddLabel(270, 121, 0, "Config");
            AddButton(324, 126, 2362, 2360, (int)GumpChoice.ConfigSettings, GumpButtonType.Reply, 0); // button for the config

			AddImage(80, 105, 3500);
			AddImage(346, 105, 3502);
			AddImage(79, 131, 3506);
			AddImage(346, 131, 3508);
		}
Exemplo n.º 8
0
        public ConfigSelectionGump(Mobile from, INXHairStylist hairStylist) : base(180, 180)
        {
            m_From        = from;
            m_HairStylist = hairStylist;

            AddPage(0);

            AddImage(105, 131, 3507);
            AddImage(105, 105, 3501);

            AddLabel(135, 121, 0, "Paperdoll");
            AddButton(115, 126, 2362, 2360, (int)GumpChoice.ViewPaperDoll, GumpButtonType.Reply, 0); // button for the paperdoll

            AddLabel(270, 121, 0, "Config");
            AddButton(324, 126, 2362, 2360, (int)GumpChoice.ConfigSettings, GumpButtonType.Reply, 0); // button for the config

            AddImage(80, 105, 3500);
            AddImage(346, 105, 3502);
            AddImage(79, 131, 3506);
            AddImage(346, 131, 3508);
        }
Exemplo n.º 9
0
            public HairStylistSetTimeSpanGump(PropertyInfo prop, Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, int page) : base(PropsConfig.GumpOffsetX, PropsConfig.GumpOffsetY)
            {
                m_Property     = prop;
                m_From         = from;
                m_HairStylist  = hairStylist;
                m_Page         = page;
                m_PropertyList = propertyList;

                TimeSpan ts = (TimeSpan)prop.GetValue(hairStylist, null);

                AddPage(0);

                AddBackground(0, 0, BackWidth, BackHeight, PropsConfig.BackGumpID);
                AddImageTiled(PropsConfig.BorderSize, PropsConfig.BorderSize, TotalWidth - (PropsConfig.OldStyle ? PropsConfig.SetWidth + PropsConfig.OffsetSize : 0), TotalHeight, PropsConfig.OffsetGumpID);

                AddRect(0, prop.Name, 0, -1);
                AddRect(1, ts.ToString(), 0, -1);
                AddRect(2, "Zero", 1, -1);
                AddRect(3, "From H:M:S", 2, -1);
                AddRect(4, "H:", 3, 0);
                AddRect(5, "M:", 4, 1);
                AddRect(6, "S:", 5, 2);
            }
Exemplo n.º 10
0
            public HairStylistSetListOptionGump(PropertyInfo prop, Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, string[] names, object[] values, int propsPage)
                : base(PropsConfig.GumpOffsetX, PropsConfig.GumpOffsetY)
            {
                m_Property = prop;
                m_From = from;
                m_HairStylist  = hairStylist;

                m_Page = propsPage;
                m_PropertyList = propertyList;

                m_Values = values;

                int pages = (names.Length + EntryCount - 1) / EntryCount;
                int index = 0;

                for (int page = 1; page <= pages; ++page)
                {
                    AddPage(page);

                    int start = (page - 1) * EntryCount;
                    int count = names.Length - start;

                    if (count > EntryCount)
                        count = EntryCount;

                    int totalHeight = PropsConfig.OffsetSize + ((count + 2) * (PropsConfig.EntryHeight + PropsConfig.OffsetSize));
                    int backHeight = PropsConfig.BorderSize + totalHeight + PropsConfig.BorderSize;

                    AddBackground(0, 0, BackWidth, backHeight, PropsConfig.BackGumpID);
                    AddImageTiled(PropsConfig.BorderSize, PropsConfig.BorderSize, TotalWidth - (PropsConfig.OldStyle ? PropsConfig.SetWidth + PropsConfig.OffsetSize : 0), totalHeight, PropsConfig.OffsetGumpID);



                    int x = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                    int y = PropsConfig.BorderSize + PropsConfig.OffsetSize;

                    int emptyWidth = TotalWidth - PropsConfig.PrevWidth - PropsConfig.NextWidth - (PropsConfig.OffsetSize * 4) - (PropsConfig.OldStyle ? PropsConfig.SetWidth + PropsConfig.OffsetSize : 0);

                    AddImageTiled(x, y, PropsConfig.PrevWidth, PropsConfig.EntryHeight, PropsConfig.HeaderGumpID);

                    if (page > 1)
                    {
                        AddButton(x + PropsConfig.PrevOffsetX, y + PropsConfig.PrevOffsetY, PropsConfig.PrevButtonID1, PropsConfig.PrevButtonID2, 0, GumpButtonType.Page, page - 1);

                        if (PrevLabel)
                            AddLabel(x + PrevLabelOffsetX, y + PrevLabelOffsetY, PropsConfig.TextHue, "Previous");
                    }

                    x += PropsConfig.PrevWidth + PropsConfig.OffsetSize;

                    if (!PropsConfig.OldStyle)
                        AddImageTiled(x - (PropsConfig.OldStyle ? PropsConfig.OffsetSize : 0), y, emptyWidth + (PropsConfig.OldStyle ? PropsConfig.OffsetSize * 2 : 0), PropsConfig.EntryHeight, PropsConfig.HeaderGumpID);

                    x += emptyWidth + PropsConfig.OffsetSize;

                    if (!PropsConfig.OldStyle)
                        AddImageTiled(x, y, PropsConfig.NextWidth, PropsConfig.EntryHeight, PropsConfig.HeaderGumpID);

                    if (page < pages)
                    {
                        AddButton(x + PropsConfig.NextOffsetX, y + PropsConfig.NextOffsetY, PropsConfig.NextButtonID1, PropsConfig.NextButtonID2, 0, GumpButtonType.Page, page + 1);

                        if (NextLabel)
                            AddLabel(x + NextLabelOffsetX, y + NextLabelOffsetY, PropsConfig.TextHue, "Next");
                    }



                    AddRect(0, prop.Name, 0);

                    for (int i = 0; i < count; ++i)
                        AddRect(i + 1, names[index], ++index);
                }
            }
Exemplo n.º 11
0
 public HairStylistSetCustomEnumGump(PropertyInfo prop, Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, string[] names, int page)
     : base(prop, from, hairStylist, null, page, new ArrayList(propertyList), names, null)
 {
     m_Property = prop;
     m_From = from;
     m_HairStylist  = hairStylist;
     m_PropertyList = propertyList;
     m_Names = names;
     m_Page = page;
 }
Exemplo n.º 12
0
            public HairStylistSetTimeSpanGump(PropertyInfo prop, Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, int page) : base(PropsConfig.GumpOffsetX, PropsConfig.GumpOffsetY)
            {
                m_Property = prop;
                m_From = from;
                m_HairStylist  = hairStylist;
                m_Page = page;
                m_PropertyList = propertyList;

                TimeSpan ts = (TimeSpan)prop.GetValue(hairStylist, null);

                AddPage(0);

                AddBackground(0, 0, BackWidth, BackHeight, PropsConfig.BackGumpID);
                AddImageTiled(PropsConfig.BorderSize, PropsConfig.BorderSize, TotalWidth - (PropsConfig.OldStyle ? PropsConfig.SetWidth + PropsConfig.OffsetSize : 0), TotalHeight, PropsConfig.OffsetGumpID);

                AddRect(0, prop.Name, 0, -1);
                AddRect(1, ts.ToString(), 0, -1);
                AddRect(2, "Zero", 1, -1);
                AddRect(3, "From H:M:S", 2, -1);
                AddRect(4, "H:", 3, 0);
                AddRect(5, "M:", 4, 1);
                AddRect(6, "S:", 5, 2);
            }
Exemplo n.º 13
0
 public InternalTarget(PropertyInfo prop, Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, int page)
     : base(-1, true, TargetFlags.None)
 {
     m_Property = prop;
     m_From = from;
     m_HairStylist  = hairStylist;
     m_PropertyList = propertyList;
     m_Page = page;
 }
Exemplo n.º 14
0
            public HairStylistSetPoint3DGump(PropertyInfo prop, Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, int page)
                : base(PropsConfig.GumpOffsetX, PropsConfig.GumpOffsetY)
            {
                m_Property = prop;
                m_From = from;
                m_HairStylist  = hairStylist;
                m_Page = page;
                m_PropertyList = propertyList;

                Point3D p = (Point3D)prop.GetValue(m_HairStylist , null);

                AddPage(0);

                AddBackground(0, 0, BackWidth, BackHeight, PropsConfig.BackGumpID);
                AddImageTiled(PropsConfig.BorderSize, PropsConfig.BorderSize, TotalWidth - (PropsConfig.OldStyle ? PropsConfig.SetWidth + PropsConfig.OffsetSize : 0), TotalHeight, PropsConfig.OffsetGumpID);

                int x = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                int y = PropsConfig.BorderSize + PropsConfig.OffsetSize;

                AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddLabelCropped(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, prop.Name);
                x += EntryWidth + PropsConfig.OffsetSize;

                if (PropsConfig.SetGumpID != 0)
                    AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);

                x = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                y += PropsConfig.EntryHeight + PropsConfig.OffsetSize;

                AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddLabelCropped(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "Use your location");
                x += EntryWidth + PropsConfig.OffsetSize;

                if (PropsConfig.SetGumpID != 0)
                    AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);
                AddButton(x + PropsConfig.SetOffsetX, y + PropsConfig.SetOffsetY, PropsConfig.SetButtonID1, PropsConfig.SetButtonID2, 1, GumpButtonType.Reply, 0);

                x = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                y += PropsConfig.EntryHeight + PropsConfig.OffsetSize;

                AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddLabelCropped(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "Target a location");
                x += EntryWidth + PropsConfig.OffsetSize;

                if (PropsConfig.SetGumpID != 0)
                    AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);
                AddButton(x + PropsConfig.SetOffsetX, y + PropsConfig.SetOffsetY, PropsConfig.SetButtonID1, PropsConfig.SetButtonID2, 2, GumpButtonType.Reply, 0);

                x = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                y += PropsConfig.EntryHeight + PropsConfig.OffsetSize;

                AddImageTiled(x, y, CoordWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddLabelCropped(x + PropsConfig.TextOffsetX, y, CoordWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "X:");
                AddTextEntry(x + 16, y, CoordWidth - 16, PropsConfig.EntryHeight, PropsConfig.TextHue, 0, p.X.ToString());
                x += CoordWidth + PropsConfig.OffsetSize;

                AddImageTiled(x, y, CoordWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddLabelCropped(x + PropsConfig.TextOffsetX, y, CoordWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "Y:");
                AddTextEntry(x + 16, y, CoordWidth - 16, PropsConfig.EntryHeight, PropsConfig.TextHue, 1, p.Y.ToString());
                x += CoordWidth + PropsConfig.OffsetSize;

                AddImageTiled(x, y, CoordWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddLabelCropped(x + PropsConfig.TextOffsetX, y, CoordWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "Z:");
                AddTextEntry(x + 16, y, CoordWidth - 16, PropsConfig.EntryHeight, PropsConfig.TextHue, 2, p.Z.ToString());
                x += CoordWidth + PropsConfig.OffsetSize;

                if (PropsConfig.SetGumpID != 0)
                    AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);
                AddButton(x + PropsConfig.SetOffsetX, y + PropsConfig.SetOffsetY, PropsConfig.SetButtonID1, PropsConfig.SetButtonID2, 3, GumpButtonType.Reply, 0);
            }
Exemplo n.º 15
0
        public HairStylistConfigGump(Mobile from, INXHairStylist hairStylist)
            : base(85, 40)
        {
            m_From = from;
            m_HairStylist  = hairStylist;
            m_PropertyList = GetPropertyInfoList();

            InitializePage(0);
        }
Exemplo n.º 16
0
            public HairStylistSetPoint3DGump(PropertyInfo prop, Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, int page)
                : base(PropsConfig.GumpOffsetX, PropsConfig.GumpOffsetY)
            {
                m_Property     = prop;
                m_From         = from;
                m_HairStylist  = hairStylist;
                m_Page         = page;
                m_PropertyList = propertyList;

                Point3D p = (Point3D)prop.GetValue(m_HairStylist, null);

                AddPage(0);

                AddBackground(0, 0, BackWidth, BackHeight, PropsConfig.BackGumpID);
                AddImageTiled(PropsConfig.BorderSize, PropsConfig.BorderSize, TotalWidth - (PropsConfig.OldStyle ? PropsConfig.SetWidth + PropsConfig.OffsetSize : 0), TotalHeight, PropsConfig.OffsetGumpID);

                int x = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                int y = PropsConfig.BorderSize + PropsConfig.OffsetSize;

                AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddLabelCropped(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, prop.Name);
                x += EntryWidth + PropsConfig.OffsetSize;

                if (PropsConfig.SetGumpID != 0)
                {
                    AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);
                }

                x  = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                y += PropsConfig.EntryHeight + PropsConfig.OffsetSize;

                AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddLabelCropped(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "Use your location");
                x += EntryWidth + PropsConfig.OffsetSize;

                if (PropsConfig.SetGumpID != 0)
                {
                    AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);
                }
                AddButton(x + PropsConfig.SetOffsetX, y + PropsConfig.SetOffsetY, PropsConfig.SetButtonID1, PropsConfig.SetButtonID2, 1, GumpButtonType.Reply, 0);

                x  = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                y += PropsConfig.EntryHeight + PropsConfig.OffsetSize;

                AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddLabelCropped(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "Target a location");
                x += EntryWidth + PropsConfig.OffsetSize;

                if (PropsConfig.SetGumpID != 0)
                {
                    AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);
                }
                AddButton(x + PropsConfig.SetOffsetX, y + PropsConfig.SetOffsetY, PropsConfig.SetButtonID1, PropsConfig.SetButtonID2, 2, GumpButtonType.Reply, 0);

                x  = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                y += PropsConfig.EntryHeight + PropsConfig.OffsetSize;

                AddImageTiled(x, y, CoordWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddLabelCropped(x + PropsConfig.TextOffsetX, y, CoordWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "X:");
                AddTextEntry(x + 16, y, CoordWidth - 16, PropsConfig.EntryHeight, PropsConfig.TextHue, 0, p.X.ToString());
                x += CoordWidth + PropsConfig.OffsetSize;

                AddImageTiled(x, y, CoordWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddLabelCropped(x + PropsConfig.TextOffsetX, y, CoordWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "Y:");
                AddTextEntry(x + 16, y, CoordWidth - 16, PropsConfig.EntryHeight, PropsConfig.TextHue, 1, p.Y.ToString());
                x += CoordWidth + PropsConfig.OffsetSize;

                AddImageTiled(x, y, CoordWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddLabelCropped(x + PropsConfig.TextOffsetX, y, CoordWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "Z:");
                AddTextEntry(x + 16, y, CoordWidth - 16, PropsConfig.EntryHeight, PropsConfig.TextHue, 2, p.Z.ToString());
                x += CoordWidth + PropsConfig.OffsetSize;

                if (PropsConfig.SetGumpID != 0)
                {
                    AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);
                }
                AddButton(x + PropsConfig.SetOffsetX, y + PropsConfig.SetOffsetY, PropsConfig.SetButtonID1, PropsConfig.SetButtonID2, 3, GumpButtonType.Reply, 0);
            }
Exemplo n.º 17
0
            public CutTimer(Mobile customer, INXHairStylist hairStylist, List<Item> styles, int ticks)  : base(TimeSpan.Zero, TimeSpan.FromMilliseconds(250.0), ticks)
            {
                m_Customer = customer;
                m_HairStylist = hairStylist;
                m_Styles = styles;
                m_MaxTicks = ticks;
      
                m_HairStylist.FocusMob = m_Customer;

                //If the hair stylist has a chair/item assosiated with it, then that will be the location for the player to "sit".
                if (m_HairStylist.StylistChairLoc != Point3D.Zero)
                    m_StartingLocation = m_LastLocation = m_HairStylist.StylistChairLoc;
                else
                    m_StartingLocation = m_LastLocation = m_Customer.Location;

                m_LastDirection = m_Customer.Direction;

                if (m_Customer.HairItemID == 0)
                {
                    m_BaldCustomer = true;
                    m_Customer.HairHue = 0;
                }

                if (m_HairStylist.FreezeCustomer)
                    m_Customer.Frozen = true;
            }
Exemplo n.º 18
0
            public HairStylistSetGump(PropertyInfo prop, Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, int page)
                : base(PropsConfig.GumpOffsetX, PropsConfig.GumpOffsetY)
            {
                m_Property    = prop;
                m_From        = from;
                m_HairStylist = hairStylist;

                m_Page         = page;
                m_PropertyList = propertyList;

                bool canNull = !prop.PropertyType.IsValueType;
                bool canDye  = prop.IsDefined(typeof(HueAttribute), false);
                bool isBody  = prop.IsDefined(typeof(BodyAttribute), false);

                object val = prop.GetValue(m_HairStylist, null);
                string initialText;

                if (val == null)
                {
                    initialText = "";
                }
                else
                {
                    initialText = val.ToString();
                }

                AddPage(0);

                AddBackground(0, 0, BackWidth, BackHeight + (canNull ? (PropsConfig.EntryHeight + PropsConfig.OffsetSize) : 0) + (canDye ? (PropsConfig.EntryHeight + PropsConfig.OffsetSize) : 0) + (isBody ? (PropsConfig.EntryHeight + PropsConfig.OffsetSize) : 0), PropsConfig.BackGumpID);
                AddImageTiled(PropsConfig.BorderSize, PropsConfig.BorderSize, TotalWidth - (PropsConfig.OldStyle ? PropsConfig.SetWidth + PropsConfig.OffsetSize : 0), TotalHeight + (canNull ? (PropsConfig.EntryHeight + PropsConfig.OffsetSize) : 0) + (canDye ? (PropsConfig.EntryHeight + PropsConfig.OffsetSize) : 0) + (isBody ? (PropsConfig.EntryHeight + PropsConfig.OffsetSize) : 0), PropsConfig.OffsetGumpID);

                int x = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                int y = PropsConfig.BorderSize + PropsConfig.OffsetSize;

                AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddLabelCropped(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, prop.Name);
                x += EntryWidth + PropsConfig.OffsetSize;

                if (PropsConfig.SetGumpID != 0)
                {
                    AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);
                }

                x  = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                y += PropsConfig.EntryHeight + PropsConfig.OffsetSize;

                AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddTextEntry(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, 0, initialText);
                x += EntryWidth + PropsConfig.OffsetSize;

                if (PropsConfig.SetGumpID != 0)
                {
                    AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);
                }

                AddButton(x + PropsConfig.SetOffsetX, y + PropsConfig.SetOffsetY, PropsConfig.SetButtonID1, PropsConfig.SetButtonID2, 1, GumpButtonType.Reply, 0);

                if (canNull)
                {
                    x  = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                    y += PropsConfig.EntryHeight + PropsConfig.OffsetSize;

                    AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                    AddLabelCropped(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "Null");
                    x += EntryWidth + PropsConfig.OffsetSize;

                    if (PropsConfig.SetGumpID != 0)
                    {
                        AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);
                    }

                    AddButton(x + PropsConfig.SetOffsetX, y + PropsConfig.SetOffsetY, PropsConfig.SetButtonID1, PropsConfig.SetButtonID2, 2, GumpButtonType.Reply, 0);
                }

                if (canDye)
                {
                    x  = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                    y += PropsConfig.EntryHeight + PropsConfig.OffsetSize;

                    AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                    AddLabelCropped(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "Hue Picker");
                    x += EntryWidth + PropsConfig.OffsetSize;

                    if (PropsConfig.SetGumpID != 0)
                    {
                        AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);
                    }

                    AddButton(x + PropsConfig.SetOffsetX, y + PropsConfig.SetOffsetY, PropsConfig.SetButtonID1, PropsConfig.SetButtonID2, 3, GumpButtonType.Reply, 0);
                }

                if (isBody)
                {
                    x  = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                    y += PropsConfig.EntryHeight + PropsConfig.OffsetSize;

                    AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                    AddLabelCropped(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "Body Picker");
                    x += EntryWidth + PropsConfig.OffsetSize;

                    if (PropsConfig.SetGumpID != 0)
                    {
                        AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);
                    }

                    AddButton(x + PropsConfig.SetOffsetX, y + PropsConfig.SetOffsetY, PropsConfig.SetButtonID1, PropsConfig.SetButtonID2, 4, GumpButtonType.Reply, 0);
                }
            }
Exemplo n.º 19
0
            public HairStylistSetListOptionGump(PropertyInfo prop, Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, string[] names, object[] values, int propsPage)
                : base(PropsConfig.GumpOffsetX, PropsConfig.GumpOffsetY)
            {
                m_Property    = prop;
                m_From        = from;
                m_HairStylist = hairStylist;

                m_Page         = propsPage;
                m_PropertyList = propertyList;

                m_Values = values;

                int pages = (names.Length + EntryCount - 1) / EntryCount;
                int index = 0;

                for (int page = 1; page <= pages; ++page)
                {
                    AddPage(page);

                    int start = (page - 1) * EntryCount;
                    int count = names.Length - start;

                    if (count > EntryCount)
                    {
                        count = EntryCount;
                    }

                    int totalHeight = PropsConfig.OffsetSize + ((count + 2) * (PropsConfig.EntryHeight + PropsConfig.OffsetSize));
                    int backHeight  = PropsConfig.BorderSize + totalHeight + PropsConfig.BorderSize;

                    AddBackground(0, 0, BackWidth, backHeight, PropsConfig.BackGumpID);
                    AddImageTiled(PropsConfig.BorderSize, PropsConfig.BorderSize, TotalWidth - (PropsConfig.OldStyle ? PropsConfig.SetWidth + PropsConfig.OffsetSize : 0), totalHeight, PropsConfig.OffsetGumpID);



                    int x = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                    int y = PropsConfig.BorderSize + PropsConfig.OffsetSize;

                    int emptyWidth = TotalWidth - PropsConfig.PrevWidth - PropsConfig.NextWidth - (PropsConfig.OffsetSize * 4) - (PropsConfig.OldStyle ? PropsConfig.SetWidth + PropsConfig.OffsetSize : 0);

                    AddImageTiled(x, y, PropsConfig.PrevWidth, PropsConfig.EntryHeight, PropsConfig.HeaderGumpID);

                    if (page > 1)
                    {
                        AddButton(x + PropsConfig.PrevOffsetX, y + PropsConfig.PrevOffsetY, PropsConfig.PrevButtonID1, PropsConfig.PrevButtonID2, 0, GumpButtonType.Page, page - 1);

                        if (PrevLabel)
                        {
                            AddLabel(x + PrevLabelOffsetX, y + PrevLabelOffsetY, PropsConfig.TextHue, "Previous");
                        }
                    }

                    x += PropsConfig.PrevWidth + PropsConfig.OffsetSize;

                    if (!PropsConfig.OldStyle)
                    {
                        AddImageTiled(x - (PropsConfig.OldStyle ? PropsConfig.OffsetSize : 0), y, emptyWidth + (PropsConfig.OldStyle ? PropsConfig.OffsetSize * 2 : 0), PropsConfig.EntryHeight, PropsConfig.HeaderGumpID);
                    }

                    x += emptyWidth + PropsConfig.OffsetSize;

                    if (!PropsConfig.OldStyle)
                    {
                        AddImageTiled(x, y, PropsConfig.NextWidth, PropsConfig.EntryHeight, PropsConfig.HeaderGumpID);
                    }

                    if (page < pages)
                    {
                        AddButton(x + PropsConfig.NextOffsetX, y + PropsConfig.NextOffsetY, PropsConfig.NextButtonID1, PropsConfig.NextButtonID2, 0, GumpButtonType.Page, page + 1);

                        if (NextLabel)
                        {
                            AddLabel(x + NextLabelOffsetX, y + NextLabelOffsetY, PropsConfig.TextHue, "Next");
                        }
                    }



                    AddRect(0, prop.Name, 0);

                    for (int i = 0; i < count; ++i)
                    {
                        AddRect(i + 1, names[index], ++index);
                    }
                }
            }
Exemplo n.º 20
0
            public HairStylistSetGump(PropertyInfo prop, Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, int page)
                : base(PropsConfig.GumpOffsetX, PropsConfig.GumpOffsetY)
            {
                m_Property = prop;
                m_From = from;
                m_HairStylist  = hairStylist;
                
                m_Page = page;
                m_PropertyList = propertyList;

                bool canNull = !prop.PropertyType.IsValueType;
                bool canDye = prop.IsDefined(typeof(HueAttribute), false);
                bool isBody = prop.IsDefined(typeof(BodyAttribute), false);

                object val = prop.GetValue(m_HairStylist , null);
                string initialText;

                if (val == null)
                    initialText = "";
                else
                    initialText = val.ToString();

                AddPage(0);

                AddBackground(0, 0, BackWidth, BackHeight + (canNull ? (PropsConfig.EntryHeight + PropsConfig.OffsetSize) : 0) + (canDye ? (PropsConfig.EntryHeight + PropsConfig.OffsetSize) : 0) + (isBody ? (PropsConfig.EntryHeight + PropsConfig.OffsetSize) : 0), PropsConfig.BackGumpID);
                AddImageTiled(PropsConfig.BorderSize, PropsConfig.BorderSize, TotalWidth - (PropsConfig.OldStyle ? PropsConfig.SetWidth + PropsConfig.OffsetSize : 0), TotalHeight + (canNull ? (PropsConfig.EntryHeight + PropsConfig.OffsetSize) : 0) + (canDye ? (PropsConfig.EntryHeight + PropsConfig.OffsetSize) : 0) + (isBody ? (PropsConfig.EntryHeight + PropsConfig.OffsetSize) : 0), PropsConfig.OffsetGumpID);

                int x = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                int y = PropsConfig.BorderSize + PropsConfig.OffsetSize;

                AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddLabelCropped(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, prop.Name);
                x += EntryWidth + PropsConfig.OffsetSize;

                if (PropsConfig.SetGumpID != 0)
                    AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);

                x = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                y += PropsConfig.EntryHeight + PropsConfig.OffsetSize;

                AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                AddTextEntry(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, 0, initialText);
                x += EntryWidth + PropsConfig.OffsetSize;

                if (PropsConfig.SetGumpID != 0)
                    AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);

                AddButton(x + PropsConfig.SetOffsetX, y + PropsConfig.SetOffsetY, PropsConfig.SetButtonID1, PropsConfig.SetButtonID2, 1, GumpButtonType.Reply, 0);

                if (canNull)
                {
                    x = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                    y += PropsConfig.EntryHeight + PropsConfig.OffsetSize;

                    AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                    AddLabelCropped(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "Null");
                    x += EntryWidth + PropsConfig.OffsetSize;

                    if (PropsConfig.SetGumpID != 0)
                        AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);

                    AddButton(x + PropsConfig.SetOffsetX, y + PropsConfig.SetOffsetY, PropsConfig.SetButtonID1, PropsConfig.SetButtonID2, 2, GumpButtonType.Reply, 0);
                }

                if (canDye)
                {
                    x = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                    y += PropsConfig.EntryHeight + PropsConfig.OffsetSize;

                    AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                    AddLabelCropped(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "Hue Picker");
                    x += EntryWidth + PropsConfig.OffsetSize;

                    if (PropsConfig.SetGumpID != 0)
                        AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);

                    AddButton(x + PropsConfig.SetOffsetX, y + PropsConfig.SetOffsetY, PropsConfig.SetButtonID1, PropsConfig.SetButtonID2, 3, GumpButtonType.Reply, 0);
                }

                if (isBody)
                {
                    x = PropsConfig.BorderSize + PropsConfig.OffsetSize;
                    y += PropsConfig.EntryHeight + PropsConfig.OffsetSize;

                    AddImageTiled(x, y, EntryWidth, PropsConfig.EntryHeight, PropsConfig.EntryGumpID);
                    AddLabelCropped(x + PropsConfig.TextOffsetX, y, EntryWidth - PropsConfig.TextOffsetX, PropsConfig.EntryHeight, PropsConfig.TextHue, "Body Picker");
                    x += EntryWidth + PropsConfig.OffsetSize;

                    if (PropsConfig.SetGumpID != 0)
                        AddImageTiled(x, y, PropsConfig.SetWidth, PropsConfig.EntryHeight, PropsConfig.SetGumpID);

                    AddButton(x + PropsConfig.SetOffsetX, y + PropsConfig.SetOffsetY, PropsConfig.SetButtonID1, PropsConfig.SetButtonID2, 4, GumpButtonType.Reply, 0);
                }
            }
Exemplo n.º 21
0
 public InternalPicker(PropertyInfo prop, Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, int page)
     : base(((IHued)hairStylist).HuedItemID)
 {
     m_Property = prop;
     m_From = from;
     m_HairStylist  = hairStylist;
     
     m_Page = page;
     m_PropertyList = propertyList;
 }
Exemplo n.º 22
0
        public HairStylistConfigGump(Mobile from, INXHairStylist hairStylist, PropertyInfo[] propertyList, int page)
            : base(85, 40)
        {
            m_From = from;
            m_HairStylist  = hairStylist;
            m_PropertyList = propertyList;
            m_Page = page;

            InitializePage(m_Page);
        }