Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/summary/summary.js
Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | function init(data) | ||||
initGUILabelsAndButtons(); | initGUILabelsAndButtons(); | ||||
selectPanel(Engine.GetGUIObjectByName(g_SelectedPanel)); | selectPanel(Engine.GetGUIObjectByName(g_SelectedPanel)); | ||||
for (let button of g_PanelButtons) | for (let button of g_PanelButtons) | ||||
{ | { | ||||
let tab = Engine.GetGUIObjectByName(button); | let tab = Engine.GetGUIObjectByName(button); | ||||
tab.onMouseWheelUp = () => selectNextTab(1); | tab.onMouseWheelUp = () => selectNextTab(1); | ||||
tab.onMouseWheelDown = () => selectNextTab(-1); | tab.onMouseWheelDown = () => selectNextTab(-1); | ||||
} | } | ||||
if (Engine.HasXmppClient()) | |||||
Engine.GetGUIObjectByName("toolTip").caption = sprintf( | |||||
translate("Hit %(key)s in lobby to show last game summary."), | |||||
{ "key": Engine.ConfigDB_GetValue("user", "hotkey.summary") } | |||||
); | |||||
} | } | ||||
/* | /* | ||||
* Show next/previous panel. | * Show next/previous panel. | ||||
* @param direction - 1/-1 forward, backward panel. | * @param direction - 1/-1 forward, backward panel. | ||||
*/ | */ | ||||
function selectNextTab(direction) | function selectNextTab(direction) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 370 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator