Console questions
by Vern Jensen · in Torque Game Builder · 08/25/2008 (1:18 pm) · 3 replies
1) I want to make the mouse cursor visible when the console appears, and invisible when it disappears. Any way to do this? Or a function I can call to determine if the console is visible or not?
2) How do I change the console so it does not appear when ~ is pushed, or it responds to a different key combination? (Such as Command ~) I'm wanting a different key combo for when my game ships.
2) How do I change the console so it does not appear when ~ is pushed, or it responds to a different key combination? (Such as Command ~) I'm wanting a different key combo for when my game ships.
#2
Look at common/gui/console.gui, you might put something like Canvas.hideCursor/showCursor in ConsoleDlg::onWake/onSleep
Also ConsoleDlg.isActive() would tell you if the console is currently "on"
08/26/2008 (11:37 pm)
Also (for some reason) you can change the console key in commonConfig.xml.Look at common/gui/console.gui, you might put something like Canvas.hideCursor/showCursor in ConsoleDlg::onWake/onSleep
Also ConsoleDlg.isActive() would tell you if the console is currently "on"
#3
08/26/2008 (11:57 pm)
Awesome, thanks so much!
Torque Owner Conor O Kane
GlobalActionMap.bind(keyboard, $Game::ConsoleBind, toggleConsole);
Then you can bind your own key to a function that calls toggleConsole(); and canvas.hideCursor(); or canvas.showCursor();