removed scrollbar from tables
added enabled property
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user