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; }
private void FinalizeLoad() { _mapIcon.LoadingMessage = null; _allPathableResourceManagers.ForEach(GameService.Pathing.RegisterPathableResourceManager); _currentReader.UpdatePathableStates(); GameService.Pathing.NewMapLoaded += _onNewMapLoaded; GameService.Debug.StopTimeFuncAndOutput("Markers and Paths"); }