aboutsummaryrefslogtreecommitdiffstats
path: root/input.lua
diff options
context:
space:
mode:
authorMatthias Richter <vrld@vrld.org>2013-11-04 21:52:36 +0100
committerMatthias Richter <vrld@vrld.org>2013-11-04 21:52:36 +0100
commitffd187dc177f4a15fa2e87579b9cbabee38b8245 (patch)
tree70fcf81f88080286ef71a7b0da601100537b648a /input.lua
parent935c91f0426852bdcc4a90facb9d4d2afb92d177 (diff)
downloadQuickie-ffd187dc177f4a15fa2e87579b9cbabee38b8245.tar.gz
Quickie-ffd187dc177f4a15fa2e87579b9cbabee38b8245.tar.bz2
Quickie-ffd187dc177f4a15fa2e87579b9cbabee38b8245.tar.xz
Quickie-ffd187dc177f4a15fa2e87579b9cbabee38b8245.zip
Fix #11: Right click support.
When clicked, Button() and Input() return the respective mouse button constant ('l', 'r', 'm') instead of just true. When activated by keyboard, Button() and Input() return 'return'. Otherwise Button() and Input() return false.
Diffstat (limited to 'input.lua')
-rw-r--r--input.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/input.lua b/input.lua
index dd5e3aa..ad0683f 100644
--- a/input.lua
+++ b/input.lua
@@ -74,5 +74,5 @@ return function(w)
core.registerDraw(id, w.draw or core.style.Input,
w.info.text, w.info.cursor, pos[1],pos[2], size[1],size[2])
- return mouse.releasedOn(id) or (keyboard.key == 'return' and keyboard.hasFocus(id))
+ return mouse.releasedOn(id) or keyboard.pressedOn(id, 'return')
end