From: Severin Meyer Date: Sun, 14 Dec 2014 17:16:46 +0000 (+0100) Subject: Move the slider UP when using mousewheelup or the PgUp key, and move it DOWN when... X-Git-Tag: xonotic-v0.8.0~85^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2c681ebf40619c0202b70e633e74ea51a41fcf51;p=xonotic%2Fxonotic-data.pk3dir.git Move the slider UP when using mousewheelup or the PgUp key, and move it DOWN when using the mousewheeldown or the PgDn key --- diff --git a/qcsrc/menu/item/slider.c b/qcsrc/menu/item/slider.c index b071a1af3..c92db27e9 100644 --- a/qcsrc/menu/item/slider.c +++ b/qcsrc/menu/item/slider.c @@ -104,7 +104,7 @@ float Slider_keyDown(entity me, float key, float ascii, float shift) if(me.disabled) return 0; inRange = (almost_in_bounds(me.valueMin, me.value, me.valueMax)); - if(key == K_LEFTARROW || key == K_KP_LEFTARROW || key == K_MWHEELUP) + if(key == K_LEFTARROW || key == K_KP_LEFTARROW || key == K_MWHEELDOWN) { if(inRange) me.setValue(me, median(me.valueMin, me.value - me.valueKeyStep, me.valueMax)); @@ -112,7 +112,7 @@ float Slider_keyDown(entity me, float key, float ascii, float shift) me.setValue(me, me.valueMax); return 1; } - if(key == K_RIGHTARROW || key == K_KP_RIGHTARROW || key == K_MWHEELDOWN) + if(key == K_RIGHTARROW || key == K_KP_RIGHTARROW || key == K_MWHEELUP) { if(inRange) me.setValue(me, median(me.valueMin, me.value + me.valueKeyStep, me.valueMax)); @@ -120,7 +120,7 @@ float Slider_keyDown(entity me, float key, float ascii, float shift) me.setValue(me, me.valueMin); return 1; } - if(key == K_PGUP || key == K_KP_PGUP) + if(key == K_PGDN || key == K_KP_PGDN) { if(inRange) me.setValue(me, median(me.valueMin, me.value - me.valuePageStep, me.valueMax)); @@ -128,7 +128,7 @@ float Slider_keyDown(entity me, float key, float ascii, float shift) me.setValue(me, me.valueMax); return 1; } - if(key == K_PGDN || key == K_KP_PGDN) + if(key == K_PGUP || key == K_KP_PGUP) { if(inRange) me.setValue(me, median(me.valueMin, me.value + me.valuePageStep, me.valueMax));