From ff73d25308dece987e0ded07291054595d6bd764 Mon Sep 17 00:00:00 2001 From: ChrisK2 Date: Wed, 28 May 2014 01:55:52 +0200 Subject: osc: correct calculation of slider position calculation the mouse position on the slider relied on how the hitbox is positioned, change it according to new hitbox size. --- player/lua/osc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/lua') diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 4bb884167c..02044698ca 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -128,7 +128,7 @@ function limit_range(min, max, val) end function get_slider_value(element) - local fill_offsetV = element.metainfo.slider.border + element.metainfo.slider.gap + local fill_offsetV = element.metainfo.slider.border local paddingH = (element.h - (2*fill_offsetV)) / 2 local b_x1, b_x2 = element.hitbox.x1 + paddingH, element.hitbox.x2 - paddingH -- cgit v1.2.3