Many Mouse-Pointers in SplashGui
by Dirk Hoffmann · in Torque Game Builder · 06/10/2006 (7:03 am) · 2 replies
Hello,
I have a routine for displaying a Splash screen and after a certain delay a Main menu.
It look like this:
new GuiFadeinBitmapCtrl(ggSplash) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "0 0";
Extent = "640 480";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
bitmap = "~/data/images/GGLogo_icon_long-RGB";//~
wrap = "0";
fadeinTime = "3000";
waitTime = "2000";
fadeoutTime = "2000";
done = "0";
};
//--- OBJECT WRITE END ---
//SplashAnzeige
function loadGGSplash()
{
canvas.setCursor(DefaultCursor);
canvas.setContent(ggSplash);
alxPlay( ambient1Audio );
schedule(7000,0,checkGGSplash);
}
function checkGGSplash()
{
if(ggSplash.done)
{
canvas.setContent(MainMenuGui);
canvas.setCursor(DefaultCursor);
}
else
schedule(100,0,checkGGSplash);
}
So far it works just fine. But on the splash screen and also afterwards in the menu the mouse-cursor isn't refreshed. This means wherever the mouse moved, a trace stays visible.
I think by using: canvas.setCursor(DefaultCursor);
it should be fixed, but it isn't. Anyone out there familiar with this or with a good idea how to fix?
Thanks in advance
Dirk
I have a routine for displaying a Splash screen and after a certain delay a Main menu.
It look like this:
new GuiFadeinBitmapCtrl(ggSplash) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "0 0";
Extent = "640 480";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
bitmap = "~/data/images/GGLogo_icon_long-RGB";//~
wrap = "0";
fadeinTime = "3000";
waitTime = "2000";
fadeoutTime = "2000";
done = "0";
};
//--- OBJECT WRITE END ---
//SplashAnzeige
function loadGGSplash()
{
canvas.setCursor(DefaultCursor);
canvas.setContent(ggSplash);
alxPlay( ambient1Audio );
schedule(7000,0,checkGGSplash);
}
function checkGGSplash()
{
if(ggSplash.done)
{
canvas.setContent(MainMenuGui);
canvas.setCursor(DefaultCursor);
}
else
schedule(100,0,checkGGSplash);
}
So far it works just fine. But on the splash screen and also afterwards in the menu the mouse-cursor isn't refreshed. This means wherever the mouse moved, a trace stays visible.
I think by using: canvas.setCursor(DefaultCursor);
it should be fixed, but it isn't. Anyone out there familiar with this or with a good idea how to fix?
Thanks in advance
Dirk
#2
You might want to make sure your gui Control size matches your screen settings.
06/10/2006 (4:09 pm)
You'll also notice this behavior if your GUI controls aren't resizing so there isn't a gui control covering the canvas at the location you notice your mouse trails. You might want to make sure your gui Control size matches your screen settings.
Torque Owner Tom Bushby
function loadGGSplash() { canvas.setCursor(DefaultCursor); canvas.setContent(ggSplash); alxPlay( ambient1Audio ); schedule(7000,0,checkGGSplash); }to
function loadGGSplash() { canvas.setCursor(DefaultCursor); canvas.setContent(ggSplash); alxPlay( ambient1Audio ); schedule(500,0,checkGGSplash); }Might work.
However, check your image has no transparency. ;)
Hope that helps, sorry if it does not,
- Tom.