Example #1
0
        public override void Update(GameTime gameTime)
        {
            if (_gump == null || _useLargeMap != ClientVars.EngineVars.MiniMap_LargeFormat)
            {
                _useLargeMap = ClientVars.EngineVars.MiniMap_LargeFormat;
                if (_gump != null)
                    _gump.Dispose();
                _gump = new GumpPic(this, 0, 0, 0, (_useLargeMap ? 5011 : 5010), 0);
                _gump.OnMouseClick = onClickMap;
                _gump.OnMouseDoubleClick = onDoubleClickMap;
                _gump.MakeDragger(this);
                _gump.MakeCloseTarget(this);
                AddControl(_gump);
            }

            base.Update(gameTime);
        }
Example #2
0
        public override void Update(GameTime gameTime)
        {
            if (_expandableScrollHeight < _expandableScrollHeight_Min)
                _expandableScrollHeight = _expandableScrollHeight_Min;
            if (_expandableScrollHeight > _expandableScrollHeight_Max)
                _expandableScrollHeight = _expandableScrollHeight_Max;

            if (_gumplingTitleGumpIDDelta)
            {
                _gumplingTitleGumpIDDelta = false;
                if (_gumplingTitle != null)
                    _gumplingTitle.Dispose();
                _gumplingTitle = (GumpPic)AddControl(new GumpPic(this, 0, 0, 0, _gumplingTitleGumpID, 0));
            }

            if (!_gumplingTop.IsInitialized)
            {
                Visible = false;
            }
            else
            {
                Visible = true;
                _gumplingTop.X = 0;
                _gumplingTop.Y = 0;

                _gumplingMiddle.X = 17;
                _gumplingMiddle.Y = gumplingMidY;
                _gumplingMiddle.Width = 263;
                _gumplingMiddle.Height = gumplingMidHeight;

                _gumplingBottom.X = 17;
                _gumplingBottom.Y = gumplingBottomY;

                _gumplingExpander.X = gumplingExpanderX;
                _gumplingExpander.Y = gumplingExpanderY;

                if (_gumplingTitle != null && _gumplingTitle.IsInitialized)
                {
                    _gumplingTitle.X = (_gumplingTop.Width - _gumplingTitle.Width) / 2;
                    _gumplingTitle.Y = (_gumplingTop.Height - _gumplingTitle.Height) / 2;
                }
            }

            base.Update(gameTime);
        }
Example #3
0
        public override void Initialize(UIManager manager)
        {
            base.Initialize(manager);
            _gumplingTop = (GumpPic)AddControl(new GumpPic(this, 0, 0, 0, 0x0820, 0));
            _gumplingMiddle = (GumpPicTiled)AddControl(new GumpPicTiled(this, 0, 0, 0, 0, 0, 0x0822));
            _gumplingBottom = (GumpPic)AddControl(new GumpPic(this, 0, 0, 0, 0x0823, 0));
            _gumplingExpander = (Button)AddControl(new Button(this, 0, 0, 0, 0x082E, 0x82F, ButtonTypes.Activate, 0, gumplingExpander_ButtonID));

            _gumplingExpander.OnMouseDown = expander_OnMouseDown;
            _gumplingExpander.OnMouseUp = expander_OnMouseUp;
            _gumplingExpander.OnMouseOver = expander_OnMouseOver;
        }