Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ui/slider.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/slider.cc b/src/ui/slider.cc
index c1b473c..9166656 100644
--- a/src/ui/slider.cc
+++ b/src/ui/slider.cc
@@ -164,7 +164,7 @@ void Slider::on_mousemove(const math::Vector2f &cursor)
math::clamp(x, 2.0f * height(), width() - 2.0f * height());
const float w = (width() - 4.0f * height());
const float s = w / (slider_maximum - slider_minimum);
- const float p = cursor.x() - 2.0f * height();
+ const float p = x - 2.0f * height();
const float newvalue = slider_minimum + round(p /s);
if (slider_value != newvalue) {
slider_value = newvalue;