Blockland Forums > Suggestions & Requests
Press enter to "send" events
<< < (2/2)
TBD:

--- Quote from: Nexus on October 28, 2013, 07:55:06 PM ---Turned out to not be quite as simple as that, but close enough.
https://dl.dropboxusercontent.com/u/20459676/Betas/Client_EnterToSendEvents.zip

--- End quote ---
thanks ;)
MARBLE MAN:

--- Quote from: Nexus on October 28, 2013, 07:55:06 PM ---Turned out to not be quite as simple as that, but close enough.
https://dl.dropboxusercontent.com/u/20459676/Betas/Client_EnterToSendEvents.zip

--- End quote ---


--- Code: (nexus') ---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";

--- End code ---

so close, do button commands not get triggered by just changing the accelerator?
Nexus:

--- Quote from: MARBLE MAN on October 28, 2013, 11:27:15 PM ---
--- Code: (nexus') ---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";

--- End code ---

so close, do button commands not get triggered by just changing the accelerator?

--- End quote ---

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.
MARBLE MAN:

--- Quote from: Nexus on October 29, 2013, 01:49:29 AM ---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.

--- End quote ---

noice
Navigation
Message Index
Previous page

Go to full version