Editbox had the RightAligned ?

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

User avatar
ttom
Just popping in
Just popping in
Posts: 16
Joined: Wed Jan 12, 2005 12:06

Editbox had the RightAligned ?

Postby ttom » Thu Nov 06, 2008 01:56

Dear All:
The Editbox only had the LeftAligned. Can let it have the RightAligned ?
How to do it?
ttom

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

Postby CrazyEddie » Thu Nov 06, 2008 20:09

Hi,

I wasn't sure about this, but checking the code it seems that the LeftAligned text formatting is hard coded (in the editbox window renderer, not the editbox widget itself).

To achieve right aligned text you'd need to write a replacement window renderer for the editbox.

I think this should be made configurable in the future ;)

CE.

User avatar
ttom
Just popping in
Just popping in
Posts: 16
Joined: Wed Jan 12, 2005 12:06

Postby ttom » Fri Nov 07, 2008 01:28

Thanks to the CrazyEddie to replay me. So I just modify the FalEditbox.cpp to achieve the function. If this right, when i finish I post the code let the C.E. to check it.
ttom

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

Postby CrazyEddie » Fri Nov 07, 2008 09:50

ttom wrote:So I just modify the FalEditbox.cpp to achieve the function.

Yes, this would be the place to make the modification. You'll have to decide between a hard coded change and a 'configurable alignment' that perhaps uses a property.

I'll be happy to have a look over the mods you make.

CE.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 14 guests