Skip to content

Commit 37dde88

Browse files
authored
Small bugfix for frames
Small bugfix for frames when using setZIndex after objects got added. Reason was because the frame didn't add the events to it's parent.
1 parent 8f2e191 commit 37dde88

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Basalt/Frame.lua

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,17 @@ return function(name, parent, pTerm, basalt)
371371

372372
getType = function(self)
373373
return objectType
374-
end;
374+
end,
375+
376+
setZIndex = function(self, newIndex)
377+
base.setZIndex(self, newIndex)
378+
for k,v in pairs(activeEvents)do
379+
if(v)then
380+
self.parent:addEvent(k, self)
381+
end
382+
end
383+
return self
384+
end,
375385

376386
setFocusedObject = function(self, obj)
377387
if(focusedObject~=obj)then

0 commit comments

Comments
 (0)