Ejemplo n.º 1
0
        private void AddTooltip(int x, int y, int w, int h, int num)
        {
            GHotspot toAdd = new GHotspot(x, y, w, h, this)
            {
                m_CanDrag   = true,
                m_QuickDrag = false,
                Tooltip     = new Tooltip(Localization.GetString(num))
            };

            base.m_Children.Add(toAdd);
        }
Ejemplo n.º 2
0
        public GDragAmount(Client.Item item) : base(0x85c, 0, 0)
        {
            GTextBox box;

            this.m_First = true;
            this.m_Item  = item;
            int amount = (ushort)this.m_Item.Amount;

            this.m_Amount        = amount;
            this.m_Okay          = new GButtonNew(0x81a, 0x81c, 0x81b, 0x66, 0x25);
            this.m_Okay.CanEnter = true;
            this.m_Okay.Clicked += new EventHandler(this.Okay_Clicked);
            base.m_Children.Add(this.m_Okay);
            GSlider toAdd = new GSlider(0x845, 0x23, 0x10, 0x5f, 15, (double)amount, 0.0, (double)amount, 1.0)
            {
                OnValueChange = new OnValueChange(this.Slider_OnValueChange)
            };

            base.m_Children.Add(toAdd);
            this.m_Slider = toAdd;
            GHotspot hotspot = new GHotspot(0x1c, 0x10, 0x6d, 15, toAdd);

            base.m_Children.Add(hotspot);
            box = new GTextBox(0, false, 0x1a, 0x2b, 0x42, 15, amount.ToString(), Engine.GetFont(1), Hues.Load(0x455), Hues.Load(0x455), Hues.Load(0x455))
            {
                OnTextChange       = (OnTextChange)Delegate.Combine(box.OnTextChange, new OnTextChange(this.TextBox_OnTextChange)),
                OnBeforeTextChange = (OnBeforeTextChange)Delegate.Combine(box.OnBeforeTextChange, new OnBeforeTextChange(this.TextBox_OnBeforeTextChange)),
                EnterButton        = this.m_Okay
            };
            base.m_Children.Add(box);
            this.m_TextBox = box;
            box.Focus();
            base.m_IsDragging = true;
            base.m_OffsetX    = this.Width / 2;
            base.m_OffsetY    = this.Height / 2;
            Gumps.LastOver    = this;
            Gumps.Drag        = this;
            Gumps.Focus       = this;
            base.m_X          = Engine.m_xMouse - base.m_OffsetX;
            base.m_Y          = Engine.m_yMouse - base.m_OffsetY;
        }
Ejemplo n.º 3
0
        public GSkillList(GSkills owner) : base(4, 4, 250, 50)
        {
            this.m_Owner   = owner;
            base.m_CanDrag = false;
            Skills skills = Engine.Skills;

            this.m_SkillGumps = new GSkillGump[0x100];
            int y = 4;

            for (int i = 0; i < skills.Groups.Length; i++)
            {
                GLabel     label;
                SkillGroup group = skills.Groups[i];
                label = new GLabel(group.Name, Engine.GetUniFont(1), Hues.Bright, 4, y)
                {
                    X = label.X - label.Image.xMin,
                    Y = label.Y - label.Image.yMin
                };
                label.SetTag("yBase", label.Y);
                base.m_Children.Add(label);
                y += 4 + (label.Image.yMax - label.Image.yMin);
                for (int j = 0; j < group.Skills.Count; j++)
                {
                    Skill      skill = (Skill)group.Skills[j];
                    GSkillGump toAdd = new GSkillGump(skill, y, base.m_Width - 20, this.m_Owner.ShowReal);
                    this.m_SkillGumps[skill.ID] = toAdd;
                    base.m_Children.Add(toAdd);
                    y += 4 + toAdd.Height;
                }
            }
            this.m_SliderBorder = new GSingleBorder(0, 0, 0x10, 100);
            base.m_Children.Add(this.m_SliderBorder);
            this.m_Slider = new GAlphaVSlider(0, 6, 0x10, 100, 0.0, 0.0, (double)(y + 1), 1.0);
            this.m_Slider.SetTag("Max", y + 1);
            this.m_Slider.OnValueChange = (OnValueChange)Delegate.Combine(this.m_Slider.OnValueChange, new OnValueChange(this.Slider_OnValueChange));
            base.m_Children.Add(this.m_Slider);
            this.m_Hotspot = new GHotspot(0, 0, 0x10, 100, this.m_Slider);
            base.m_Children.Add(this.m_Hotspot);
        }
Ejemplo n.º 4
0
        public GPacketStats() : base(3, 3, 0xc2, 0xc2)
        {
            this.m_xLast = -12345;
            this.m_yLast = -12345;
            m_Labels     = new GLabel[0x100];
            m_Values     = new GLabel[0x100];
            IFont uniFont = Engine.GetUniFont(1);
            IHue  bright  = Hues.Bright;
            int   y       = 3;

            for (int i = 0; i < 0x100; i++)
            {
                if (PacketHandlers.m_Handlers[i] != null)
                {
                    PacketHandler handler = PacketHandlers.m_Handlers[i];
                    m_Labels[i] = new GLabel(handler.Name, uniFont, bright, 3, y);
                    m_Labels[i].SetTag("BaseY", y);
                    base.m_Children.Add(m_Labels[i]);
                    m_Values[i] = new GLabel(handler.Count.ToString(), uniFont, bright, 3, y);
                    m_Values[i].SetTag("BaseY", y);
                    m_Values[i].X = 0xaf - m_Values[i].Width;
                    base.m_Children.Add(m_Values[i]);
                    y += m_Labels[i].Height + 3;
                }
            }
            this.m_Slider = new GAlphaVSlider(0xb3, 6, 0x10, 0xb7, 0.0, 0.0, (double)(y - 0xc0), 1.0);
            this.m_Slider.OnValueChange = (OnValueChange)Delegate.Combine(this.m_Slider.OnValueChange, new OnValueChange(this.Slider_OnValueChange));
            this.m_Slider.ScrollOffset  = 15.0;
            base.m_Children.Add(this.m_Slider);
            GHotspot toAdd = new GHotspot(0xb2, 1, 0x10, 0xc0, this.m_Slider)
            {
                NormalHit = false
            };

            base.m_Children.Add(toAdd);
            this.m_Event           = new OnPacketHandle(this.OnRecv);
            Network.OnPacketHandle = (OnPacketHandle)Delegate.Combine(Network.OnPacketHandle, this.m_Event);
        }
Ejemplo n.º 5
0
 public GSkillList(GSkills owner)
     : base(4, 4, 250, 50)
 {
     this.m_Owner = owner;
     base.m_CanDrag = false;
     Skills skills = Engine.Skills;
     this.m_SkillGumps = new GSkillGump[0x100];
     int y = 4;
     for (int i = 0; i < skills.Groups.Length; i++)
     {
         GLabel label;
         SkillGroup group = skills.Groups[i];
         label = new GLabel(group.Name, Engine.GetUniFont(1), Hues.Bright, 4, y) {
             X = label.X - label.Image.xMin,
             Y = label.Y - label.Image.yMin
         };
         label.SetTag("yBase", label.Y);
         base.m_Children.Add(label);
         y += 4 + (label.Image.yMax - label.Image.yMin);
         for (int j = 0; j < group.Skills.Count; j++)
         {
             Skill skill = (Skill) group.Skills[j];
             GSkillGump toAdd = new GSkillGump(skill, y, base.m_Width - 20, this.m_Owner.ShowReal);
             this.m_SkillGumps[skill.ID] = toAdd;
             base.m_Children.Add(toAdd);
             y += 4 + toAdd.Height;
         }
     }
     this.m_SliderBorder = new GSingleBorder(0, 0, 0x10, 100);
     base.m_Children.Add(this.m_SliderBorder);
     this.m_Slider = new GAlphaVSlider(0, 6, 0x10, 100, 0.0, 0.0, (double) (y + 1), 1.0);
     this.m_Slider.SetTag("Max", y + 1);
     this.m_Slider.OnValueChange = (OnValueChange) Delegate.Combine(this.m_Slider.OnValueChange, new OnValueChange(this.Slider_OnValueChange));
     base.m_Children.Add(this.m_Slider);
     this.m_Hotspot = new GHotspot(0, 0, 0x10, 100, this.m_Slider);
     base.m_Children.Add(this.m_Hotspot);
 }
Ejemplo n.º 6
0
        public GJournal() : base(50, 50, 300, 0xbc)
        {
            int num = Engine.m_Journal.Count - 1;

            if (num < 0)
            {
                num = 0;
            }
            base.m_Children.Add(new GVResizer(this));
            base.m_Children.Add(new GHResizer(this));
            base.m_Children.Add(new GLResizer(this));
            base.m_Children.Add(new GTResizer(this));
            base.m_Children.Add(new GHVResizer(this));
            base.m_Children.Add(new GLTResizer(this));
            base.m_Children.Add(new GHTResizer(this));
            base.m_Children.Add(new GLVResizer(this));
            this.m_Scroller          = new GAlphaVSlider(0, 10, 0x10, 0xa9, (double)num, 0.0, (double)num, 1.0);
            this.m_Hotspot           = new GHotspot(0, 4, 0x10, 180, this.m_Scroller);
            this.m_Hotspot.NormalHit = false;
            base.m_Children.Add(this.m_Scroller);
            base.m_Children.Add(this.m_Hotspot);
            this.Width  = 300;
            this.Height = 0xbc;
        }
Ejemplo n.º 7
0
 public GDragAmount(Client.Item item)
     : base(0x85c, 0, 0)
 {
     GTextBox box;
     this.m_First = true;
     this.m_Item = item;
     int amount = (ushort) this.m_Item.Amount;
     this.m_Amount = amount;
     this.m_Okay = new GButtonNew(0x81a, 0x81c, 0x81b, 0x66, 0x25);
     this.m_Okay.CanEnter = true;
     this.m_Okay.Clicked += new EventHandler(this.Okay_Clicked);
     base.m_Children.Add(this.m_Okay);
     GSlider toAdd = new GSlider(0x845, 0x23, 0x10, 0x5f, 15, (double) amount, 0.0, (double) amount, 1.0) {
         OnValueChange = new OnValueChange(this.Slider_OnValueChange)
     };
     base.m_Children.Add(toAdd);
     this.m_Slider = toAdd;
     GHotspot hotspot = new GHotspot(0x1c, 0x10, 0x6d, 15, toAdd);
     base.m_Children.Add(hotspot);
     box = new GTextBox(0, false, 0x1a, 0x2b, 0x42, 15, amount.ToString(), Engine.GetFont(1), Hues.Load(0x455), Hues.Load(0x455), Hues.Load(0x455)) {
         OnTextChange = (OnTextChange) Delegate.Combine(box.OnTextChange, new OnTextChange(this.TextBox_OnTextChange)),
         OnBeforeTextChange = (OnBeforeTextChange) Delegate.Combine(box.OnBeforeTextChange, new OnBeforeTextChange(this.TextBox_OnBeforeTextChange)),
         EnterButton = this.m_Okay
     };
     base.m_Children.Add(box);
     this.m_TextBox = box;
     box.Focus();
     base.m_IsDragging = true;
     base.m_OffsetX = this.Width / 2;
     base.m_OffsetY = this.Height / 2;
     Gumps.LastOver = this;
     Gumps.Drag = this;
     Gumps.Focus = this;
     base.m_X = Engine.m_xMouse - base.m_OffsetX;
     base.m_Y = Engine.m_yMouse - base.m_OffsetY;
 }
Ejemplo n.º 8
0
 public GPacketStats()
     : base(3, 3, 0xc2, 0xc2)
 {
     this.m_xLast = -12345;
     this.m_yLast = -12345;
     m_Labels = new GLabel[0x100];
     m_Values = new GLabel[0x100];
     IFont uniFont = Engine.GetUniFont(1);
     IHue bright = Hues.Bright;
     int y = 3;
     for (int i = 0; i < 0x100; i++)
     {
         if (PacketHandlers.m_Handlers[i] != null)
         {
             PacketHandler handler = PacketHandlers.m_Handlers[i];
             m_Labels[i] = new GLabel(handler.Name, uniFont, bright, 3, y);
             m_Labels[i].SetTag("BaseY", y);
             base.m_Children.Add(m_Labels[i]);
             m_Values[i] = new GLabel(handler.Count.ToString(), uniFont, bright, 3, y);
             m_Values[i].SetTag("BaseY", y);
             m_Values[i].X = 0xaf - m_Values[i].Width;
             base.m_Children.Add(m_Values[i]);
             y += m_Labels[i].Height + 3;
         }
     }
     this.m_Slider = new GAlphaVSlider(0xb3, 6, 0x10, 0xb7, 0.0, 0.0, (double) (y - 0xc0), 1.0);
     this.m_Slider.OnValueChange = (OnValueChange) Delegate.Combine(this.m_Slider.OnValueChange, new OnValueChange(this.Slider_OnValueChange));
     this.m_Slider.ScrollOffset = 15.0;
     base.m_Children.Add(this.m_Slider);
     GHotspot toAdd = new GHotspot(0xb2, 1, 0x10, 0xc0, this.m_Slider) {
         NormalHit = false
     };
     base.m_Children.Add(toAdd);
     this.m_Event = new OnPacketHandle(this.OnRecv);
     Network.OnPacketHandle = (OnPacketHandle) Delegate.Combine(Network.OnPacketHandle, this.m_Event);
 }
Ejemplo n.º 9
0
 public GJournal()
     : base(50, 50, 300, 0xbc)
 {
     int num = Engine.m_Journal.Count - 1;
     if (num < 0)
     {
         num = 0;
     }
     base.m_Children.Add(new GVResizer(this));
     base.m_Children.Add(new GHResizer(this));
     base.m_Children.Add(new GLResizer(this));
     base.m_Children.Add(new GTResizer(this));
     base.m_Children.Add(new GHVResizer(this));
     base.m_Children.Add(new GLTResizer(this));
     base.m_Children.Add(new GHTResizer(this));
     base.m_Children.Add(new GLVResizer(this));
     this.m_Scroller = new GAlphaVSlider(0, 10, 0x10, 0xa9, (double) num, 0.0, (double) num, 1.0);
     this.m_Hotspot = new GHotspot(0, 4, 0x10, 180, this.m_Scroller);
     this.m_Hotspot.NormalHit = false;
     base.m_Children.Add(this.m_Scroller);
     base.m_Children.Add(this.m_Hotspot);
     this.Width = 300;
     this.Height = 0xbc;
 }
Ejemplo n.º 10
0
 public static void ShowCharCitySelection(int Str, int Dex, int Int, int vSkill1, int vSkill2, int vSkill3, int iSkill1, int iSkill2, int iSkill3, int hSkinTone, int hShirtColor, int hPantsColor, int hHairColor, int hFacialHairColor, string Name, int Gender)
 {
     Cursor.Hourglass = false;
     Point[] pointArray = new Point[] { new Point(0x2c, 0x5e), new Point(190, 0x2f), new Point(0x74, 0x9a), new Point(0x152, 0x6f), new Point(0x8f, 0x102), new Point(0x116, 0xcb), new Point(0x68, 0x15b), new Point(0x2a, 0xc6), new Point(220, 0x54) };
     string[] strArray = new string[] { "Yew", "Minoc", "Britain", "Moonglow", "Trinsic", "Magincia", "Jhelom", "Skara Brae", "Vesper" };
     Gumps.Desktop.Children.Clear();
     Gumps.Desktop.Children.Add(new GBackground(0x588, ScreenWidth, ScreenHeight, false));
     Gumps.Desktop.Children.Add(new GImage(0x157c, 0, 0));
     Gumps.Desktop.Children.Add(new GImage(0x15a0, 0, 4));
     GButton toAdd = new GButton(0x1589, 0x22b, 4, new OnClick(Engine.Quit_OnClick)) {
         Tooltip = new Tooltip(Strings.GetString("Tooltips.Quit"))
     };
     Gumps.Desktop.Children.Add(toAdd);
     Gumps.Desktop.Children.Add(new GBackground(0xbbc, 0x9e, 0x16f, 0x1c4, 60, true));
     GImage image = new GImage(0x1598, 0x39, 0x31);
     for (int i = 0; i < 9; i++)
     {
         GTextButton button2;
         GImage image2 = new GImage(0x4b9, pointArray[i].X, pointArray[i].Y);
         image.Children.Add(image2);
         button2 = new GTextButton(strArray[i], GetUniFont(0), Hues.Load(0x58), Hues.Load(0x35), pointArray[i].X, 0, new OnClick(Engine.City_OnClick)) {
             Y = (pointArray[i].Y - button2.Height) - 1
         };
         if (i == 3)
         {
             button2.X = (pointArray[i].X + 14) - button2.Width;
         }
         button2.SetTag("Strength", Str);
         button2.SetTag("Dexterity", Dex);
         button2.SetTag("Intelligence", Int);
         button2.SetTag("vSkill1", vSkill1);
         button2.SetTag("vSkill2", vSkill2);
         button2.SetTag("vSkill3", vSkill3);
         button2.SetTag("iSkill1", iSkill1);
         button2.SetTag("iSkill2", iSkill2);
         button2.SetTag("iSkill3", iSkill3);
         button2.SetTag("Skin Tone", hSkinTone);
         button2.SetTag("Shirt Color", hShirtColor);
         button2.SetTag("Pants Color", hPantsColor);
         button2.SetTag("Hair Color", hHairColor);
         button2.SetTag("Facial Hair Color", hFacialHairColor);
         button2.SetTag("CityID", i);
         button2.SetTag("Name", Name);
         button2.SetTag("Gender", Gender);
         image.Children.Add(button2);
         int x = Smallest(image2.X, button2.X);
         int y = Smallest(image2.Y, button2.Y);
         int width = Biggest(image2.X + image2.Width, button2.X + button2.Width) - x;
         int height = Biggest(image2.Y + image2.Height, button2.Y + button2.Height) - y;
         GHotspot hotspot = new GHotspot(x, y, width, height, button2) {
             Tooltip = new Tooltip("Click here to enter this city")
         };
         image.Children.Add(hotspot);
     }
     Gumps.Desktop.Children.Add(image);
 }
Ejemplo n.º 11
0
 public static void ShowCharAppearance(int Str, int Dex, int Int, int vSkill1, int vSkill2, int vSkill3, int iSkill1, int iSkill2, int iSkill3)
 {
     Cursor.Hourglass = false;
     Gumps.Desktop.Children.Clear();
     Gumps.Desktop.Children.Add(new GBackground(0x588, ScreenWidth, ScreenHeight, false));
     Gumps.Desktop.Children.Add(new GImage(0x157c, 0, 0));
     Gumps.Desktop.Children.Add(new GImage(0x15a0, 0, 4));
     GButton toAdd = new GButton(0x1589, 0x22b, 4, new OnClick(Engine.Quit_OnClick)) {
         Tooltip = new Tooltip(Strings.GetString("Tooltips.Quit"))
     };
     Gumps.Desktop.Children.Add(toAdd);
     Gumps.Desktop.Children.Add(new GImage(0x709, 280, 0x35));
     GTextBox box = new GTextBox(0, false, 0xf8, 0x4b, 0xd7, 0x10, "Name", GetFont(5), Hues.Load(0x76b), Hues.Load(0x835), Hues.Load(0x25)) {
         Tooltip = new Tooltip(Strings.GetString("Tooltips.CharCreateName"))
     };
     Gumps.Desktop.Children.Add(new GImage(0x70a, 240, 0x49));
     Gumps.Desktop.Children.Add(new GBackground(0x70b, 0xd7, 0x10, 0xf8, 0x49, false));
     Gumps.Desktop.Children.Add(new GImage(0x70c, 0x1cf, 0x49));
     Gumps.Desktop.Children.Add(box);
     GImage image = new GImage(0x708, 0xee, 0x62);
     GButton button2 = new GButton(0x710, 0x48, 320, new OnClick(Engine.CharGender_OnClick));
     button2.SetTag("Gender", 0);
     image.Children.Add(button2);
     Gumps.Desktop.Children.Add(image);
     Gumps.Desktop.Children.Add(new GBackground(0xe14, 0x97, 310, 0x52, 0x7d, true));
     GBackground background = new GBackground(0xe14, 0x97, 310, 0x1db, 0x7d, true);
     string[] strArray = new string[] { "Skin Tone", "Shirt Color", "Pants Color", "Hair Color", "Facial Hair Color" };
     string[] strArray2 = new string[] { Strings.GetString("Tooltips.CharCreateSkinTone"), Strings.GetString("Tooltips.CharCreateShirtHue"), Strings.GetString("Tooltips.CharCreatePantsHue"), Strings.GetString("Tooltips.CharCreateHairHue"), Strings.GetString("Tooltips.CharCreateFHairHue") };
     int[] numArray = new int[] { GetRandomSkinHue(), GetRandomHue(), GetRandomHue(), GetRandomHairHue(), GetRandomHairHue(), GetRandomYellowHue() };
     numArray[0] ^= 0x8000;
     if (!Map.m_ItemFlags[0x1517][TileFlag.PartialHue])
     {
         numArray[1] ^= 0x8000;
     }
     if (!Map.m_ItemFlags[0x152e][TileFlag.PartialHue])
     {
         numArray[2] ^= 0x8000;
     }
     if (!Map.m_ItemFlags[0x203b][TileFlag.PartialHue])
     {
         numArray[3] ^= 0x8000;
     }
     if (!Map.m_ItemFlags[0x2040][TileFlag.PartialHue])
     {
         numArray[4] ^= 0x8000;
     }
     if (!Map.m_ItemFlags[0x170f][TileFlag.PartialHue])
     {
         numArray[5] ^= 0x8000;
     }
     Gump[] gumpArray = new Gump[] { new GImage(0x761, Hues.Load(numArray[0]), 0, 0), new GImage(0x739, Hues.Load(numArray[1]), 0, 0), new GImage(0x738, Hues.Load(numArray[2]), 0, 0), new GImage(0x753, Hues.Load(numArray[3]), 0, 0), new GImage(0x759, Hues.Load(numArray[4]), 0, 0), new GImage(0x762, Hues.Load(numArray[5]), 0, 0) };
     gumpArray[0].SetTag("ItemID", 0);
     gumpArray[1].SetTag("ItemID", 0x1517);
     gumpArray[2].SetTag("ItemID", 0x152e);
     gumpArray[3].SetTag("ItemID", 0x203b);
     gumpArray[4].SetTag("ItemID", 0x2040);
     gumpArray[5].SetTag("ItemID", 0x170f);
     button2.SetTag("Image", gumpArray[0]);
     int offsetY = background.OffsetY;
     image.Children.Add(gumpArray[0]);
     image.Children.Add(gumpArray[5]);
     image.Children.Add(gumpArray[1]);
     image.Children.Add(gumpArray[2]);
     image.Children.Add(gumpArray[4]);
     image.Children.Add(gumpArray[3]);
     GButton button3 = new GButton(0x15a4, 610, 0x1bd, new OnClick(Engine.CharCreationAppearanceArrow_OnClick));
     button2.SetTag("Image[5]", gumpArray[5]);
     button2.SetTag("Arrow", button3);
     UnicodeFont uniFont = GetUniFont(0);
     for (int i = 0; i < 5; i++)
     {
         GTextButton button4 = new GTextButton(strArray[i], uniFont, Hues.Bright, Hues.Load(0x26), background.OffsetX, offsetY, new OnClick(Engine.AppearanceHueProperty_OnClick)) {
             SpaceWidth = 6
         };
         offsetY += button4.Height - 2;
         GHuePreview preview = new GHuePreview(background.OffsetX, offsetY, 100, 0x10, numArray[i], false);
         offsetY += 0x10;
         button4.Tooltip = new Tooltip(strArray2[i]);
         button4.SetTag("Property", strArray[i]);
         button4.SetTag("Preview", preview);
         button4.SetTag("Image", gumpArray[i]);
         button2.SetTag(string.Format("Image[{0}]", i), gumpArray[i]);
         button3.SetTag(strArray[i], preview);
         background.Children.Add(button4);
         background.Children.Add(preview);
         GHotspot hotspot = new GHotspot(button4.X, button4.Y, Biggest(button4.Width, preview.Width), (preview.Y + preview.Height) - button4.Y, button4) {
             Tooltip = new Tooltip(strArray2[i])
         };
         background.Children.Add(hotspot);
         if (i == 4)
         {
             button2.SetTag("HideHS", hotspot);
             button2.SetTag("HideTB", button4);
             button2.SetTag("HideHP", preview);
         }
     }
     Gumps.Desktop.Children.Add(background);
     button3.SetTag("Strength", Str);
     button3.SetTag("Dexterity", Dex);
     button3.SetTag("Intelligence", Int);
     button3.SetTag("vSkill1", vSkill1);
     button3.SetTag("vSkill2", vSkill2);
     button3.SetTag("vSkill3", vSkill3);
     button3.SetTag("iSkill1", iSkill1);
     button3.SetTag("iSkill2", iSkill2);
     button3.SetTag("iSkill3", iSkill3);
     button3.SetTag("Name", box);
     button3.SetTag("Gender", 0);
     Gumps.Desktop.Children.Add(button3);
 }
Ejemplo n.º 12
0
 private void AddTooltip(int x, int y, int w, int h, int num)
 {
     GHotspot toAdd = new GHotspot(x, y, w, h, this) {
         m_CanDrag = true,
         m_QuickDrag = false,
         Tooltip = new Tooltip(Localization.GetString(num))
     };
     base.m_Children.Add(toAdd);
 }
Ejemplo n.º 13
0
 private static bool Parse_HotSpot(XmlTextReader xml, Gump Parent, string Name)
 {
     int x = 0;
     int y = 0;
     int width = 0;
     int height = 0;
     Gump target = null;
     bool isEmptyElement = xml.IsEmptyElement;
     while (xml.MoveToNextAttribute())
     {
         switch (xml.Name)
         {
             case "X":
             {
                 x = GetInt(xml.Value);
                 continue;
             }
             case "Y":
             {
                 y = GetInt(xml.Value);
                 continue;
             }
             case "Width":
             {
                 width = GetInt(xml.Value);
                 continue;
             }
             case "Height":
             {
                 height = GetInt(xml.Value);
                 continue;
             }
             case "Target":
             {
                 target = GetGump(xml.Value);
                 continue;
             }
         }
         return false;
     }
     GHotspot toAdd = new GHotspot(x, y, width, height, target);
     Parent.Children.Add(toAdd);
     if (isEmptyElement)
     {
         return true;
     }
     while (xml.Read())
     {
         XmlNodeType nodeType = xml.NodeType;
         if (nodeType != XmlNodeType.Element)
         {
             if (nodeType != XmlNodeType.Comment)
             {
                 return (nodeType == XmlNodeType.EndElement);
             }
         }
         else if (!Parse_Element(xml, toAdd, Name))
         {
             return false;
         }
     }
     return false;
 }