As the title says, it'd be nice if boolean properties could be cast to floats (0 / 1) when used inside/with a DimOperator. Forgive me if my request happens to be invalid; the project is pretty big and I might have missed something.
This would help when creating WidgetLooks that have children that can be hidden/shown and the layout of the parent depends on their visibility.
A short example to demonstrate this:
<WidgetLook name="sketch/hscroll"> <PropertyLinkDefinition name="DecButtonVisible" initialValue="True" widget="auto_decbtn" targetProperty="Visible" redrawOnWrite="true" layoutOnWrite="true" /> ... <NamedArea name="ThumbTrackArea"> <Area> <Dim type="LeftEdge"> <WidgetDim widget="auto_decbtn" dimension="RightEdge"> <DimOperator op="Multiply"> <PropertyDim name="DecButtonVisible" /> <!-- This fails at the moment --> </DimOperator> </WidgetDim> </Dim> ...
You could say that I could just set the property to "1" instead of "True" but then the PropertyLinkDefinition to a boolean property breaks.
Additional information: This was originally reported on the forums, http://www.cegui.org.uk/phpBB2/viewtopic.php?f=3&t=5919
OS: Windows, OS build: XP, Platform: x86