CEGUI: 0.7.1 SVN Branch
Ogre: 1.6.4 SVN
MSVS: 9.0+
We are migrating from 0.6.x to 0.7.x. We are having an issue with DRAG CONTAINERs not properly being added to the parent window. It's hard to describe so I have created a small video to view the problem. Please ignore the window layouts as the schema has not been converted to the 0.7.x format.
What to watch for:
After I click the cargo button note what happens to the two child windows (icons). You will notice that the first icon (drag container) appears at the top left-hand corner of the root GUI sheet however the second icon (drag container) correctly appears contained in the parent. Then watch what happens when I move the parent window (a CEGUI::FrameWindow).
Click to view video (335kb WMV)
Here is what is happening:
1) User clicks CARGO button.
2) Client requests the list of cargo items from the server farm.
3) Server sends back the list.
4) Client parses server messages in a loop:
4a) Reads data from message
4b) Creates an object from our class for each item. A DRAG CONTAINER which has a DefaultWindow to contain the static image.
4c) The DRAG CONTAINER is added to the parent window (which is a CEGUI::ScrollablePane).
4d) The CEGUI::Window::EventChildAdded is fired. The function "arranges" the icons and finally performs a CEGUI::FrameWindow::invalidate( true )
Note that this worked fine under 0.6.x.
[BUG] adding Drag Containers to Windows
Moderators: CEGUI MVP, CEGUI Team
Re: [BUG] adding Drag Containers to Windows
The library does not seem to properly honor the CEGUI::Window::invalidate() request. The reason being is that the orphaned window will not "visibly" appear in the frame window unless the frame window is MOVED. Resizing the frame window or adding/removing children has no effect. Only when the frame window is "moved" will the orphaned child visibly appear inside the frame window. This is a visual problem, not a logic problem. As I step through our code, the orphaned window is attached to the parent. This is visually evident because the icons in the frame window are arranged as if it were present.
Re: [BUG] adding Drag Containers to Windows
I experience that bug as well in my item system. When attaching a CEGUI::DragContainer class to any other CEGUI::Window object via CEGUI::Window::addChildWindow, the children of the DragContainer are somehow wrongly positioned (after several tries about this problem I think it always visually aligns them relative to the PARENT window of the CEGUI::Window object, instead of the CEGUI::Window object itself, which, in your case appears to be the root window. Look at it a bit closer, it has the same offset to [0/0], the left top corner of root as it has in the actual parent window once it has been moved. In my case, I attached the DragContainer to a StaticImage (kind of an item container) and it was positioned relative to the Inventory window (the StaticImage's parent)). I managed to fix this problem by manually attaching all of the DragContainer's child windows in the correct order again AFTER attaching the DragContainer to its new parent. This seems to forcedly invalidate and reposition the single elements correctly (as calling invalidate() manually, be it recursive or not, doesn't resolve this issue), but I doubt this nasty hack is intentioned As mentioned before, all hints linked together seem to be pointing at a bug in the invalidate() function, which I will look into later
Greetings,
-BigG
Greetings,
-BigG
Re: [BUG] adding Drag Containers to Windows
I have a No Hacking policy. If it doesn't work then it needs to be fixed. Hacking just delays the inevitable.
This is a serious bug and should to be addressed by a CEGUI project developer ASAP.
This is a serious bug and should to be addressed by a CEGUI project developer ASAP.
Re: [BUG] adding Drag Containers to Windows
Would a moderator please move this thread to the BUG REPORTING forum. It will get lost in this forum.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: [BUG] adding Drag Containers to Windows
I didn't look at the video yet, since I can't view it on this machine at the moment. But just wanted to say that I'll look into this and decide if it's an issue or something else...
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: [BUG] adding Drag Containers to Windows
This issue should now be fixed in the stable branch.
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Bug Reports, Suggestions, Feature Requests”
Who is online
Users browsing this forum: No registered users and 3 guests