IsVisble not reacting as expected

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Scorch
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Mon Feb 13, 2006 07:05
Location: Las Vegas, NV

IsVisble not reacting as expected

Postby Scorch » Sun Mar 26, 2006 21:21

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

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Mon Mar 27, 2006 09:22

Hi,

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

Scorch
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Mon Feb 13, 2006 07:05
Location: Las Vegas, NV

Postby Scorch » Mon Mar 27, 2006 16:23

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?

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Mon Mar 27, 2006 20:02

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! :-)


Return to “Help”

Who is online

Users browsing this forum: No registered users and 7 guests