Added basalt.onEvent(event, callback)

Added basalt.removeEvent(eventcallback)
basalt.triggerEvent(event, ...)

Fixed a event is nil error in Container.lua
This commit is contained in:
Robert Jelic
2025-09-02 12:24:30 +02:00
parent d2d5f8c3ae
commit f10413dddb
5 changed files with 132 additions and 14 deletions

View File

@@ -347,7 +347,7 @@ end
local function convertMousePosition(self, event, ...)
local args = {...}
if event:find("mouse_") then
if event and event:find("mouse_") then
local button, absX, absY = ...
local xOffset, yOffset = self.get("offsetX"), self.get("offsetY")
local relX, relY = self:getRelativePosition(absX + xOffset, absY + yOffset)