Another child window layout problem in 0.7.0

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

zhaosili
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Wed Sep 23, 2009 19:05

Another child window layout problem in 0.7.0

Postby zhaosili » Thu Oct 01, 2009 21:01

Another child window layout problem in 0.7.0

The problem is similar to the one:
viewtopic.php?f=10&t=4365
except that it happens in vertical axis but not in horizontal axis.

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

Re: Another child window layout problem in 0.7.0

Postby CrazyEddie » Sat Oct 03, 2009 08:28

Hi,

Would it be possible to povide some additional information about the circumstances when the issue occurs and perhaps some info or layout so that we can try and reproduce this and make any required fixes.

Thanks a lot

CE.

zhaosili
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Wed Sep 23, 2009 19:05

Re: Another child window layout problem in 0.7.0

Postby zhaosili » Sat Oct 03, 2009 15:48

Hi,
Replace the Avatar layout in that thread, I think it will reproduce the problem.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<GUILayout >
    <Window Type="DefaultWindow" Name="Avatar" >
        <Property Name="InheritsAlpha" Value="False" />
        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
        <Property Name="UnifiedAreaRect" Value="{{1,-120},{1,-142},{1,0},{1,0}}" />
        <Property Name="ClippedByParent" Value="False" />
        <Window Type="TaharezLook/StaticImage" Name="Avatar/Backgound" >
            <Property Name="FrameEnabled" Value="False" />
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
            <Property Name="ClippedByParent" Value="False" />
            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,-20},{1,0},{1,-20}}" />
            <Property Name="BackgroundEnabled" Value="False" />
            <Window Type="TaharezLook/StaticImage" Name="Avatar/Backgound/Frame" >
                <Property Name="FrameEnabled" Value="False" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
                <Property Name="BackgroundEnabled" Value="False" />
                <Window Type="TaharezLook/StaticImage" Name="Avatar/Backgound/Frame/Char" >
                    <Property Name="FrameEnabled" Value="False" />
                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                    <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
                    <Property Name="BackgroundEnabled" Value="False" />
                </Window>
            </Window>
        </Window>
    </Window>
</GUILayout>


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

Re: Another child window layout problem in 0.7.0

Postby CrazyEddie » Sun Oct 04, 2009 09:44

Thanks a lot. I'll test it out and make any required fixes either this afternoon or sometime tomorrow :)

CE.

zhaosili
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Wed Sep 23, 2009 19:05

Re: Another child window layout problem in 0.7.0

Postby zhaosili » Sun Oct 04, 2009 10:10

Hi,

I'm so sorry that I made a mistake.
I have posted the wrong layout in the above reply.
Try this one.

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>

<GUILayout >
    <Window Type="DefaultWindow" Name="Avatar" >
        <Property Name="InheritsAlpha" Value="False" />
        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,-20},{1,0},{1,-20}}" />
        <Property Name="UnifiedWidth" Value="{0,120}" />
        <Property Name="UnifiedHeight" Value="{0,142}" />
        <Property Name="ClippedByParent" Value="False" />
        <Window Type="TaharezLook/StaticImage" Name="Avatar/Backgound" >
            <Property Name="FrameEnabled" Value="False" />
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
            <Property Name="ClippedByParent" Value="False" />
            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
            <Property Name="BackgroundEnabled" Value="False" />
            <Window Type="TaharezLook/StaticImage" Name="Avatar/Backgound/Frame" >
                <Property Name="FrameEnabled" Value="False" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
                <Property Name="BackgroundEnabled" Value="False" />
                <Window Type="TaharezLook/StaticImage" Name="Avatar/Backgound/Frame/Char" >
                    <Property Name="FrameEnabled" Value="False" />
                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                    <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
                    <Property Name="BackgroundEnabled" Value="False" />
                </Window>
            </Window>
        </Window>
    </Window>
</GUILayout>




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

Re: Another child window layout problem in 0.7.0

Postby CrazyEddie » Mon Oct 05, 2009 09:13

I tested this layout by swapping it for the one in the other thread, and the results are correct as best I can tell. Here's a screenshot:
Image

Is this correct, or have I missed something?

CE.

zhaosili
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Wed Sep 23, 2009 19:05

Re: Another child window layout problem in 0.7.0

Postby zhaosili » Tue Oct 06, 2009 09:29

Hi,

I am so busy these days.
Sorry for replying so late.

I think I found when the problem occurs.
Try loading the following three layouts, then use 'UserInfo' as the child of 'Channel/Avatar' and 'Avatar' as the child of 'UserInfo/Ava', that is, Channel<--Channel/Avatar<--UserInfo<--UserInfo/Ava<--Avatar.
The problem should occur in a chain for minus values of postions.

Code: Select all

<GUILayout >
    <Window Type="DefaultWindow" Name="Channel" >
        <Property Name="Alpha" Value="0.8" />
        <Property Name="InheritsAlpha" Value="False" />
        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
        <Property Name="FrameEnabled" Value="False" />
        <Property Name="BackgroundEnabled" Value="False" />
        <Window Type="TaharezLook/StaticImage" Name="Channel/Avatar" >
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
            <Property Name="UnifiedAreaRect" Value="{{0.678807,0},{0.646111,0},{0.973955,-0},{0.896111,0}}" />
            <Property Name="FrameEnabled" Value="False" />
            <Property Name="BackgroundEnabled" Value="False" />
        </Window>
    </Window>
</GUILayout>


Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<GUILayout >
    <Window Type="DefaultWindow" Name="UserInfo" >
        <Property Name="InheritsAlpha" Value="False" />
        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
        <Window Type="DefaultWindow" Name="UserInfo/Ava" >
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
            <Property Name="UnifiedAreaRect" Value="{{0,50},{0,50},{0.532265,50},{1,5}}" />
        </Window>
     </Window>
</GUILayout>


Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<GUILayout >
    <Window Type="DefaultWindow" Name="Avatar" >
        <Property Name="InheritsAlpha" Value="False" />
        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
        <Property Name="UnifiedAreaRect" Value="{{0,-10},{0,0},{1,-10},{1,0}}" />
        <Property Name="UnifiedWidth" Value="{0,120}" />
        <Property Name="UnifiedHeight" Value="{0,142}" />
        <Property Name="ClippedByParent" Value="False" />
        <Window Type="TaharezLook/StaticImage" Name="Avatar/Backgound" >
            <Property Name="FrameEnabled" Value="False" />
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
            <Property Name="ClippedByParent" Value="False" />
            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
            <Property Name="BackgroundEnabled" Value="False" />
            <Window Type="TaharezLook/StaticImage" Name="Avatar/Backgound/Frame" >
                <Property Name="FrameEnabled" Value="False" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
                <Property Name="BackgroundEnabled" Value="False" />
                <Window Type="TaharezLook/StaticImage" Name="Avatar/Backgound/Frame/Char" >
                    <Property Name="FrameEnabled" Value="False" />
                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                    <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
                    <Property Name="BackgroundEnabled" Value="False" />
                </Window>
            </Window>
        </Window>
    </Window>
</GUILayout>

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

Re: Another child window layout problem in 0.7.0

Postby CrazyEddie » Sat Oct 10, 2009 10:20

OK. I have tried this out, I think I got the correct results, though. Here's a screenshot of what I got, the Avatar window has some alpha enabled to show it's position to the parent beneath. I went through the layouts with the image afterwards and the results are consistent.

Image

CE.

zhaosili
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Wed Sep 23, 2009 19:05

Re: Another child window layout problem in 0.7.0

Postby zhaosili » Sat Oct 10, 2009 10:36

Hi,
It seems correct in your demo, it's so strange that I don't know what's wrong with my program, currently I just use layouts without minus values to get it work around.

BTW: I use Irrlicht for my program, may it be related to this problem?

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

Re: Another child window layout problem in 0.7.0

Postby CrazyEddie » Sat Oct 10, 2009 12:38

Hi,

I've just confirmed this: viewtopic.php?f=10&t=4384 as another layout affecting issue (I can reproduce it without needing to resize the window, so it's not solely a resize issue), so perhaps you're seeing the same thing? This should get fixed later today, I'll report in the other thread when it's done, so keep an eye out in there ;)

CE.

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

Re: Another child window layout problem in 0.7.0

Postby CrazyEddie » Sun Oct 11, 2009 16:49

Hi again,

Just for info, I have fixed a whole bunch of issues relating to content sizing and positioning - it's possible that one of these may have fixed your issue also.

With regards to the question of Irrlicht, are you correctly informing CEGUI of any size changes to the host window / display? It may be prudent to always call the notification (CEGUI::notifyDisplaySizeChanged) at startup with the initial size, just to be on the safe side.

CE.

zhaosili
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Wed Sep 23, 2009 19:05

Re: Another child window layout problem in 0.7.0

Postby zhaosili » Mon Oct 12, 2009 08:01

Hi,

Sorry for replying so late,
The resolution of my program is fixed to 800 x 600 and I don't use any thing related to size changes.
I will try the new version in the svn trunk.
Thank you, CE.

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

Re: Another child window layout problem in 0.7.0

Postby CrazyEddie » Mon Oct 12, 2009 09:01

zhaosili wrote:I will try the new version in the svn trunk.

I still recommend the v0-7 branch over trunk ;) In either case, don't forget on MSVC++ you'll need the new, updated dependency packs (viewtopic.php?f=6&t=4392).

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 4 guests