change wrench dialog button accelerators to enter?
seems like it would be annoying if you were to accidentally hit enter and a player would click your build or do something and screw up the events
Turned out to not be quite as simple as that, but close enough.https://dl.dropboxusercontent.com/u/20459676/Betas/Client_EnterToSendEvents.zip
WrenchEvents_Window.getobject(1).accelerator = "enter";Wrench_Name.altCommand = "wrenchDlg.send();";Wrench_ItemRespawnTime.altCommand = "wrenchDlg.send();";Wrench_Window.getobject(4).accelerator = "enter";wrenchBot_Name.altCommand = "wrenchBotDlg.send();";wrenchBot_ItemRespawnTime.altCommand = "wrenchBotDlg.send();";WrenchSound_Name.altCommand = "wrenchSoundDlg.send();";WrenchSound_Window.getobject(1).accelerator = "enter";WrenchVehicleSpawn_Name.altCommand = "wrenchVehicleSpawnDlg.send();";WrenchVehicleSpawn_Window.getobject(1).accelerator = "enter";
Code: (nexus') [Select]WrenchEvents_Window.getobject(1).accelerator = "enter";Wrench_Name.altCommand = "wrenchDlg.send();";Wrench_ItemRespawnTime.altCommand = "wrenchDlg.send();";Wrench_Window.getobject(4).accelerator = "enter";wrenchBot_Name.altCommand = "wrenchBotDlg.send();";wrenchBot_ItemRespawnTime.altCommand = "wrenchBotDlg.send();";WrenchSound_Name.altCommand = "wrenchSoundDlg.send();";WrenchSound_Window.getobject(1).accelerator = "enter";WrenchVehicleSpawn_Name.altCommand = "wrenchVehicleSpawnDlg.send();";WrenchVehicleSpawn_Window.getobject(1).accelerator = "enter";so close, do button commands not get triggered by just changing the accelerator?
It turns out, when there are text edit controls in a gui control, no accelerators work except escape. The text edit will just intercept everything else unless you decide to mess with global keymapping stuff like in the RTB overlay, which is kinda overkill. My solution was to just make it so hitting enter in one of the text boxes just calls the same command as the button.