diff options
author | Max Horn | 2003-11-05 11:24:37 +0000 |
---|---|---|
committer | Max Horn | 2003-11-05 11:24:37 +0000 |
commit | 2c3b8c9b3046472e34f777588dcc8627cc32dd93 (patch) | |
tree | e8a2f9dcb01dc7f96984cba93b406c3e73b99c09 | |
parent | 086c8a50a46f7e5fe74c68d7f26801178d4570c3 (diff) | |
download | scummvm-rg350-2c3b8c9b3046472e34f777588dcc8627cc32dd93.tar.gz scummvm-rg350-2c3b8c9b3046472e34f777588dcc8627cc32dd93.tar.bz2 scummvm-rg350-2c3b8c9b3046472e34f777588dcc8627cc32dd93.zip |
minor tweaks
svn-id: r11149
-rw-r--r-- | gui/PopUpWidget.cpp | 7 | ||||
-rw-r--r-- | gui/PopUpWidget.h | 2 | ||||
-rw-r--r-- | gui/dialog.h | 1 |
3 files changed, 7 insertions, 3 deletions
diff --git a/gui/PopUpWidget.cpp b/gui/PopUpWidget.cpp index ca87c8d9df..acdc0feae6 100644 --- a/gui/PopUpWidget.cpp +++ b/gui/PopUpWidget.cpp @@ -252,8 +252,8 @@ void PopUpDialog::drawMenuEntry(int entry, bool hilite) { g_gui.fillRect(x, y, w, kLineHeight, hilite ? g_gui._textcolorhi : g_gui._bgcolor); if (name.size() == 0) { // Draw a seperator - g_gui.hLine(x, y + kLineHeight / 2, x + w - 1, g_gui._color); - g_gui.hLine(x + 1, y + 1 + kLineHeight / 2, x + w - 1, g_gui._shadowcolor); + g_gui.hLine(x - 1, y + kLineHeight / 2, x + w, g_gui._shadowcolor); + g_gui.hLine(x, y + 1 + kLineHeight / 2, x + w, g_gui._color); } else { g_gui.drawString(name, x + 1, y + 2, w - 2, hilite ? g_gui._bgcolor : g_gui._textcolor); } @@ -273,6 +273,9 @@ PopUpWidget::PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const Stri _type = kPopUpWidget; _selectedItem = -1; + + if (!_label.isEmpty() && _labelWidth == 0) + _labelWidth = g_gui.getStringWidth(_label); } void PopUpWidget::handleMouseDown(int x, int y, int button, int clickCount) { diff --git a/gui/PopUpWidget.h b/gui/PopUpWidget.h index 4b20415e72..963485e28d 100644 --- a/gui/PopUpWidget.h +++ b/gui/PopUpWidget.h @@ -53,7 +53,7 @@ protected: uint _labelWidth; public: - PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const String &label, uint labelWidth); + PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const String &label, uint labelWidth = 0); void handleMouseDown(int x, int y, int button, int clickCount); diff --git a/gui/dialog.h b/gui/dialog.h index 46cf2bac7e..5fd197ac7d 100644 --- a/gui/dialog.h +++ b/gui/dialog.h @@ -78,6 +78,7 @@ protected: ButtonWidget *addButton(int x, int y, const Common::String &label, uint32 cmd, char hotkey); void setResult(int result) { _result = result; } + int getResult() const { return _result; } }; #endif |