about summary refs log tree commit diff stats
path: root/button.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-08-23 12:13:22 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-08-23 12:13:22 -0700
commitb6f42ebf01b6738458b37ff255f55854dea20adc (patch)
tree46c407c2098e90a3505d65e2e041ab8379f7287c /button.lua
parent8747415461a921dd26cc2610471ddb411db0ed16 (diff)
downloadtext.love-b6f42ebf01b6738458b37ff255f55854dea20adc.tar.gz
pass all button params to the icon
Diffstat (limited to 'button.lua')
-rw-r--r--button.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/button.lua b/button.lua
index c027b5c..d8ab601 100644
--- a/button.lua
+++ b/button.lua
@@ -14,7 +14,7 @@ function button(State, name, params)
   end
   love.graphics.setColor(params.color[1], params.color[2], params.color[3])
   love.graphics.rectangle('fill', params.x,params.y, params.w,params.h, 5,5)
-  if params.icon then params.icon(params.x, params.y) end
+  if params.icon then params.icon(params) end
   table.insert(State.button_handlers, params)
 end