From 37dde881ad73d03e2461fbbf1d3ec22016d53a63 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Tue, 22 Nov 2022 18:28:03 +0100 Subject: [PATCH] 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. --- Basalt/Frame.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Basalt/Frame.lua b/Basalt/Frame.lua index 7b5ea76..863e42d 100644 --- a/Basalt/Frame.lua +++ b/Basalt/Frame.lua @@ -371,7 +371,17 @@ return function(name, parent, pTerm, basalt) getType = function(self) return objectType - end; + end, + + setZIndex = function(self, newIndex) + base.setZIndex(self, newIndex) + for k,v in pairs(activeEvents)do + if(v)then + self.parent:addEvent(k, self) + end + end + return self + end, setFocusedObject = function(self, obj) if(focusedObject~=obj)then