Merge 0de4bf423e
into 1767782603
This commit is contained in:
commit
68cf9f8253
1 changed files with 2 additions and 0 deletions
|
@ -24,6 +24,8 @@ return function(core, info, ...)
|
||||||
fraction = math.min(1, math.max(0, (mx - x) / w))
|
fraction = math.min(1, math.max(0, (mx - x) / w))
|
||||||
end
|
end
|
||||||
local v = fraction * (info.max - info.min) + info.min
|
local v = fraction * (info.max - info.min) + info.min
|
||||||
|
v = math.floor((v/info.step) + 0.5) * info.step --Snaps slider to nearest step interval.
|
||||||
|
fraction = v / (info.max - info.min) + info.min --Updates slider drawing during mouse drag.
|
||||||
if v ~= info.value then
|
if v ~= info.value then
|
||||||
info.value = v
|
info.value = v
|
||||||
value_changed = true
|
value_changed = true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue