Page 1 of 1

Another child window layout problem in 0.7.0

Posted: Thu Oct 01, 2009 21:01
by zhaosili
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.

Re: Another child window layout problem in 0.7.0

Posted: Sat Oct 03, 2009 08:28
by CrazyEddie
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.

Re: Another child window layout problem in 0.7.0

Posted: Sat Oct 03, 2009 15:48
by zhaosili
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>


Re: Another child window layout problem in 0.7.0

Posted: Sun Oct 04, 2009 09:44
by CrazyEddie
Thanks a lot. I'll test it out and make any required fixes either this afternoon or sometime tomorrow :)

CE.

Re: Another child window layout problem in 0.7.0

Posted: Sun Oct 04, 2009 10:10
by zhaosili
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>




Re: Another child window layout problem in 0.7.0

Posted: Mon Oct 05, 2009 09:13
by CrazyEddie
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.

Re: Another child window layout problem in 0.7.0

Posted: Tue Oct 06, 2009 09:29
by zhaosili
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>

Re: Another child window layout problem in 0.7.0

Posted: Sat Oct 10, 2009 10:20
by CrazyEddie
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.

Re: Another child window layout problem in 0.7.0

Posted: Sat Oct 10, 2009 10:36
by zhaosili
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?

Re: Another child window layout problem in 0.7.0

Posted: Sat Oct 10, 2009 12:38
by CrazyEddie
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.

Re: Another child window layout problem in 0.7.0

Posted: Sun Oct 11, 2009 16:49
by CrazyEddie
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.

Re: Another child window layout problem in 0.7.0

Posted: Mon Oct 12, 2009 08:01
by zhaosili
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.

Re: Another child window layout problem in 0.7.0

Posted: Mon Oct 12, 2009 09:01
by CrazyEddie
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.