diff options
author | Eugene Sandulenko | 2014-04-28 01:05:04 +0300 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 2a9cf65eeb305525c55c4d157ef8b1a104b8f7d7 (patch) | |
tree | 67a6671d3268d607369f9f4eecd459ac2b220928 /gui/widget.cpp | |
parent | 00d8d232366f418d3a25046786ab9ab5c90a52c2 (diff) | |
download | scummvm-rg350-2a9cf65eeb305525c55c4d157ef8b1a104b8f7d7.tar.gz scummvm-rg350-2a9cf65eeb305525c55c4d157ef8b1a104b8f7d7.tar.bz2 scummvm-rg350-2a9cf65eeb305525c55c4d157ef8b1a104b8f7d7.zip |
GUI: Add mode to skip drawing of button for PicButton
Diffstat (limited to 'gui/widget.cpp')
-rw-r--r-- | gui/widget.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gui/widget.cpp b/gui/widget.cpp index f2a29c3100..1d0247883c 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -398,7 +398,7 @@ void ButtonWidget::setUnpressedState() { PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd, uint8 hotkey) : ButtonWidget(boss, x, y, w, h, "", tooltip, cmd, hotkey), - _gfx(), _alpha(256), _transparency(false) { + _gfx(), _alpha(256), _transparency(false), _showButton(true) { setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG); _type = kButtonWidget; @@ -406,7 +406,7 @@ PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, co PicButtonWidget::PicButtonWidget(GuiObject *boss, const Common::String &name, const char *tooltip, uint32 cmd, uint8 hotkey) : ButtonWidget(boss, name, "", tooltip, cmd, hotkey), - _gfx(), _alpha(256), _transparency(false) { + _gfx(), _alpha(256), _transparency(false), _showButton(true) { setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG); _type = kButtonWidget; } @@ -449,7 +449,8 @@ void PicButtonWidget::setGfx(int w, int h, int r, int g, int b) { } void PicButtonWidget::drawWidget() { - g_gui.theme()->drawButtonClip(Common::Rect(_x, _y, _x + _w, _y + _h), getBossClipRect(), "", _state, getFlags()); + if (_showButton) + g_gui.theme()->drawButtonClip(Common::Rect(_x, _y, _x + _w, _y + _h), getBossClipRect(), "", _state, getFlags()); if (_gfx.getPixels()) { // Check whether the set up surface needs to be converted to the GUI |