mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-14 23:43:32 +00:00
ignore color markup in map labels...
...(fixes bug #13678: label color can be faked with WML markup)
This commit is contained in:
parent
022a5ef56c
commit
8cf542c170
@ -677,13 +677,12 @@ static surface render_text(const std::string& text, int fontsize, const SDL_Colo
|
|||||||
|
|
||||||
for(std::vector< std::string >::const_iterator ln = lines.begin(), ln_end = lines.end(); ln != ln_end; ++ln) {
|
for(std::vector< std::string >::const_iterator ln = lines.begin(), ln_end = lines.end(); ln != ln_end; ++ln) {
|
||||||
|
|
||||||
SDL_Color col = colour;
|
|
||||||
int sz = fontsize;
|
int sz = fontsize;
|
||||||
int text_style = style;
|
int text_style = style;
|
||||||
|
|
||||||
std::string::const_iterator after_markup = use_markup ?
|
std::string::const_iterator after_markup = use_markup ?
|
||||||
parse_markup(ln->begin(),ln->end(),&sz,&col,&text_style) : ln->begin();
|
parse_markup(ln->begin(), ln->end(), &sz, NULL, &text_style) : ln->begin();
|
||||||
text_surface txt_surf(sz, col, text_style);
|
text_surface txt_surf(sz, colour, text_style);
|
||||||
|
|
||||||
if (after_markup == ln->end() && ln+1 != ln_end) {
|
if (after_markup == ln->end() && ln+1 != ln_end) {
|
||||||
// we replace empty line by a space (to have a line height)
|
// we replace empty line by a space (to have a line height)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user