From 475499407f2f7c18c26b112999e88c97d72765b2 Mon Sep 17 00:00:00 2001 From: HJfod <60038575+HJfod@users.noreply.github.com> Date: Sat, 15 Apr 2023 14:20:33 +0300 Subject: [PATCH] fix Notification not being at the top of the scene tree --- loader/src/ui/nodes/Notification.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/loader/src/ui/nodes/Notification.cpp b/loader/src/ui/nodes/Notification.cpp index 872cc6b5..9210900e 100644 --- a/loader/src/ui/nodes/Notification.cpp +++ b/loader/src/ui/nodes/Notification.cpp @@ -166,7 +166,8 @@ void Notification::show() { if (!this->getParent()) { auto winSize = CCDirector::get()->getWinSize(); this->setPosition(winSize.width / 2, winSize.height / 4); - CCDirector::get()->getRunningScene()->addChild(this); + this->setZOrder(CCScene::get()->getHighestChildZ() + 100); + CCScene::get()->addChild(this); } SceneManager::get()->keepAcrossScenes(this); m_showing = true;