aboutsummaryrefslogtreecommitdiff
path: root/gui/dialog.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2005-06-03 12:33:03 +0000
committerTorbjörn Andersson2005-06-03 12:33:03 +0000
commit41f69db19f717239ca14a3cd4ef793a7829ca93e (patch)
treeaf7ab2b76f86de2991596d642808cde835c783ee /gui/dialog.cpp
parentec958e975eb9eaac22843f8fd96df0b9a0fff6e4 (diff)
downloadscummvm-rg350-41f69db19f717239ca14a3cd4ef793a7829ca93e.tar.gz
scummvm-rg350-41f69db19f717239ca14a3cd4ef793a7829ca93e.tar.bz2
scummvm-rg350-41f69db19f717239ca14a3cd4ef793a7829ca93e.zip
Cleanup.
svn-id: r18324
Diffstat (limited to 'gui/dialog.cpp')
-rw-r--r--gui/dialog.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp
index 6fff8a66c4..915e34c128 100644
--- a/gui/dialog.cpp
+++ b/gui/dialog.cpp
@@ -296,18 +296,15 @@ ButtonWidget *Dialog::addButton(GuiObject *boss, int x, int y, const Common::Str
}
CheckboxWidget *Dialog::addCheckbox(GuiObject *boss, int x, int y, const Common::String &label, uint32 cmd, char hotkey, WidgetSize ws) {
- const Graphics::Font *font;
int w, h;
if (ws == kBigWidgetSize) {
- font = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
h = kBigButtonHeight;
} else {
- font = FontMan.getFontByUsage(Graphics::FontManager::kGUIFont);
h = kButtonHeight;
}
- w = font->getFontHeight() + 10 + font->getStringWidth(label);
+ w = g_gui.getFontHeight() + 10 + g_gui.getStringWidth(label);
return new CheckboxWidget(boss, x, y, w, h, label, cmd, hotkey, ws);
}
@@ -327,15 +324,7 @@ SliderWidget *Dialog::addSlider(GuiObject *boss, int x, int y, uint32 cmd, Widge
}
PopUpWidget *Dialog::addPopUp(GuiObject *boss, int x, int y, int w, const Common::String &label, uint labelWidth, WidgetSize ws) {
- const Graphics::Font *font;
-
- if (ws == kBigWidgetSize) {
- font = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
- } else {
- font = FontMan.getFontByUsage(Graphics::FontManager::kGUIFont);
- }
-
- return new PopUpWidget(boss, x, y, w, font->getFontHeight() + 2, label, labelWidth, ws);
+ return new PopUpWidget(boss, x, y, w, kLineHeight, label, labelWidth, ws);
}
uint32 GuiObject::getMillis() {