public void SetToolMode(TrafficManagerMode mode) { if (mode == ToolMode) { return; } //UI.toolMode = mode; ToolMode = mode; if (mode != TrafficManagerMode.None) { if (ToolsModifierControl.toolController.CurrentTool != TrafficLightTool) { _originalTool = ToolsModifierControl.toolController.CurrentTool; } DestroyTool(); EnableTool(); } else { ToolsModifierControl.toolController.CurrentTool = _originalTool; DestroyTool(); } }
internal static void ReleaseTool() { if (ToolMode != TrafficManagerMode.None) { ToolMode = TrafficManagerMode.None; DestroyTool(); } }
public override void OnReleased() { base.OnReleased(); if (ToolMode != TrafficManagerMode.None) { ToolMode = TrafficManagerMode.None; UITrafficManager.uistate = UITrafficManager.UIState.None; DestroyTool(); } }
public static void SetToolMode(TrafficManagerMode mode) { if (mode == ToolMode) { return; } ToolMode = mode; if (mode != TrafficManagerMode.None) { EnableTool(); } else { DisableTool(); } }
public ModUI() { UiScaleObservable = new UIScaleObservable(); uiOpacityObservable = new UIOpacityObservable(); Log._Debug("##### Initializing ModUI."); CreateMainMenuButtonAndWindow(); #if DEBUG UIView uiView = UIView.GetAView(); DebugMenu = (DebugMenuPanel)uiView.AddUIComponent(typeof(DebugMenuPanel)); #endif ToolMode = TrafficManagerMode.None; // One time load LoadingExtension.TranslationDatabase.ReloadTutorialTranslations(); LoadingExtension.TranslationDatabase.ReloadGuideTranslations(); }
public UIBase() { Log._Debug("##### Initializing UIBase."); // Get the UIView object. This seems to be the top-level object for most // of the UI. var uiView = UIView.GetAView(); // Add a new button to the view. MainMenuButton = (UIMainMenuButton)uiView.AddUIComponent(typeof(UIMainMenuButton)); // add the menu MainMenu = (MainMenuPanel)uiView.AddUIComponent(typeof(MainMenuPanel)); #if DEBUG DebugMenu = (DebugMenuPanel)uiView.AddUIComponent(typeof(DebugMenuPanel)); #endif ToolMode = TrafficManagerMode.None; }
public void SetToolMode(TrafficManagerMode mode) { if (mode == ToolMode) { return; } //UI.toolMode = mode; ToolMode = mode; if (mode != TrafficManagerMode.None) { DestroyTool(); EnableTool(); } else { DestroyTool(); } }
public void SetToolMode(TrafficManagerMode mode) { if (mode == ToolMode) return; //UI.toolMode = mode; ToolMode = mode; if (mode != TrafficManagerMode.None) { DestroyTool(); EnableTool(); } else { DestroyTool(); } }
public override void OnReleased() { base.OnReleased(); if (ToolMode != TrafficManagerMode.None) { ToolMode = TrafficManagerMode.None; UITrafficManager.uistate = UITrafficManager.UIState.None; DestroyTool(); } }