I'm working on a context menu which appears when you right-click on the screen and am having an issue when I try to re-open it after it's been used. Specifically, my context menu has (currently) 3 layers of menus (Top, Sub, then Options) as specified below.
The menu disappears correctly when I choose one of the options, but when I open it again by right-clicking, the context menu appears with all sub-menus already open. It's like it's not resetting properly.
Is this due perhaps to how I'm re-opening it? (I set it to visible and enable it) Looking at the recursive call for MenuItem::closeAllMenuItemPopups(), I see that it finds the parent and then calls hide on it, which I assume doesn't really close the submenus. Can anyone tell me what I should be looking for in order to determine why the submenus don't collapse?
Thank you for the help.
Code: Select all
<Window name="MainMenu" type="TaharezLook/PopupMenu" >
<Window name="Menu1" type="TaharezLook/MenuItem" >
<Property name="Text" value="Menu 1" />
<Window name="Menu1_Categories" type="TaharezLook/PopupMenu" >
<Window name="Menu1_Submenu1" type="TaharezLook/MenuItem" >
<Property name="Text" value="Submenu 1" />
<Window name="Menu1_Submenu1_Categories_Popup" type="TaharezLook/PopupMenu" >
<Window name="Category1" type="TaharezLook/MenuItem" >
<Property name="Text" value="Category1" />
</Window>
<Window name="Category2" type="TaharezLook/MenuItem" >
<Property name="Text" value="Category2" />
</Window>
<Window name="Category3" type="TaharezLook/MenuItem" >
<Property name="Text" value="Category3" />
</Window>
</Window>
</Window>
</Window>
</Window>
</Window>
Code: Select all
[13:01:07] Cegui: ---- Version: 0.8.4 (Build: Jul 13 2016 Static Debug Microsoft Windows MSVC++ 11.0 32 bit) ----
[13:01:07] Cegui: ---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
[13:01:07] Cegui: ---- XML Parser module is: CEGUI::RapidXMLParser - Official RapidXML based parser module for CEGUI ----
[13:01:07] Cegui: ---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
[13:01:07] Cegui: ---- Scripting module is: None ----