Can we add an event to a layout object (PushButton, etc...)

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

Just popping in
Just popping in
Posts: 1
Joined: Thu May 11, 2017 01:15

Can we add an event to a layout object (PushButton, etc...)

Postby Hem0rragie » Mon May 15, 2017 17:09


My team and I are making a little game with Ogre and CEGUI, and we're looking to know how to use layouts, we managed to load it and play around with schemes too, but can we select a part of the layout and add an event to it? Like, if I created a PushButton in my .layout, can I make it quit the game when I click on it, only by adding an event, or do I have to create another button? And if we have to create a Button, can we retrieve the x and y from the .layout?

Thanks for the help! :D

Just popping in
Just popping in
Posts: 7
Joined: Mon Jun 12, 2017 22:38

Re: Can we add an event to a layout object (PushButton, etc...)

Postby anave26 » Thu Jun 15, 2017 04:11

Okay, So I'm not really sure I understand your questions but I think what you are asking is how to register a GUI element to trigger an event when you interact with it (such as clicking on a push button) when the elements were created from a layout file.

If that is the case, have a look at this tutorial, it should help: ... me_Console

Now, bear in mind I found your post because I'm having an issue with events I can't seem to resolve so take that for what it's worth. I would recommend you have a look at the posting requirements though, if you follow those you are more likely to get help from some one that actually knows what they are doing (Just to be clear, I definitely don't know what I'm doing. ) :D

Best of luck.

Return to “Help”

Who is online

Users browsing this forum: No registered users and 4 guests