How to subscribing to events using the layout approach?

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

extrakun
Just popping in
Just popping in
Posts: 8
Joined: Sun Sep 17, 2006 11:47

How to subscribing to events using the layout approach?

Postby extrakun » Tue Sep 19, 2006 11:23

Hi all,

I have been trying to follow the 'Main Menu' code snippet. I have managed to load a layout, but am having problem subscribing the widget to events. The way the code snippet is parsed kind of unclear too. Where can I find additional information?

Many thanks in advance!

Note: I manage to get the hard-coded method (calling the subscribe method of each widget) to work, and have confirmed that inputs are injected to CEGUI. I am using Ogre 1.2

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Tue Sep 19, 2006 14:27

You can look at the samples included within the SDK: cegui_mk2\Samples I recommend Demo7.

extrakun
Just popping in
Just popping in
Posts: 8
Joined: Sun Sep 17, 2006 11:47

Postby extrakun » Tue Sep 19, 2006 16:58

Rackle wrote:You can look at the samples included within the SDK: cegui_mk2\Samples I recommend Demo7.


Hi, I assume by the SDK, you mean the one downloadable from this site, not the one which comes with Ogre 1.2?

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Tue Sep 19, 2006 17:35

The one from the Cegui download will be the most recent one. The one from Ogre is v0.4, unless you download from the CVS. But regardless, Demo 7 from pretty much any source is still worth a look as it seems to be the most complete/comprehensive and it is the one that I used to turn to the most for reference information.

You can have a look at Widget Galore for a basic how-to for most widgets (excludes menu). There are no events but it covers how to specify a value and how to retrieve it, which is at the core of the functionality of widgets.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 19 guests