36 lines
905 B
C
Raw Normal View History

2017-01-16 20:40:45 -05:00
#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;
2017-01-16 20:40:45 -05:00
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; }
2017-01-16 20:40:45 -05:00
};
}
}