This commit is contained in:
SirLynix
2022-07-16 14:11:03 +02:00
committed by Jérôme Leclercq
parent 481702c109
commit 05c78da22a
58 changed files with 2306 additions and 41 deletions

View File

@@ -3,11 +3,18 @@
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Widgets/WidgetTheme.hpp>
#include <Nazara/Utils/Algorithm.hpp>
#include <cassert>
#include <Nazara/Widgets/Debug.hpp>
namespace Nz
{
inline auto WidgetTheme::GetConfig() const -> const Config&
{
return m_config;
}
inline BaseWidgetStyle::BaseWidgetStyle(BaseWidget* widget, int renderLayerCount) :
m_widgetOwner(widget),
m_renderLayerCount(renderLayerCount)
@@ -25,6 +32,12 @@ namespace Nz
m_widgetOwner->DestroyEntity(entity);
}
template<typename T>
T* BaseWidgetStyle::GetOwnerWidget() const
{
return SafeCast<T*>(m_widgetOwner);
}
inline entt::registry& BaseWidgetStyle::GetRegistry()
{
return m_widgetOwner->GetRegistry();