Preserve lowercase first char behaviour

This commit is contained in:
Sabine Lim
2023-05-18 02:58:23 +10:00
parent 72bb660eba
commit c5effd002c

View File

@@ -127,7 +127,8 @@ return {
})
objects = basalt.createObjectsFromLayout(layout, props)
else
local object = basalt:createObject(node.tag, node.attributes["id"])
local objectName = node.tag:gsub("^%l", string.upper)
local object = basalt:createObject(objectName, node.attributes["id"])
for attribute, expression in pairs(node.attributes) do
if (attribute:sub(1, 2) == "on") then
registerFunctionEvent(object, object[attribute], expression .. "()", env)