GUI: Made PicButtonWidget derivative of ButtonWidget
This commit is contained in:
parent
25766500c0
commit
b0fe2bbaf9
2 changed files with 5 additions and 21 deletions
13
gui/widget.h
13
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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue