Page 1 of 1

a auto fade window like tooltip[resolved]

Posted: Thu Nov 09, 2006 04:35
by silenttree
i notice that tooltip can auto fadein and fadeout.

for some reason, i need a window like this.

so i inherit a class from CEGUI::Window, and override updateSelf() method like Tooptip. and mark multi-window-state such as Active/FadeOut

then i create a window with it, like below

Code: Select all

MyOwnWindow* WindowPtr = static_cast<MyOwnWindow*>(m_WindowMgr->createWindow(WindowType, WindowName))


like System::setDefaultTooltip does below

Code: Select all

d_defaultTooltip = static_cast<Tooltip*>(WindowManager::getSingleton().createWindow(tooltipType, "CEGUI::System::default__auto_tooltip__"));


but, nothing happen!

the system does not invoke my updateSelf implement.
:oops:

is there something goes wrong?

Posted: Thu Nov 09, 2006 09:54
by CrazyEddie
Hi,

Obvious question, but do you add your window to the 'active' hierarchy? The method is only called if the system can reach it at some level from the active root sheet (else it would not display anyway ;) ).

If you're doing that, the only other thing I could think of was that if you added that override some time after the initial version of your code, it could be some strange 'minimal rebuild' issue. I've seen such strangeness before with adding overrides - did you try a clean / full rebuild?

If it's not either of those, is there any other information you could offer?

CE.

Posted: Thu Nov 09, 2006 14:26
by silenttree
at the first. say sorry to EC for my bad expression.

my origin goal is: make a window auto fade by given time.

i notice that "tooltip" can do this well.

so i read it in cegui - solution, and make a new copy for my own.

but its "doesnt work"(window show directly, but didnt invoke MyOwnWindowClass::updateSelf() method that i override from CEGUI::Window), so i cant make a window auto fade-out like tooltip. :?

and i dont know why. :roll:

Posted: Mon Nov 13, 2006 09:42
by CrazyEddie
Just to confirm... the window is appearing, but no fading is occurring? You've traced it somewhat and the updateSelf member of your new class is not being called?

Could you post some relevant code (i.e. a minimal amount that demonstrates the issue).

Cheers,

CE.

Posted: Tue Nov 14, 2006 19:53
by silenttree
problem is resolved by adding a timer.:lol:

thank you CE!:wink:

Posted: Thu Nov 16, 2006 09:13
by CrazyEddie
hehe, cool :D