To subcribe a mouse event
Posted: Wed Nov 26, 2008 18:57
Hi!!
I'm trying to subscribe a mouse event on a quit button. For do that, tutorial says that I have to create a button, and subscribe it whith the next function:
Well, to handle the event, I write the close() function out of a cegui class, in order to pass to subscriber function, as a pointer (&function()). And I received this error:
I don't understand what is CEGUI::EventArgs&, somebody can help me?
Thanks very much
I'm trying to subscribe a mouse event on a quit button. For do that, tutorial says that I have to create a button, and subscribe it whith the next function:
Code: Select all
quit->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(close(??), this));
Well, to handle the event, I write the close() function out of a cegui class, in order to pass to subscriber function, as a pointer (&function()). And I received this error:
Code: Select all
cegui.cpp:54: error: no matching function for call to ‘close()’
/usr/include/unistd.h:320: note: candidates are: int close(int)
cegui.cpp:23: note: bool close(const CEGUI::EventArgs&)
make: *** [cegui.o] Error 1
I don't understand what is CEGUI::EventArgs&, somebody can help me?
Thanks very much