Skip to content

Commit 059759d

Browse files
committed
Small Fix
Fixed removeChildren for movable frames and scrollable frames
1 parent 47a4706 commit 059759d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Basalt/objects/MovableFrame.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ return function(name, basalt)
4040
self:listenEvent("mouse_drag")
4141
end,
4242

43+
removeChildren = function(self)
44+
base.removeChildren(self)
45+
self:listenEvent("mouse_click")
46+
self:listenEvent("mouse_up")
47+
self:listenEvent("mouse_drag")
48+
end,
49+
4350
dragHandler = function(self, btn, x, y)
4451
if(base.dragHandler(self, btn, x, y))then
4552
if (isDragging) then

Basalt/objects/ScrollableFrame.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ return function(name, basalt)
9898
self:listenEvent("mouse_scroll")
9999
end,
100100

101+
removeChildren = function(self)
102+
base.removeChildren(self)
103+
self:listenEvent("mouse_scroll")
104+
end,
105+
101106
setParent = function(self, p, ...)
102107
base.setParent(self, p, ...)
103108
parent = p

0 commit comments

Comments
 (0)