Widgets: Add widget theme (WIP)
This commit is contained in:
@@ -8,9 +8,10 @@
|
||||
#define NAZARA_WIDGETS_BUTTONWIDGET_HPP
|
||||
|
||||
#include <Nazara/Core/Color.hpp>
|
||||
#include <Nazara/Graphics/Sprite.hpp>
|
||||
#include <Nazara/Graphics/SlicedSprite.hpp>
|
||||
#include <Nazara/Graphics/TextSprite.hpp>
|
||||
#include <Nazara/Widgets/BaseWidget.hpp>
|
||||
#include <Nazara/Widgets/WidgetTheme.hpp>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
@@ -25,18 +26,7 @@ namespace Nz
|
||||
ButtonWidget(ButtonWidget&&) = default;
|
||||
~ButtonWidget() = default;
|
||||
|
||||
inline const Color& GetColor() const;
|
||||
inline const Color& GetCornerColor() const;
|
||||
inline const Color& GetHoverColor() const;
|
||||
inline const Color& GetHoverCornerColor() const;
|
||||
inline const Color& GetPressColor() const;
|
||||
inline const Color& GetPressCornerColor() const;
|
||||
|
||||
inline void SetColor(const Color& color, const Color& cornerColor);
|
||||
inline void SetHoverColor(const Color& color, const Color& cornerColor);
|
||||
inline void SetPressColor(const Color& color, const Color& cornerColor);
|
||||
|
||||
inline void UpdateText(const AbstractTextDrawer& drawer);
|
||||
void UpdateText(const AbstractTextDrawer& drawer);
|
||||
|
||||
ButtonWidget& operator=(const ButtonWidget&) = delete;
|
||||
ButtonWidget& operator=(ButtonWidget&&) = default;
|
||||
@@ -51,17 +41,7 @@ namespace Nz
|
||||
void OnMouseButtonRelease(int x, int y, Mouse::Button button) override;
|
||||
void OnMouseExit() override;
|
||||
|
||||
std::shared_ptr<MaterialPass> m_gradientMaterialPass;
|
||||
std::shared_ptr<Sprite> m_gradientSprite;
|
||||
std::shared_ptr<TextSprite> m_textSprite;
|
||||
entt::entity m_textEntity;
|
||||
entt::entity m_gradientEntity;
|
||||
Color m_color;
|
||||
Color m_cornerColor;
|
||||
Color m_hoverColor;
|
||||
Color m_hoverCornerColor;
|
||||
Color m_pressColor;
|
||||
Color m_pressCornerColor;
|
||||
std::unique_ptr<ButtonWidgetStyle> m_style;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user