diff options
author | Matthias Richter <vrld@vrld.org> | 2013-03-24 18:24:20 +0100 |
---|---|---|
committer | Matthias Richter <vrld@vrld.org> | 2013-03-24 19:53:20 +0100 |
commit | e6d397ef87b1160e06c5922d147ce8740c8f3cd8 (patch) | |
tree | de54e340edb8ae2f23311a98530240ea869061b3 | |
parent | 2c24ba3ca076ad4a5ef08f746c2b2b5886251972 (diff) | |
download | Quickie-e6d397ef87b1160e06c5922d147ce8740c8f3cd8.tar.gz Quickie-e6d397ef87b1160e06c5922d147ce8740c8f3cd8.tar.bz2 Quickie-e6d397ef87b1160e06c5922d147ce8740c8f3cd8.tar.xz Quickie-e6d397ef87b1160e06c5922d147ce8740c8f3cd8.zip |
Fix #6: Arrow key input on Slider2D widget
-rw-r--r-- | slider2d.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/slider2d.lua b/slider2d.lua index 0ebfeb8..19e264c 100644 --- a/slider2d.lua +++ b/slider2d.lua @@ -77,17 +77,17 @@ return function(w) if keyboard.hasFocus(id) then if keyboard.key == 'down' then - w.info.value[2] = math.min(w.info.max[2], w.info.value[2] + w.info.step.y) + w.info.value[2] = math.min(w.info.max[2], w.info.value[2] + w.info.step[2]) changed = true elseif keyboard.key == 'up' then - w.info.value[2] = math.max(w.info.min[2], w.info.value[2] - w.info.step.y) + w.info.value[2] = math.max(w.info.min[2], w.info.value[2] - w.info.step[2]) changed = true end if keyboard.key == 'right' then - w.info.value[1] = math.min(w.info.max[1], w.info.value[1] + w.info.step.x) + w.info.value[1] = math.min(w.info.max[1], w.info.value[1] + w.info.step[1]) changed = true elseif keyboard.key == 'left' then - w.info.value[1] = math.max(w.info.min[1], w.info.value[1] - w.info.step.x) + w.info.value[1] = math.max(w.info.min[1], w.info.value[1] - w.info.step[1]) changed = true end end |