Problem with the cursor over the PlayGui with menu
by ERICK MIRANDA M · in Torque Game Engine · 06/03/2009 (12:25 pm) · 10 replies
Hello everybody, I have a litle problem, I made a menu on the PlayGui (GuiControl), when I click the right button, the menu appears, my problem is the cursor... ahmmm, when I move the mouse on the screen, the cursor print it on the playgui screen, but when is over the menu it's ok, but when I move the mouse over the playgui screen new again, the cursor continuos printing on the playgui screen, this happen when appears the menu. Thanks for your help.
About the author
#2
06/05/2009 (12:43 pm)
Thanks Scooby for the answer, but this is my problem when I active my menu on the plagygui screen...
#3
06/05/2009 (12:50 pm)
can you post your gui code?
#4
eg, try this in the TGE 1.5.2 demo.exe:
you get something like this:
06/05/2009 (2:20 pm)
this can happen if the canvas's main child isn't "opaque", which is the case for the default gui profile.eg, try this in the TGE 1.5.2 demo.exe:
canvas.setContent(new GuiControl(foo) { new GuiControl(bar) { position = "100 100"; extent = "400 400"; profile = GuiBevelLoweredProfile;}; } );you get something like this:
#5
06/05/2009 (2:23 pm)
for extra fun, try issuing this command before the previous one:GuiBevelLoweredProfile.fillColor = "255 255 255 8";
#6
The playgui doesn't have any change:
I have a new menuRaton.gui, this is my menu when I click on the second button:
And then, when I click on the second button the problem appear, thanks for your help pals.
06/05/2009 (5:09 pm)
Thanks for your help Orion, but I accept, I´m new on Torque and I studied your example, but couldn't understand the function, indeed I can´t apply the solution to my problem. I guess if I create a new guiControl this will happen out of the menu, but I would like to this doesn´t happen.The playgui doesn't have any change:
//--- OBJECT WRITE BEGIN ---
noCursor = "1";
new GameTSCtrl(PlayGui) {
canSaveDynamicFields = "1";
Profile = "GuiContentProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "1024 768";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
applyFilterToChildren = "1";
cameraZRot = "0";
forceFOV = "0";
noCursor = "1";
helpTag = "0";
new GuiCrossHairHud() {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "center";
VertSizing = "center";
position = "480 352";
Extent = "64 64";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
wrap = "0";
damageFillColor = "0 1 0 1";
damageFrameColor = "1 0.6 0 1";
damageRect = "50 4";
damageOffset = "0 32";
};
new GuiMouseEventCtrl() {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "center";
VertSizing = "center";
position = "469 339";
Extent = "84 88";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
lockMouse = "0";
};
};
//--- OBJECT WRITE END ---I have a new menuRaton.gui, this is my menu when I click on the second button:
//--- OBJECT WRITE BEGIN ---
new GuiControl(menuRaton) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "1024 768";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
new GuiBitmapCtrl() {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "center";
VertSizing = "center";
position = "311 261";
Extent = "230 218";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
bitmap = "./mouse.png";
wrap = "0";
};
};
//--- OBJECT WRITE END ---And then, when I click on the second button the problem appear, thanks for your help pals.
#7
that is, what command does the mouse click trigger which actually displays the menu ?
is it possibly Canvas.setContent(menuRaton) ?
if so, then perhaps try Canvas.pushDialog(menuRaton) instead.
06/05/2009 (5:15 pm)
how is the menu being displayed ?that is, what command does the mouse click trigger which actually displays the menu ?
is it possibly Canvas.setContent(menuRaton) ?
if so, then perhaps try Canvas.pushDialog(menuRaton) instead.
#8
06/05/2009 (5:41 pm)
Orion, really really thanks for your advice, thats is true, in default.bind, in my function on second button, I had Canvas.setContent(menuRaton), then I have changed the function with Canvas.pushDialog(menuRaton) and the problem disappeared. Orion and Scooby, really thanks for your help.
#9
06/05/2009 (5:52 pm)
sweet, glad that fixed it!
#10
06/06/2009 (5:11 am)
Woooo its solved..nice one. if you need anymore help we are here :-)
Torque 3D Owner Scooby Brown
noCursor = "1";
in the playgui variables