This repository has been archived on 2025-03-10. You can view files and clone it, but cannot push or open issues or pull requests.

25 lines
553 B
C++

#pragma once
#include "UIElement.h"
#include "Utility.h"
namespace nf {
class Texture;
struct Asset;
class UITexture : public UIElement {
public:
UITexture();
void create(Asset* textureAsset, const Vec2& position, double scale = 1.0, double opacity = 1.0 );
const char* identity() override;
void setScale(double scale);
void setOpacity(double opacity);
void render(Shader* shader, unsigned int windowWidth, unsigned int windowHeight) override;
~UITexture();
private:
Texture* m_texture;
float m_scale;
float m_opacity;
};
}