Пример #1
0
 public override void Restore(BinaryReader reader)
 {
     base.Restore(reader);
     _self        = this;
     _useLargeMap = reader.ReadBoolean();
     _forceUpdate = true;
 }
Пример #2
0
 public static void Toggle(GameScene scene)
 {
     if (Engine.UI.GetByLocalSerial <MiniMapGump>() == null)
     {
         Engine.UI.Add(_self = new MiniMapGump());
     }
     else
     {
         _self.Dispose();
     }
 }
Пример #3
0
        public static void Toggle(GameScene scene)
        {
            UIManager ui = Service.Get <UIManager>();

            if (ui.GetByLocalSerial <MiniMapGump>() == null)
            {
                ui.Add(_self = new MiniMapGump(scene));
            }
            else
            {
                _self.Dispose();
            }
        }
Пример #4
0
        public override void OnButtonClick(int buttonID)
        {
            switch ((Buttons)buttonID)
            {
            case Buttons.Map:
                Log.Message(LogTypes.Warning, "Map button pushed! Not implemented yet!");
                MiniMapGump.Toggle(_scene);

                break;

            case Buttons.Paperdoll:

                if (UIManager.GetByLocalSerial <PaperDollGump>(World.Player) == null)
                {
                    GameActions.DoubleClick((Serial)(World.Player.Serial | int.MinValue));
                }
                else
                {
                    UIManager.Remove <PaperDollGump>(World.Player);
                }

                break;

            case Buttons.Inventory:
                Item backpack = World.Player.Equipment[(int)Layer.Backpack];

                if (backpack != null && !backpack.IsDisposed)
                {
                    if (UIManager.GetByLocalSerial(backpack) == null)
                    {
                        GameActions.DoubleClick(backpack);
                    }
                    else
                    {
                        UIManager.Remove <Gump>(backpack);
                    }
                }

                break;

            case Buttons.Journal:

                if (UIManager.GetByLocalSerial <JournalGump>() == null)
                {
                    UIManager.Add(new JournalGump());
                }
                else
                {
                    UIManager.Remove <JournalGump>();
                }

                break;

            case Buttons.Chat:
                Log.Message(LogTypes.Warning, "Chat button pushed! Not implemented yet!");

                break;

            case Buttons.Help:
                GameActions.RequestHelp();

                break;

            case Buttons.Debug:
                Log.Message(LogTypes.Warning, "Debug button pushed! Not implemented yet!");

                break;
            }
        }