aboutsummaryrefslogtreecommitdiff
path: root/gui/dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/dialog.cpp')
-rw-r--r--gui/dialog.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp
index 9ab22c26ef..78a3ca6d33 100644
--- a/gui/dialog.cpp
+++ b/gui/dialog.cpp
@@ -323,6 +323,24 @@ CheckboxWidget *Dialog::addCheckbox(GuiObject *boss, int x, int y, const Common:
return new CheckboxWidget(boss, x, y, w, h, label, cmd, hotkey, ws);
}
+SliderWidget *Dialog::addSlider(int x, int y, uint32 cmd, WidgetSize ws) {
+ return addSlider(this, x, y, cmd, ws);
+}
+
+SliderWidget *Dialog::addSlider(GuiObject *boss, int x, int y, uint32 cmd, WidgetSize ws) {
+ int w, h;
+
+ if (ws == kBigWidgetSize) {
+ w = kBigSliderWidth;
+ h = kBigSliderHeight;
+ } else {
+ w = kSliderWidth;
+ h = kSliderHeight;
+ }
+
+ return new SliderWidget(boss, x, y, w, h, cmd);
+}
+
uint32 GuiObject::getMillis() {
return g_system->getMillis();
}