mrmclovin
31-12-2008 01:56:47
Im tryin to set diffrent widgets events to the same gui listener. For instance, a Button and one of the List event requires an extra param.
Register callbacks:
But I get a bunch of errors.
Is it possible in MyGUI/C++ ?
if not, any tips on what I can do to keep all events linked to one function?
void onGuiEvent(MyGUI::WidgetPtr); // for buttons and other widgets
void onGuiEvent(MyGUI::WidgetPtr, size_t index); // for a special list event
Register callbacks:
mDelButton->eventMouseButtonClick = MyGUI::newDelegate(this, &LevelEditor::onGuiEvent(MyGUI::WidgetPtr));
mList->eventListSelectAccept = MyGUI::newDelegate(this, &LevelEditor::onGuiEvent(MyGUI::WidgetPtr, size_t));
But I get a bunch of errors.
Is it possible in MyGUI/C++ ?
if not, any tips on what I can do to keep all events linked to one function?