コード例 #1
0
ファイル: ProfileGump.cs プロジェクト: plugtopus/WisQuas2
        public ProfileGump(Serial serial, string header, string footer, string body, bool canEdit) : base(serial, serial)
        {
            CanMove = true;

            AcceptKeyboardInput = true;

            Add(_background = new ExpandableScroll(0, 0, 300));
            _scrollBar = new ScrollFlag( 0, 0, Height, true);
            Add(_scrollBar);
            AddHorizontalBar(92, 40, 40, 220);
            Add(new Label(header, true, 0, font: 1, maxwidth: 140)
            {
                X = 90,
                Y = 32,
            });

            Add(_textBox = new MultiLineBox(new MultiLineEntry(1, width: 220, maxWidth: 220, hue: 0), canEdit)
            {
                X = 40,
                Y = 82,
                Width = 220,
                ScissorsEnabled = true,
                Text = body
            });

            /*
			AddHorizontalBar(95, 40, _textBox.Y + _textBox.Height, 220);
			AddChildren(new Label(footer, true, 0, font: 1, maxwidth: 220)
			{
				X = 40, Y = _textBox.Y + _textBox.Height + 20,
			});
			*/
        }
コード例 #2
0
        public VendorBuyGump(AEntity vendorBackpack, VendorBuyListPacket packet)
            : base(0, 0)
        {
            // sanity checking: don't show buy gumps for empty containers.
            if (!(vendorBackpack is Container) || ((vendorBackpack as Container).Contents.Count <= 0) || (packet.Items.Count <= 0))
            {
                Dispose();
                return;
            }

            IsMoveable = true;
            // note: original gumplings start at index 0x0870.
            AddControl(m_Background = new ExpandableScroll(this, 0, 0, 360, false));
            AddControl(new HtmlGumpling(this, 0, 6, 300, 20, 0, 0, " <center><span color='#004' style='font-family:uni0;'>Shop Inventory"));

            m_ScrollBar = (IScrollBar)AddControl(new ScrollFlag(this));
            AddControl(m_ShopContents = new RenderedTextList(this, 22, 32, 250, 260, m_ScrollBar));
            BuildShopContents(vendorBackpack, packet);

            AddControl(m_TotalCost = new HtmlGumpling(this, 44, 334, 200, 30, 0, 0, string.Empty));
            UpdateCost();

            Button okButton = (Button)AddControl(new Button(this, 220, 333, 0x907, 0x908, ButtonTypes.Activate, 0, 0));

            okButton.GumpOverID       = 0x909;
            okButton.MouseClickEvent += okButton_MouseClickEvent;
        }
コード例 #3
0
        public ProfileGump(Serial serial, string header, string footer, string body, bool canEdit) : base(serial, serial)
        {
            Height              = 300;
            CanMove             = true;
            AcceptKeyboardInput = true;
            Add(_scrollExp      = new ExpandableScroll(0, 0, Height, 0x0820));
            _scrollArea         = new ScrollArea(0, 32, 272, Height - 96, false);

            Control c = new Label(header, true, 0, font: 1, maxwidth: 140)
            {
                X = 85,
                Y = 0
            };

            _scrollArea.Add(c);
            AddHorizontalBar(_scrollArea, 92, 35, 220);

            _textBox = new MultiLineBox(new MultiLineEntry(1, -1, 0, 220, true, hue: 0), canEdit)
            {
                Height = FileManager.Fonts.GetHeightUnicode(1, body, 220, TEXT_ALIGN_TYPE.TS_LEFT, 0x0),
                X      = 35,
                Y      = 0,
                Text   = _originalText = body
            };
            _scrollArea.Add(_textBox);
            AddHorizontalBar(_scrollArea, 95, 35, 220);

            _scrollArea.Add(new Label(footer, true, 0, font: 1, maxwidth: 220)
            {
                X = 35,
                Y = 0
            });
            Add(_scrollArea);
        }
コード例 #4
0
ファイル: TipNoticeGump.cs プロジェクト: seand88/ClassicUO
        public TipNoticeGump(byte type, string page) : base(0, 0)
        {
            Height  = 300;
            CanMove = true;
            CanCloseWithRightClick = true;
            _scrollArea            = new ScrollArea(0, 32, 272, Height - 96, false);

            _textBox = new StbTextBox(1, -1, 220)
            {
                Height     = 20,
                X          = 35,
                Y          = 0,
                Width      = 220,
                IsEditable = false
            };

            _textBox.SetText(page);
            Add(_background = new ExpandableScroll(0, 0, Height, 0x0820));
            _scrollArea.Add(_textBox);
            Add(_scrollArea);

            if (type == 0)
            {
                _pages = new OrderedDictionary <uint, string>();
                _tips  = this;
                _background.TitleGumpID = 0x9CA;
                _idx      = 0;
                Add(_prev = new Button(0, 0x9cc, 0x9cc)
                {
                    X = 35, ContainsByBounds = true
                });

                _prev.MouseUp += (o, e) =>
                {
                    if (e.Button == MouseButtonType.Left)
                    {
                        SetPage(_idx - 1);
                    }
                };

                Add(_next = new Button(0, 0x9cd, 0x9cd)
                {
                    X = 240, ContainsByBounds = true
                });

                _next.MouseUp += (o, e) =>
                {
                    if (e.Button == MouseButtonType.Left)
                    {
                        SetPage(_idx + 1);
                    }
                };
            }
            else
            {
                _background.TitleGumpID = 0x9D2;
            }
        }
コード例 #5
0
        public StandardSkillsGump() : base(Constants.SKILLSTD_LOCALSERIAL, 0)
        {
            CanBeSaved       = true;
            AcceptMouseInput = false;
            CanMove          = true;
            Height           = 200 + _diffY;

            Add(new GumpPic(160, 0, 0x82D, 0));
            _scrollArea = new ExpandableScroll(0, _diffY, Height, 0x1F40)
            {
                TitleGumpID      = 0x0834,
                AcceptMouseInput = true
            };

            Add(_scrollArea);

            Add(new GumpPic(50, 35 + _diffY, 0x082B, 0));
            Add(_bottomLine    = new GumpPic(50, Height - 98, 0x082B, 0));
            Add(_bottomComment = new GumpPic(25, Height - 85, 0x0836, 0));

            _container = new ScrollArea(22, 45 + _diffY + _bottomLine.Height - 10, _scrollArea.Width - 14,
                                        _scrollArea.Height - (83 + _diffY), false)
            {
                AcceptMouseInput = true, CanMove = true
            };
            Add(_container);
            Add(_skillsLabelSum = new Label(World.Player.Skills.Sum(s => s.Value).ToString("F1"), false, 600, 0, 3)
            {
                X = _bottomComment.X + _bottomComment.Width + 5, Y = _bottomComment.Y - 5
            });

            //new group
            Add(_newGroupButton = new Button(0, 0x083A, 0x083A, 0x083A)
            {
                X = 60,
                Y = Height,
                ContainsByBounds = true,
                ButtonAction     = ButtonAction.Activate
            });
            Add(_checkReal = new Checkbox(0x938, 0x939, " - Show Real", 1, 0x0386, false)
            {
                X = _newGroupButton.X + _newGroupButton.Width + 30, Y = _newGroupButton.Y - 6
            });
            Add(_checkCaps = new Checkbox(0x938, 0x939, " - Show Caps", 1, 0x0386, false)
            {
                X = _newGroupButton.X + _newGroupButton.Width + 30, Y = _newGroupButton.Y + 7
            });
            _checkReal.ValueChanged += UpdateGump;
            _checkCaps.ValueChanged += UpdateGump;

            _allSkillControls = new SkillControl[FileManager.Skills.SkillsCount];

            foreach (KeyValuePair <string, List <int> > k in SkillsGroupManager.Groups)
            {
                AddSkillsToGroup(k.Key, k.Value.OrderBy(s => s, _instance).ToList());
            }
        }
コード例 #6
0
ファイル: ProfileGump.cs プロジェクト: soufflee/ClassicUO
        public ProfileGump(uint serial, string header, string footer, string body, bool canEdit) : base(serial == World.Player.Serial ? serial = Constants.PROFILE_LOCALSERIAL : serial, serial)
        {
            Height                 = 300 + _diffY;
            CanMove                = true;
            AcceptKeyboardInput    = true;
            CanCloseWithRightClick = true;

            Add(_gumpPic = new GumpPic(143, 0, 0x82D, 0));
            _gumpPic.MouseDoubleClick += _picBase_MouseDoubleClick;
            Add(_scrollExp             = new ExpandableScroll(0, _diffY, Height - _diffY, 0x0820));
            _scrollArea = new ScrollArea(0, 32 + _diffY, 272, Height - (96 + _diffY), false);

            Control c = new Label(header, true, 0, font: 1, maxwidth: 140)
            {
                X = 85,
                Y = 0
            };

            _scrollArea.Add(c);
            AddHorizontalBar(_scrollArea, 92, 35, 220);

            _textBox = new StbTextBox(1, -1, 220)
            {
                Height     = FontsLoader.Instance.GetHeightUnicode(1, body, 220, TEXT_ALIGN_TYPE.TS_LEFT, 0x0),
                Width      = 220,
                X          = 35,
                Y          = 0,
                IsEditable = canEdit,
                Multiline  = true
            };

            _originalText = body;
            _textBox.SetText(body);

            if (_textBox.Height < 50)
            {
                _textBox.Height = 50;
            }

            _textBox.TextChanged += _textBox_TextChanged;
            _scrollArea.Add(_textBox);
            AddHorizontalBar(_scrollArea, 95, 35, 220);

            _scrollArea.Add
            (
                new Label(footer, true, 0, font: 1, maxwidth: 220)
            {
                X = 35,
                Y = 0
            }
            );

            Add(_scrollArea);

            Add(_hitBox      = new HitBox(143, 0, 23, 24));
            _hitBox.MouseUp += _hitBox_MouseUp;
        }
コード例 #7
0
        public TipNoticeGump(byte type, string page) : base(0, 0)
        {
            Height     = 300;
            CanMove    = true;
            CanBeSaved = true;

            _scrollArea = new ScrollArea(0, 32, 272, Height - 96, false);

            _textBox = new MultiLineBox(new MultiLineEntry(1, -1, 0, 220, true, hue: 0), false)
            {
                Height = 20,
                X      = 35,
                Y      = 0,
                Text   = page
            };
            Add(_background = new ExpandableScroll(0, 0, Height, 0x0820));
            _scrollArea.Add(_textBox);
            Add(_scrollArea);

            if (type == 0)
            {
                _pages = new OrderedDictionary <uint, string>();
                _tips  = this;
                _background.TitleGumpID = 0x9CA;
                _idx = 0;
                Button b;
                Add(_prev = new Button(0, 0x9cc, 0x9cc)
                {
                    X = 35, ContainsByBounds = true
                });

                _prev.MouseUp += (o, e) =>
                {
                    if (e.Button == MouseButton.Left)
                    {
                        SetPage(_idx - 1);
                    }
                };
                Add(_next = new Button(0, 0x9cd, 0x9cd)
                {
                    X = 240, ContainsByBounds = true
                });

                _next.MouseUp += (o, e) =>
                {
                    if (e.Button == MouseButton.Left)
                    {
                        SetPage(_idx + 1);
                    }
                };
            }
            else
            {
                _background.TitleGumpID = 0x9D2;
            }
        }
コード例 #8
0
        public JournalGump()
            : base(0, 0)
        {
            IsMoveable = true;

            AddControl(m_Background  = new ExpandableScroll(this, 0, 0, 300));
            m_Background.TitleGumpID = 0x82A;

            m_ScrollBar = (IScrollBar)AddControl(new ScrollFlag(this));
            AddControl(m_JournalEntries = new RenderedTextList(this, 30, 36, 242, 200, m_ScrollBar));
        }
コード例 #9
0
 public JournalGump() : base(0, 0)
 {
     X                           = 100;
     Y                           = 100;
     CanMove                     = true;
     AcceptMouseInput            = true;
     AddChildren(_background     = new ExpandableScroll(0, 0, 300));
     _background.TitleGumpID     = 0x82A;
     AddChildren(_scrollBar      = new ScrollFlag(this, 0, 0, Height));
     AddChildren(_journalEntries = new RenderedTextList(30, 36, 242, 200, _scrollBar));
 }
コード例 #10
0
ファイル: JournalGump.cs プロジェクト: ViWinfii/UltimaXNA
        public JournalGump()
            : base(0, 0)
        {
            AddControl(m_Background  = new ExpandableScroll(this, 0, 0, 0, 300));
            m_Background.TitleGumpID = 0x82A;
            m_Background.MakeDragger(this);
            m_Background.MakeCloseTarget(this);

            AddControl(m_ScrollBar = new ScrollBar(this, 0));
            IsMovable = true;
        }
コード例 #11
0
        public SkillsGump()
            : base(0, 0)
        {
            AddControl(m_scroll  = new ExpandableScroll(this, 0, 0, 0, 200));
            m_scroll.TitleGumpID = 0x834;
            m_scroll.MakeDragger(this);
            m_scroll.MakeCloseTarget(this);
            IsMovable = true;

            AddControl(m_list = new HtmlGump(this, 0, 10, 20, 180, 100, 0, 1, ""));
        }
コード例 #12
0
        public SkillsGump()
            : base(0, 0)
        {
            IsMoveable = true;

            m_World = ServiceRegistry.GetService <WorldModel>();

            AddControl(m_Background  = new ExpandableScroll(this, 0, 0, 200));
            m_Background.TitleGumpID = 0x834;

            AddControl(m_SkillsHtml = new HtmlGumpling(this, 32, 32, 240, 200 - 92, 0, 2, string.Empty));
        }
コード例 #13
0
        public SkillsGump()
            : base(0, 0)
        {
            m_World = UltimaServices.GetService <WorldModel>();

            AddControl(m_scroll  = new ExpandableScroll(this, 0, 0, 0, 200));
            m_scroll.TitleGumpID = 0x834;
            m_scroll.MakeDragger(this);
            m_scroll.MakeCloseTarget(this);
            IsMovable = true;

            AddControl(m_list = new HtmlGump(this, 0, 10, 20, 180, 100, 0, 1, ""));
        }
コード例 #14
0
ファイル: JournalGump.cs プロジェクト: shiryux/ClassicUO
        public JournalGump() : base(0, 0)
        {
            Height          = 300;
            CanMove         = true;
            CanBeSaved      = true;
            Add(_background = new ExpandableScroll(0, 0, Height)
            {
                TitleGumpID = 0x82A
            });

            _scrollBar = new ScrollFlag(-25, 0, Height, true);

            Add(_journalEntries = new RenderedTextList(30, 36, 242, 200, _scrollBar));

            Add(_scrollBar);
        }
コード例 #15
0
ファイル: JournalGump.cs プロジェクト: saddamsial/MobileUO
        public JournalGump() : base(Constants.JOURNAL_LOCALSERIAL, 0)
        {
            Height  = 300;
            CanMove = true;
            CanCloseWithRightClick = true;
            Add(_gumpPic           = new GumpPic(160, 0, 0x82D, 0));
            Add(_background        = new ExpandableScroll(0, _diffY, Height - _diffY, 0x1F40)
            {
                TitleGumpID = 0x82A
            });

            const ushort DARK_MODE_JOURNAL_HUE = 903;

            string str   = "Dark mode";
            int    width = FontsLoader.Instance.GetWidthASCII(6, str);

            Checkbox darkMode;

            Add(darkMode = new Checkbox(0x00D2, 0x00D3, str, 6, 0x0288, false)
            {
                X         = _background.Width - width - 2,
                Y         = _diffY + 7,
                IsChecked = ProfileManager.Current.JournalDarkMode
            });

            Hue = (ushort)(ProfileManager.Current.JournalDarkMode ? DARK_MODE_JOURNAL_HUE : 0);
            darkMode.ValueChanged += (sender, e) =>
            {
                var ok = ProfileManager.Current.JournalDarkMode = !ProfileManager.Current.JournalDarkMode;
                Hue = (ushort)(ok ? DARK_MODE_JOURNAL_HUE : 0);
            };

            _scrollBar = new ScrollFlag(-25, _diffY + 36, Height - _diffY, true);

            Add(_journalEntries = new RenderedTextList(25, _diffY + 36, _background.Width - (_scrollBar.Width >> 1) - 5, 200, _scrollBar));

            Add(_scrollBar);

            Add(_hitBox                = new HitBox(160, 0, 23, 24));
            _hitBox.MouseUp           += _hitBox_MouseUp;
            _gumpPic.MouseDoubleClick += _gumpPic_MouseDoubleClick;


            InitializeJournalEntries();
            World.Journal.EntryAdded += AddJournalEntry;
        }
コード例 #16
0
        public TipNoticeGump(uint serial, byte type, string text) : base(serial, 0)
        {
            Height  = 300;
            CanMove = true;
            CanCloseWithRightClick = true;

            _scrollArea = new ScrollArea
                          (
                0,
                32,
                272,
                Height - 96,
                false
                          );

            _textBox = new StbTextBox(6, -1, 220, isunicode: false)
            {
                Height     = 20,
                X          = 35,
                Y          = 0,
                Width      = 220,
                IsEditable = false
            };

            _textBox.SetText(text);
            Add(_background = new ExpandableScroll(0, 0, Height, 0x0820));
            _scrollArea.Add(_textBox);
            Add(_scrollArea);

            if (type == 0)
            {
                _background.TitleGumpID = 0x9CA;
                Add(new Button(1, 0x9cc, 0x9cc)
                {
                    X = 35, ContainsByBounds = true, ButtonAction = ButtonAction.Activate
                });
                Add(new Button(2, 0x9cd, 0x9cd)
                {
                    X = 240, ContainsByBounds = true, ButtonAction = ButtonAction.Activate
                });
            }
            else
            {
                _background.TitleGumpID = 0x9D2;
            }
        }
コード例 #17
0
        public VendorSellGump(VendorSellListPacket packet)
            : base(0, 0)
        {
            IsMoveable = true;
            // note: original gumplings start at index 0x0870.
            AddControl(m_Background = new ExpandableScroll(this, 0, 0, 360, false));
            AddControl(new HtmlGumpling(this, 0, 6, 300, 20, 0, 0, " <center><span color='#004' style='font-family:uni0;'>My Inventory"));

            m_ScrollBar = (IScrollBar)AddControl(new ScrollFlag(this));
            AddControl(m_ShopContents = new RenderedTextList(this, 22, 32, 250, 260, m_ScrollBar));
            BuildShopContents(packet);

            AddControl(m_TotalCost = new HtmlGumpling(this, 44, 334, 200, 30, 0, 0, string.Empty));
            UpdateEntryAndCost();

            AddControl(m_OKButton       = new Button(this, 220, 333, 0x907, 0x908, ButtonTypes.Activate, 0, 0));
            m_OKButton.GumpOverID       = 0x909;
            m_OKButton.MouseClickEvent += okButton_MouseClickEvent;
        }
コード例 #18
0
ファイル: ProfileGump.cs プロジェクト: xoozyx/ClassicUO
        public ProfileGump(Serial serial, string header, string footer, string body, bool canEdit) : base(serial == World.Player.Serial ? serial = Constants.PROFILE_LOCALSERIAL : serial, serial)
        {
            Height              = 300 + _diffY;
            CanMove             = true;
            AcceptKeyboardInput = true;

            Add(_gumpPic = new GumpPic(143, 0, 0x82D, 0));
            _gumpPic.MouseDoubleClick += _picBase_MouseDoubleClick;
            Add(_scrollExp             = new ExpandableScroll(0, _diffY, Height - _diffY, 0x0820));
            _scrollArea = new ScrollArea(0, 32 + _diffY, 272, Height - (96 + _diffY), false);

            Control c = new Label(header, true, 0, font: 1, maxwidth: 140)
            {
                X = 85,
                Y = 0
            };

            _scrollArea.Add(c);
            AddHorizontalBar(_scrollArea, 92, 35, 220);

            _textBox = new MultiLineBox(new MultiLineEntry(1, -1, 0, 220, true, hue: 0), canEdit)
            {
                Height = UOFileManager.Fonts.GetHeightUnicode(1, body, 220, TEXT_ALIGN_TYPE.TS_LEFT, 0x0),
                Width  = 220,
                X      = 35,
                Y      = 0,
                Text   = _originalText = body
            };
            _scrollArea.Add(_textBox);
            AddHorizontalBar(_scrollArea, 95, 35, 220);

            _scrollArea.Add(new Label(footer, true, 0, font: 1, maxwidth: 220)
            {
                X = 35,
                Y = 0
            });
            Add(_scrollArea);

            Add(_hitBox      = new HitBox(143, 0, 23, 24));
            _hitBox.MouseUp += _hitBox_MouseUp;
        }
コード例 #19
0
ファイル: JournalGump.cs プロジェクト: sadoseja/ClassicUO
        public JournalGump() : base(Constants.JOURNAL_LOCALSERIAL, 0)
        {
            Height = 300;
            CanMove = true;
            CanBeSaved = true;

            Add(new GumpPic(160, 0, 0x82D, 0));
            Add(_background = new ExpandableScroll(0, _diffY, Height - _diffY, 0x1F40)
            {
                TitleGumpID = 0x82A
            });

            const ushort DARK_MODE_JOURNAL_HUE = 903;

            string str = "Dark mode";
            int width = FileManager.Fonts.GetWidthASCII(6, str);

            Checkbox darkMode;
            Add(darkMode = new Checkbox(0x00D2, 0x00D3, str, 6, 0x0288, false)
            {
                X = _background.Width - width -2, 
                Y = _diffY + 7,
                IsChecked = Engine.Profile.Current.JournalDarkMode
            });

            Hue = (ushort)(Engine.Profile.Current.JournalDarkMode ? DARK_MODE_JOURNAL_HUE : 0);
            darkMode.ValueChanged += (sender, e) =>
            {
                var ok = Engine.Profile.Current.JournalDarkMode = !Engine.Profile.Current.JournalDarkMode;
                Hue = (ushort) (ok ? DARK_MODE_JOURNAL_HUE : 0);
            };

            _scrollBar = new ScrollFlag(-25, _diffY + 36, Height - _diffY, true);

            Add(_journalEntries = new RenderedTextList(25, _diffY + 36, _background.Width - (_scrollBar.Width >> 1) - 5, 200, _scrollBar));

            Add(_scrollBar);
        }
コード例 #20
0
        public ProfileGump(uint serial, string header, string footer, string body, bool canEdit) : base(serial, 0)
        {
            Height                 = 600;
            CanMove                = true;
            AcceptKeyboardInput    = true;
            CanCloseWithRightClick = true;

            Add(_profile_background = new ExpandableScroll(0, _diffY - 65, Height - _diffY, 0x09E6));
            Add(_gumpPic            = new GumpPic(365, 0, 0x2C94, 0));

            _scrollArea = new ScrollArea
                          (
                22,
                32 + _diffY,
                _profile_background.Width - 14,
                _profile_background.Height - (83 + _diffY),
                false
                          );

            Label topText = new Label
                            (
                "Name: " + header,
                true,
                0x04EC,
                font: 0,
                maxwidth: 140
                            )
            {
                X = 140,
                Y = 6
            };

            _scrollArea.Add(topText);

            int offsetY = topText.Height - 15;

            /* _scrollArea.Add(new GumpPic(4, offsetY, 0x005C, 0));
             *
             * _scrollArea.Add
             * (
             *  new GumpPicTiled
             *  (
             *      56,
             *      offsetY,
             *      138,
             *      0,
             *      0x005D
             *  )
             * );
             *
             * _scrollArea.Add(new GumpPic(194, offsetY, 0x005E, 0)); */

            offsetY += 44;

            _textBox = new StbTextBox(0, -1, 370, hue: 0x0704)
            {
                Width      = 370,
                X          = 22,
                Y          = offsetY,
                IsEditable = canEdit,
                Multiline  = true
            };

            _originalText         = body;
            _textBox.TextChanged += _textBox_TextChanged;
            _textBox.SetText(body);
            _scrollArea.Add(_textBox);

            _databox = new DataBox(12, _textBox.Height + 3, 1, 1);
            _databox.WantUpdateSize = true;

            _databox.Add(new GumpPic(4, 0, 0x005F, 0));

            _databox.Add
            (
                new GumpPicTiled
                (
                    13,
                    0 + 9,
                    370,
                    0,
                    0x0060
                )
            );

            _databox.Add(new GumpPic(375, 0, 0x0061, 0));

            _databox.Add
            (
                new Label
                (
                    footer,
                    true,
                    0x0704,
                    font: 0,
                    maxwidth: 220
                )
            {
                X = 8,
                Y = 26
            }
            );

            Add(_scrollArea);
            _scrollArea.Add(_databox);

            Add(_hitBox                = new HitBox(364, 0, 15, 20));
            _hitBox.MouseUp           += _hitBox_MouseUp;
            _gumpPic.MouseDoubleClick += _gumpPic_MouseDoubleClick;
        }
コード例 #21
0
        public StandardSkillsGump() : base(0, 0)
        {
            AcceptMouseInput       = false;
            CanMove                = true;
            CanCloseWithRightClick = true;

            Height = 200 + _diffY;

            Add(_gumpPic = new GumpPic(160, 0, 0x82D, 0));
            _gumpPic.MouseDoubleClick += _picBase_MouseDoubleClick;

            _scrollArea = new ExpandableScroll(0, _diffY, Height, 0x1F40)
            {
                TitleGumpID      = 0x0834,
                AcceptMouseInput = true
            };

            Add(_scrollArea);

            Add(new GumpPic(50, 35 + _diffY, 0x082B, 0));
            Add(_bottomLine    = new GumpPic(50, Height - 98, 0x082B, 0));
            Add(_bottomComment = new GumpPic(25, Height - 85, 0x0836, 0));

            _area = new ScrollArea
                    (
                22, 45 + _diffY + _bottomLine.Height - 10, _scrollArea.Width - 14, _scrollArea.Height - (83 + _diffY),
                false
                    )
            {
                AcceptMouseInput = true, CanMove = true
            };

            Add(_area);

            _container = new DataBox(0, 0, 1, 1);
            _container.WantUpdateSize   = true;
            _container.AcceptMouseInput = true;
            _container.CanMove          = true;

            _area.Add(_container);

            Add
            (
                _skillsLabelSum = new Label(World.Player.Skills.Sum(s => s.Value).ToString("F1"), false, 600, 0, 3)
            {
                X = _bottomComment.X + _bottomComment.Width + 5, Y = _bottomComment.Y - 5
            }
            );

            //new group
            Add
            (
                _newGroupButton = new Button(0, 0x083A, 0x083A, 0x083A)
            {
                X = 60,
                Y = Height,
                ContainsByBounds = true,
                ButtonAction     = ButtonAction.Activate
            }
            );

            Add
            (
                _checkReal = new Checkbox(0x938, 0x939, ResGumps.ShowReal, 1, 0x0386, false)
            {
                X = _newGroupButton.X + _newGroupButton.Width + 30, Y = _newGroupButton.Y - 6
            }
            );

            Add
            (
                _checkCaps = new Checkbox(0x938, 0x939, ResGumps.ShowCaps, 1, 0x0386, false)
            {
                X = _newGroupButton.X + _newGroupButton.Width + 30, Y = _newGroupButton.Y + 7
            }
            );

            _checkReal.ValueChanged += UpdateSkillsValues;
            _checkCaps.ValueChanged += UpdateSkillsValues;


            if (World.Player != null)
            {
                foreach (SkillsGroup g in SkillsGroupManager.Groups)
                {
                    SkillsGroupControl control = new SkillsGroupControl(g, 3, 3);
                    _skillsControl.Add(control);
                    _container.Add(control);

                    control.IsMinimized = true;

                    int count = g.Count;

                    for (int i = 0; i < count; i++)
                    {
                        byte index = g.GetSkill(i);

                        if (index < SkillsLoader.Instance.SkillsCount)
                        {
                            control.AddSkill(index, 0, 17 + i * 17);
                        }
                    }
                }
            }

            _hitBox = new HitBox(160, 0, 23, 24);
            Add(_hitBox);
            _hitBox.MouseUp += _hitBox_MouseUp;

            _container.ReArrangeChildren();
        }
コード例 #22
0
        public JournalGump() : base(0, 0)
        {
            Height  = 600;
            CanMove = true;
            CanCloseWithRightClick = true;

            Add(_background = new ExpandableScroll(0, _diffY - 65, Height - _diffY, 0x1F40));
            Add(_gumpPic    = new GumpPic(365, 0, 0x2C94, 0));
            _scrollBar      = new ScrollFlag(-25, _diffY + 36, Height - _diffY, true);

            Add
            (
                _journalEntries = new RenderedTextList
                                  (
                    38,
                    _diffY + 10,
                    _background.Width - 10 - (_scrollBar.Width >> 1) - 15,
                    230,
                    _scrollBar
                                  )
            );

            Add(_scrollBar);

            Add(_hitBox                = new HitBox(364, 0, 15, 20));
            _hitBox.MouseUp           += _hitBox_MouseUp;
            _gumpPic.MouseDoubleClick += _gumpPic_MouseDoubleClick;

            int  cx   = 65; // 63
            int  dist = 90; // 85
            byte font = 1;  // 1

            _filters_checkboxes[0] = new Checkbox
                                     (
                0x00D2,
                0x00D3,
                "System",
                font,
                0x0386,
                false
                                     )
            {
                X           = cx,
                LocalSerial = 1,
                IsChecked   = ProfileManager.CurrentProfile.ShowJournalSystem
            };

            _filters_checkboxes[1] = new Checkbox
                                     (
                0x00D2,
                0x00D3,
                "Objects",
                font,
                0x0386,
                false
                                     )
            {
                X           = cx + dist,
                LocalSerial = 2,
                IsChecked   = ProfileManager.CurrentProfile.ShowJournalObjects
            };

            _filters_checkboxes[2] = new Checkbox
                                     (
                0x00D2,
                0x00D3,
                "Client",
                font,
                0x0386,
                false
                                     )
            {
                X           = cx + dist * 2,
                LocalSerial = 0,
                IsChecked   = ProfileManager.CurrentProfile.ShowJournalClient
            };

            _filters_checkboxes[3] = new Checkbox
                                     (
                0x00D2,
                0x00D3,
                "Guild",
                font,
                0x0386,
                false
                                     )
            {
                X           = cx + dist * 3,
                LocalSerial = 3,
                IsChecked   = ProfileManager.CurrentProfile.ShowJournalGuildAlly
            };

            void on_check_box(object sender, EventArgs e)
            {
                Checkbox c = (Checkbox)sender;

                if (c != null)
                {
                    switch ((TextType)c.LocalSerial)
                    {
                    case TextType.CLIENT:
                        ProfileManager.CurrentProfile.ShowJournalClient = c.IsChecked;

                        break;

                    case TextType.SYSTEM:
                        ProfileManager.CurrentProfile.ShowJournalSystem = c.IsChecked;

                        break;

                    case TextType.OBJECT:
                        ProfileManager.CurrentProfile.ShowJournalObjects = c.IsChecked;

                        break;

                    case TextType.GUILD_ALLY:
                        ProfileManager.CurrentProfile.ShowJournalGuildAlly = c.IsChecked;

                        break;
                    }
                }
            }

            for (int i = 0; i < _filters_checkboxes.Length; i++)
            {
                _filters_checkboxes[i].ValueChanged += on_check_box;

                Add(_filters_checkboxes[i]);
            }

            InitializeJournalEntries();
            World.Journal.EntryAdded += AddJournalEntry;
        }
コード例 #23
0
        public StandardSkillsGump() : base(0, 0)
        {
            AcceptMouseInput       = false;
            CanMove                = true;
            CanCloseWithRightClick = true;

            Height = 200 + _diffY;

            Add(_gumpPic = new GumpPic(160, 0, 0x82D, 0));
            _gumpPic.MouseDoubleClick += _picBase_MouseDoubleClick;

            _scrollArea = new ExpandableScroll(0, _diffY, Height, 0x1F40)
            {
                TitleGumpID      = 0x0834,
                AcceptMouseInput = true
            };

            Add(_scrollArea);

            Add(new GumpPic(50, 35 + _diffY, 0x082B, 0));
            Add(_bottomLine    = new GumpPic(50, Height - 98, 0x082B, 0));
            Add(_bottomComment = new GumpPic(25, Height - 85, 0x0836, 0));

            _area = new ScrollArea
                    (
                22,
                45 + _diffY + _bottomLine.Height - 10,
                _scrollArea.Width - 14,
                _scrollArea.Height - (83 + _diffY),
                false
                    )
            {
                AcceptMouseInput = true, CanMove = true
            };

            Add(_area);

            _container = new DataBox(0, 0, 1, 1);
            _container.WantUpdateSize   = true;
            _container.AcceptMouseInput = true;
            _container.CanMove          = true;

            _area.Add(_container);

            Add
            (
                _skillsLabelSum = new Label
                                  (
                    World.Player.Skills.Sum(s => s.Value).ToString("F1"),
                    false,
                    600,
                    0,
                    3
                                  )
            {
                X = _bottomComment.X + _bottomComment.Width + 5, Y = _bottomComment.Y - 5
            }
            );

            //new group
            int x = 60;

            Add
            (
                _newGroupButton = new Button(0, 0x083A, 0x083A, 0x083A)
            {
                X = x,
                Y = Height,
                ContainsByBounds = true,
                ButtonAction     = ButtonAction.Activate
            }
            );

            Add
            (
                _checkReal = new Checkbox
                             (
                    0x938,
                    0x939,
                    ResGumps.ShowReal,
                    1,
                    0x0386,
                    false
                             )
            {
                X = _newGroupButton.X + _newGroupButton.Width + 30, Y = _newGroupButton.Y - 6
            }
            );

            Add
            (
                _checkCaps = new Checkbox
                             (
                    0x938,
                    0x939,
                    ResGumps.ShowCaps,
                    1,
                    0x0386,
                    false
                             )
            {
                X = _newGroupButton.X + _newGroupButton.Width + 30, Y = _newGroupButton.Y + 7
            }
            );

            _checkReal.ValueChanged += UpdateSkillsValues;
            _checkCaps.ValueChanged += UpdateSkillsValues;


            LoadSkills();

            Add(_resetGroups = new NiceButton(_scrollArea.X + 25, _scrollArea.Y + 7, 100, 18,
                                              ButtonAction.Activate, ResGumps.ResetGroups,
                                              unicode: false,
                                              font: 6)
            {
                ButtonParameter = 1,
                IsSelectable    = false,
                //Alpha = 1f
            });

            _hitBox = new HitBox(160, 0, 23, 24);
            Add(_hitBox);
            _hitBox.MouseUp += _hitBox_MouseUp;

            _container.ReArrangeChildren();
        }
コード例 #24
0
        public BulletinBoardItem(uint serial, uint msgSerial, string poster, string subject, string datatime,
                                 string data, byte variant) : base(serial, 0)
        {
            _msgSerial             = msgSerial;
            AcceptKeyboardInput    = true;
            CanMove                = true;
            CanCloseWithRightClick = true;
            _datatime              = datatime;
            _articleContainer      = new ExpandableScroll(0, 0, 408, 0x0820)
            {
                TitleGumpID      = 0x0820,
                AcceptMouseInput = true
            };

            Add(_articleContainer);
            _scrollArea = new ScrollArea(0, 120, 272, 224, false);

            AddHorizontalBar(_scrollArea, 92, 35, 220);

            bool useUnicode              = Client.Version >= ClientVersion.CV_305D;
            byte unicodeFontIndex        = 1;
            int  unicodeFontHeightOffset = 0;

            ushort textColor = 0x0386;

            if (useUnicode)
            {
                unicodeFontHeightOffset = -6;
                textColor = 0;
            }

            Label text = new Label("Author:", useUnicode, textColor, font: useUnicode ? unicodeFontIndex : (byte)6)
            {
                X = 30,
                Y = 40
            };

            Add(text);

            text = new Label(poster, useUnicode, textColor, font: useUnicode ? unicodeFontIndex : (byte)9)
            {
                X = 30 + text.Width,
                Y = 46 + unicodeFontHeightOffset
            };
            Add(text);


            text = new Label("Date:", useUnicode, textColor, font: useUnicode ? unicodeFontIndex : (byte)6)
            {
                X = 30,
                Y = 58
            };
            Add(text);

            text = new Label(datatime, useUnicode, textColor, font: useUnicode ? unicodeFontIndex : (byte)9)
            {
                X = 32 + text.Width,
                Y = 64 + unicodeFontHeightOffset
            };
            Add(text);

            text = new Label("Title:", useUnicode, textColor, font: useUnicode ? unicodeFontIndex : (byte)6)
            {
                X = 30,
                Y = 77
            };
            Add(text);

            ushort subjectColor = textColor;

            if (variant == 0)
            {
                subjectColor = 0x0008;
            }

            Add(_subjectTextbox = new TextBox(useUnicode ? unicodeFontIndex : (byte)9, maxWidth: 150, width: 150,
                                              isunicode: useUnicode, hue: subjectColor)
            {
                X          = 30 + text.Width,
                Y          = 83 + unicodeFontHeightOffset,
                Width      = 150,
                IsEditable = variant == 0 ? true : false
            });
            _subjectTextbox.SetText(subject);

            Add(new GumpPicTiled(30, 106, 235, 4, 0x0835));

            _scrollArea.Add(_textBox =
                                new MultiLineBox(
                                    new MultiLineEntry(useUnicode ? unicodeFontIndex : (byte)9, -1, 0, 220, hue: textColor,
                                                       unicode: useUnicode), true)
            {
                X               = 40,
                Y               = 0,
                Width           = 220,
                ScissorsEnabled = true,
                Text            = data,
                IsEditable      = variant == 0 ? true : false
            });
            Add(_scrollArea);
            switch (variant)
            {
            case 0:
                Add(new GumpPic(97, 12, 0x0883, 0));

                Add(_buttonPost = new Button((int)ButtonType.Post, 0x0886, 0x0886)
                {
                    X                = 37,
                    Y                = Height - 50,
                    ButtonAction     = ButtonAction.Activate,
                    ContainsByBounds = true
                });

                break;

            case 1:

                Add(_buttonReply = new Button((int)ButtonType.Reply, 0x0884, 0x0884)
                {
                    X                = 37,
                    Y                = Height - 50,
                    ButtonAction     = ButtonAction.Activate,
                    ContainsByBounds = true
                });

                break;

            case 2:

                Add(_buttonRemove = new Button((int)ButtonType.Remove, 0x0885, 0x0885)    //DISABLED
                {
                    X                = 235,
                    Y                = Height - 50,
                    ButtonAction     = ButtonAction.Activate,
                    ContainsByBounds = true
                });

                break;
            }
        }
コード例 #25
0
        public JournalGump() : base(0, 0)
        {
            Height  = 300;
            CanMove = true;
            CanCloseWithRightClick = true;
            Add(_gumpPic           = new GumpPic(160, 0, 0x82D, 0));

            Add
            (
                _background = new ExpandableScroll(0, _diffY, Height - _diffY, 0x1F40)
            {
                TitleGumpID = 0x82A
            }
            );

            const ushort DARK_MODE_JOURNAL_HUE = 903;

            string str   = ResGumps.DarkMode;
            int    width = FontsLoader.Instance.GetWidthASCII(6, str);

            Checkbox darkMode;

            Add
            (
                darkMode = new Checkbox(0x00D2, 0x00D3, str, 6, 0x0288, false)
            {
                X         = _background.Width - width - 2,
                Y         = _diffY + 7,
                IsChecked = ProfileManager.CurrentProfile.JournalDarkMode
            }
            );

            Hue = (ushort)(ProfileManager.CurrentProfile.JournalDarkMode ? DARK_MODE_JOURNAL_HUE : 0);

            darkMode.ValueChanged += (sender, e) =>
            {
                bool ok = ProfileManager.CurrentProfile.JournalDarkMode = !ProfileManager.CurrentProfile.JournalDarkMode;
                Hue = (ushort)(ok ? DARK_MODE_JOURNAL_HUE : 0);
            };

            _scrollBar = new ScrollFlag(-25, _diffY + 36, Height - _diffY, true);

            Add
            (
                _journalEntries = new RenderedTextList
                                      (25, _diffY + 36, _background.Width - (_scrollBar.Width >> 1) - 5, 200, _scrollBar)
            );

            Add(_scrollBar);

            Add(_hitBox                = new HitBox(160, 0, 23, 24));
            _hitBox.MouseUp           += _hitBox_MouseUp;
            _gumpPic.MouseDoubleClick += _gumpPic_MouseDoubleClick;

            int  cx   = 43; // 63
            int  dist = 75; // 85
            byte font = 6;  // 1

            _filters_chekboxes[0] = new Checkbox(0x00D2, 0x00D3, "System", font, 0x0386, false)
            {
                X           = cx,
                LocalSerial = 1,
                IsChecked   = ProfileManager.CurrentProfile.ShowJournalSystem
            };

            _filters_chekboxes[1] = new Checkbox(0x00D2, 0x00D3, "Objects", font, 0x0386, false)
            {
                X           = cx + dist,
                LocalSerial = 2,
                IsChecked   = ProfileManager.CurrentProfile.ShowJournalObjects
            };

            _filters_chekboxes[2] = new Checkbox(0x00D2, 0x00D3, "Client", font, 0x0386, false)
            {
                X           = cx + dist * 2,
                LocalSerial = 0,
                IsChecked   = ProfileManager.CurrentProfile.ShowJournalClient
            };

            _filters_chekboxes[3] = new Checkbox(0x00D2, 0x00D3, "Guild", font, 0x0386, false)
            {
                X           = cx + dist * 3,
                LocalSerial = 3,
                IsChecked   = ProfileManager.CurrentProfile.ShowJournalGuildAlly
            };

            void on_check_box(object sender, EventArgs e)
            {
                Checkbox c = (Checkbox)sender;

                if (c != null)
                {
                    switch ((TextType)c.LocalSerial)
                    {
                    case TextType.CLIENT:
                        ProfileManager.CurrentProfile.ShowJournalClient = c.IsChecked;

                        break;

                    case TextType.SYSTEM:
                        ProfileManager.CurrentProfile.ShowJournalSystem = c.IsChecked;

                        break;

                    case TextType.OBJECT:
                        ProfileManager.CurrentProfile.ShowJournalObjects = c.IsChecked;

                        break;

                    case TextType.GUILD_ALLY:
                        ProfileManager.CurrentProfile.ShowJournalGuildAlly = c.IsChecked;

                        break;
                    }
                }
            }

            for (int i = 0; i < _filters_chekboxes.Length; i++)
            {
                _filters_chekboxes[i].ValueChanged += on_check_box;

                Add(_filters_chekboxes[i]);
            }

            InitializeJournalEntries();
            World.Journal.EntryAdded += AddJournalEntry;
        }
コード例 #26
0
        public BulletinBoardItem
        (
            uint serial,
            uint msgSerial,
            string poster,
            string subject,
            string datatime,
            string data,
            byte variant
        ) : base(serial, 0)
        {
            _msgSerial             = msgSerial;
            AcceptKeyboardInput    = true;
            CanMove                = true;
            CanCloseWithRightClick = true;
            _datatime              = datatime;

            _articleContainer = new ExpandableScroll(0, 0, 408, 0x0820)
            {
                TitleGumpID      = 0x0820,
                AcceptMouseInput = true
            };

            Add(_articleContainer);

            ScrollArea area = new ScrollArea(0, 120, 272, 224, false);

            Add(area);

            _databox = new DataBox(0, 0, 1, 1);
            area.Add(_databox);

            bool useUnicode              = Client.Version >= ClientVersion.CV_305D;
            byte unicodeFontIndex        = 1;
            int  unicodeFontHeightOffset = 0;

            ushort textColor = 0x0386;

            if (useUnicode)
            {
                unicodeFontHeightOffset = -6;
                textColor = 0;
            }

            Label text = new Label
                             (ResGumps.Author, useUnicode, textColor, font: useUnicode ? unicodeFontIndex : (byte)6)
            {
                X = 30,
                Y = 40
            };

            Add(text);

            text = new Label(poster, useUnicode, textColor, font: useUnicode ? unicodeFontIndex : (byte)9)
            {
                X = 30 + text.Width,
                Y = 46 + unicodeFontHeightOffset
            };

            Add(text);


            text = new Label(ResGumps.Date, useUnicode, textColor, font: useUnicode ? unicodeFontIndex : (byte)6)
            {
                X = 30,
                Y = 58
            };

            Add(text);

            text = new Label(datatime, useUnicode, textColor, font: useUnicode ? unicodeFontIndex : (byte)9)
            {
                X = 32 + text.Width,
                Y = 64 + unicodeFontHeightOffset
            };

            Add(text);

            text = new Label(ResGumps.Title, useUnicode, textColor, font: useUnicode ? unicodeFontIndex : (byte)6)
            {
                X = 30,
                Y = 77
            };

            Add(text);

            ushort subjectColor = textColor;

            if (variant == 0)
            {
                subjectColor = 0x0008;
            }

            Add
            (
                _subjectTextbox = new StbTextBox
                                      (useUnicode ? unicodeFontIndex : (byte)9, maxWidth: 150, isunicode: useUnicode, hue: subjectColor)
            {
                X          = 30 + text.Width,
                Y          = 83 + unicodeFontHeightOffset,
                Width      = 150,
                IsEditable = variant == 0
            }
            );

            _subjectTextbox.SetText(subject);

            Add(new GumpPicTiled(30, 106, 235, 4, 0x0835));

            _databox.Add
            (
                _textBox = new StbTextBox
                               (useUnicode ? unicodeFontIndex : (byte)9, -1, 220, hue: textColor, isunicode: useUnicode)
            {
                X          = 40,
                Y          = 0,
                Width      = 220,
                Height     = 300,
                IsEditable = variant == 0,
                Multiline  = true
            }
            );

            _textBox.SetText(data);
            _textBox.TextChanged += _textBox_TextChanged;

            switch (variant)
            {
            case 0:
                Add(new GumpPic(97, 12, 0x0883, 0));

                Add
                (
                    _buttonPost = new Button((int)ButtonType.Post, 0x0886, 0x0886)
                {
                    X                = 37,
                    Y                = Height - 50,
                    ButtonAction     = ButtonAction.Activate,
                    ContainsByBounds = true
                }
                );

                break;

            case 1:

                Add
                (
                    _buttonReply = new Button((int)ButtonType.Reply, 0x0884, 0x0884)
                {
                    X                = 37,
                    Y                = Height - 50,
                    ButtonAction     = ButtonAction.Activate,
                    ContainsByBounds = true
                }
                );

                break;

            case 2:

                Add
                (
                    _buttonRemove = new Button((int)ButtonType.Remove, 0x0885, 0x0885)      //DISABLED
                {
                    X                = 235,
                    Y                = Height - 50,
                    ButtonAction     = ButtonAction.Activate,
                    ContainsByBounds = true
                }
                );

                break;
            }

            _databox.WantUpdateSize = true;
            _databox.ReArrangeChildren();
        }
コード例 #27
0
        public StandardSkillsGump() : base(0, 0)
        {
            AcceptMouseInput       = false;
            CanMove                = true;
            CanCloseWithRightClick = true;

            Height = 600;

            Add(_background    = new ExpandableScroll(0, _diffY - 65, Height - _diffY, 0x820));
            Add(_gumpPic       = new GumpPic(245, 0, 0x2C94, 0));
            Add(_bottomComment = new GumpPic(25, Height - 85, 0x0836, 0));

            _area = new ScrollArea
                    (
                22,
                _diffY + 10,
                _background.Width - 14,
                _background.Height - (83 + _diffY),
                false
                    )
            {
                AcceptMouseInput = true, CanMove = true
            };

            Add(_area);

            _container = new DataBox(0, 0, 1, 1);
            _container.WantUpdateSize   = true;
            _container.AcceptMouseInput = true;
            _container.CanMove          = true;

            _area.Add(_container);

            Add
            (
                _skillsLabelSum = new Label
                                  (
                    World.Player.Skills.Sum(s => s.Value).ToString("F1"),
                    true,
                    0x04EC,
                    200,
                    0
                                  )
            {
                X = _bottomComment.X - 20 + _bottomComment.Width + 5, Y = _bottomComment.Y - 5
            }
            );


            _databox = new DataBox(25, _background.Height + 3, 1, 1);
            _databox.WantUpdateSize = true;

            _databox.Add(new GumpPic(2, 22, 0x005F, 0));

            _databox.Add
            (
                new GumpPicTiled
                (
                    13,
                    31,
                    245,
                    0,
                    0x0060
                )
            );

            _databox.Add(new GumpPic(250, 22, 0x0061, 0));
            _background.Add(_databox);

            //new group
            int x = 50;

            Add
            (
                _newGroupButton = new Button(0, 0x8B, 0x8D, 0x8C)
            {
                X = x,
                Y = Height,
                ContainsByBounds = true,
                ButtonAction     = ButtonAction.Activate
            }
            );

            Add
            (
                _checkReal = new Checkbox
                             (
                    0x938,
                    0x939,
                    ResGumps.ShowReal,
                    1,
                    0x0386,
                    false
                             )
            {
                X = _newGroupButton.X - 5 + _newGroupButton.Width + 30, Y = _newGroupButton.Y - 4
            }
            );

            Add
            (
                _checkCaps = new Checkbox
                             (
                    0x938,
                    0x939,
                    ResGumps.ShowCaps,
                    1,
                    0x0386,
                    false
                             )
            {
                X = _newGroupButton.X - 5 + _newGroupButton.Width + 30, Y = _newGroupButton.Y + 9
            }
            );

            _checkReal.ValueChanged += UpdateSkillsValues;
            _checkCaps.ValueChanged += UpdateSkillsValues;

            LoadSkills();

            Add(_resetGroups = new NiceButton(57, _background.Height + 15, 82, 18,
                                              ButtonAction.Activate, ResGumps.ResetGroups,
                                              hue: 0x26,
                                              unicode: true,
                                              font: 1)
            {
                ButtonParameter = 1,
                IsSelectable    = false,
                //Alpha = 1f
            });

            Add(_hitBox                = new HitBox(245, 0, 15, 20));
            _hitBox.MouseUp           += _hitBox_MouseUp;
            _gumpPic.MouseDoubleClick += _gumpPic_MouseDoubleClick;

            _container.ReArrangeChildren();
        }