UI
This commit is contained in:
33
archive/ui/UISprite.hpp
Normal file
33
archive/ui/UISprite.hpp
Normal 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);
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user