small quick fix
This commit is contained in:
@@ -206,20 +206,22 @@ return function(name, parent, pTerm, basalt)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function removeEvent(self, event, obj)
|
local function removeEvent(self, event, obj)
|
||||||
for a, b in pairs(events[event]) do
|
if(events[event]~=nil)then
|
||||||
for key, value in pairs(b) do
|
for a, b in pairs(events[event]) do
|
||||||
if (value == obj) then
|
for key, value in pairs(b) do
|
||||||
table.remove(events[event][a], key)
|
if (value == obj) then
|
||||||
if(#events[event][a]<=0)then
|
table.remove(events[event][a], key)
|
||||||
events[event][a] = nil
|
if(#events[event][a]<=0)then
|
||||||
if(self.parent~=nil)then
|
events[event][a] = nil
|
||||||
if(tableCount(events[event])<=0)then
|
if(self.parent~=nil)then
|
||||||
activeEvents[event] = false
|
if(tableCount(events[event])<=0)then
|
||||||
self.parent:removeEvent(event, self)
|
activeEvents[event] = false
|
||||||
|
self.parent:removeEvent(event, self)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
return true;
|
||||||
end
|
end
|
||||||
return true;
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ local basaltEvent = require("basaltEvent")()
|
|||||||
local Frame = require("Frame")
|
local Frame = require("Frame")
|
||||||
local theme = require("theme")
|
local theme = require("theme")
|
||||||
local utils = require("utils")
|
local utils = require("utils")
|
||||||
|
local log = require("basaltLogs")
|
||||||
local uuid = utils.uuid
|
local uuid = utils.uuid
|
||||||
local createText = utils.createText
|
local createText = utils.createText
|
||||||
|
|
||||||
|
|||||||
@@ -134,10 +134,11 @@ return function(name)
|
|||||||
|
|
||||||
|
|
||||||
local function predefinedLerp(v1,v2,d,t,get,set,typ,self)
|
local function predefinedLerp(v1,v2,d,t,get,set,typ,self)
|
||||||
|
local obj = _OBJ
|
||||||
local x,y
|
local x,y
|
||||||
local name = ""
|
local name = ""
|
||||||
if(_OBJ.parent~=nil)then name = _OBJ.parent:getName() end
|
if(obj.parent~=nil)then name = obj.parent:getName() end
|
||||||
name = name.._OBJ:getName()
|
name = name..obj:getName()
|
||||||
addAnimationPart(t+0.05, function()
|
addAnimationPart(t+0.05, function()
|
||||||
if(typ~=nil)then
|
if(typ~=nil)then
|
||||||
if(activeAnimations[typ]==nil)then activeAnimations[typ] = {} end
|
if(activeAnimations[typ]==nil)then activeAnimations[typ] = {} end
|
||||||
@@ -146,13 +147,13 @@ return function(name)
|
|||||||
end
|
end
|
||||||
activeAnimations[typ][name] = self
|
activeAnimations[typ][name] = self
|
||||||
end
|
end
|
||||||
x,y = get(_OBJ)
|
x,y = get(obj)
|
||||||
end)
|
end)
|
||||||
for n=0.05,d+0.01,0.05 do
|
for n=0.05,d+0.01,0.05 do
|
||||||
addAnimationPart(t+n, function()
|
addAnimationPart(t+n, function()
|
||||||
local _x = math.floor(lerp.lerp(x, v1, lerp[mode](n / d))+0.5)
|
local _x = math.floor(lerp.lerp(x, v1, lerp[mode](n / d))+0.5)
|
||||||
local _y = math.floor(lerp.lerp(y, v2, lerp[mode](n / d))+0.5)
|
local _y = math.floor(lerp.lerp(y, v2, lerp[mode](n / d))+0.5)
|
||||||
set(_OBJ, _x,_y)
|
set(obj, _x,_y)
|
||||||
if(typ~=nil)then
|
if(typ~=nil)then
|
||||||
if(n>=d-0.01)then
|
if(n>=d-0.01)then
|
||||||
if(activeAnimations[typ][name]==self)then
|
if(activeAnimations[typ][name]==self)then
|
||||||
|
|||||||
Reference in New Issue
Block a user