Skip to content

Commit

Permalink
Add OOP for dgsDetachFromAutoDestroy
Browse files Browse the repository at this point in the history
  • Loading branch information
xLive committed Apr 19, 2021
1 parent 4f32f39 commit 06283e0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions classlib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,13 @@ class {
return dgsAttachToAutoDestroy(self.dgsElement,type(element) == "table" and element.dgsElement or element,dgsElement) and self
end
end,
detachFromAutoDestroy = function(self,element,dgsElement)
if self == dgsRootInstance then
return dgsDetachFromAutoDestroy(type(element) == "table" and element.dgsElement or element,type(dgsElement) == "table" and dgsElement.dgsElement or dgsElement) and self
else
return dgsDetachFromAutoDestroy(self.dgsElement,type(element) == "table" and element.dgsElement or element,dgsElement) and self
end
end,
----------Plugins
dgsColorPicker = function(...) return dgsOOP.dgsColorPicker(...) end,
dgsComponentSelector = function(...) return dgsOOP.dgsComponentSelector(...) end,
Expand Down

0 comments on commit 06283e0

Please sign in to comment.