Added 'defaultProperties' arg on module:class.import

This commit is contained in:
살려주세요 2021-09-12 21:08:33 +09:00
parent 2cc19c094b
commit 39f670f35c
2 changed files with 3 additions and 5 deletions

View file

@ -41,8 +41,8 @@ function module.init(shared)
end end
local make = new.make; local make = new.make;
function new.import(ClassName) -- make new quad class object function new.import(ClassName,defaultProperties) -- make new quad class object
local this = {}; local this = defaultProperties or {};
setmetatable(this,{ setmetatable(this,{
__call = function (self,prop) __call = function (self,prop)
if type(prop) == "string" then if type(prop) == "string" then

View file

@ -8,9 +8,7 @@ local store = render.store;
local frame = class "Frame"; local frame = class "Frame";
local text = class.import "TextLabel"; local text = class.import "TextLabel";
text.style = { text.TextSize = ;
};
mount(gui,frame "testFrame" { mount(gui,frame "testFrame" {
text "texts" { text "texts" {