CEGUI Callback

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

dehseth
Just popping in
Just popping in
Posts: 8
Joined: Thu Aug 05, 2010 11:42

CEGUI Callback

Postby dehseth » Mon Aug 09, 2010 08:54

Hi everyone,

I am using Irrlicht and I am new to CEGUI. I would like to know if there's a global callback function in CEGUI. Let's say I created a window put two textboxes and two buttons in it. I saw a register event sapmle code to call if a pushbutton is clicked:

Code: Select all

PushButton * baglan = static_cast<PushButton*>(System::getSingleton().getGUISheet()->getChild("Root/Anamenu")->getChild("Root/Anamenu/Button1"));
   baglan->subscribeEvent(PushButton::EventClicked,CEGUI::Event::Subscriber(&Engine::BaglanButton,this));


What I need is to subscribe all events. Is there a callback in CEGUI which I can register in my code and CEGUI calls back every time an event occurs regaredless of the type of object and event? If there isn't why :D

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

Re: CEGUI Callback

Postby CrazyEddie » Mon Aug 09, 2010 10:21

No, this is not available. The reason being is that I think monolithic handlers like that (i.e. MS Windows WndProc type things) are horrible, promote poor coding practices and I'll have no part of it ;) I'm aware there are fans of this approach, but for CEGUI it will never happen - sorry :D

CE.

dehseth
Just popping in
Just popping in
Posts: 8
Joined: Thu Aug 05, 2010 11:42

Re: CEGUI Callback

Postby dehseth » Mon Aug 09, 2010 10:30

Maybe this would be a good time to reconsider it. As you said some people (like me) would like to use it. It'd be nice if we have choices :)

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: CEGUI Callback

Postby Jamarr » Mon Aug 09, 2010 16:38

I would like to hear the reasoning behind wanting to use a monolithic event handler. Because I am having a hard time coming up with any worth while merits...
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!


Return to “Help”

Who is online

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