Page 1 of 1

MultiColumnListbox formatting questions

Posted: Wed Jul 26, 2006 16:28
by enkd
using 0.5.0rc1...

1) is there any way to right-justify text within a cell of a MultiColumnListbox? The fact that a ListboxItem is not derived from CEGUI::Window seems to limit the options.

2) does CEGUI support non-proportional (monospaced) TrueType fonts? I have tried using FreeMono.ttf and though the font is non-proportional in all Windows applications, the character spacing seems to vary in CEGUI (resulting in text which is not character aligned from one cell to another).

thanks!

Re: MultiColumnListbox formatting questions

Posted: Thu Jul 27, 2006 08:59
by CrazyEddie
enkd wrote:using 0.5.0rc1...

1) is there any way to right-justify text within a cell of a MultiColumnListbox? The fact that a ListboxItem is not derived from CEGUI::Window seems to limit the options.

Not directly, but it should be pretty simple to write a subclass of ListboxItem, say "ListboxRightJustifiedItem" which does this. Or possibly one with a configurable formatting option (literally about a screen of code, nothing major).

enkd wrote:2) does CEGUI support non-proportional (monospaced) TrueType fonts? I have tried using FreeMono.ttf and though the font is non-proportional in all Windows applications, the character spacing seems to vary in CEGUI (resulting in text which is not character aligned from one cell to another).

Seems it could be some kind of bug you have found :D We would have to have a look and see to be sure ;) In theory it is supposed to work correctly at the moment.

CE

Posted: Thu Jul 27, 2006 17:05
by enkd
Thanks for the info... yes, subclassing ListboxItem seems to be the way to go. Just wanted to make sure I wasn't missing something....

I'll keep my eye on the forums, in case anyone gets a chance to confirm the monospacing issue. Seems like it might be a freetype issue, I've seen the same behaviour in GIMP (which also uses freetype?)

thanks again!