Maybe I should modify how I go about things?
I'm casting to get the gui values after a button was clicked, e.g:
Code: Select all
unsigned int CMazeGameMenu::getChosenNumOfAIPlayers()
{
float numOfAI = dynamic_cast<irr::gui::IGUISpinBox *>(
_guiEnv->getRootGUIElement()->getElementFromId(MenuElement::MazeNumOfAI))->getValue();
return static_cast<unsigned int>(round(numOfAI));
}