using code from the wiki and other places i have a subscribed event for them as follows
Code: Select all
CEGUI::WindowManager::getSingleton().getWindow("preFold")->
subscribeEvent(CEGUI::RadioButton::EventSelectStateChanged, CEGUI::Event::Subscriber(&menuDlg::radioPreselect,this));
CEGUI::WindowManager::getSingleton().getWindow("preCheckfold")->
subscribeEvent(CEGUI::RadioButton::EventSelectStateChanged, CEGUI::Event::Subscriber(&menuDlg::radioPreselect,this));
CEGUI::WindowManager::getSingleton().getWindow("preBet")->
subscribeEvent(CEGUI::RadioButton::EventSelectStateChanged, CEGUI::Event::Subscriber(&menuDlg::radioPreselect,this));
this is the radioPreselect function
Code: Select all
bool menuDlg::radioPreselect(const CEGUI::EventArgs &args)
{
CEGUI::RadioButton * preBet = static_cast<CEGUI::RadioButton*>(CEGUI::WindowManager::getSingletonPtr()->getWindow("preBet"));
CEGUI::RadioButton * preFold = static_cast<CEGUI::RadioButton*>(CEGUI::WindowManager::getSingletonPtr()->getWindow("preFold"));
CEGUI::RadioButton * preCheckfold = static_cast<CEGUI::RadioButton*>(CEGUI::WindowManager::getSingletonPtr()->getWindow("preCheckfold"));
if (preBet->isSelected())
{
CEGUI::WindowManager::getSingleton().getWindow("preBetSlidebar")->show();
}
if (preFold->isSelected())
{
}
}
//and so on
the problem anyway is that the EventSelectStateChanged state is being called when the mouseclick down event selects the radio button and is called again when mouseclick up event is over the radio button after clicking on it
I am assuming the EventSelectStateChanged state is not correct for this window type at least to me selectstate changed means a single trigger once per change only. I hesitate to say its a bug since its such a simple component surely someone else would have noticed it by now heh
anyway does anyone know a workaround probably to check the radio button is selected and the mouse state is up at the same time
