aboutsummaryrefslogtreecommitdiffstats
path: root/button.lua
diff options
context:
space:
mode:
Diffstat (limited to 'button.lua')
-rw-r--r--button.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/button.lua b/button.lua
index b601458..8d76b1f 100644
--- a/button.lua
+++ b/button.lua
@@ -1,7 +1,7 @@
local core = require((...):match("(.-)[^%.]+$") .. 'core')
-- the widget
-return function(title, x,y, w,h, draw)
+return function(title, x,y, w,h, widgetHit, draw)
-- Generate unique identifier for gui state update and querying.
local id = core.generateID()
@@ -10,8 +10,8 @@ return function(title, x,y, w,h, draw)
-- active (mouse pressed on widget) or
-- normal (mouse not on widget and not pressed on widget).
--
- -- core.mouse.updateState(id, x,y,w,h) updates the state for this widget.
- core.mouse.updateState(id, x,y,w,h)
+ -- core.mouse.updateState(id, widgetHit, x,y,w,h) updates the state for this widget.
+ core.mouse.updateState(id, widgetHit or core.style.widgetHit, x,y,w,h)
-- core.makeCyclable makes the item focus on tab or whatever binding is
-- in place (see core.keyboard.cycle). Cycle order is determied by the