From e5c9e7e29fd34271522a4ed7dfc6b8b8ee6670cd Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Wed, 23 Jan 2013 13:18:58 +0100 Subject: Allow setting custom widget ids --- input.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'input.lua') diff --git a/input.lua b/input.lua index 64f2ced..87d980e 100644 --- a/input.lua +++ b/input.lua @@ -36,7 +36,7 @@ return function(w) w.info.text = w.info.text or "" w.info.cursor = math.min(w.info.cursor or w.info.text:len(), w.info.text:len()) - local id = core.generateID() + local id = w.id or core.generateID() local pos, size = group.getRect(w.pos, w.size) mouse.updateWidget(id, pos, size, w.widgetHit) keyboard.makeCyclable(id) -- cgit v1.2.3-54-g00ecf