[SOLVED] Window hangs around after deletion

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

User avatar
mmixLinus
Quite a regular
Quite a regular
Posts: 71
Joined: Fri May 20, 2011 08:46
Location: Lund, Sweden
Contact:

[SOLVED] Window hangs around after deletion

Postby mmixLinus » Mon Jan 11, 2016 13:18

Hi!

After destroying the child (a Listbox called "WebPopupMenu") of an RTT GUIContext root window, it is still visible. I want it gone! :wink:

Code: Select all

   CEGUI::Window   *root = CApplication::getSingleton().getGUIContext(m_sOverlayName)->getRootWindow();
      CEGUI::Listbox *lb = static_cast<CEGUI::Listbox *>(root->getChild(POPUPMENU_NAME));
      root->destroyChild(lb);
//      root->destroyChild(POPUPMENU_NAME);
The Listbox IS deleted from the CEGUI window tree (I know, because I can create it again (same name)). Even doing an "lb->setVisible(false)" has no effect.

Any ideas what's wrong? Seems like the root window isn't updated after the destroyChild(). I can see that my other buttons are updated because they highlight properly when I hover over them. I tried root->invalidate(true) after destroyChild() but no change.. Maybe the Listbox area isn't cleared because the root window is transparent?

Code: Select all

11/01/2016 13:58:50 (Std)    ********************************************************************************
11/01/2016 13:58:50 (Std)    * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM       -------- *
11/01/2016 13:58:50 (Std)    ********************************************************************************
11/01/2016 13:58:50 (Std)    ---- Version: 0.8.4 (Build: Nov 13 2015 Debug Microsoft Windows MSVC++ 12.0 (2013) 32 bit) ----
11/01/2016 13:58:50 (Std)    ---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
11/01/2016 13:58:50 (Std)    ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
11/01/2016 13:58:50 (Std)    ---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
11/01/2016 13:58:50 (Std)    ---- Scripting module is: None ----
11/01/2016 13:58:50 (Std)    ********************************************************************************
11/01/2016 13:58:50 (Std)    * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM         -------- *
11/01/2016 13:58:50 (Std)    ********************************************************************************

Start of layout of GUI Context root window:

Code: Select all

<GUILayout version="4">
  <Window type="DefaultWindow" name="Overlay_WebPage">
    <Property name="InheritsAlpha"                value="False" />
    <Property name="Alpha"                      value="1.0" />
    <Property name="Visible"                      value="True" />
    <Property name="Position"            value="{{0.0,0},{0.0,0}}" />
    <Property name="Size"                value="{{1.0,0},{1.0,0}}" />
    <Property name="MaxSize"             value="{{1.0,0},{1.0,0}}" />
    <Property name="AlwaysOnTop"                value="False" />
    <Property name="MousePassThroughEnabled"    value="True" />
     <Event    name="Clicked"                    function="handlerOverlayClicked" />

The Listbox is destroyed:

Code: Select all

11/01/2016 13:59:33 (Info)    Window at 'Overlay_WebPage/WebPopupMenu' will be added to dead pool. (002EDCE0)
11/01/2016 13:59:33 (Info)    Window at 'Overlay_WebPage/WebPopupMenu/__auto_hscrollbar__' will be added to dead pool. (002ECF64)
11/01/2016 13:59:33 (Info)    Window at 'Overlay_WebPage/WebPopupMenu/__auto_hscrollbar__/__auto_incbtn__' will be added to dead pool. (002EC1E8)
11/01/2016 13:59:33 (Info)    Window at 'Overlay_WebPage/WebPopupMenu/__auto_hscrollbar__/__auto_decbtn__' will be added to dead pool. (002EC1E8)
11/01/2016 13:59:33 (Info)    Window at 'Overlay_WebPage/WebPopupMenu/__auto_hscrollbar__/__auto_thumb__' will be added to dead pool. (002EC1E8)
11/01/2016 13:59:33 (Info)    Window at 'Overlay_WebPage/WebPopupMenu/__auto_vscrollbar__' will be added to dead pool. (002ECF64)
11/01/2016 13:59:33 (Info)    Window at 'Overlay_WebPage/WebPopupMenu/__auto_vscrollbar__/__auto_incbtn__' will be added to dead pool. (002EC1E8)
11/01/2016 13:59:33 (Info)    Window at 'Overlay_WebPage/WebPopupMenu/__auto_vscrollbar__/__auto_decbtn__' will be added to dead pool. (002EC1E8)
11/01/2016 13:59:33 (Info)    Window at 'Overlay_WebPage/WebPopupMenu/__auto_vscrollbar__/__auto_thumb__' will be added to dead pool. (002EC1E8)

Help much appreciated!
/mmixLinus
Last edited by mmixLinus on Mon Jan 11, 2016 21:59, edited 1 time in total.
MMiX.Me 3D Music Player
Galaxy Navigator 3D - 2 million stars (ESA's Gaia satellite)
(YouTube|Facebook)

User avatar
Ident
CEGUI Team
Posts: 1995
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Window hangs around after deletion

Postby Ident » Mon Jan 11, 2016 21:05

Why do you only post the start of the layout?
CrazyEddie: "I don't like GUIs"

User avatar
mmixLinus
Quite a regular
Quite a regular
Posts: 71
Joined: Fri May 20, 2011 08:46
Location: Lund, Sweden
Contact:

Re: Window hangs around after deletion

Postby mmixLinus » Mon Jan 11, 2016 21:59

Ident, sorry, I thought my problem was due to some crucial root window setting. However I SOLVED it a minute ago, hehe. I was missing this, silly me:

Code: Select all

         static_cast<CEGUI::TextureTarget&>(guic->getRenderTarget()).clear();
AND it solved THIS! My old RTT Alpha weirdness from almost two years ago! Admittedly, I haven't been working on this code for almost that long :lol: But my smooth alpha shadows look just great!
MMiX.Me 3D Music Player
Galaxy Navigator 3D - 2 million stars (ESA's Gaia satellite)
(YouTube|Facebook)

User avatar
Ident
CEGUI Team
Posts: 1995
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [SOLVED] Window hangs around after deletion

Postby Ident » Mon Jan 11, 2016 22:55

See also: http://cegui.org.uk/wiki/Rendering_to_t ... 9_in_CEGUI

, which I wrote a while ago and where the proper way to use RTTs is described :pint:
CrazyEddie: "I don't like GUIs"

User avatar
mmixLinus
Quite a regular
Quite a regular
Posts: 71
Joined: Fri May 20, 2011 08:46
Location: Lund, Sweden
Contact:

Re: [SOLVED] Window hangs around after deletion

Postby mmixLinus » Tue Jan 12, 2016 23:21

Yes, I know, I know!! :D I am using that page! (Obviously with bits missing :D) :hammer:
MMiX.Me 3D Music Player
Galaxy Navigator 3D - 2 million stars (ESA's Gaia satellite)
(YouTube|Facebook)


Return to “Help”

Who is online

Users browsing this forum: Bing [Bot] and 17 guests