add 'region' image property

This commit is contained in:
MihailRis
2025-04-26 22:12:34 +03:00
parent 032b5ae9dc
commit 79528a44ea
4 changed files with 20 additions and 1 deletions
+3
View File
@@ -1,11 +1,13 @@
#pragma once
#include "UINode.hpp"
#include "maths/UVRegion.hpp"
namespace gui {
class Image : public UINode {
protected:
std::string texture;
UVRegion region {};
bool autoresize = false;
public:
Image(GUI& gui, std::string texture, glm::vec2 size=glm::vec2(32,32));
@@ -16,5 +18,6 @@ namespace gui {
virtual bool isAutoResize() const;
virtual const std::string& getTexture() const;
virtual void setTexture(const std::string& name);
void setRegion(const UVRegion& region);
};
}