Example #1
0
 private void Remove_OnClick(Gump g)
 {
     this.m_Account.Server.RemoveAccount(this.m_Account);
     Profiles.Save();
     Engine.UpdateSmartLoginMenu();
     this.Close();
 }
Example #2
0
 private void Route_OnClick(Gump g)
 {
     if (this.m_OnClick != null)
     {
         this.m_OnClick(this);
     }
 }
Example #3
0
 public static void AddGumpTo(string Parent, Gump Child)
 {
     if (m_xFiles.Contains(Parent) && m_MainGumps.Contains(Parent))
     {
         ((Gump) m_MainGumps[Parent]).Children.Add(Child);
     }
 }
Example #4
0
 public int Add(Gump ToAdd)
 {
     this.m_Array = null;
     Gumps.Invalidate();
     ToAdd.Parent = this.m_Owner;
     this.m_Count++;
     return this.m_List.Add(ToAdd);
 }
Example #5
0
 public GHotspot(int X, int Y, int Width, int Height, Gump Target)
     : base(X, Y)
 {
     this.m_NormalHit = true;
     this.m_Width = Width;
     this.m_Height = Height;
     this.m_Target = Target;
 }
Example #6
0
 public Tooltip(string Text, bool Big, int Width)
 {
     this.m_Text = Text;
     this.m_Big = Big;
     this.m_Gump = null;
     this.m_Delay = 1f;
     this.m_WrapWidth = Width;
 }
Example #7
0
 protected internal override void OnDragDrop(Gump g)
 {
     if (g is GSpellIcon)
     {
         g.X = (Engine.GameX + this.m_GameOffsetX) + 2;
         g.Y = (Engine.GameY + this.m_GameOffsetY) + 2;
     }
 }
Example #8
0
 private void Okay_OnClick(Gump g)
 {
     string title = this.m_Title.String;
     string address = this.m_Address.String;
     string str3 = this.m_Port.String;
     Profiles.AddServer(new ServerProfile(title, address, Convert.ToInt32(str3)));
     Profiles.Save();
     Engine.UpdateSmartLoginMenu();
     this.Close();
 }
Example #9
0
 public GSpellbookIcon(Gump book, Item container)
     : base(container.BookIconX, container.BookIconY, Spells.GetBookIcon(container.ID))
 {
     this.m_Book = book;
     this.m_Container = container;
     this.m_Container.OpenSB = true;
     base.m_CanDrag = true;
     base.m_QuickDrag = false;
     base.m_GUID = string.Format("Spellbook Icon #{0}", container.Serial);
 }
Example #10
0
 private void Okay_OnClick(Gump g)
 {
     string title = this.m_Title.String;
     string username = this.m_Username.String;
     string password = this.m_Password.String;
     AccountProfile account = new AccountProfile(this.m_Server, title, username, password);
     this.m_Server.AddAccount(account);
     new ServerSync(this.m_Server, account, null);
     Profiles.Save();
     Engine.UpdateSmartLoginMenu();
     this.Close();
 }
Example #11
0
 private void Delete_OnClick(Gump g)
 {
     ArrayList list = new ArrayList(this.m_Macro.Actions);
     list.Remove(this.m_Action);
     this.m_Macro.Actions = (Action[]) list.ToArray(typeof(Action));
     GMacroEditorForm parent = this.m_Panel.Parent.Parent as GMacroEditorForm;
     if (parent != null)
     {
         parent.Current = parent.Current;
     }
     Gumps.Destroy(this);
     Gumps.Focus = parent;
 }
Example #12
0
 private void Okay_OnClick(Gump g)
 {
     this.m_Account.Title = this.m_Title.String;
     this.m_Account.Username = this.m_Username.String;
     this.m_Account.Password = this.m_Password.String;
     if ((this.m_Account.Menu != null) && (this.m_Account.Menu != this.m_Account.Server.Menu))
     {
         this.m_Account.Menu.Text = this.m_Account.Title;
     }
     new ServerSync(this.m_Account.Server, this.m_Account, null);
     Profiles.Save();
     this.Close();
 }
Example #13
0
 private void OnScroll(double vNew, double vOld, Gump sender)
 {
     int num = (int) vNew;
     Gump[] gumpArray = base.m_Children.ToArray();
     for (int i = 0; i < gumpArray.Length; i++)
     {
         GServerEntry entry = gumpArray[i] as GServerEntry;
         if (entry != null)
         {
             entry.Y = entry.yBase - num;
         }
     }
 }
Example #14
0
 public override void UpdateGump(Gump g)
 {
     GMainMenu menu = (GMainMenu) g;
     GMenuItem item = (GMenuItem) menu.Children[0];
     InfoNode active = base.Active as InfoNode;
     if (active == null)
     {
         item.Text = base.Name;
     }
     else
     {
         item.Text = active.Name;
     }
 }
Example #15
0
 public GWindowsForm(int x, int y, int width, int height)
     : base(x, y)
 {
     base.m_CanDrag = true;
     base.m_QuickDrag = true;
     this.m_Width = width;
     this.m_Height = height;
     this.m_CaptionLabel = new GLabel("Form", Engine.GetUniFont(1), Hues.Default, 7, 3);
     base.m_Children.Add(this.m_CaptionLabel);
     this.m_Client = new GEmpty(0, 0, 0, 0);
     base.m_Children.Add(this.m_Client);
     this.m_CloseButton = new GWindowsButton("", 0, 0, 0x10, 14);
     this.m_CloseButton.ImageColor = 0;
     this.m_CloseButton.Image = Engine.m_FormX;
     this.m_CloseButton.Clicked += new EventHandler(this.CloseButton_Clicked);
     base.m_Children.Add(this.m_CloseButton);
     this.ResizeClient();
 }
Example #16
0
        private void Slider_OnValueChange(double vNew, double vOld, Gump sender)
        {
            int    num = (int)vNew;
            double tag = (int)sender.GetTag("Max");

            tag = ((double)num) / tag;
            num = (int)-((((int)sender.GetTag("Max")) - base.m_Height) * tag);
            foreach (Gump gump in base.m_Children.ToArray())
            {
                Type type = gump.GetType();
                if (type == tGLabel)
                {
                    gump.Y = num + ((int)gump.GetTag("yBase"));
                }
                else if (type == tGSkillGump)
                {
                    gump.Y = num + ((GSkillGump)gump).yBase;
                }
            }
        }
Example #17
0
 private void Entry_OnHighlight(Gump g)
 {
     if (g.HasTag("HueID"))
     {
         int tag = (int)g.GetTag("HueID");
         if ((tag >= 2) && (tag < 0x3ea))
         {
             tag -= 2;
             int num2 = tag % 5;
             tag /= 5;
             int num3 = tag % 20;
             tag /= 20;
             int num4 = tag;
             this.m_Picker.Brightness = num2;
             this.m_Picker.ShadeX     = num3;
             this.m_Picker.ShadeY     = num4;
             this.m_Brightness.Refresh();
         }
     }
 }
Example #18
0
 public virtual Gump GetGump()
 {
     if (this.m_Gump == null)
     {
         GWrappedLabel label;
         if ((this.m_Text == null) || (this.m_Text.Length <= 0))
         {
             return((Gump)(this.m_Gump = null));
         }
         this.m_Gump = new GAlphaBackground(0, 0, 100, 100);
         label       = new GWrappedLabel(this.m_Text, Engine.GetUniFont(1), Hues.Load(0x481), 4, 4, this.m_WrapWidth)
         {
             X = label.X - label.Image.xMin,
             Y = label.Y - label.Image.yMin
         };
         this.m_Gump.Width  = (label.Image.xMax - label.Image.xMin) + 9;
         this.m_Gump.Height = (label.Image.yMax - label.Image.yMin) + 9;
         this.m_Gump.Children.Add(label);
     }
     return(this.m_Gump);
 }
Example #19
0
 public override void UpdateGump(Gump g)
 {
     g.Children.Clear();
     Table2DInfoNode active = base.Inputs[0].Active as Table2DInfoNode;
     if (active == null)
     {
         GLabel toAdd = new GLabel("Select a spell type from the list above.", Engine.GetUniFont(1), GumpHues.WindowText, 0, 0);
         g.Children.Add(toAdd);
     }
     else
     {
         int num = 0;
         for (int i = 0; i < active.Descriptors.Length; i++)
         {
             TableGump gump = new TableGump(active.Descriptors[i]) {
                 Y = num
             };
             num += gump.Height + 10;
             g.Children.Add(gump);
         }
     }
 }
Example #20
0
 private void TextBox_OnTextChange(string text, Gump g)
 {
     try
     {
         int num = Convert.ToInt32(text);
         if (num < 0)
         {
             this.m_Slider.SetValue(0.0, true);
         }
         else if (num > this.m_Amount)
         {
             this.m_Slider.SetValue((double)this.m_Amount, true);
         }
         else
         {
             this.m_Slider.SetValue((double)num, false);
         }
     }
     catch
     {
     }
 }
Example #21
0
        protected internal override void Draw(int x, int y)
        {
            Gump[] array = Gumps.Desktop.Children.ToArray();
            float  num   = 1f;

            for (int i = Array.IndexOf(array, this) + 1; i < array.Length; i++)
            {
                Gump gump = array[i];
                if (gump is IMessage)
                {
                    IMessage message = (IMessage)gump;
                    if (message.Visible && message.ImageRect.IntersectsWith(this.m_ImageRect))
                    {
                        num += message.Alpha;
                    }
                }
            }
            float alpha = this.Alpha;

            this.Alpha = (float)((1.0 / ((double)num)) * alpha);
            base.Draw(x, y);
            this.Alpha = alpha;
        }
Example #22
0
 protected internal override void OnDragDrop(Gump g)
 {
     if ((g != null) && (g.GetType() == typeof(GDraggedItem)))
     {
         GDraggedItem item      = (GDraggedItem)g;
         Item         toEquip   = item.Item;
         Item         item3     = null;
         Gump[]       gumpArray = base.m_Children.ToArray();
         Point        point     = base.PointToClient(new Point(Engine.m_xMouse, Engine.m_yMouse));
         for (int i = gumpArray.Length - 1; i >= 0; i--)
         {
             if ((gumpArray[i] is GPaperdollItem) && gumpArray[i].HitTest(point.X - gumpArray[i].X, point.Y - gumpArray[i].Y))
             {
                 item3 = ((GPaperdollItem)gumpArray[i]).Item;
                 break;
             }
         }
         if ((item3 != null) && Map.m_ItemFlags[item3.ID & 0x3fff][TileFlag.Container])
         {
             Network.Send(new PDropItem(toEquip.Serial, -1, -1, 0, item3.Serial));
         }
         else if (Map.m_ItemFlags[toEquip.ID & 0x3fff][TileFlag.Wearable])
         {
             Network.Send(new PEquipItem(toEquip, this.m_Mobile));
         }
         else
         {
             Network.Send(new PDropItem(toEquip.Serial, -1, -1, 0, World.Serial));
         }
         Gumps.Destroy(item);
     }
     if (this.m_Image != null)
     {
         Gumps.Destroy(this.m_Image);
         this.m_Image = null;
     }
 }
Example #23
0
 protected internal override void OnDragDrop(Gump g)
 {
     if ((g != null) && (g.GetType() == typeof(GDraggedItem)))
     {
         GDraggedItem item = (GDraggedItem) g;
         Item toEquip = item.Item;
         Item item3 = null;
         Gump[] gumpArray = base.m_Children.ToArray();
         Point point = base.PointToClient(new Point(Engine.m_xMouse, Engine.m_yMouse));
         for (int i = gumpArray.Length - 1; i >= 0; i--)
         {
             if ((gumpArray[i] is GPaperdollItem) && gumpArray[i].HitTest(point.X - gumpArray[i].X, point.Y - gumpArray[i].Y))
             {
                 item3 = ((GPaperdollItem) gumpArray[i]).Item;
                 break;
             }
         }
         if ((item3 != null) && Map.m_ItemFlags[item3.ID & 0x3fff][TileFlag.Container])
         {
             Network.Send(new PDropItem(toEquip.Serial, -1, -1, 0, item3.Serial));
         }
         else if (Map.m_ItemFlags[toEquip.ID & 0x3fff][TileFlag.Wearable])
         {
             Network.Send(new PEquipItem(toEquip, this.m_Mobile));
         }
         else
         {
             Network.Send(new PDropItem(toEquip.Serial, -1, -1, 0, World.Serial));
         }
         Gumps.Destroy(item);
     }
     if (this.m_Image != null)
     {
         Gumps.Destroy(this.m_Image);
         this.m_Image = null;
     }
 }
Example #24
0
 protected internal override void OnDragEnter(Gump g)
 {
     if ((g != null) && (g.GetType() == typeof(GDraggedItem)))
     {
         GDraggedItem item  = (GDraggedItem)g;
         Item         item2 = item.Item;
         int          iD    = item2.ID;
         int          hue   = item2.Hue;
         Engine.ItemArt.Translate(ref iD, ref hue);
         if (Map.m_ItemFlags[iD][TileFlag.Wearable])
         {
             if (this.m_Image != null)
             {
                 Gumps.Destroy(this.m_Image);
             }
             this.m_Image       = new GImage(Gumps.GetEquipGumpID(iD, this.m_Gender, ref hue), Hues.GetItemHue(iD, hue), 8, 0x13);
             this.m_Image.Alpha = 0.5f;
             int           count     = base.m_Children.Count;
             LayerComparer paperdoll = LayerComparer.Paperdoll;
             int           num4      = paperdoll.GetValue(iD, (Layer)Map.GetQuality(iD));
             for (int i = 0; i < base.m_Children.Count; i++)
             {
                 Gump gump = base.m_Children[i];
                 if (gump.GetType() == typeof(GPaperdollItem))
                 {
                     GPaperdollItem item3 = (GPaperdollItem)gump;
                     if (paperdoll.GetValue(item3.Item.ID, (Layer)((byte)item3.Layer)) < num4)
                     {
                         count = i;
                         break;
                     }
                 }
             }
             base.m_Children.Insert(count, this.m_Image);
         }
     }
 }
Example #25
0
 protected internal override void Render(int X, int Y)
 {
     if (base.m_Visible)
     {
         if (!m_Fade)
         {
             base.Alpha   = 1f;
             this.m_State = FadeState.Opaque;
             base.Render(X, Y);
         }
         else
         {
             int x = X + this.X;
             int y = Y + this.Y;
             this.Draw(x, y);
             Gump[] gumpArray = base.m_Children.ToArray();
             float  alpha     = 0f;
             for (int i = 0; i < gumpArray.Length; i++)
             {
                 Gump gump = gumpArray[i];
                 if (gump.m_ITranslucent)
                 {
                     ITranslucent translucent = (ITranslucent)gump;
                     alpha              = translucent.Alpha;
                     translucent.Alpha *= base.m_fAlpha;
                     gump.Render(x, y);
                     translucent.Alpha = alpha;
                 }
                 else
                 {
                     gump.Render(x, y);
                 }
             }
         }
     }
 }
Example #26
0
        public override void UpdateGump(Gump g)
        {
            g.Children.Clear();
            Table2DInfoNode active = base.Inputs[0].Active as Table2DInfoNode;

            if (active == null)
            {
                GLabel toAdd = new GLabel("Select a weapon type from the list above.", Engine.GetUniFont(1), GumpHues.WindowText, 0, 0);
                g.Children.Add(toAdd);
            }
            else
            {
                int num = 0;
                for (int i = 0; i < active.Descriptors.Length; i++)
                {
                    TableGump gump = new TableGump(active.Descriptors[i])
                    {
                        Y = num
                    };
                    num += gump.Height + 10;
                    g.Children.Add(gump);
                }
            }
        }
Example #27
0
 public virtual Gump GetGump()
 {
     if (this.m_Gump == null)
     {
         GWrappedLabel label;
         if ((this.m_Text == null) || (this.m_Text.Length <= 0))
         {
             return (Gump) (this.m_Gump = null);
         }
         this.m_Gump = new GAlphaBackground(0, 0, 100, 100);
         label = new GWrappedLabel(this.m_Text, Engine.GetUniFont(1), Hues.Load(0x481), 4, 4, this.m_WrapWidth) {
             X = label.X - label.Image.xMin,
             Y = label.Y - label.Image.yMin
         };
         this.m_Gump.Width = (label.Image.xMax - label.Image.xMin) + 9;
         this.m_Gump.Height = (label.Image.yMax - label.Image.yMin) + 9;
         this.m_Gump.Children.Add(label);
     }
     return this.m_Gump;
 }
Example #28
0
 private void Cancel_OnClick(Gump g)
 {
     this.Close();
 }
Example #29
0
 public static void AttackModeToggle_OnClick(Gump Sender)
 {
     Network.Send(new PSetWarMode(!World.Player.Flags[MobileFlag.Warmode], 0x20, 0));
 }
Example #30
0
 public static void AppearanceHueProperty_OnClick(Gump Sender)
 {
     string tag = (string) Sender.GetTag("Property");
     Gump gump = (Gump) Sender.GetTag("Preview");
     Gump gump2 = (Gump) Sender.GetTag("Image");
     GBackground background = new GBackground(0xe14, 0x97, 310, 0x1db, 0x7d, true);
     Gump toAdd = null;
     string str = tag;
     if (str != null)
     {
         str = string.IsInterned(str);
         if (str == "Skin Tone")
         {
             toAdd = new GSkinHuePickerAll(background.OffsetX, background.OffsetY, background.UseWidth, background.UseHeight);
             ((GSkinHuePickerAll) toAdd).OnHueRelease = new OnHueSelect(Engine.AppearanceHuePicker_OnHueRelease);
             ((GSkinHuePickerAll) toAdd).OnHueSelect = new OnHueSelect(Engine.AppearanceHuePicker_OnHueSelect);
             toAdd.SetTag("Back", background);
             toAdd.SetTag("Preview", gump);
             toAdd.SetTag("Image", gump2);
             toAdd.SetTag("Sender", Sender);
         }
         else if (str == "Shirt Color")
         {
             toAdd = new GHuePickerAll(background.OffsetX, background.OffsetY, background.UseWidth, background.UseHeight);
             ((GHuePickerAll) toAdd).OnHueRelease = new OnHueSelect(Engine.AppearanceHuePicker_OnHueRelease);
             ((GHuePickerAll) toAdd).OnHueSelect = new OnHueSelect(Engine.AppearanceHuePicker_OnHueSelect);
             toAdd.SetTag("Back", background);
             toAdd.SetTag("Preview", gump);
             toAdd.SetTag("Image", gump2);
             toAdd.SetTag("Sender", Sender);
         }
         else if (str == "Pants Color")
         {
             toAdd = new GHuePickerAll(background.OffsetX, background.OffsetY, background.UseWidth, background.UseHeight);
             ((GHuePickerAll) toAdd).OnHueRelease = new OnHueSelect(Engine.AppearanceHuePicker_OnHueRelease);
             ((GHuePickerAll) toAdd).OnHueSelect = new OnHueSelect(Engine.AppearanceHuePicker_OnHueSelect);
             toAdd.SetTag("Back", background);
             toAdd.SetTag("Preview", gump);
             toAdd.SetTag("Image", gump2);
             toAdd.SetTag("Sender", Sender);
         }
         else if (str == "Hair Color")
         {
             toAdd = new GHairHuePickerAll(background.OffsetX, background.OffsetY, background.UseWidth, background.UseHeight);
             ((GHairHuePickerAll) toAdd).OnHueRelease = new OnHueSelect(Engine.AppearanceHuePicker_OnHueRelease);
             ((GHairHuePickerAll) toAdd).OnHueSelect = new OnHueSelect(Engine.AppearanceHuePicker_OnHueSelect);
             toAdd.SetTag("Back", background);
             toAdd.SetTag("Preview", gump);
             toAdd.SetTag("Image", gump2);
             toAdd.SetTag("Sender", Sender);
         }
         else
         {
             if (str != "Facial Hair Color")
             {
                 return;
             }
             toAdd = new GHairHuePickerAll(background.OffsetX, background.OffsetY, background.UseWidth, background.UseHeight);
             ((GHairHuePickerAll) toAdd).OnHueRelease = new OnHueSelect(Engine.AppearanceHuePicker_OnHueRelease);
             ((GHairHuePickerAll) toAdd).OnHueSelect = new OnHueSelect(Engine.AppearanceHuePicker_OnHueSelect);
             toAdd.SetTag("Back", background);
             toAdd.SetTag("Preview", gump);
             toAdd.SetTag("Image", gump2);
             toAdd.SetTag("Sender", Sender);
         }
         toAdd.X += (background.UseWidth - toAdd.Width) / 2;
         toAdd.Y += (background.UseHeight - toAdd.Height) / 2;
         background.Children.Add(toAdd);
         Gumps.Desktop.Children.Add(background);
     }
 }
Example #31
0
 private void HueReleased(int hue, Gump g)
 {
     this.m_Entry.SetValue(hue);
     Gumps.Destroy(this);
 }
Example #32
0
 public override void UpdateGump(Gump g)
 {
 }
Example #33
0
 protected internal override void OnDragLeave(Gump g)
 {
     if (this.m_Image != null)
     {
         Gumps.Destroy(this.m_Image);
         this.m_Image = null;
     }
 }
Example #34
0
 public int IndexOf(Gump Child)
 {
     return(this.m_List.IndexOf(Child));
 }
Example #35
0
 public GMouseRouter(int GumpID, int X, int Y, Gump Target) : this(GumpID, Hues.Default, X, Y, Target)
 {
 }
Example #36
0
 private void Cancel_OnClick(Gump g)
 {
     this.Close();
 }
Example #37
0
        public GSecureTrade(int serial, Gump container, string myName, string theirName) : base(50, 50, 0x119, 0x74)
        {
            this.m_Serial    = serial;
            this.m_Container = container;
            base.m_CanDrop   = true;
            base.FillAlpha   = 0.5f;
            base.FillColor   = 0x6080ff;
            GBorder3D toAdd = new GBorder3D(false, 0, 0, this.Width, this.Height)
            {
                FillAlpha     = 0f,
                ShouldHitTest = false
            };

            base.m_Children.Add(toAdd);
            GBorder3D borderd2 = new GBorder3D(true, 6, 6, 0x84, 0x68)
            {
                FillAlpha     = 0f,
                ShouldHitTest = false
            };

            base.m_Children.Add(borderd2);
            GBorder3D borderd3 = new GBorder3D(false, 7, 7, 130, 20)
            {
                ShouldHitTest = false
            };
            GLabel label = new GLabel(this.Truncate(myName, Engine.GetUniFont(1), borderd3.Width - 0x1c), Engine.GetUniFont(1), Hues.Load(1), 0, 0);

            borderd3.Children.Add(label);
            label.Center();
            label.X = 0x1c - label.Image.xMin;
            base.m_Children.Add(borderd3);
            GBorder3D borderd4 = new GBorder3D(true, 0x8f, 6, 0x84, 0x68)
            {
                FillAlpha     = 0f,
                ShouldHitTest = false
            };

            base.m_Children.Add(borderd4);
            GBorder3D borderd5 = new GBorder3D(false, 0x90, 7, 130, 20)
            {
                ShouldHitTest = false
            };
            GLabel label2 = new GLabel(this.Truncate(theirName, Engine.GetUniFont(1), borderd5.Width - 0x1c), Engine.GetUniFont(1), Hues.Load(1), 0, 0);

            borderd5.Children.Add(label2);
            label2.Center();
            label2.X = (borderd5.Width - 0x1c) - label2.Image.xMax;
            base.m_Children.Add(borderd5);
            GAlphaBackground background = new GAlphaBackground(1, 1, 5, 0x72)
            {
                ShouldHitTest = false,
                BorderColor   = 0xc0c0c0,
                FillColor     = 0xc0c0c0,
                FillAlpha     = 1f
            };

            base.m_Children.Add(background);
            background = new GAlphaBackground(0x113, 1, 5, 0x72)
            {
                ShouldHitTest = false,
                BorderColor   = 0xc0c0c0,
                FillColor     = 0xc0c0c0,
                FillAlpha     = 1f
            };
            base.m_Children.Add(background);
            background = new GAlphaBackground(6, 1, 0x10d, 5)
            {
                ShouldHitTest = false,
                BorderColor   = 0xc0c0c0,
                FillColor     = 0xc0c0c0,
                FillAlpha     = 1f
            };
            base.m_Children.Add(background);
            background = new GAlphaBackground(6, 110, 0x10d, 5)
            {
                ShouldHitTest = false,
                BorderColor   = 0xc0c0c0,
                FillColor     = 0xc0c0c0,
                FillAlpha     = 1f
            };
            base.m_Children.Add(background);
            background = new GAlphaBackground(0x8a, 6, 5, 0x68)
            {
                ShouldHitTest = false,
                BorderColor   = 0xc0c0c0,
                FillColor     = 0xc0c0c0,
                FillAlpha     = 1f
            };
            base.m_Children.Add(background);
        }
Example #38
0
 private void Add_OnClick(Gump g)
 {
     Engine.AddTextMessage("Enter hue name:");
     Engine.Prompt = new HuePrompt(this.m_Picker.Hue, this);
 }
Example #39
0
 private void KeyboardFlipper_OnClick(Gump g)
 {
     this.ShowKeyboard = !this.ShowKeyboard;
 }
Example #40
0
 protected internal override void Render(int X, int Y)
 {
     if (this.m_AlphaRegions.Count == 0)
     {
         base.Render(X, Y);
     }
     else if (base.m_Visible)
     {
         int x = X + this.X;
         int y = Y + this.Y;
         this.Draw(x, y);
         Gump[]        gumpArray = base.m_Children.ToArray();
         RectangleList list      = new RectangleList();
         RectangleList list2     = new RectangleList();
         int           num3      = 0;
         for (int i = 0; i < gumpArray.Length; i++)
         {
             Gump gump = gumpArray[i];
             if (gump is GTransparentRegion)
             {
                 num3++;
                 continue;
             }
             if (num3 >= this.m_AlphaRegions.Count)
             {
                 gump.Render(x, y);
                 continue;
             }
             Rectangle rect = new Rectangle(gump.X, gump.Y, gump.Width, gump.Height);
             list.Add(rect);
             for (int j = num3; j < this.m_AlphaRegions.Count; j++)
             {
                 Gump gump2 = (Gump)this.m_AlphaRegions[j];
                 if (gump2 is GTransparentRegion)
                 {
                     Rectangle a          = new Rectangle(gump2.X, gump2.Y, gump2.Width, gump2.Height);
                     Rectangle rectangle3 = Rectangle.Intersect(a, rect);
                     list.Remove(rectangle3);
                     list2.Add(rectangle3);
                 }
             }
             if (list2.Count > 0)
             {
                 for (int k = i + 1; k < gumpArray.Length; k++)
                 {
                     Gump gump3 = gumpArray[k];
                     if (gump3 is GServerBackground)
                     {
                         GServerBackground background = (GServerBackground)gump3;
                         Rectangle         rectangle4 = new Rectangle(background.X + background.OffsetX, background.Y + background.OffsetY, background.UseWidth, background.UseHeight);
                         list.Remove(rectangle4);
                         list2.Remove(rectangle4);
                     }
                     else if (gump3 == this.m_AlphaRegions[this.m_AlphaRegions.Count - 1])
                     {
                         break;
                     }
                 }
                 if ((list2.Count == 1) && (list.Count == 0))
                 {
                     Renderer.SetAlphaEnable(true);
                     Renderer.SetAlpha(0.5f);
                     gump.Render(x, y);
                     Renderer.SetAlphaEnable(false);
                 }
                 else
                 {
                     for (int m = 0; m < list.Count; m++)
                     {
                         Rectangle rectangle5 = list[m];
                         if (Renderer.SetViewport(x + rectangle5.X, y + rectangle5.Y, rectangle5.Width, rectangle5.Height))
                         {
                             gump.Render(x, y);
                         }
                     }
                     for (int n = 0; n < list2.Count; n++)
                     {
                         Rectangle rectangle6 = list2[n];
                         if (Renderer.SetViewport(x + rectangle6.X, y + rectangle6.Y, rectangle6.Width, rectangle6.Height))
                         {
                             Renderer.SetAlphaEnable(true);
                             Renderer.SetAlpha(0.5f);
                             gump.Render(x, y);
                             Renderer.SetAlphaEnable(false);
                         }
                     }
                     if ((list.Count > 0) || (list2.Count > 0))
                     {
                         Renderer.SetViewport(0, 0, Engine.ScreenWidth, Engine.ScreenHeight);
                     }
                 }
                 list.Clear();
                 list2.Clear();
                 continue;
             }
             gump.Render(x, y);
         }
     }
 }
Example #41
0
 protected internal override void OnDragEnter(Gump g)
 {
     if ((g != null) && (g.GetType() == typeof(GDraggedItem)))
     {
         GDraggedItem item = (GDraggedItem) g;
         Item item2 = item.Item;
         int iD = item2.ID;
         int hue = item2.Hue;
         Engine.ItemArt.Translate(ref iD, ref hue);
         if (Map.m_ItemFlags[iD][TileFlag.Wearable])
         {
             if (this.m_Image != null)
             {
                 Gumps.Destroy(this.m_Image);
             }
             this.m_Image = new GImage(Gumps.GetEquipGumpID(iD, this.m_Gender, ref hue), Hues.GetItemHue(iD, hue), 8, 0x13);
             this.m_Image.Alpha = 0.5f;
             int count = base.m_Children.Count;
             LayerComparer paperdoll = LayerComparer.Paperdoll;
             int num4 = paperdoll.GetValue(iD, (Layer) Map.GetQuality(iD));
             for (int i = 0; i < base.m_Children.Count; i++)
             {
                 Gump gump = base.m_Children[i];
                 if (gump.GetType() == typeof(GPaperdollItem))
                 {
                     GPaperdollItem item3 = (GPaperdollItem) gump;
                     if (paperdoll.GetValue(item3.Item.ID, (Layer) ((byte) item3.Layer)) < num4)
                     {
                         count = i;
                         break;
                     }
                 }
             }
             base.m_Children.Insert(count, this.m_Image);
         }
     }
 }
Example #42
0
 private void All_OnClick(Gump g)
 {
     this.Mods ^= MacroModifiers.All;
 }
Example #43
0
 public GumpList(Gump Owner)
 {
     this.m_Owner = Owner;
     this.m_Array = m_Empty;
 }
Example #44
0
 public static void AppearanceHuePicker_OnHueSelect(int Hue, Gump Sender)
 {
     GImage tag = (GImage) Sender.GetTag("Image");
     if ((((int) tag.GetTag("ItemID")) == 0) || !Map.m_ItemFlags[((int) tag.GetTag("ItemID")) & 0x3fff][TileFlag.PartialHue])
     {
         Hue ^= 0x8000;
     }
     tag.Hue = Hues.Load(Hue);
 }
Example #45
0
 private void OnTextChange(string text, Gump g)
 {
     base.Active = text;
 }
Example #46
0
 protected internal override void OnDragDrop(Gump g)
 {
     if (this.m_Container != null)
     {
         this.m_Container.OnDragDrop(g);
     }
 }
Example #47
0
 protected internal virtual void OnDragLeave(Gump g)
 {
 }
Example #48
0
 protected internal virtual void OnFocusChanged(Gump Focused)
 {
 }
Example #49
0
 private void Alt_OnClick(Gump g)
 {
     this.m_Macro.Alt = !this.m_Macro.Alt;
     this.UpdateModifier(this.m_Alt, "Alt", this.m_Macro.Alt);
     this.NotifyParent();
 }
Example #50
0
 public void SetMouseOverride(Gump g)
 {
     this.m_Override  = g;
     base.m_QuickDrag = base.m_CanDrag = ((g != null) && g.m_CanDrag) && g.m_QuickDrag;
 }
Example #51
0
 public GSecureTrade(int serial, Gump container, string myName, string theirName)
     : base(50, 50, 0x119, 0x74)
 {
     this.m_Serial = serial;
     this.m_Container = container;
     base.m_CanDrop = true;
     base.FillAlpha = 0.5f;
     base.FillColor = 0x6080ff;
     GBorder3D toAdd = new GBorder3D(false, 0, 0, this.Width, this.Height) {
         FillAlpha = 0f,
         ShouldHitTest = false
     };
     base.m_Children.Add(toAdd);
     GBorder3D borderd2 = new GBorder3D(true, 6, 6, 0x84, 0x68) {
         FillAlpha = 0f,
         ShouldHitTest = false
     };
     base.m_Children.Add(borderd2);
     GBorder3D borderd3 = new GBorder3D(false, 7, 7, 130, 20) {
         ShouldHitTest = false
     };
     GLabel label = new GLabel(this.Truncate(myName, Engine.GetUniFont(1), borderd3.Width - 0x1c), Engine.GetUniFont(1), Hues.Load(1), 0, 0);
     borderd3.Children.Add(label);
     label.Center();
     label.X = 0x1c - label.Image.xMin;
     base.m_Children.Add(borderd3);
     GBorder3D borderd4 = new GBorder3D(true, 0x8f, 6, 0x84, 0x68) {
         FillAlpha = 0f,
         ShouldHitTest = false
     };
     base.m_Children.Add(borderd4);
     GBorder3D borderd5 = new GBorder3D(false, 0x90, 7, 130, 20) {
         ShouldHitTest = false
     };
     GLabel label2 = new GLabel(this.Truncate(theirName, Engine.GetUniFont(1), borderd5.Width - 0x1c), Engine.GetUniFont(1), Hues.Load(1), 0, 0);
     borderd5.Children.Add(label2);
     label2.Center();
     label2.X = (borderd5.Width - 0x1c) - label2.Image.xMax;
     base.m_Children.Add(borderd5);
     GAlphaBackground background = new GAlphaBackground(1, 1, 5, 0x72) {
         ShouldHitTest = false,
         BorderColor = 0xc0c0c0,
         FillColor = 0xc0c0c0,
         FillAlpha = 1f
     };
     base.m_Children.Add(background);
     background = new GAlphaBackground(0x113, 1, 5, 0x72) {
         ShouldHitTest = false,
         BorderColor = 0xc0c0c0,
         FillColor = 0xc0c0c0,
         FillAlpha = 1f
     };
     base.m_Children.Add(background);
     background = new GAlphaBackground(6, 1, 0x10d, 5) {
         ShouldHitTest = false,
         BorderColor = 0xc0c0c0,
         FillColor = 0xc0c0c0,
         FillAlpha = 1f
     };
     base.m_Children.Add(background);
     background = new GAlphaBackground(6, 110, 0x10d, 5) {
         ShouldHitTest = false,
         BorderColor = 0xc0c0c0,
         FillColor = 0xc0c0c0,
         FillAlpha = 1f
     };
     base.m_Children.Add(background);
     background = new GAlphaBackground(0x8a, 6, 5, 0x68) {
         ShouldHitTest = false,
         BorderColor = 0xc0c0c0,
         FillColor = 0xc0c0c0,
         FillAlpha = 1f
     };
     base.m_Children.Add(background);
 }
Example #52
0
 private void Ctrl_OnClick(Gump g)
 {
     this.m_Macro.Control = !this.m_Macro.Control;
     this.UpdateModifier(this.m_Ctrl, "Ctrl", this.m_Macro.Control);
     this.NotifyParent();
 }
Example #53
0
 private void HueSelected(int hue, Gump g)
 {
     this.m_Entry.SetValue(hue);
 }
Example #54
0
 private void Shift_OnClick(Gump g)
 {
     this.m_Macro.Shift = !this.m_Macro.Shift;
     this.UpdateModifier(this.m_Shift, "Shift", this.m_Macro.Shift);
     this.NotifyParent();
 }
Example #55
0
 private void ValueType_OnClick(Gump g)
 {
     this.m_ShowReal = !this.m_ShowReal;
     this.m_ValueType.Text = this.m_ShowReal ? "Real Values" : "Used Values";
     this.m_ValueType.X = 4 - this.m_ValueType.Image.xMin;
     this.m_ValueType.Y = (base.m_Height - 5) - this.m_ValueType.Image.yMax;
     this.m_SkillList.ShowReal = this.m_ShowReal;
 }
Example #56
0
 private void SetIndex_OnClick(Gump g)
 {
     this.Index = (int)g.GetTag("Index");
     Gumps.Destroy(this.m_Dropdown);
 }
Example #57
0
 private void Slider_OnValueChange(double v, double old, Gump g)
 {
     this.m_TextBox.String = ((int)v).ToString();
 }
Example #58
0
 protected internal virtual void OnDragDrop(Gump g)
 {
 }
Example #59
0
 private void Lock_OnStateChange(int state, Gump g)
 {
     SkillLock @lock = (SkillLock) state;
     if (this.m_Skill.Lock != @lock)
     {
         this.m_Skill.Lock = @lock;
         Network.Send(new PUpdateSkillLock(this.m_Skill));
     }
 }
Example #60
0
 protected internal virtual void OnDragEnter(Gump g)
 {
 }