Widgets: Improve theme

- move simple styles classes ton their own file
- add button hovered texture
- add button hovered/pressed texture
- add label style
This commit is contained in:
Jérôme Leclercq
2021-11-30 12:42:05 +01:00
parent b20897a2fb
commit 461a06ab8c
10 changed files with 343 additions and 134 deletions

View File

@@ -9,6 +9,7 @@
#include <Nazara/Graphics/TextSprite.hpp>
#include <Nazara/Widgets/BaseWidget.hpp>
#include <Nazara/Widgets/WidgetTheme.hpp>
namespace Nz
{
@@ -23,14 +24,16 @@ namespace Nz
LabelWidget(LabelWidget&&) = default;
~LabelWidget() = default;
inline void UpdateText(const AbstractTextDrawer& drawer, float scale = 1.f);
void UpdateText(const AbstractTextDrawer& drawer, float scale = 1.f);
LabelWidget& operator=(const LabelWidget&) = delete;
LabelWidget& operator=(LabelWidget&&) = default;
private:
entt::entity m_entity;
std::shared_ptr<TextSprite> m_textSprite;
void OnMouseEnter() override;
void OnMouseExit() override;
std::unique_ptr<LabelWidgetStyle> m_style;
};
}