Dawn/src/dawn/ui/UISprite.hpp

28 lines
720 B
C++

// 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;
void drawSelf(UIShader *uiShader, glm::mat4 selfTransform) override;
public:
Mesh mesh;
Texture *texture;
/**
* UI Sprite Constructor, use the UIElement / UIComponent create instead.
*
* @param canvas Canvas that this sprite belongs to.
*/
UISprite(UICanvas *canvas);
};
}