Widgets: Add support for render layer (fixes rendering)

This commit is contained in:
Jérôme Leclercq
2021-12-01 18:58:48 +01:00
parent 653c9e0028
commit 8f897084d7
17 changed files with 135 additions and 16 deletions

View File

@@ -3,13 +3,16 @@
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Widgets/WidgetTheme.hpp>
#include <cassert>
#include <Nazara/Widgets/Debug.hpp>
namespace Nz
{
inline BaseWidgetStyle::BaseWidgetStyle(BaseWidget* widget) :
m_widgetOwner(widget)
inline BaseWidgetStyle::BaseWidgetStyle(BaseWidget* widget, int renderLayerCount) :
m_widgetOwner(widget),
m_renderLayerCount(renderLayerCount)
{
assert(m_renderLayerCount >= 0);
}
inline entt::entity BaseWidgetStyle::CreateEntity()
@@ -31,6 +34,11 @@ namespace Nz
{
return m_widgetOwner->GetRegistry();
}
inline int BaseWidgetStyle::GetRenderLayerCount() const
{
return m_renderLayerCount;
}
}
#include <Nazara/Widgets/DebugOff.hpp>