Same event to all Button element. [solved]
Posted: Thu Mar 05, 2009 18:27
Hello.
How can I set the same event-function for all Button? I want to play a sound when whatever button is pushed.
Thanks.
for each Button
{
button->subscribeEvent(PushButton::EventMouseClick, Event::Subscriber(&MyClass::playSound, this));
}
How can I set the same event-function for all Button? I want to play a sound when whatever button is pushed.
Thanks.
for each Button
{
button->subscribeEvent(PushButton::EventMouseClick, Event::Subscriber(&MyClass::playSound, this));
}