TGEA_1.7 ESC Key functionality
by mb · in Torque Game Engine Advanced · 05/02/2008 (11:20 am) · 6 replies
Hi,
I wrote a script that allows me to use different GUI's depending on the screensize of the user. It works fine but the ESC key on the two new playGui's have lost it's functionality. All the GUI's are the same (i just copied them - the gui names are changed though: GameTSCtrl(PlayGui2), GameTSCtrl(PlayGui3) ). If my screensize is 640 it will use playGui.gui and the ESC Key works as it should. If I use 800 or 1024 (which are the sizes for the new gui's) it will use playGui2.gui or playGui3.gui and the ESC Key will no longer work.
I also copied the playGui.cs file and made a playGui2.cs and playGui3.cs. These files are almost the same except the function names have changed:
function PlayGui::onWake
function PlayGui2::onWake
function PlayGui3::onWake
I exec all new gui and cs files in init.cs.
Long story short ESC Key doesn't work when I'm using playGui2 & playGui3. If anyone has any clue as to why this is happing please let me know :)
Thanks in advance.
-Mike
I wrote a script that allows me to use different GUI's depending on the screensize of the user. It works fine but the ESC key on the two new playGui's have lost it's functionality. All the GUI's are the same (i just copied them - the gui names are changed though: GameTSCtrl(PlayGui2), GameTSCtrl(PlayGui3) ). If my screensize is 640 it will use playGui.gui and the ESC Key works as it should. If I use 800 or 1024 (which are the sizes for the new gui's) it will use playGui2.gui or playGui3.gui and the ESC Key will no longer work.
I also copied the playGui.cs file and made a playGui2.cs and playGui3.cs. These files are almost the same except the function names have changed:
function PlayGui::onWake
function PlayGui2::onWake
function PlayGui3::onWake
I exec all new gui and cs files in init.cs.
Long story short ESC Key doesn't work when I'm using playGui2 & playGui3. If anyone has any clue as to why this is happing please let me know :)
Thanks in advance.
-Mike
#2
Any help would be appreciated.
Thanks,
Mike
05/06/2008 (9:39 am)
Anyone know why this is happening? When I hit F11 and go into the mission editor and then hit F11 again the gui switches (because the screen resolution changes when you hit F11) and then I can hit ESC to exit. Otherwise I have to use the new function listed above which is the same as the old function but uses a different key.Any help would be appreciated.
Thanks,
Mike
#3
05/06/2008 (11:53 am)
Doh! I think I found my problem, I'll have to check it when I get home, but i think it was something simple as I deleted the ctrl in the gui that is bound to the esc key.
#4
Thx ahead of time
Edit: perhaps we're on 2 different things, but any information is welcomed.
05/08/2008 (6:29 am)
Any word on the issue mb ? ..I have lost use of "esc" as a key accelerator in all of my previous GUI's from 1.0.3.Thx ahead of time
Edit: perhaps we're on 2 different things, but any information is welcomed.
#5
05/08/2008 (8:50 am)
Try accelerator = "escape";
#6
05/12/2008 (9:38 am)
I still haven't been able to track this down. Escape only works when the screensize is 640x480.
Torque 3D Owner mb
//------------------------------------------------------------------------------ // Non-remapable binds //------------------------------------------------------------------------------ function escapeFromGame() { if ( $Server::ServerType $= "SinglePlayer" ) MessageBoxYesNoOld( "Quit Mission", "Exit from this Mission?", "disconnect();", ""); else MessageBoxYesNoOld( "Disconnect", "Disconnect from the server?", "disconnect();", ""); } //moveMap.bindCmd(keyboard, "escape", "", "escapeFromGame();"); function escapeFromGame2() { if ( $Server::ServerType $= "SinglePlayer" ) MessageBoxYesNoOld( "Quit Mission", "Exit from this Mission?", "disconnect();", ""); else MessageBoxYesNoOld( "Disconnect", "Disconnect from the server?", "disconnect();", ""); } moveMap.bindCmd(keyboard, "alt q", "", "escapeFromGame2();");