Author Topic: Press enter to "send" events  (Read 905 times)

It would be cool to have a client sided mod that allows you to press enter instead of having to click send to apply events, lights, emitters, and items.

Ik it seems lazy, but it would save time and just be quicker and easier all around
« Last Edit: October 28, 2013, 06:07:39 PM by TBD »

change wrench dialog button accelerators to enter?

change wrench dialog button accelerators to enter?

Turned out to not be quite as simple as that, but close enough.
https://dl.dropboxusercontent.com/u/20459676/Betas/Client_EnterToSendEvents.zip

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

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
Well that would be bad, but that's the risk of sending events immaturely, anyways.


Turned out to not be quite as simple as that, but close enough.
https://dl.dropboxusercontent.com/u/20459676/Betas/Client_EnterToSendEvents.zip

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?

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.

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.

noice