/// <summary> /// Fill Global keybinds section /// </summary> private void CreateUI_Global() { AddReadOnlyKeybind(Translation.Options.Get("Keybind:Generic exit subtool key"), Esc); AddKeybindRowUI(Translation.Options.Get("Keybind:Toggle Main Menu"), ToggleMainMenu); ToggleMainMenu.OnKeyChanged(() => { if (ModUI.Instance != null && ModUI.Instance.MainMenuButton != null) { ModUI.Instance.MainMenuButton.UpdateButtonImageAndTooltip(); } }); AddKeybindRowUI(Translation.Options.Get("Keybind.Main:Toggle traffic lights tool"), ToggleTrafficLightTool); AddKeybindRowUI(Translation.Options.Get("Keybind.Main:Lane arrow tool"), LaneArrowTool); AddKeybindRowUI(Translation.Options.Get("Keybind.Main:Lane connections tool"), LaneConnectionsTool); AddKeybindRowUI(Translation.Options.Get("Keybind.Main:Priority signs tool"), PrioritySignsTool); AddKeybindRowUI(Translation.Options.Get("Keybind.Main:Junction restrictions tool"), JunctionRestrictionsTool); AddKeybindRowUI(Translation.Options.Get("Keybind.Main:Speed limits tool"), SpeedLimitsTool); }
/// <summary> /// Fill Global keybinds section /// </summary> private void CreateUI_Global() { AddReadOnlyKeybind(Translation.Options.Get("Keybind:Generic exit subtool key"), ToolCancelViewOnly); AddKeybindRowUI(Translation.Options.Get("Keybind:Toggle Main Menu"), ToggleMainMenu); ToggleMainMenu.OnKeyChanged(() => { if (LoadingExtension.BaseUI != null && LoadingExtension.BaseUI.MainMenuButton != null) { LoadingExtension.BaseUI.MainMenuButton.UpdateTooltip(); } }); AddKeybindRowUI(Translation.Options.Get("Keybind.Main:Toggle traffic lights tool"), ToggleTrafficLightTool); AddKeybindRowUI(Translation.Options.Get("Keybind.Main:Lane arrow tool"), LaneArrowTool); AddKeybindRowUI(Translation.Options.Get("Keybind.Main:Lane connections tool"), LaneConnectionsTool); AddKeybindRowUI(Translation.Options.Get("Keybind.Main:Priority signs tool"), PrioritySignsTool); AddKeybindRowUI(Translation.Options.Get("Keybind.Main:Junction restrictions tool"), JunctionRestrictionsTool); AddKeybindRowUI(Translation.Options.Get("Keybind.Main:Speed limits tool"), SpeedLimitsTool); }
/// <summary> /// Fill Global keybinds section /// </summary> private void CreateUI_Global() { AddReadOnlyKeybind(Translation.GetString("Keybind_Exit_subtool"), ToolCancelViewOnly); AddKeybindRowUI(Translation.GetString("Keybind_toggle_TMPE_main_menu"), ToggleMainMenu); ToggleMainMenu.OnKeyChanged(() => { if (LoadingExtension.BaseUI != null && LoadingExtension.BaseUI.MainMenuButton != null) { LoadingExtension.BaseUI.MainMenuButton.UpdateTooltip(); } }); AddKeybindRowUI(Translation.GetString("Keybind_toggle_traffic_lights_tool"), ToggleTrafficLightTool); AddKeybindRowUI(Translation.GetString("Keybind_use_lane_arrow_tool"), LaneArrowTool); AddKeybindRowUI(Translation.GetString("Keybind_use_lane_connections_tool"), LaneConnectionsTool); AddKeybindRowUI(Translation.GetString("Keybind_use_priority_signs_tool"), PrioritySignsTool); AddKeybindRowUI(Translation.GetString("Keybind_use_junction_restrictions_tool"), JunctionRestrictionsTool); AddKeybindRowUI(Translation.GetString("Keybind_use_speed_limits_tool"), SpeedLimitsTool); }