Hi,
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!
Can we add an event to a layout object (PushButton, etc...)
Moderators: CEGUI MVP, CEGUI Team
-
- Just popping in
- Posts: 1
- Joined: Thu May 11, 2017 01:15
Re: Can we add an event to a layout object (PushButton, etc...)
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:
http://cegui.org.uk/wiki/CEGUI_In_Pract ... 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. )
Best of luck.
If that is the case, have a look at this tutorial, it should help:
http://cegui.org.uk/wiki/CEGUI_In_Pract ... 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. )
Best of luck.
Who is online
Users browsing this forum: No registered users and 28 guests