Exemplo n.º 1
0
        protected override void Initialize()
        {
            _markerDirectory = DirectoriesManager.GetFullDirectoryPath("markers");

            _moduleControls       = new List <Control>();
            _pathableToggleStates = GameService.Store.RegisterStore(this.Namespace);

            _mapIcon = new CornerIcon()
            {
                IconName = "Markers & Paths",
                Icon     = ContentsManager.GetTexture("marker-pathing-icon.png"),
                Priority = "Markers & Paths".GetHashCode()
            };

            _onNewMapLoaded = delegate {
                if (this.Loaded && _packsLoaded)
                {
                    _currentReader?.UpdatePathableStates();
                }
            };

            _mapIconMenu = new ContextMenuStrip();

            _mapIcon.Click += delegate { _mapIconMenu.Show(_mapIcon); };

            var loadingMenuItem = _mapIconMenu.AddMenuItem("Loading...");

            loadingMenuItem.Enabled = false;
        }
        private void FinalizeLoad()
        {
            _mapIcon.LoadingMessage = null;

            _allPathableResourceManagers.ForEach(GameService.Pathing.RegisterPathableResourceManager);

            _currentReader.UpdatePathableStates();
            GameService.Pathing.NewMapLoaded += _onNewMapLoaded;
        }
Exemplo n.º 3
0
        private void FinalizeLoad()
        {
            _mapIcon.LoadingMessage = null;

            _allPathableResourceManagers.ForEach(GameService.Pathing.RegisterPathableResourceManager);

            _currentReader.UpdatePathableStates();
            GameService.Pathing.NewMapLoaded += _onNewMapLoaded;

            GameService.Debug.StopTimeFuncAndOutput("Markers and Paths");
        }