Checkbox marked detection problem
Posted: Mon Sep 11, 2006 09:05
have a problem with the CEGUI::Checkbox::isSelected function. It returns a bad value when running in Release mode but not in Debug mode (VS2003.NET). In Release mode this function below prints "171" everytime called. In Debug mode it prints '0' and '1' every second time. Is there something I have forgot, or what might cause the problem?
The CEGUI::Checkbox is defined in an XML file using this piece of code:
Thanks for your help!
/Klarre
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