Add widgets (WIP)

This commit is contained in:
Jérôme Leclercq
2021-10-04 09:25:45 +02:00
parent 68708c54f7
commit a66f6faed1
31 changed files with 1955 additions and 24 deletions

View File

@@ -0,0 +1,17 @@
// Copyright (C) 2017 Jérôme Leclercq
// This file is part of the "Nazara Development Kit"
// For conditions of distribution and use, see copyright notice in Prerequisites.hpp
#include <Nazara/Widgets/LabelWidget.hpp>
namespace Nz
{
inline void LabelWidget::UpdateText(const Nz::AbstractTextDrawer& drawer, float scale)
{
m_textSprite->Update(drawer, scale);
Nz::Vector2f size = Nz::Vector2f(m_textSprite->GetAABB().GetLengths());
SetMinimumSize(size);
SetPreferredSize(size);
}
}