This commit is contained in:
NoryiE
2025-02-16 19:31:38 +00:00
parent dd6825f3b6
commit 056897dd1b
36 changed files with 1085 additions and 5065 deletions

View File

@@ -1,23 +1,10 @@
-- Will temporary exist so that we don't lose track of how the plugin system works
Will temporary exist so that we don't lose track of how the plugin system works
## VisualElement.hooks.init()
Hooks into existing methods (you can also use init.pre or init.post)
local VisualElement = {hooks={init={}}}
## VisualElement.setup()
Called on Class level to define properties and setup before instance is created
-- Called on Class level to define properties and setup before instance is created
function VisualElement.setup(element)
element.defineProperty(element, "testProp", {default = 5, type = "number"})
end
-- Hooks into existing methods (you can also use init.pre or init.post)
function VisualElement.hooks.init(self)
--self.basalt.LOGGER.debug("VisualElement initialized")
end
-- Adds a new method to the class
function VisualElement:testFunc()
--self.basalt.LOGGER.debug("Hello World", self.get("testProp"))
end
return {
VisualElement = VisualElement
}
## VisualElement:testFunc()
Adds a new method to the class