Auto-cast boolean properties when used in DimOperators

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

pav
Not too shy to talk
Not too shy to talk
Posts: 37
Joined: Thu Dec 01, 2011 14:17

Auto-cast boolean properties when used in DimOperators

Postby pav » Mon Dec 12, 2011 10:17

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:

Code: Select all

<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.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Auto-cast boolean properties when used in DimOperators

Postby CrazyEddie » Tue Dec 13, 2011 11:24

I can appreciate the issue(s) this presents. Though I can give no estimates as to when any additions are likely to make it into the lib, please add the request to the mantis tracker here: http://www.cegui.org.uk/mantis/

Thanks :)

CE.

pav
Not too shy to talk
Not too shy to talk
Posts: 37
Joined: Thu Dec 01, 2011 14:17

Re: Auto-cast boolean properties when used in DimOperators

Postby pav » Tue Dec 13, 2011 12:47

CrazyEddie wrote:please add the request to the mantis tracker


Done, thank you.


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: Google [Bot] and 1 guest