Game states and layouts management

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

Jefferian
Not too shy to talk
Not too shy to talk
Posts: 37
Joined: Wed May 08, 2013 21:55

Game states and layouts management

Postby Jefferian » Mon Aug 19, 2013 09:35

In my application i have several states. Some of them use CEGUI. Some of them use even more than a single layout.
I've tried multiple approaches, be it loading them when the state was entered or when it was created. All of them had some issues, probably also due of an incorrect understanding on my part (for example, loading multiple layouts on creation cancels out the one delegated to the mouse cursor (and i still don't know why); doesn't happen if i load them when entering the state, but then the application crashes when i try to destroy the windows when exiting the state).
I thought the correct way to properly deal with them was to load them (thus,create the window) everytime i enter the state, thus subscribing the related events, and deleting the window when the need to exit from the state arises. Was the assumption correct?
If so, i'll have to understand why it crashes in my case - but that can come later.

Return to “Help”

Who is online

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