removed scrollbar from tables

added enabled property
This commit is contained in:
Robert Jelic
2025-06-22 04:17:14 +02:00
parent 1b467c4d4a
commit 8fd37ee1fe
9 changed files with 291 additions and 222 deletions

View File

@@ -31,6 +31,9 @@ BaseElement.defineProperty(BaseElement, "name", {default = "", type = "string"})
--- @property eventCallbacks table BaseElement The event callbacks for the element
BaseElement.defineProperty(BaseElement, "eventCallbacks", {default = {}, type = "table"})
--- @property enabled boolean BaseElement Whether the element is enabled or not
BaseElement.defineProperty(BaseElement, "enabled", {default = true, type = "boolean" })
--- Registers a new event listener for the element (on class level)
--- @shortDescription Registers a new event listener for the element (on class level)
--- @param class table The class to register
@@ -215,6 +218,9 @@ end
--- @return boolean? handled Whether the event was handled
--- @protected
function BaseElement:dispatchEvent(event, ...)
if self.get("enabled") == false then
return false
end
if self[event] then
return self[event](self, ...)
end