Is there a simple way of getting the available Events for a specified Window?
I have for example a Radiobutton, in the API documentation is has a method named EventSelectStateChanged" and onSelectStateChanged
None works with w:subscribeEvent("EventSelectStateChanged", "setupWorldEnableCallback")
or w:subscribeEvent("onSelectStateChanged", "setupWorldEnableCallback")
and finally SelectStateChanged.
None of the above works.
I can get a slider to work, and ordinary button (with Clicked) but not this Radiobutton, it just doesnt respond...
Any hints?
Name of events
Moderators: CEGUI MVP, CEGUI Team
Taken from Formatted Numeric Data:
radiobutton->subscribeEvent(RadioButton::EventSelectStateChanged, Event::Subscriber(&DemoSample::onCurrencySelected, this));
where DemoSample is the name of a class. The function called is defined as follows:
bool DemoSample::onCurrencySelected(const CEGUI::EventArgs& e)
{
return true;
}
You are better off using the Cegui constants rather than using literal strings.
radiobutton->subscribeEvent(RadioButton::EventSelectStateChanged, Event::Subscriber(&DemoSample::onCurrencySelected, this));
where DemoSample is the name of a class. The function called is defined as follows:
bool DemoSample::onCurrencySelected(const CEGUI::EventArgs& e)
{
return true;
}
You are better off using the Cegui constants rather than using literal strings.
MM, assuming you are working in C++, which I am not. Im using CEGUI using lua.
Im sorry I didnt explicitly say that.. (could have been derived from my code examples though).
So the problem is still....a problem.
Where can I find the exported Event names, and why couldnt one throw an exception upon specifying an unexisting events?
Im sorry I didnt explicitly say that.. (could have been derived from my code examples though).
So the problem is still....a problem.
Where can I find the exported Event names, and why couldnt one throw an exception upon specifying an unexisting events?
Who is online
Users browsing this forum: Google [Bot] and 10 guests