Add widgets (WIP)
This commit is contained in:
@@ -27,17 +27,28 @@ namespace Nz
|
||||
|
||||
void BuildElement(std::size_t passIndex, const WorldInstance& worldInstance, std::vector<std::unique_ptr<RenderElement>>& elements) const override;
|
||||
|
||||
inline const Color& GetColor() const;
|
||||
inline const Color& GetCornerColor(RectCorner corner) const;
|
||||
const std::shared_ptr<Material>& GetMaterial(std::size_t i) const;
|
||||
std::size_t GetMaterialCount() const;
|
||||
|
||||
inline void SetColor(const Color& color);
|
||||
inline void SetCornerColor(RectCorner corner, const Color& color);
|
||||
inline void SetMaterial(std::shared_ptr<Material> material);
|
||||
inline void SetSize(const Vector2f& size);
|
||||
|
||||
Sprite& operator=(const Sprite&) = delete;
|
||||
Sprite& operator=(Sprite&&) noexcept = default;
|
||||
|
||||
private:
|
||||
inline void UpdateVertices();
|
||||
|
||||
std::array<Color, RectCornerCount> m_cornerColor;
|
||||
std::array<VertexStruct_XYZ_Color_UV, 4> m_vertices;
|
||||
std::shared_ptr<Material> m_material;
|
||||
Color m_color;
|
||||
Rectf m_textureCoords;
|
||||
Vector2f m_size;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user