Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/hotkeys/HotkeyPicker.js
Show All 24 Lines | else | ||||
Engine.GetGUIObjectByName("hotkeyPickerDescHotkey").hidden = true; | Engine.GetGUIObjectByName("hotkeyPickerDescHotkey").hidden = true; | ||||
} | } | ||||
this.setupCombinations(); | this.setupCombinations(); | ||||
this.render(); | this.render(); | ||||
Engine.GetGUIObjectByName("hotkeyPickerReset").onPress = () => { | Engine.GetGUIObjectByName("hotkeyPickerReset").onPress = () => { | ||||
// This is a bit "using a bazooka to kill a fly" | // This is a bit "using a bazooka to kill a fly" | ||||
Engine.ConfigDB_RemoveValue("user", "hotkey." + this.name); | Engine.ConfigDB_RemoveValueAndSave("user", "hotkey." + this.name); | ||||
Engine.ConfigDB_WriteFile("user", "config/user.cfg"); | |||||
Engine.ReloadHotkeys(); | Engine.ReloadHotkeys(); | ||||
let data = Engine.GetHotkeyMap(); | let data = Engine.GetHotkeyMap(); | ||||
this.combinations = data[this.name]; | this.combinations = data[this.name]; | ||||
this.setupCombinations(); | this.setupCombinations(); | ||||
this.render(); | this.render(); | ||||
}; | }; | ||||
Engine.GetGUIObjectByName("hotkeyPickerCancel").onPress = () => { | Engine.GetGUIObjectByName("hotkeyPickerCancel").onPress = () => { | ||||
onClose(this, false); | onClose(this, false); | ||||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator