aboutsummaryrefslogtreecommitdiff
path: root/gui/widget.h
diff options
context:
space:
mode:
Diffstat (limited to 'gui/widget.h')
-rw-r--r--gui/widget.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/gui/widget.h b/gui/widget.h
index acd575a90b..789fc09231 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -197,28 +197,17 @@ protected:
};
/* PicButtonWidget */
-class PicButtonWidget : public Widget, public CommandSender {
- friend class Dialog; // Needed for the hotkey handling
-protected:
- uint32 _cmd;
- uint8 _hotkey;
+class PicButtonWidget : public ButtonWidget {
public:
PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
PicButtonWidget(GuiObject *boss, const Common::String &name, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
~PicButtonWidget();
- void setCmd(uint32 cmd) { _cmd = cmd; }
- uint32 getCmd() const { return _cmd; }
-
void setGfx(const Graphics::Surface *gfx);
void useAlpha(int alpha) { _alpha = alpha; }
void useThemeTransparency(bool enable) { _transparency = enable; }
- 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(); }
-
protected:
void drawWidget();
@@ -365,6 +354,8 @@ protected:
void drawWidget();
};
+ButtonWidget *addClearButton(GuiObject *boss, const Common::String &name, uint32 cmd, int x=0, int y=0, int w=0, int h=0);
+
} // End of namespace GUI
#endif