Former-commit-id: 1945290ec1bd8fb85f0271e71a3deac8fe29d1d3 [formerly 685f46c52586642355658b6dc97b01c62c8ceb18] [formerly 2d7b1bdc6ec1b08d82f5967bde41e07681b37bba [formerly 24f645b1a9ae22d4d9a3d45d40a09a92929f407a]] Former-commit-id: 0b8303a6701d2a0507433fb004a181ed1852e250 [formerly 81f107cd8a3b5adf3fb583e24d72fb11600be8d4] Former-commit-id: 1fe7c371f085ef008da5f4362924ebed8a2e968a
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
// Copyright (C) 2015 Jérôme Leclercq
|
|
// This file is part of the "Nazara Development Kit"
|
|
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
|
|
|
|
#pragma once
|
|
|
|
#ifndef NDK_WIDGETS_LABELWIDGET_HPP
|
|
#define NDK_WIDGETS_LABELWIDGET_HPP
|
|
|
|
#include <NDK/Prerequesites.hpp>
|
|
#include <NDK/BaseWidget.hpp>
|
|
#include <Nazara/Utility/AbstractTextDrawer.hpp>
|
|
#include <Nazara/Graphics/TextSprite.hpp>
|
|
|
|
namespace Ndk
|
|
{
|
|
class World;
|
|
|
|
class NDK_API LabelWidget : public BaseWidget
|
|
{
|
|
public:
|
|
LabelWidget(BaseWidget* parent = nullptr);
|
|
LabelWidget(const LabelWidget&) = delete;
|
|
LabelWidget(LabelWidget&&) = default;
|
|
~LabelWidget() = default;
|
|
|
|
//virtual LabelWidget* Clone() const = 0;
|
|
|
|
void ResizeToContent();
|
|
|
|
inline void UpdateText(const Nz::AbstractTextDrawer& drawer);
|
|
|
|
LabelWidget& operator=(const LabelWidget&) = delete;
|
|
LabelWidget& operator=(LabelWidget&&) = default;
|
|
|
|
private:
|
|
EntityHandle m_textEntity;
|
|
Nz::TextSpriteRef m_textSprite;
|
|
};
|
|
}
|
|
|
|
#include <NDK/Widgets/LabelWidget.inl>
|
|
|
|
#endif // NDK_WIDGETS_LABELWIDGET_HPP
|