public void Close() { if (LoadingExtension.Instance != null) { var uiView = UIView.GetAView(); var trafficManager = uiView.FindUIComponent("UITrafficManager"); if (trafficManager != null) { Log._Debug("Hiding TM UI"); trafficManager.Hide(); } else { Log._Debug("Hiding TM UI: null!"); } UITrafficManager.deactivateButtons(); TrafficManagerTool.SetToolMode(ToolMode.None); LoadingExtension.Instance.SetToolMode(TrafficManagerMode.None); _uiShown = false; } else { Log._Debug("TM UI Close: LoadingExtension.Instance is null!"); } }
private static void ClickToggleDespawn(UIComponent component, UIMouseEventParameter eventParam) { TrafficManagerTool.SetToolMode(ToolMode.None); Options.setEnableDespawning(!Options.enableDespawning); _buttonToggleDespawn.text = Options.enableDespawning ? Translation.GetString("Disable_despawning") : Translation.GetString("Enable_despawning"); }
public void Close() { var uiView = UIView.GetAView(); GetMenu().Hide(); UITrafficManager.deactivateButtons(); TrafficManagerTool.SetToolMode(ToolMode.None); LoadingExtension.SetToolMode(TrafficManagerMode.None); _uiShown = false; button.UpdateSprites(); }
private void clickChangeLanes(UIComponent component, UIMouseEventParameter eventParam) { if (TrafficManagerTool.GetToolMode() != ToolMode.LaneChange) { _buttonLaneChange.focusedBgSprite = "ButtonMenuFocused"; TrafficManagerTool.SetToolMode(ToolMode.LaneChange); } else { _buttonLaneChange.focusedBgSprite = "ButtonMenu"; TrafficManagerTool.SetToolMode(ToolMode.None); } }
private void clickVehicleRestrictions(UIComponent component, UIMouseEventParameter eventParam) { if (TrafficManagerTool.GetToolMode() != ToolMode.VehicleRestrictions) { _buttonVehicleRestrictions.focusedBgSprite = "ButtonMenuFocused"; TrafficManagerTool.SetToolMode(ToolMode.VehicleRestrictions); } else { _buttonVehicleRestrictions.focusedBgSprite = "ButtonMenu"; TrafficManagerTool.SetToolMode(ToolMode.None); } }
private void clickSpeedLimits(UIComponent component, UIMouseEventParameter eventParam) { if (TrafficManagerTool.GetToolMode() != ToolMode.SpeedLimits) { _buttonSpeedLimits.focusedBgSprite = "ButtonMenuFocused"; TrafficManagerTool.SetToolMode(ToolMode.SpeedLimits); } else { _buttonSpeedLimits.focusedBgSprite = "ButtonMenu"; TrafficManagerTool.SetToolMode(ToolMode.None); } }
private void clickTimedAdd(UIComponent component, UIMouseEventParameter eventParam) { if (TrafficManagerTool.GetToolMode() != ToolMode.TimedLightsSelectNode && TrafficManagerTool.GetToolMode() != ToolMode.TimedLightsShowLights) { _buttonTimedMain.focusedBgSprite = "ButtonMenuFocused"; TrafficManagerTool.SetToolMode(ToolMode.TimedLightsSelectNode); } else { _buttonTimedMain.focusedBgSprite = "ButtonMenu"; TrafficManagerTool.SetToolMode(ToolMode.None); } }
private void clickManualControl(UIComponent component, UIMouseEventParameter eventParam) { if (TrafficManagerTool.GetToolMode() != ToolMode.ManualSwitch) { _buttonManualControl.focusedBgSprite = "ButtonMenuFocused"; TrafficManagerTool.SetToolMode(ToolMode.ManualSwitch); } else { _buttonManualControl.focusedBgSprite = "ButtonMenu"; TrafficManagerTool.SetToolMode(ToolMode.None); } }
private void clickSwitchTraffic(UIComponent component, UIMouseEventParameter eventParam) { if (TrafficManagerTool.GetToolMode() != ToolMode.SwitchTrafficLight) { _buttonSwitchTraffic.focusedBgSprite = "ButtonMenuFocused"; TrafficManagerTool.SetToolMode(ToolMode.SwitchTrafficLight); } else { _buttonSwitchTraffic.focusedBgSprite = "ButtonMenu"; TrafficManagerTool.SetToolMode(ToolMode.None); } }
private void clickLaneConnector(UIComponent component, UIMouseEventParameter eventParam) { if (TrafficManagerTool.GetToolMode() != ToolMode.LaneConnector) { _buttonLaneConnector.normalBgSprite = _buttonLaneConnector.focusedBgSprite = "ButtonMenuFocused"; TrafficManagerTool.SetToolMode(ToolMode.LaneConnector); } else { _buttonLaneConnector.normalBgSprite = _buttonLaneConnector.focusedBgSprite = "ButtonMenu"; TrafficManagerTool.SetToolMode(ToolMode.None); } }
private void clickAddPrioritySigns(UIComponent component, UIMouseEventParameter eventParam) { if (TrafficManagerTool.GetToolMode() != ToolMode.AddPrioritySigns) { _buttonPrioritySigns.normalBgSprite = _buttonPrioritySigns.focusedBgSprite = "ButtonMenuFocused"; TrafficManagerTool.SetToolMode(ToolMode.AddPrioritySigns); } else { _buttonPrioritySigns.normalBgSprite = _buttonPrioritySigns.focusedBgSprite = "ButtonMenu"; TrafficManagerTool.SetToolMode(ToolMode.None); } }
public void Close() { GetMenu().Hide(); #if DEBUG GetDebugMenu().Hide(); #endif TrafficManagerTool tmTool = GetTrafficManagerTool(false); if (tmTool != null) { tmTool.SetToolMode(UI.ToolMode.None); } SetToolMode(TrafficManagerMode.None); _uiShown = false; MainMenuButton.UpdateSprites(); }
private void clickClearTraffic(UIComponent component, UIMouseEventParameter eventParam) { TrafficManagerTool.SetToolMode(ToolMode.None); TrafficPriority.RequestClearTraffic(); }
private void clickClearTraffic(UIComponent component, UIMouseEventParameter eventParam) { TrafficManagerTool.SetToolMode(ToolMode.None); VehicleStateManager.Instance.RequestClearTraffic(); }
private void clickRemoveStuckEntities(UIComponent component, UIMouseEventParameter eventParam) { TrafficManagerTool.SetToolMode(ToolMode.None); UtilityManager.Instance.RequestResetStuckEntities(); }