From a556b45abf18f1bd509daaf63b66b7d55e9fd291 Mon Sep 17 00:00:00 2001 From: jjesswan Date: Mon, 22 Apr 2024 21:56:26 -0400 Subject: add engine version --- .../Systems/UI/ButtonAction/showwindowaction.cpp | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 engine-ocean/Game/Systems/UI/ButtonAction/showwindowaction.cpp (limited to 'engine-ocean/Game/Systems/UI/ButtonAction/showwindowaction.cpp') diff --git a/engine-ocean/Game/Systems/UI/ButtonAction/showwindowaction.cpp b/engine-ocean/Game/Systems/UI/ButtonAction/showwindowaction.cpp new file mode 100644 index 0000000..e6b9797 --- /dev/null +++ b/engine-ocean/Game/Systems/UI/ButtonAction/showwindowaction.cpp @@ -0,0 +1,33 @@ +#include "showwindowaction.h" +#include "Game/Systems/UI/uisystem.h" +#include + +ShowWindowAction::ShowWindowAction(std::map>& all_screens, + std::set& shownScreens, + const std::string screenName): + m_screens(all_screens), + m_shownScreens(shownScreens) +{ + m_screenName = screenName; +} + + + +void ShowWindowAction::activate(){ + std::cout << "activated window show!!!" << std::endl; + + // add screen to be rendered, and also set it be the only one active + //m_screens[m_screenName] = m_screen; +// for (auto &screen : m_screens){ +// screen.second->isActive = false; +// } + +// m_screens[m_screenName]->isActive = true; + m_shownScreens.insert(m_screenName); + m_screens[m_screenName]->isActive = true; + +} + +void ShowWindowAction::deactivate(){ + m_shownScreens.erase(m_screenName); +} -- cgit v1.2.3-70-g09d2