Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 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);
     }
 }
Beispiel #3
0
 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);
     }
 }
Beispiel #4
0
 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);
     }
 }
Beispiel #5
0
 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);
     }
 }
Beispiel #6
0
 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);
     }
 }