diff options
-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(); } |