Added 'defaultProperties' arg on module:class.import
This commit is contained in:
parent
2cc19c094b
commit
39f670f35c
2 changed files with 3 additions and 5 deletions
|
|
@ -41,8 +41,8 @@ function module.init(shared)
|
|||
end
|
||||
local make = new.make;
|
||||
|
||||
function new.import(ClassName) -- make new quad class object
|
||||
local this = {};
|
||||
function new.import(ClassName,defaultProperties) -- make new quad class object
|
||||
local this = defaultProperties or {};
|
||||
setmetatable(this,{
|
||||
__call = function (self,prop)
|
||||
if type(prop) == "string" then
|
||||
|
|
|
|||
4
test.lua
4
test.lua
|
|
@ -8,9 +8,7 @@ local store = render.store;
|
|||
|
||||
local frame = class "Frame";
|
||||
local text = class.import "TextLabel";
|
||||
text.style = {
|
||||
|
||||
};
|
||||
text.TextSize = ;
|
||||
|
||||
mount(gui,frame "testFrame" {
|
||||
text "texts" {
|
||||
|
|
|
|||
Loading…
Reference in a new issue