svn-id: r18324
This commit is contained in:
Torbjörn Andersson 2005-06-03 12:33:03 +00:00
parent ec958e975e
commit 41f69db19f
4 changed files with 18 additions and 58 deletions

View file

@ -439,18 +439,10 @@ int OptionsDialog::addVolumeControls(GuiObject *boss, int yoffset, WidgetSize ws
"Speech volume:"
};
const Graphics::Font *font;
if (ws == kBigWidgetSize) {
font = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
} else {
font = FontMan.getFontByUsage(Graphics::FontManager::kGUIFont);
}
int textwidth = 0;
for (int i = 0; i < ARRAYSIZE(slider_labels); i++) {
int width = font->getStringWidth(slider_labels[i]);
int width = g_gui.getStringWidth(slider_labels[i]);
if (width > textwidth)
textwidth = width;