Handle windows and EnTT with application components

This commit is contained in:
SirLynix
2023-01-21 12:03:02 +01:00
committed by Jérôme Leclercq
parent 18851c9185
commit da9eb14ebe
16 changed files with 287 additions and 65 deletions

View File

@@ -7,6 +7,26 @@
namespace Nz
{
template<typename ...Args>
Window& AppWindowingComponent::CreateWindow(Args&&... args)
{
return *m_windows.emplace_back(std::make_unique<Window>(std::forward<Args>(args)...));
}
inline void AppWindowingComponent::DisableQuitOnLastWindowClosed()
{
return EnableQuitOnLastWindowClosed(false);
}
inline void AppWindowingComponent::EnableQuitOnLastWindowClosed(bool enable)
{
m_quitOnLastWindowClosed = enable;
}
inline bool AppWindowingComponent::IsQuitOnLastWindowClosedEnabled() const
{
return m_quitOnLastWindowClosed;
}
}
#include <Nazara/Platform/DebugOff.hpp>