unsubscribing for events

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
thumperj
Not too shy to talk
Not too shy to talk
Posts: 30
Joined: Wed Jan 12, 2005 12:06
Location: Austin, TX
Contact:

unsubscribing for events

Postby thumperj » Wed Feb 23, 2005 15:52

What is the proper way to unsubscribe for an event after I have subscribed?

I'd like to disconnect the mechanism given a certain circumstance but I can't find a clean way to do that.

Thanks,
Chris

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: unsubscribing for events

Postby CrazyEddie » Thu Feb 24, 2005 09:32

When you subscribe to an event you get returned an Event::Connection object. This can be used to unsubscribe from the event. There is also Event::ScopedConnection which will auto-unsubscribe when it goes out of scope.

HTH

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 6 guests