wesnoth-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-dev] Font: Use wrapping or ellipsis?


From: Bram Ridder
Subject: [Wesnoth-dev] Font: Use wrapping or ellipsis?
Date: Wed, 06 Jul 2005 00:46:40 +0200
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Greatings co-developers,

I'm currently working on the editor and I'm trying to fix bug #11965 <http://savannah.nongnu.org/bugs/index.php?func=detailitem&item_id=11965> and #11967 <http://savannah.nongnu.org/bugs/index.php?func=detailitem&item_id=11965>, which state the terrain string isn't displayed as a whole in the right buttom part of the editor screen. A part of this issue comes from the fact that there is to little space to draw the terrain strings in that space, that's solveable. But an other part of the problem is that the font class cuts a string of and uses a ellipisis as default for reports. So even if I extend the space to draw the tile strings, so a tile string can be displayed on 2 - 3 lines it still doesn't work and the string is simply cut of and ends with "...".

I've created a temporaty fix in the font class that wraps the word before applying the ellipsis, but this is only a hack to show that it works. My suggestion is to include two tags to be put in the /data/theme/editor.cgf file to enable / disable word wrapping. So the selected_terrain would look like this to enable word wrapping with a maximum of 3 lines per string:

[selected_terrain]
font_size=12
enable_wrap=true
wrap_lines=3
rect=900,710,1024,40
xanchor=right
yanchor=bottom
[/selected_terrain]

This way we're able to enable word wrapping for some parts of the editor / game and leave the rest as it was (default value for enable_wrap is false).

Any thought on this subject would be nice. If I've overlooked something please let me know, thanks in advance!

- Bram




reply via email to

[Prev in Thread] Current Thread [Next in Thread]