Code: Select all
bool GUISystem::handleCheckbox(const CEGUI::EventArgs &e)
{
CEGUI::Checkbox* checkBox = CEGUI::Checkbox*)mWindowManager->getWindow("hiddencheckbox");
std::cout << checkBox->isSelected() << std::endl; // Prints "171" to the console
}
The CEGUI::Checkbox is defined in an XML file using this piece of code:
Code: Select all
<Window Type="TaharezLook/Checkbox" name="checkbox">
<Property Name="RelativeMaxSize" Value="w:1.0 h:1.0" />
<Property Name="Position" Value="x:0.05 y:0.87" />
<Property Name="Size" Value="w:0.45 h:0.075" />
<Property Name="Text" Value="Hide" />
<Property Name="Selected" Value="false" />
</Window>
Thanks for your help!
/Klarre