diff options
author | Eugene Sandulenko | 2011-08-06 10:12:34 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2011-08-06 11:30:58 +0100 |
commit | 9e0c1a38e1264715e00fba000777cf0b05dde8fb (patch) | |
tree | 42e9b34e7131b1434e0da925f44d6966d9796c7d | |
parent | f681617913d6716f0a003af3d7a1c1fa4bb4b8d2 (diff) | |
download | scummvm-rg350-9e0c1a38e1264715e00fba000777cf0b05dde8fb.tar.gz scummvm-rg350-9e0c1a38e1264715e00fba000777cf0b05dde8fb.tar.bz2 scummvm-rg350-9e0c1a38e1264715e00fba000777cf0b05dde8fb.zip |
GUI: Consistent behavior of ButtonWidget::setLabel()
-rw-r--r-- | gui/widget.cpp | 4 | ||||
-rw-r--r-- | gui/widget.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gui/widget.cpp b/gui/widget.cpp index 8420391a3f..c4d288eb11 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -298,6 +298,10 @@ void ButtonWidget::drawWidget() { g_gui.theme()->drawButton(Common::Rect(_x, _y, _x+_w, _y+_h), _label, _state, getFlags()); } +void ButtonWidget::setLabel(const Common::String &label) { + StaticTextWidget::setLabel(cleanupHotkey(label)); +} + #pragma mark - PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd, uint8 hotkey) diff --git a/gui/widget.h b/gui/widget.h index 70f2da4c98..acd575a90b 100644 --- a/gui/widget.h +++ b/gui/widget.h @@ -186,6 +186,8 @@ public: void setCmd(uint32 cmd) { _cmd = cmd; } uint32 getCmd() const { return _cmd; } + void setLabel(const Common::String &label); + void handleMouseUp(int x, int y, int button, int clickCount); void handleMouseEntered(int button) { setFlags(WIDGET_HILITED); draw(); } void handleMouseLeft(int button) { clearFlags(WIDGET_HILITED); draw(); } |