Child window position error use different initial order

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

rockoz
Not too shy to talk
Not too shy to talk
Posts: 34
Joined: Tue Sep 22, 2009 02:26

Child window position error use different initial order

Postby rockoz » Sat Jul 31, 2010 07:57

I met this problem when I was writing a window has at least three layers.

My code is like:

Code: Select all

oRootWindow = winMgr:loadWindowLayout("TestPosWindow.layout")

oSlotWindow = winMgr:createWindow("TaharezLook/StaticImage", "TestSlotWindow")
oSlotWindow:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 5), CEGUI.UDim(0, 15)))
oSlotWindow:setWidth(CEGUI.UDim(0,32))
oSlotWindow:setHeight(CEGUI.UDim(0,32))
   
oContainerWindow = winMgr:createWindow("TaharezLook/StaticImage", "TestContainerWindow")
oContainerWindow:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 10), CEGUI.UDim(0, 10)))
oContainerWindow:setWidth(CEGUI.UDim(0,32))
oContainerWindow:setHeight(CEGUI.UDim(0,32))


Init these windows first and then set their relation in different orders:

code that get right position

Code: Select all

oRootWindow:addChildWindow(oSlotWindow)
oSlotWindow:addChildWindow(oContainerWindow)


result
Image

and code error occurs

Code: Select all

oSlotWindow:addChildWindow(oContainerWindow)
oRootWindow:addChildWindow(oSlotWindow)


result
Image


Is CEGUI windows position must be initialised in the right order or this problem can be solved? :(

Thanks~
Last edited by rockoz on Sun Aug 01, 2010 10:40, edited 1 time in total.

rockoz
Not too shy to talk
Not too shy to talk
Posts: 34
Joined: Tue Sep 22, 2009 02:26

Re: Child window position error use different initial order

Postby rockoz » Sat Jul 31, 2010 08:04

And in addition, when error occurs, sizing and moving the root window can make the container window back to its right position.
I'm not sure how make this happen, sometimes just move, and sometimes try both sizing and moving once has no effect. Anyway, that's weird :(

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

Re: Child window position error use different initial order

Postby CrazyEddie » Sat Jul 31, 2010 12:48

You forgot to post vital information.

VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV

rockoz
Not too shy to talk
Not too shy to talk
Posts: 34
Joined: Tue Sep 22, 2009 02:26

Re: Child window position error use different initial order

Postby rockoz » Sun Aug 01, 2010 10:30

CrazyEddie wrote:You forgot to post vital information.

VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV


Hello CE, is that you cant see pictures I posted?
That is the last thing I expected to happen... :(

I've changed another image hosting space. Wish it will help...

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Child window position error use different initial order

Postby Kulik » Sun Aug 01, 2010 11:54

rockoz wrote:
CrazyEddie wrote:You forgot to post vital information.

VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV


Hello CE, is that you cant see pictures I posted?
That is the last thing I expected to happen... :(

I've changed another image hosting space. Wish it will help...


You have to post what version you are using! Read CE sig and hope he haven't gone mad already :lol:

rockoz
Not too shy to talk
Not too shy to talk
Posts: 34
Joined: Tue Sep 22, 2009 02:26

Re: Child window position error use different initial order

Postby rockoz » Sun Aug 01, 2010 13:37

Kulik wrote:
rockoz wrote:
CrazyEddie wrote:You forgot to post vital information.

VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV


Hello CE, is that you cant see pictures I posted?
That is the last thing I expected to happen... :(

I've changed another image hosting space. Wish it will help...


You have to post what version you are using! Read CE sig and hope he haven't gone mad already :lol:



Thank you Kulik, the thing I worried about most is you possibly not see pictures I posted.

The version ought to be annonced that I'm using 0.7.1. Sorry guys. :oops:

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

Re: Child window position error use different initial order

Postby CrazyEddie » Sun Aug 01, 2010 18:46

:lol:

I'll have to test it on both 0.7.1 and current v0-7. I have a recollection of fixing many such issues, so it may be fixed already (but may not be, hence the testing!). I'll get back to you soon...

CE.

rockoz
Not too shy to talk
Not too shy to talk
Posts: 34
Joined: Tue Sep 22, 2009 02:26

Re: Child window position error use different initial order

Postby rockoz » Mon Aug 02, 2010 01:27

...the thing I worried about most is you possibly not see pictures I posted.


I still dont know whether you can see them.
It is hard to find a linkable image sharing site for me, so please tell me the result.

test 1
Image

test 2
Image

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

Re: Child window position error use different initial order

Postby CrazyEddie » Mon Aug 02, 2010 18:03

Yeah, I've been able to see the images all along. I should have clarified that earlier ;) I'll look into the issue itself soon (i.e. hopefully sometime in the next 7 days).

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 20 guests