Exemple #1
0
        public void HandlePositionCommand(CommandEventArgs e)
        {
            var user = e.Mobile as PlayerMobile;

            if (user == null || user.Deleted || user.NetState == null || !ModuleEnabled)
            {
                return;
            }

            if (user.AccessLevel < Access)
            {
                if (user.AccessLevel > AccessLevel.Player)
                {
                    user.SendMessage("You do not have access to that command.");
                }

                return;
            }

            var tb = Toolbars.EnsureState(user).GetToolbarGump();

            SuperGump.Send(
                new OffsetSelectorGump(
                    user,
                    tb.Refresh(true),
                    Toolbars.GetOffset(user),
                    (self, oldValue) =>
            {
                Toolbars.SetOffset(user, self.Value);
                tb.X = self.Value.X;
                tb.Y = self.Value.Y;
                tb.Refresh(true);
            }));
        }
Exemple #2
0
        public virtual void EndGlobalEdit()
        {
            if (State == Toolbars.DefaultEntries)
            {
                State.User = null;
                State      = Toolbars.EnsureState(User as PlayerMobile);
            }

            GlobalEdit = false;
            Refresh(true);
        }
Exemple #3
0
        public void HandlePopupCommand(CommandEventArgs e)
        {
            var user = e.Mobile as PlayerMobile;

            if (user == null || user.Deleted || user.NetState == null || !ModuleEnabled)
            {
                return;
            }

            if (user.AccessLevel < Access)
            {
                if (user.AccessLevel > AccessLevel.Player)
                {
                    user.SendMessage("You do not have access to that command.");
                }

                return;
            }

            SuperGump.Send(Toolbars.EnsureState(user).GetToolbarGump());
        }