This is killing me for some time and I'm either unaware of the correct spelling or such a feature doesn't exist. I'm using CEGUI 0.6.2 and I'm trying to make a definition for a widget that by default is center aligned and has horizontal alignment property, making it either left or right aligned on occasion.
I define a property like this
<PropertyDefinition name="HorzFormatting" initialValue="CenterAligned" redrawOnWrite="true" />
and setting up like this in a text component doesn't work :
<HorzFormatProperty name="HorzFormatting" />
But I then looked at other definitions and saw that there's multiple cases of
<HorzAlignment type="RightAligned" />
so I'm wondering, why isn't there a HorzAlignmentProperty because I'm assuming this is what I need to use to set the alignment ?
HorzAlignmentProperty
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: HorzAlignmentProperty
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: HorzAlignmentProperty
Yeah like that one, although if you were suggesting setting it from code, I was sorta thinking to use it from the layout file. Or are you saying to just rename the value of the property from CenterAligned to Centre ? (saw the difference in spelling in the link you gave me)
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: HorzAlignmentProperty
You can use it in layouts (or code) like with all other properties, so within a layout:
CE
Code: Select all
...
<Property Name="HorizontalAlignment" Value="Centre" />
...
CE
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: HorzAlignmentProperty
Hm, ok this is kinda weird. I'm trying to set the alignment of a piece of text from a tab button to avoid duplicate definitions for just a single property changed. When I used what you gave me it aligned the tab in the center of it's parent window. How do I set the property for the text inside it ?
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: HorzAlignmentProperty
You didn't mention text in the original post, and it appeared you were referring to window alignment - which is why you got the information you did.
With this new information, the rest of your OP makes a bit more sense now. Looking back at that briefly, it should have worked ok except that the initial value you specified in the PropertyDefinition is spelt incorrectly. The correct spelling is "CentreAligned".
CE.
With this new information, the rest of your OP makes a bit more sense now. Looking back at that briefly, it should have worked ok except that the initial value you specified in the PropertyDefinition is spelt incorrectly. The correct spelling is "CentreAligned".
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: HorzAlignmentProperty
wtb aliases for property-values so us American-English spellers can stop fumbling over this issue ![Crying or Very sad :cry:](./images/smilies/icon_cry.gif)
![Crying or Very sad :cry:](./images/smilies/icon_cry.gif)
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: HorzAlignmentProperty
While I'm not completely opposed to such a thing for the built in property enumeration strings, I would not, however, be happy to extend that to all property names, xml tag names and such, because doing that puts us on something of a slippery slope (next request becomes event names, then API names and so on...). Because of this situation, we would end up with a lot of inconsistency where American English works in some places and not others - at least right now it generally does not work anywhere, so while not ideal for everyone, it is consistent ![Wink ;)](./images/smilies/icon_wink.gif)
CE.
![Wink ;)](./images/smilies/icon_wink.gif)
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Offtopic Discussion”
Who is online
Users browsing this forum: No registered users and 7 guests