// Copyright (c) 2022 Dominic Masters
// 
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT

#pragma once
#include "UIComponent.hpp"
#include "display/mesh/QuadMesh.hpp"
#include "display/Texture.hpp"

namespace Dawn {
  class UISprite : public UIComponent {
    protected:
      void updatePositions() override;
      std::vector<struct ShaderPassItem> getSelfPassItems(
        glm::mat4 projection,
        glm::mat4 view,
        glm::mat4 transform
      ) override;

    public:
      Mesh mesh;
      struct Color color = COLOR_WHITE;
      Texture *texture = nullptr;

      /**
       * UI Sprite Constructor, use the UIElement / UIComponent create instead.
       * 
       * @param canvas Canvas that this sprite belongs to.
       */
      UISprite(UICanvas *canvas);
  };
}