RadioButton / CheckBox size
Posted: Sun Dec 26, 2010 15:59
I wonder if there's a way to change the actual size of a checkbox/radio button. Using setHeight and setWidth isn't changing the size of the checkbox itself.
The official forum for CEGUI
http://cegui.org.uk/forum/
<WidgetLook name="Vanilla/RadioButton">
<PropertyDefinition name="NormalTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
<PropertyDefinition name="HoverTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
<PropertyDefinition name="PushedTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
<PropertyDefinition name="DisabledTextColour" initialValue="FF7F7F7F" redrawOnWrite="true" />
<ImagerySection name="label">
<TextComponent>
<Area>
<Dim type="LeftEdge" >
<ImageDim imageset="Vanilla-Images" image="RadioButtonNormal" dimension="Width">
<DimOperator op="Add">
<AbsoluteDim value="3" />
</DimOperator>
</ImageDim>
</Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="RightEdge" ><UnifiedDim scale="0" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<VertFormat type="CentreAligned" />
<HorzFormat type="LeftAligned" />
</TextComponent>
</ImagerySection>
<ImagerySection name="normal">
<ImageryComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" >
<ImageDim imageset="Vanilla-Images" image="RadioButtonNormal" dimension="Width" >
<DimOperator op="Multiply">
<AbsoluteDim value="0.7" />
</DimOperator>
</ImageDim>
</Dim>
<Dim type="Height" >
<ImageDim imageset="Vanilla-Images" image="RadioButtonNormal" dimension="Height" >
<DimOperator op="Multiply">
<AbsoluteDim value="0.7" />
</DimOperator>
</ImageDim>
</Dim>
</Area>
<Image imageset="Vanilla-Images" image="RadioButtonNormal" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
</ImagerySection>
<ImagerySection name="hover">
<ImageryComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<Image imageset="Vanilla-Images" image="RadioButtonHover" />
<VertFormat type="CentreAligned" />
<HorzFormat type="LeftAligned" />
</ImageryComponent>
</ImagerySection>
<ImagerySection name="select_mark">
<ImageryComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<Image imageset="Vanilla-Images" image="RadioButtonMark" />
<VertFormat type="CentreAligned" />
<HorzFormat type="LeftAligned" />
</ImageryComponent>
</ImagerySection>
<StateImagery name="Normal">
<Layer>
<Section section="normal" />
<Section section="label">
<ColourProperty name="NormalTextColour" />
</Section>
</Layer>
</StateImagery>
<StateImagery name="Hover">
<Layer>
<Section section="hover" />
<Section section="label">
<ColourProperty name="HoverTextColour" />
</Section>
</Layer>
</StateImagery>
<StateImagery name="Disabled">
<Layer>
<Section section="normal">
<Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
</Section>
<Section section="label">
<ColourProperty name="DisabledTextColour" />
</Section>
</Layer>
</StateImagery>
<StateImagery name="SelectedNormal">
<Layer>
<Section section="normal" />
<Section section="select_mark" />
<Section section="label">
<ColourProperty name="NormalTextColour" />
</Section>
</Layer>
</StateImagery>
<StateImagery name="SelectedHover">
<Layer>
<Section section="hover" />
<Section section="select_mark" />
<Section section="label">
<ColourProperty name="HoverTextColour" />
</Section>
</Layer>
</StateImagery>
<StateImagery name="SelectedDisabled">
<Layer>
<Section section="normal">
<Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
</Section>
<Section section="select_mark">
<Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
</Section>
<Section section="label">
<ColourProperty name="DisabledTextColour" />
</Section>
</Layer>
</StateImagery>
</WidgetLook>