aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Richter <vrld@vrld.org>2012-02-22 23:33:54 +0100
committerMatthias Richter <vrld@vrld.org>2012-02-22 23:33:54 +0100
commit370c10c78770bc3c1a70a086b238e7a8e5197fb9 (patch)
tree379101b354515c4bda8f0a36a4a4f4141e143662
parentd6ed0f93011a2a877ccea4955d4db071710594f5 (diff)
downloadQuickie-370c10c78770bc3c1a70a086b238e7a8e5197fb9.tar.gz
Quickie-370c10c78770bc3c1a70a086b238e7a8e5197fb9.tar.bz2
Quickie-370c10c78770bc3c1a70a086b238e7a8e5197fb9.tar.xz
Quickie-370c10c78770bc3c1a70a086b238e7a8e5197fb9.zip
Rename makeTabable() to makeCyclable()
-rw-r--r--button.lua7
-rw-r--r--checkbox.lua2
-rw-r--r--core.lua4
-rw-r--r--input.lua2
-rw-r--r--slider.lua2
-rw-r--r--slider2d.lua2
6 files changed, 10 insertions, 9 deletions
diff --git a/button.lua b/button.lua
index 94ff634..b601458 100644
--- a/button.lua
+++ b/button.lua
@@ -13,9 +13,10 @@ return function(title, x,y, w,h, draw)
-- core.mouse.updateState(id, x,y,w,h) updates the state for this widget.
core.mouse.updateState(id, x,y,w,h)
- -- core.makeTabable makes the item focus on tab. Tab order is determied
- -- by the order you call the widget functions.
- core.makeTabable(id)
+ -- core.makeCyclable makes the item focus on tab or whatever binding is
+ -- in place (see core.keyboard.cycle). Cycle order is determied by the
+ -- order you call the widget functions.
+ core.makeCyclable(id)
-- core.registerDraw(id, drawfunction, drawfunction-arguments...)
-- shows widget when core.draw() is called.
diff --git a/checkbox.lua b/checkbox.lua
index 306fc8f..b51cbb3 100644
--- a/checkbox.lua
+++ b/checkbox.lua
@@ -4,7 +4,7 @@ return function(info, x,y, w,h, draw)
local id = core.generateID()
core.mouse.updateState(id, x,y,w,h)
- core.makeTabable(id)
+ core.makeCyclable(id)
core.registerDraw(id, draw or core.style.Checkbox, info.checked,x,y,w,h)
local checked = info.checked
diff --git a/core.lua b/core.lua
index a93ed1d..bb5295a 100644
--- a/core.lua
+++ b/core.lua
@@ -59,7 +59,7 @@ function keyboard.isBindingDown(bind)
return keyboard.key == bind.key and modifiersDown
end
-local function makeTabable(id)
+local function makeCyclable(id)
keyboard.tryGrab(id)
if hasKeyFocus(id) then
if keyboard.isBindingDown(keyboard.cycle.prev) then
@@ -146,7 +146,7 @@ return {
isHot = isHot,
isActive = isActive,
hasKeyFocus = hasKeyFocus,
- makeTabable = makeTabable,
+ makeCyclable = makeCyclable,
style = require((...):match("(.-)[^%.]+$") .. '.style-default'),
color = color,
diff --git a/input.lua b/input.lua
index 7fe399d..d514348 100644
--- a/input.lua
+++ b/input.lua
@@ -6,7 +6,7 @@ return function(info, x,y,w,h, draw)
local id = core.generateID()
core.mouse.updateState(id, x,y,w,h)
- core.makeTabable(id)
+ core.makeCyclable(id)
if core.isActive(id) then core.setKeyFocus(id) end
core.registerDraw(id, draw or core.style.Input, info.text, info.cursor, x,y,w,h)
diff --git a/slider.lua b/slider.lua
index feed65c..7e4a6d9 100644
--- a/slider.lua
+++ b/slider.lua
@@ -9,7 +9,7 @@ return function(info, x,y,w,h, draw)
local id = core.generateID()
core.mouse.updateState(id, x,y,w,h)
- core.makeTabable(id)
+ core.makeCyclable(id)
core.registerDraw(id,draw or core.style.Slider, fraction, x,y,w,h, info.vertical)
-- mouse update
diff --git a/slider2d.lua b/slider2d.lua
index f20a05b..8614113 100644
--- a/slider2d.lua
+++ b/slider2d.lua
@@ -12,7 +12,7 @@ return function(info, x,y,w,h, draw)
local id = core.generateID()
core.mouse.updateState(id, x,y,w,h)
- core.makeTabable(id)
+ core.makeCyclable(id)
core.registerDraw(id,draw or core.style.Slider2D, fraction, x,y,w,h)
-- update value