]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
On second thought, remove slider's handle animation while dragging: animation is... 221/head
authorterencehill <piuntn@gmail.com>
Sat, 5 Sep 2015 11:32:44 +0000 (13:32 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 5 Sep 2015 11:32:44 +0000 (13:32 +0200)
qcsrc/menu/item/slider.qc

index daad34a168f3cf7026c92a2618b0705357192fe6..72e454e278a499835b4af00f9dc67946e50a7171 100644 (file)
@@ -55,8 +55,6 @@ void Slider_setValue_allowAnim(entity me, float val, bool allowAnim)
 {
        if(allowAnim && me.animated) {
                float t = 0.5;
-               if(me.pressed == 2)
-                       t = 0.3; // slightly more responsive while dragging the handle
                if(!me.sliderAnim)
                        me.sliderAnim = makeHostedEasing(me, Slider_setSliderValue, easingQuadOut, t, me.sliderValue, val);
                else
@@ -212,7 +210,7 @@ float Slider_mouseDrag(entity me, vector pos)
                        v = median(0, (pos.x - me.pressOffset - 0.5 * me.controlWidth) / (1 - me.textSpace - me.controlWidth), 1) * (me.valueMax - me.valueMin) + me.valueMin;
                        if(me.valueStep)
                                v = floor(0.5 + v / me.valueStep) * me.valueStep;
-                       me.setValue(me, v);
+                       me.setValue_noAnim(me, v);
                }
                else
                        me.setValue(me, me.previousValue);