mirror of
https://github.com/zetaPRIME/libstarlight.git
synced 2025-06-26 05:32:46 +00:00
36 lines
905 B
C++
36 lines
905 B
C++
#pragma once
|
|
#include "starlight/_global.h"
|
|
|
|
#include <string>
|
|
#include <memory>
|
|
|
|
#include "starlight/ThemeManager.h"
|
|
#include "starlight/gfx/ThemeRef.h"
|
|
|
|
#include "starlight/gfx/DrawContextCanvas.h"
|
|
|
|
#include "starlight/ui/UIElement.h"
|
|
|
|
namespace starlight {
|
|
namespace ui {
|
|
class Image : public UIElement {
|
|
private:
|
|
//
|
|
public:
|
|
gfx::ThemeRef<gfx::Drawable> image;
|
|
Color tint = Color::white;
|
|
bool blockTouch = false;
|
|
|
|
Image(VRect rect, const std::string& imgPath);
|
|
Image(Vector2 pos, const std::string& imgPath);
|
|
~Image() override { }
|
|
|
|
void SetImage(const std::string& imgPath, bool resize = true);
|
|
|
|
void Draw() override;
|
|
|
|
bool InterceptsTouch(Vector2 where) override { return blockTouch; }
|
|
};
|
|
}
|
|
}
|