aboutsummaryrefslogtreecommitdiff
path: root/gui/widget.h
diff options
context:
space:
mode:
Diffstat (limited to 'gui/widget.h')
-rw-r--r--gui/widget.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/gui/widget.h b/gui/widget.h
index fe6ae0b8c3..37382c1914 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -159,21 +159,10 @@ protected:
void drawWidget(bool hilite);
};
-/* PushButtonWidget */
-class PushButtonWidget : public ButtonWidget {
-protected:
- bool _state;
-public:
- PushButtonWidget(GuiObject *boss, int x, int y, int w, int h, const String &label, uint32 cmd = 0, uint8 hotkey = 0);
-
- void setState(bool state);
- void toggleState() { setState(!_state); }
- bool getState() const { return _state; }
-};
-
/* CheckboxWidget */
-class CheckboxWidget : public PushButtonWidget {
+class CheckboxWidget : public ButtonWidget {
protected:
+ bool _state;
public:
CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const String &label, uint32 cmd = 0, uint8 hotkey = 0);
@@ -181,6 +170,10 @@ public:
virtual void handleMouseEntered(int button) {}
virtual void handleMouseLeft(int button) {}
+ void setState(bool state);
+ void toggleState() { setState(!_state); }
+ bool getState() const { return _state; }
+
protected:
void drawWidget(bool hilite);
};