Changeset View
Standalone View
binaries/data/mods/public/gui/session/hotkeys/misc.xml
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | <object hotkey="quicksave"> | ||||
<action on="Press">Engine.QuickSave(getSavedGameData());</action> | <action on="Press">Engine.QuickSave(getSavedGameData());</action> | ||||
</object> | </object> | ||||
<object hotkey="quickload"> | <object hotkey="quickload"> | ||||
<action on="Press">Engine.QuickLoad();</action> | <action on="Press">Engine.QuickLoad();</action> | ||||
</object> | </object> | ||||
<object hotkey="session.kill"> | <object hotkey="session.kill"> | ||||
<action on="Press">performCommand(g_Selection.toList().map(ent => GetEntityState(ent)), "delete");</action> | <action on="Keydown">performCommand(g_Selection.toList().map(ent => GetEntityState(ent)), "delete");</action> | ||||
</object> | </object> | ||||
elexis: A reason for Press is to avoid accidental deletes. But I guess who presses shift-delete and… | |||||
<object hotkey="session.unload"> | <object hotkey="session.unload"> | ||||
<action on="Press">unloadAll();</action> | <action on="Keydown">unloadAll();</action> | ||||
</object> | </object> | ||||
<object hotkey="session.stop"> | <object hotkey="session.stop"> | ||||
<action on="Press">stopUnits(g_Selection.toList());</action> | <action on="Keydown">stopUnits(g_Selection.toList());</action> | ||||
</object> | </object> | ||||
<object hotkey="session.backtowork"> | <object hotkey="session.backtowork"> | ||||
<action on="Press">backToWork();</action> | <action on="Keydown">backToWork();</action> | ||||
Not Done Inline Actionsthese can go either way (consider that the selection can change while pressing the button) bb: these can go either way (consider that the selection can change while pressing the button) | |||||
Not Done Inline ActionsSeems unlikely that someone keeps these buttons pressed and then selects different entities while it does add performance cost if these commands are spammed needlessly. elexis: Seems unlikely that someone keeps these buttons pressed and then selects different entities… | |||||
Not Done Inline Actionsthat goes for backtowork and kill, but for stop and unload something else can happen aswell: you want to hold units manually in a battle where they would otherwise run away (manually as in you don't wan to use stances), or units are garrisonning a building but you don't want it so unload immediatley bb: that goes for backtowork and kill, but for stop and unload something else can happen aswell… | |||||
Not Done Inline ActionsCan you give an example of that stop-units-in-battle use case? To me it seems like needlessly spamming simulation commands. elexis: Can you give an example of that stop-units-in-battle use case? To me it seems like needlessly… | |||||
Not Done Inline ActionsHave units with a cc just in vision range, so the cc doesn't shoot at the units, but the units will run at the cc when idle, probably a player doesn't want to run the units in (but wait for an ally to join attack) and he can't move back for whatever reason. The player could hold its units now in place by holding "h". bb: Have units with a cc just in vision range, so the cc doesn't shoot at the units, but the units… | |||||
</object> | </object> | ||||
<object hotkey="session.batchtrain"> | <object hotkey="session.batchtrain"> | ||||
<action on="Press">updateSelectionDetails();</action> | <action on="Press">updateSelectionDetails();</action> | ||||
<action on="Release">updateSelectionDetails();</action> | <action on="Release">updateSelectionDetails();</action> | ||||
</object> | </object> | ||||
<object hotkey="session.massbarter"> | <object hotkey="session.massbarter"> | ||||
<action on="Press"> | <action on="Press"> | ||||
updateSelectionDetails(); | updateSelectionDetails(); | ||||
updateBarterButtons(); | updateBarterButtons(); | ||||
</action> | </action> | ||||
<action on="Release"> | <action on="Release"> | ||||
updateSelectionDetails(); | updateSelectionDetails(); | ||||
updateBarterButtons(); | updateBarterButtons(); | ||||
</action> | </action> | ||||
</object> | </object> | ||||
<!-- Find idle warrior - TODO: Potentially move this to own UI button? --> | <!-- Find idle warrior - TODO: Potentially move this to own UI button? --> | ||||
<object hotkey="selection.idlewarrior"> | <object hotkey="selection.idlewarrior"> | ||||
<action on="Press">findIdleUnit(g_MilitaryTypes);</action> | <action on="KeyDown">findIdleUnit(g_MilitaryTypes);</action> | ||||
</object> | </object> | ||||
<object hotkey="selection.idleunit"> | <object hotkey="selection.idleunit"> | ||||
<action on="Press">findIdleUnit(["!Domestic"]);</action> | <action on="KeyDown">findIdleUnit(["!Domestic"]);</action> | ||||
</object> | </object> | ||||
<object hotkey="selection.cancel"> | <object hotkey="selection.cancel"> | ||||
<action on="Press">clearSelection();</action> | <action on="Keydown">clearSelection();</action> | ||||
</object> | </object> | ||||
<object hotkey="session.toggleattackrange"> | <object hotkey="session.toggleattackrange"> | ||||
<action on="Press">toggleRangeOverlay("Attack");</action> | <action on="Press">toggleRangeOverlay("Attack");</action> | ||||
</object> | </object> | ||||
<object hotkey="session.toggleaurasrange"> | <object hotkey="session.toggleaurasrange"> | ||||
<action on="Press">toggleRangeOverlay("Auras");</action> | <action on="Press">toggleRangeOverlay("Auras");</action> | ||||
Show All 13 Lines |
A reason for Press is to avoid accidental deletes. But I guess who presses shift-delete and changes selection afterwards is to be served what he ordered.
A reason for Keydown being able to delete many units in different places quickly (ragequit use case?), more importantly session unit action consistency.