Z-order of windows

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

LearnerPlates
Just popping in
Just popping in
Posts: 20
Joined: Mon Jun 08, 2009 06:05

Z-order of windows

Postby LearnerPlates » Tue Sep 08, 2009 15:10

Hopefully this is a very simple question, though I can't find the answer yet -

How do I stop my windows moving into the foreground / uppermost layer when I click on them? I assume this happens because that window is then in focus. Do I have to set them to disabled to prevent this?

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Z-order of windows

Postby Jamarr » Tue Sep 08, 2009 16:46

Disabling those windows will prevent them from receiving the focus, but for whatever reason does not prevent the currently active window from losing focus (at least in 0.6.2). If this is not sufficient, then the next obvious solution would be to simply not inject the event - after all, you control what input CEGUI receives. You could use Window::isHit() or System::getWindowContainingMouse() to determine what window, if any, the mouse is over. There are probably other means as well. If you explained why you are doing this, giving an exact solution would be easier.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

LearnerPlates
Just popping in
Just popping in
Posts: 20
Joined: Mon Jun 08, 2009 06:05

Re: Z-order of windows

Postby LearnerPlates » Wed Sep 09, 2009 03:50

Hi Jamarr

Thanks - disabling them worked fine for what I needed. :) The problem was because I had a button on top of a StaticImage, so if you accidentally clicked on the image, it would move to the top layer and obscure the button!

Is there any way to disable windows through the .layout file, or is it necessary to do it through code?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Z-order of windows

Postby CrazyEddie » Wed Sep 09, 2009 08:40

Hi,

You can set the disabled state in a layout by way of the "Disabled" property. So:

Code: Select all

<Property Name="Disabled" Value="True" />


Note also, if you need the thing enabled, you can also try disabling the "RiseOnClick" setting, though note that this was broken in versions prior to 0.6.2 (I think).

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 14 guests