From 4e0e128b16f048caabc8dccdaa3ad3bc39838ca7 Mon Sep 17 00:00:00 2001 From: aurhat Date: Fri, 17 Apr 2015 17:11:34 +0200 Subject: [PATCH] Fix and improve displaying map message in menu --- source/src/menus.cpp | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/source/src/menus.cpp b/source/src/menus.cpp index db37130b..28d233cf 100644 --- a/source/src/menus.cpp +++ b/source/src/menus.cpp @@ -451,26 +451,10 @@ struct mitemmaploadmanual : mitemmanual glEnd(); xtraverts += 4; glEnable(GL_BLEND); - if(maptitle[0]) // 2011feb09:ft: TODO - this would be better as bottom line in the menu, just need to ensure it doesn't make the menu change width all the time! + if(maptitle[0]) { - int mlil = maploaditemlength; - string showt; - string restt; - restt[0] = '\0'; - filtertext(showt, maptitle, FTXT__MAPMSG); - if(mlil && mlil != 255) // 0 && 255 are 'off' - { - int tl = strlen(showt); - if(tl>mlil) - { - int cr = 0; - int mr = min(max(0, tl-mlil), mlil); - for(cr=0;cr0) { restt[cr+1] = '\0'; showt[mlil] = '\0'; } - } - } - draw_text(showt, 1*FONTH/2, VIRTH - FONTH/2); - draw_text(restt, 3*FONTH/2, VIRTH + FONTH/2); + filtertext(maptitle, maptitle, FTXT__MAPMSG); + draw_text(maptitle, FONTH/2, VIRTH - FONTH/2, 0xFF, 0xFF, 0xFF, 0xFF, -1, maploaditemlength*FONTH/2); } //if(mapstats[0]) draw_text(mapstats, x, y+ys+5*FONTH/2); }