* Layout WIP * Widgets/BoxLayout: Fix layout algorithm * Widgets/BoxLayout: Fix box layout algorithm for good * SDK/Widgets: Remove padding * Sdk/Widgets: Make use of minimum/preferred size * Sdk/TextAreaWidget: Add Minimum/PreferredSize to TextArea * Sdk/Widgets: Add height/width variants of get/set fixed, maximum, minimum and preferred size methods * Sdk/BoxLayout: Remove useless code * Sdk/TextAreaWidget: Fix compilation * Widgets/TextAreaWidget: Fix cursor position
17 lines
539 B
C++
17 lines
539 B
C++
// 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 <NDK/Widgets/LabelWidget.hpp>
|
|
|
|
namespace Ndk
|
|
{
|
|
inline void LabelWidget::UpdateText(const Nz::AbstractTextDrawer& drawer)
|
|
{
|
|
m_textSprite->Update(drawer);
|
|
|
|
SetMinimumSize(Nz::Vector2f(m_textSprite->GetBoundingVolume().obb.localBox.GetLengths()));
|
|
SetPreferredSize(Nz::Vector2f(m_textSprite->GetBoundingVolume().obb.localBox.GetLengths()));
|
|
}
|
|
}
|