Ejemplo n.º 1
0
        public override void Update(double totalMS, double frameMS)
        {
            base.Update(totalMS, frameMS);

            if (Keyboard.Alt && Engine.UI.AnchorManager[this] != null)
            {
                if (_lockGumpPic == null)
                {
                    _lockGumpPic = new GumpPic(0, 0, 0x082C, 0);
                    _lockGumpPic.Update(totalMS, frameMS);
                    _lockGumpPic.AcceptMouseInput = true;
                    _lockGumpPic.X        = Width - _lockGumpPic.Width;
                    _lockGumpPic.Y        = 0;
                    _lockGumpPic.MouseUp += _lockGumpPic_MouseClick;

                    Add(_lockGumpPic);
                }

                if (Engine.UI.MouseOverControl != null && (Engine.UI.MouseOverControl == this || Engine.UI.MouseOverControl.RootParent == this))
                {
                    _lockGumpPic.Hue = 34;
                }
                else
                {
                    _lockGumpPic.Hue = 0;
                }
            }
            else if ((!Keyboard.Alt || Engine.UI.AnchorManager[this] == null) && _lockGumpPic != null)
            {
                Remove(_lockGumpPic);
                _lockGumpPic.Dispose();
                _lockGumpPic = null;
            }
        }
Ejemplo n.º 2
0
        public override void Update(double totalMS, double frameMS)
        {
            base.Update(totalMS, frameMS);

            if (Input.Keyboard.Alt && Engine.AnchorManager[this] != null && _lockGumpPic == null)
            {
                _lockGumpPic = new GumpPic(0, 0, 0x082C, 0);
                _lockGumpPic.Update(totalMS, frameMS);
                _lockGumpPic.AcceptMouseInput = true;
                _lockGumpPic.X           = Width - _lockGumpPic.Width;
                _lockGumpPic.Y           = 0;
                _lockGumpPic.MouseClick += _lockGumpPic_MouseClick;

                Add(_lockGumpPic);
            }
            else if ((!Input.Keyboard.Alt || Engine.AnchorManager[this] == null) && _lockGumpPic != null)
            {
                Remove(_lockGumpPic);
                _lockGumpPic.Dispose();
                _lockGumpPic = null;
            }
        }