From e23b5cbda092e23076bed9292d8836bd2744d039 Mon Sep 17 00:00:00 2001 From: Lazarus Date: Wed, 30 Aug 2017 01:06:09 +0100 Subject: [PATCH] Changed internal scene placement to use specific indexes --- scenemanager.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scenemanager.lua b/scenemanager.lua index 9da40cb..790d141 100644 --- a/scenemanager.lua +++ b/scenemanager.lua @@ -1,8 +1,12 @@ --[[ -SceneManager v1.0.4 +SceneManager v1.0.5 changelog: ---------- +v1.0.5 - 30.08.2017 +Changed internal scene placement to use specific indexes. This allows +us to add always-on-top children to our scenemanager object by just +using addChild. v1.0.4 - 08.04.2012 Added option to filter a list of events during transitions @@ -272,7 +276,7 @@ function SceneManager:changeScene(scene, duration, transition, ease, options) if self.scene1 == nil then self.scene1 = self.scenes[scene].new(options and options.userData) - self:addChild(self.scene1) + self:addChildAt(self.scene1, 1) dispatchEvent(self, "transitionBegin") dispatchEvent(self.scene1, "enterBegin") dispatchEvent(self, "transitionEnd") @@ -286,7 +290,7 @@ function SceneManager:changeScene(scene, duration, transition, ease, options) self.scene2 = self.scenes[scene].new(options and options.userData) self.scene2:setVisible(false) - self:addChild(self.scene2) + self:addChildAt(self.scene2, 2) self.time = 0 self.currentTimer = os.timer()