summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-04-02 13:20:23 +0300
committerAndrei Karas <akaras@inbox.ru>2014-04-02 13:20:23 +0300
commit39a3fd884d6d585825d9f80a578c6f466a856ec3 (patch)
treeee0184c30b08dd452ae9e4e523a9bb6aa291f33b /src/gui/windows
parent35278ed7f80ed8a02785573d510c36b38998debe (diff)
downloadmanaplus-39a3fd884d6d585825d9f80a578c6f466a856ec3.tar.gz
manaplus-39a3fd884d6d585825d9f80a578c6f466a856ec3.tar.bz2
manaplus-39a3fd884d6d585825d9f80a578c6f466a856ec3.tar.xz
manaplus-39a3fd884d6d585825d9f80a578c6f466a856ec3.zip
Set correct step in sliders.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/buydialog.cpp2
-rw-r--r--src/gui/windows/charcreatedialog.cpp5
-rw-r--r--src/gui/windows/itemamountwindow.cpp4
-rw-r--r--src/gui/windows/selldialog.cpp2
4 files changed, 6 insertions, 7 deletions
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index 8bece77ef..e86bf344e 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -224,7 +224,7 @@ void BuyDialog::init()
getOptionBool("showbackground"), "buy_background.xml");
mScrollArea->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
- mSlider = new Slider(this, 1.0);
+ mSlider = new Slider(this, 1.0, 1.0);
mQuantityLabel = new Label(this, strprintf(
"%d / %d", mAmountItems, mMaxItems));
mQuantityLabel->setAlignment(Graphics::CENTER);
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 42bbb4b88..f0a9781f2 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -514,9 +514,8 @@ void CharCreateDialog::setAttributes(const StringVect &labels,
mAttributeLabel[i]->adjustSize();
add(mAttributeLabel[i]);
- mAttributeSlider[i] = new Slider(this, min, max);
- mAttributeSlider[i]->setDimension(Rect(140, y + i * 24,
- 150, 12));
+ mAttributeSlider[i] = new Slider(this, min, max, 1.0);
+ mAttributeSlider[i]->setDimension(Rect(140, y + i * 24, 150, 12));
mAttributeSlider[i]->setActionEventId("statslider");
mAttributeSlider[i]->addActionListener(this);
add(mAttributeSlider[i]);
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index 472057060..9c2e039f9 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -100,7 +100,7 @@ ItemAmountWindow::ItemAmountWindow(const Usage usage, Window *const parent,
mItem(item),
mItemIcon(new Icon(this, item ? item->getImage() : nullptr)),
mItemPopup(new ItemPopup),
- mItemAmountSlide(new Slider(this, 1.0, maxRange)),
+ mItemAmountSlide(new Slider(this, 1.0, maxRange, 1.0)),
mItemPriceSlide(nullptr),
mItemDropDown(nullptr),
mItemsModal(nullptr),
@@ -136,7 +136,7 @@ ItemAmountWindow::ItemAmountWindow(const Usage usage, Window *const parent,
mItemPriceTextField->setWidth(35);
mItemPriceTextField->addKeyListener(this);
- mItemPriceSlide = new Slider(this, 1.0, 10000000);
+ mItemPriceSlide = new Slider(this, 1.0, 10000000, 1.0);
mItemPriceSlide->setHeight(10);
mItemPriceSlide->setActionEventId("slidePrice");
mItemPriceSlide->addActionListener(this);
diff --git a/src/gui/windows/selldialog.cpp b/src/gui/windows/selldialog.cpp
index 604caa72e..1b9f1ec85 100644
--- a/src/gui/windows/selldialog.cpp
+++ b/src/gui/windows/selldialog.cpp
@@ -100,7 +100,7 @@ void SellDialog::init()
getOptionBool("showbackground"), "sell_background.xml");
mScrollArea->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
- mSlider = new Slider(this, 1.0);
+ mSlider = new Slider(this, 1.0, 1.0);
mQuantityLabel = new Label(this, strprintf(
"%d / %d", mAmountItems, mMaxItems));