From 2c8c6b40d244dffe2f944f5b838a7eca0e5377b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=84=B8=EC=A0=A4=EA=B7=80=20=EA=B3=A0=EC=96=91=EC=9D=B4?= =?UTF-8?q?=EB=93=A4?= <46598063+qwreey75@users.noreply.github.com> Date: Fri, 24 Dec 2021 20:40:56 +0900 Subject: [PATCH] bug fix --- src/class.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/class.lua b/src/class.lua index 408811f..096a616 100644 --- a/src/class.lua +++ b/src/class.lua @@ -21,6 +21,7 @@ function module.init(shared) local mount = shared.mount; ---@module src.mount local getHolder = mount.getHolder; local advancedTween = shared.advancedTween; ---@module src.libs.AdvancedTween + local round = shared.round; ---@module src.libs.round -- make object that from instance, class and more function new.make(ClassName,...) -- render object @@ -104,7 +105,7 @@ function module.init(shared) end if tween then if not advancedTween then - return warn "module 'AdvancedTween' needs to be loaded for tween properties but it is not founded on 'src.libs'. you should adding that to src.libs directory"; + return warn "module 'AdvancedTween' needs to be loaded for tween properties but it is not found on 'src.libs'. you should adding that to src.libs directory"; end advancedTween.RunTween(item,tween,{[index] = newValue}); else @@ -121,7 +122,15 @@ function module.init(shared) -- event binding elseif indexType == "string" then -- prop set - item[index] = value; -- set property + local isImage = (ClassName == "ImageLabel" or ClassName == "ImageButton"); + if index == "roundSize" and isImage then + if not round then + warn "module 'round' needs to be loaded for set images round size but it is not found on 'src.libs'. you should adding that to src.libs directory" + end + round.setRound(item,value); + else + item[index] = value; -- set property + end elseif indexType == "number" then -- object -- child object mount(item,((iprop == 1) and value or value:Clone()),holder);