GUI / Play modes
by xardias · in Torque Game Engine · 03/21/2006 (4:05 am) · 6 replies
Hiya!
I am having some problems building my game
GUI. I am trying to have 2 modes: game play
mode and GUI mode. My problem is when I add
the chat window, for example, to the PlayGUI
scene the EditCtrl in it gains focus but I
don't know how to give it back to the player.
Has anyone else ever tried to do something like
this?
I appreciate any hints, tricks and help! :)
Greetings,
Dennis.
I am having some problems building my game
GUI. I am trying to have 2 modes: game play
mode and GUI mode. My problem is when I add
the chat window, for example, to the PlayGUI
scene the EditCtrl in it gains focus but I
don't know how to give it back to the player.
Has anyone else ever tried to do something like
this?
I appreciate any hints, tricks and help! :)
Greetings,
Dennis.
About the author
#2
My next problem is the play mode / gui mode toggle... At the moment I just call "cursorOn()" which works like a charm but for some reason "cursorOff" doesn't work at all. I can make the cursor disappear by opening and closing the console. I also tried to copy some parts of the console toggle function into my cursor toggle function but that didn't help either.
Any suggestions? I am very lost there...
03/21/2006 (12:32 pm)
Okay I got it working now by adding/removing the text edit control when the player wants to type in a message/sends a message. :) Is there a better way to archieve the same effect? :)My next problem is the play mode / gui mode toggle... At the moment I just call "cursorOn()" which works like a charm but for some reason "cursorOff" doesn't work at all. I can make the cursor disappear by opening and closing the console. I also tried to copy some parts of the console toggle function into my cursor toggle function but that didn't help either.
Any suggestions? I am very lost there...
#3
03/21/2006 (12:41 pm)
The starter.fps has a chat window, when you press Y it gains focus and allows you to type. Take a look at how that's implemented, it might help.
#4
03/21/2006 (12:43 pm)
I didn't want to do it like that and I already solved the problem, thanks. :) My new problem merely concerns the mouse cursor.
#5
03/21/2006 (12:50 pm)
Are you using the mouse as your toggle?
#6
03/21/2006 (12:54 pm)
Nope, I bound my toggle function to a key via the actionMap. The toggle function sets a global Variable accordingly and calls cursorOff / -On.
Torque Owner xardias