I want the text/numbers of my spinner to be horizontally centered. Since the corresponding area is an EditBox I thought setting its TextFormatting property to HorzCentred would do the job but it doesn't. Is there any other way to align the text (xml based solutions preferred)?
Entry in looknfeel:
Code: Select all
<WidgetLook name="Widgets/Spinner">
<Child type="Widgets/EditBox" nameSuffix="__auto_editbox__">
<Area>
<!-- commented out for simplicity -->
</Area>
</Child>
<Child type="Widgets/TemplateButton" nameSuffix="__auto_incbtn__">
<Area>
<!-- commented out for simplicity -->
</Area>
<HorzAlignment type="RightAligned" />
<Property name="NormalImage" value="set:Widgets image:IncreaseButtonNormal" />
<Property name="HoverImage" value="set:Widgets image:IncreaseButtonNormal" />
<Property name="PushedImage" value="set:Widgets image:IncreaseButtonPushed" />
<Property name="DisabledImage" value="set:Widgets image:IncreaseButtonDisabled" />
</Child>
<Child type="Widgets/TemplateButton" nameSuffix="__auto_decbtn__">
<Area>
<!-- commented out for simplicity -->
</Area>
<HorzAlignment type="RightAligned" />
<Property name="NormalImage" value="set:Widgets image:DecreaseButtonNormal" />
<Property name="HoverImage" value="set:Widgets image:DecreaseButtonNormal" />
<Property name="PushedImage" value="set:Widgets image:DecreaseButtonPushed" />
<Property name="DisabledImage" value="set:Widgets image:DecreaseButtonDisabled" />
</Child>
<StateImagery name="Enabled" />
<StateImagery name="Disabled" />
</WidgetLook>
Entry in scheme file:
Code: Select all
<FalagardMapping WindowType="Widgets/Spinner" TargetType="CEGUI/Spinner" Renderer="Falagard/Default" LookNFeel="Widgets/Spinner" />
Entry in layout file:
Code: Select all
<Window Type="Widgets/Spinner" Name="Spinner" >
<Property Name="UnifiedPosition" Value="{{0,8},{0,150}}" />
<Property Name="UnifiedSize" Value="{{0,155},{0,50}}" />
<AutoWindow NamePath="__auto_editbox__" >
<Property Name="TextFormatting" Value="HorzCentred" /> <!-- THIS DOESN'T WORK! This will throw an UnknownObjectException -->
</AutoWindow>
</Window>
EDIT: I am using CEGUI 0.7.7 (from source)
Greetings
BrightBit