From 692d1a82b9a125352412f6d0fed23265a2f42227 Mon Sep 17 00:00:00 2001 From: Gabriel Tofvesson Date: Tue, 1 Oct 2024 14:54:36 +0000 Subject: [PATCH] Allow changing onClick handler in Element --- gfx/element.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gfx/element.lua b/gfx/element.lua index 6319fdc..13fef78 100644 --- a/gfx/element.lua +++ b/gfx/element.lua @@ -167,4 +167,8 @@ function Element:handleEvent(evt) return false end +function Element:setOnClick(onClick) + self.onClick = onClick +end + return Element \ No newline at end of file