Index: binaries/data/config/default.cfg =================================================================== --- binaries/data/config/default.cfg +++ binaries/data/config/default.cfg @@ -147,8 +147,9 @@ togglefullscreen = "Alt+Return" ; Toggle fullscreen/windowed mode screenshot.watermark = "Alt+K" ; Toggle product/company watermark for official screenshots wireframe = "Alt+W" ; Toggle wireframe mode -silhouettes = "Alt+S" ; Toggle unit silhouettes +silhouettes = "Ctrl+Alt+S" ; Toggle unit silhouettes showsky = "Alt+Z" ; Toggle sky +summary = "Alt+S" ; Toggle in-game summary ; > CLIPBOARD CONTROLS copy = "Ctrl+C" ; Copy to clipboard @@ -323,6 +324,10 @@ fastforward = Space ; If timewarp mode enabled, speed up the game rewind = Backspace ; If timewarp mode enabled, go back to earlier point in the game +[hotkey.tab] +next = "Tab" ; Show next tab +prev = "Shift+Tab" ; Show previous tab + [hotkey.text] ; > GUI TEXTBOX HOTKEYS delete.left = "Ctrl+Backspace" ; Delete word to the left of cursor delete.right = "Ctrl+Del" ; Delete word to the right of cursor Index: binaries/data/mods/public/gui/common/functions_utility.js =================================================================== --- binaries/data/mods/public/gui/common/functions_utility.js +++ binaries/data/mods/public/gui/common/functions_utility.js @@ -246,3 +246,23 @@ for (let i = start; i < objects.length; ++i) objects[i].hidden = true; } + +/** + * Use mouse wheel over tabs to scroll to the next/previous tab. + */ +function setTabsSwitchMouseWheel(tabs, forward, backward) +{ + for (let tab of tabs) + { + tab.onMouseWheelUp = forward; + tab.onMouseWheelDown = backward; + } +} + +/** + * Calculate next/previous index in an array, with wrapping on begin and end. + */ +function nextIndex(index, indexArray, direction) +{ + return index + direction < 0 ? indexArray.length -1 : (index + direction) % indexArray.length; +} Index: binaries/data/mods/public/gui/credits/credits.js =================================================================== --- binaries/data/mods/public/gui/credits/credits.js +++ binaries/data/mods/public/gui/credits/credits.js @@ -1,6 +1,7 @@ var g_PanelNames = ["special", "programming", "art", "translators", "misc", "donators"]; var g_ButtonNames = {}; var g_PanelTexts = {}; +var g_ViewPanel = 0; function init() { @@ -21,9 +22,13 @@ selectPanel(0); } -function placeButtons() +function nextPanel(direction) { + selectPanel(nextIndex(g_ViewPanel, g_PanelNames, direction)); +} +function placeButtons() +{ for (let i = 0; i < g_PanelNames.length; ++i) { let button = Engine.GetGUIObjectByName("creditsPanelButton[" + i + "]"); @@ -32,6 +37,8 @@ warn("Could not display some credits."); break; } + button.onMouseWheelUp = () => nextPanel(1); + button.onMouseWheelDown = () => nextPanel(-1); button.hidden = false; let size = button.size; size.top = i * 35; @@ -83,6 +90,7 @@ function selectPanel(i) { + g_ViewPanel = i; Engine.GetGUIObjectByName("creditsPanelButtons").children.forEach((button, j) => { button.sprite = i == j ? "ModernTabVerticalForeground" : "ModernTabVerticalBackground"; }); Index: binaries/data/mods/public/gui/credits/credits.xml =================================================================== --- binaries/data/mods/public/gui/credits/credits.xml +++ binaries/data/mods/public/gui/credits/credits.xml @@ -8,11 +8,20 @@