diff --git a/docs/guides/xml.md b/docs/guides/xml.md new file mode 100644 index 0000000..1ec253f --- /dev/null +++ b/docs/guides/xml.md @@ -0,0 +1,141 @@ +# XML in Basalt + +Basalt provides an XML parser that lets you define your UI layout in a declarative way. This can make your code more readable and maintainable. + +## Basic Usage + +```lua +local main = basalt.getMainFrame() + +-- Load from file +local xmlFile = fs.open("myUI.xml", "r") +main:loadXML(xmlFile.readAll()) +xmlFile.close() + +-- Or directly as string +main:loadXML([[ + + +``` + +## Property Types + +The XML parser automatically converts values based on the property type: + +```xml + + +``` \ No newline at end of file diff --git a/docs/references/plugins/pluginTemplate.md b/docs/references/plugins/pluginTemplate.md deleted file mode 100644 index 888e90f..0000000 --- a/docs/references/plugins/pluginTemplate.md +++ /dev/null @@ -1,10 +0,0 @@ -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) - -## VisualElement.setup() -Called on Class level to define properties and setup before instance is created - -## VisualElement:testFunc() -Adds a new method to the class -