Index: binaries/data/mods/public/gui/common/color.js =================================================================== --- binaries/data/mods/public/gui/common/color.js +++ binaries/data/mods/public/gui/common/color.js @@ -170,15 +170,16 @@ return [r, g, b].map(n => Math.round(n * 255)); } -function colorizeHotkey(text, hotkey) +function colorizeHotkey(text, hotkey, extra = false) { // TODO: Be more efficient in retrieving the mapping(s) for a specific hotkey let key = Engine.GetHotkeyMap()[hotkey]; if (!key) - key = sprintf(translate("Unassigned hotkey: %(hotkeyName)s"), { - "hotkeyName": hotkey - }); + if (!extra) + key = sprintf(translate("Unassigned hotkey: %(hotkeyName)s"), { + "hotkeyName": hotkey + }); else key = formatHotkeyCombinations(key); @@ -187,6 +188,11 @@ }); } +function colorizeExtraHotkey(text, hotkey) +{ + return colorizeHotkey(text, hotkey, true); +} + /** * The autocomplete hotkey is hardcoded in SDLK_TAB of CInput.cpp, * as we don't want hotkeys interfering with typing text. Index: binaries/data/mods/public/gui/session/unit_actions.js =================================================================== --- binaries/data/mods/public/gui/session/unit_actions.js +++ binaries/data/mods/public/gui/session/unit_actions.js @@ -1723,7 +1723,7 @@ if (entStates.every(entState => !entState.production || !entState.production.entities || entState.production.autoqueue)) return false; return { - "tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.queueunit.autoqueueon") + + "tooltip": colorizeExtraHotkey("%(hotkey)s" + " ", "session.queueunit.autoqueueon") + translate("Activate auto-queue for selected structures."), "icon": "autoqueue-on.png", "enabled": true @@ -1743,7 +1743,7 @@ if (entStates.every(entState => !entState.production || !entState.production.entities || !entState.production.autoqueue)) return false; return { - "tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.queueunit.autoqueueoff") + + "tooltip": colorizeExtraHotkey("%(hotkey)s" + " ", "session.queueunit.autoqueueoff") + translate("Deactivate auto-queue for selected structures."), "icon": "autoqueue-off.png", "enabled": true