c0balt60/create
v0.1.0 ·
Library providing sugar for declaring instances
create
Simple library made for declaring instances
Usage:
Just pass in the ClassName of the instance you want, initial properties, and children. Create will do the rest for you
local create = require(...)
create("Frame", {
Active = true,
BackgroundTransparency = 1,
Size = UDim2.fromScale(1, 1),
Children = {
create("TextLabel", {
BackgroundTransparency = 1,
Text = "",
Children = create("UIStroke", {
Size = 1
})
}),
create("ImageButton", {
BackgroundTransparency = 1,
Image = "",
MouseButton1Down = function(...)
print(...)
end
})
}
})
Additional implementation:
Childrenmember is reserved for passing in children of the Instance.- Setting an event member such as
MouseButton1DownwillConnectthe callback to the event