Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/session/session.js
Show First 20 Lines • Show All 798 Lines • ▼ Show 20 Lines | function onSimulationUpdate() | ||||
g_SimState = Engine.GuiInterfaceCall("GetSimulationState"); | g_SimState = Engine.GuiInterfaceCall("GetSimulationState"); | ||||
if (!g_SimState) | if (!g_SimState) | ||||
return; | return; | ||||
handleNotifications(); | handleNotifications(); | ||||
updateGUIObjects(); | updateGUIObjects(); | ||||
for (let type of ["Aura", "Heal"]) | |||||
Engine.GuiInterfaceCall("EnableVisualRangeOverlayType", { | Engine.GuiInterfaceCall("EnableVisualRangeOverlayType", { | ||||
"type": "Aura", | "type": type, | ||||
"enabled": Engine.ConfigDB_GetValue("user", "gui.session.aurarange") == "true" | "enabled": Engine.ConfigDB_GetValue("user", "gui.session." + type.toLowerCase() + "range") == "true" | ||||
}); | }); | ||||
if (g_ConfirmExit) | if (g_ConfirmExit) | ||||
confirmExit(); | confirmExit(); | ||||
} | } | ||||
/** | /** | ||||
* Don't show the message box before all playerstate changes are processed. | * Don't show the message box before all playerstate changes are processed. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 448 Lines • ▼ Show 20 Lines | Engine.GuiInterfaceCall("SetStatusBars", { | ||||
"enabled": g_ShowAllStatusBars && !remove | "enabled": g_ShowAllStatusBars && !remove | ||||
}); | }); | ||||
} | } | ||||
/** | /** | ||||
* Toggles the display of range overlays of selected entities for the given range type. | * Toggles the display of range overlays of selected entities for the given range type. | ||||
* @param {string} type - for example "Aura" | * @param {string} type - for example "Aura" | ||||
*/ | */ | ||||
function toggleRangeOverlay(type, currentValue) | function toggleRangeOverlay(type) | ||||
{ | { | ||||
let configString = "gui.session." + type.toLowerCase() + "range"; | let configString = "gui.session." + type.toLowerCase() + "range"; | ||||
let enabled = Engine.ConfigDB_GetValue("user", configString) != "true"; | let enabled = Engine.ConfigDB_GetValue("user", configString) != "true"; | ||||
Engine.ConfigDB_CreateValue("user", configString, String(enabled)); | Engine.ConfigDB_CreateValue("user", configString, String(enabled)); | ||||
Engine.ConfigDB_WriteValueToFile("user", configString, String(enabled), "config/user.cfg"); | Engine.ConfigDB_WriteValueToFile("user", configString, String(enabled), "config/user.cfg"); | ||||
Engine.GuiInterfaceCall("EnableVisualRangeOverlayType", { | Engine.GuiInterfaceCall("EnableVisualRangeOverlayType", { | ||||
"type": type, | "type": type, | ||||
▲ Show 20 Lines • Show All 364 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator