Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/mod/gui/modmod/modmod.js
Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | function initGUIButtons(data) | ||||
// Turn 'save' off, it will be enabled on any change. | // Turn 'save' off, it will be enabled on any change. | ||||
Engine.GetGUIObjectByName("saveConfigurationButton").enabled = false; | Engine.GetGUIObjectByName("saveConfigurationButton").enabled = false; | ||||
Engine.GetGUIObjectByName("toggleModButton").caption = translateWithContext("mod activation", "Enable"); | Engine.GetGUIObjectByName("toggleModButton").caption = translateWithContext("mod activation", "Enable"); | ||||
} | } | ||||
function saveMods() | function saveMods() | ||||
{ | { | ||||
sortEnabledMods(); | sortEnabledMods(); | ||||
Engine.ConfigDB_CreateValue("user", "mod.enabledmods", ["mod"].concat(g_ModsEnabled).join(" ")); | Engine.ConfigDB_CreateAndSaveValue("user", "mod.enabledmods", ["mod"].concat(g_ModsEnabled).join(" ")); | ||||
Engine.ConfigDB_WriteFile("user", "config/user.cfg"); | |||||
Engine.GetGUIObjectByName("saveConfigurationButton").enabled = false; | Engine.GetGUIObjectByName("saveConfigurationButton").enabled = false; | ||||
} | } | ||||
function startMods() | function startMods() | ||||
{ | { | ||||
saveMods(); | saveMods(); | ||||
if (!Engine.SetModsAndRestartEngine(["mod"].concat(g_ModsEnabled))) | if (!Engine.SetModsAndRestartEngine(["mod"].concat(g_ModsEnabled))) | ||||
▲ Show 20 Lines • Show All 323 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator