aboutsummaryrefslogtreecommitdiff
path: root/gui/widget.h
diff options
context:
space:
mode:
authorEugene Sandulenko2014-05-02 18:09:30 +0300
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit762671ccd841c5f54e4cf241a5372c26210b5865 (patch)
tree676eb4ca036536bd480d60a22179a3bb6016d234 /gui/widget.h
parent0281b1eba84127bef927d70245739e4e55ad5be2 (diff)
downloadscummvm-rg350-762671ccd841c5f54e4cf241a5372c26210b5865.tar.gz
scummvm-rg350-762671ccd841c5f54e4cf241a5372c26210b5865.tar.bz2
scummvm-rg350-762671ccd841c5f54e4cf241a5372c26210b5865.zip
GUI: Added possibility to specify several state images for PicButtonWidget
Diffstat (limited to 'gui/widget.h')
-rw-r--r--gui/widget.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/gui/widget.h b/gui/widget.h
index 28d7a5b8c0..d7b4c7b6f2 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -80,6 +80,15 @@ enum {
kPressedButtonTime = 200
};
+enum {
+ kPicButtonStateEnabled = 0,
+ kPicButtonHighlight = 1,
+ kPicButtonStateDisabled = 2,
+ kPicButtonStatePressed = 3,
+
+ kPicButtonStateMax = 3
+};
+
/* Widget */
class Widget : public GuiObject {
friend class Dialog;
@@ -221,8 +230,8 @@ public:
PicButtonWidget(GuiObject *boss, const Common::String &name, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
~PicButtonWidget();
- void setGfx(const Graphics::Surface *gfx);
- void setGfx(int w, int h, int r, int g, int b);
+ void setGfx(const Graphics::Surface *gfx, int statenum = kPicButtonStateEnabled);
+ void setGfx(int w, int h, int r, int g, int b, int statenum = kPicButtonStateEnabled);
void useAlpha(int alpha) { _alpha = alpha; }
void useThemeTransparency(bool enable) { _transparency = enable; }
@@ -231,7 +240,7 @@ public:
protected:
void drawWidget();
- Graphics::Surface _gfx;
+ Graphics::Surface _gfx[kPicButtonStateMax + 1];
int _alpha;
bool _transparency;
bool _showButton;