The mouse input cannot be passed into the engine
by Gu Lu · in General Discussion · 11/21/2007 (4:58 pm) · 5 replies
Hi,
I already finished the "GameOne" tutorial following the instructions given by GettingStarted.pdf. Everything runs well but only one problem still exists.
In the tutorial.base, the mouse cursor is only available when the game is in menu or editor, and it disappears when the mission is loaded, all mouse input are passed into the engine to control the camera. But in my GameOne, the mouse cursor doesn't disappear when the mission is started, so I cannot control the character to turn around. It seems all user input are handled & blocked by the GUI layer without passing into the engine.
What may be wrong to produce such a problem, please?
Any help or suggestion are welcome:)
I already finished the "GameOne" tutorial following the instructions given by GettingStarted.pdf. Everything runs well but only one problem still exists.
In the tutorial.base, the mouse cursor is only available when the game is in menu or editor, and it disappears when the mission is loaded, all mouse input are passed into the engine to control the camera. But in my GameOne, the mouse cursor doesn't disappear when the mission is started, so I cannot control the character to turn around. It seems all user input are handled & blocked by the GUI layer without passing into the engine.
What may be wrong to produce such a problem, please?
Any help or suggestion are welcome:)
#2
11/21/2007 (7:42 pm)
It's odd that I didn't find such a gui block ( new GameTSCtrl(PlayGui) ) in my .mis file
#4
This way it will always be there even if the GUI Editor turns off the noCursor flag in the gui definition section. (The GUI editor only makes changes between the two: //--- OBJECT
lines )
(Thanks to whoever first suggested this one!)
11/21/2007 (8:49 pm)
For GUI's like this where you are sure you always need this set, it is a good trick to put it in the code section after the GUI definition in the file. //--- OBJECT WRITE BEGIN ---
new GameTSCtrl(PlayGui) {
// gui objects
};
//--- OBJECT WRITE END ---
PlayGui.noCursor="1";This way it will always be there even if the GUI Editor turns off the noCursor flag in the gui definition section. (The GUI editor only makes changes between the two: //--- OBJECT
lines )
(Thanks to whoever first suggested this one!)
#5
11/21/2007 (9:53 pm)
Got it, thanks!
Torque 3D Owner Scooby Brown
like this
new GameTSCtrl(PlayGui) { canSaveDynamicFields = "0"; Profile = "GuiContentProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "0 0"; Extent = "800 600"; MinExtent = "8 8"; canSave = "1"; Visible = "1"; hovertime = "1000"; applyFilterToChildren = "1"; cameraZRot = "0"; forceFOV = "0"; nocursor = "1";