show / hide ?

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
kristian
Just popping in
Just popping in
Posts: 12
Joined: Wed Apr 13, 2005 17:25

show / hide ?

Postby kristian » Tue Apr 19, 2005 21:04

Hello,
why doesnt show on a window affect the children which is set to shown ? Shouldnt this be the task of the window manager ?

- Kristian

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

Re: show / hide ?

Postby spannerman » Tue Apr 19, 2005 21:45

Hi kristian,

In my CEGUI apps, if I set a windows visibility to false, then all the contained windows / widgets are also hidden, and they are shown when the parent windows visibility is set to true.
So Im not sure I understand your problem, please be a bit more descriptive. Maybe post an example?

User avatar
kristian
Just popping in
Just popping in
Posts: 12
Joined: Wed Apr 13, 2005 17:25

Re: show / hide ?

Postby kristian » Fri Apr 22, 2005 14:16

For example: I have a layout with 2 windows one is a menu and the other is a error window.

As per default the error window should of course not be shown so i set the visible property to false in the layout. Unfortunally when i want to show the error window i need to call show for each of the children like the text widget showing the error message. If i only call show for the error window the children is not shown automaticly.
The children has their visible prop. set to true in the layout.

Regards
Kristian

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

Re: show / hide ?

Postby spannerman » Sun Apr 24, 2005 00:08

Hmmm, ok try NOT setting the visibility of the children (to either true or false). By default, when you add a widget it is visible, but perhaps because you are force setting them as visible they may no longer get toggled according to the parent window.

So, just change the visibility of the parent window (e.g. your error window) and the children should appear/ disappear along with that.

If it still doesnt work, post a section of your code here where you are creating these windows and I'll take a look.

User avatar
gcarlton
Just can't stay away
Just can't stay away
Posts: 149
Joined: Wed Jan 12, 2005 12:06

Re: show / hide ?

Postby gcarlton » Sun Apr 24, 2005 04:10

I'd guess what is happening is that when you specify the visibility in the layout, the child windows adopt their parent's default upon creation. So instead, leave everything visible in the layout, and then in code just toggle the root window to whatever you need.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 11 guests