Page 1 of 1

IsVisble not reacting as expected

Posted: Sun Mar 26, 2006 21:21
by Scorch
I changed my menu implemenation to preload all of my menus then I just change the main sheet to the menu I need. (related post http://www.cegui.org.uk/phpBB2/viewtopi ... =7577#7577)


Now I am having trouble with IsVisible(). I loop through all of the CEGUI windows, attempting to collect information into a single storable structure. I want to only retrieve information on the visible objects. So I am calling IsVisible() before saving the GetText() value. The problem is that menus that arn't currently beging displayed are apearing as "visible" as well as those currently on the screen!. What can I do to tell which windows are currently on the screen? Should isVisible() be doing this?

Thanks,
Scorch

Posted: Mon Mar 27, 2006 09:22
by scriptkid
Hi,

when changing gui sheets, do you make the previous one invisible?

Posted: Mon Mar 27, 2006 16:23
by Scorch
Nope.
I'll give that a try.
Do I just need to mark the top level window invisible? or do I need to go through the whole tree and set every one?

Is the Show and Hide functions in CEGUI::Window the ones to do this? or is there another funciton I should try to call?

Posted: Mon Mar 27, 2006 20:02
by scriptkid
Hi,

visibility is inherited by children, so there is no need to traverse the entire sheet. And yes, Show and Hide call SetVisible itself, passing "true" and "false" respectively.

Good luck! :-)