(svn r16753) -Fix (r16740): Don't check the width of the same string 4 times, but pick the maximum width of all difficulty levels

This commit is contained in:
yexo 2009-07-05 16:55:26 +00:00
parent 96201f1a41
commit da5d63e260
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ struct SelectGameWindow : public Window {
Dimension d = {0, 0};
if (widget == SGI_DIFFICULTIES) {
for (uint i = STR_DIFFICULTY_LEVEL_EASY; i <= STR_DIFFICULTY_LEVEL_CUSTOM; i++) {
SetDParam(0, STR_DIFFICULTY_LEVEL_EASY + _settings_newgame.difficulty.diff_level);
SetDParam(0, i);
d = maxdim(d, GetStringBoundingBox(STR_INTRO_DIFFICULTY));
}
}