This commit is contained in:
2023-03-05 12:58:59 -08:00
parent 855ac79095
commit f7ff21fa8d
24 changed files with 501 additions and 520 deletions

33
archive/ui/UISprite.hpp Normal file
View File

@ -0,0 +1,33 @@
// 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);
};
}