Making Icons a thing again since it's convenient.
This commit is contained in:
parent
7e64879f78
commit
4c019048d0
4 changed files with 35 additions and 1 deletions
|
@ -36,6 +36,20 @@ namespace guecs {
|
|||
void render(sf::RenderWindow& window, sf::Shader *shader_ptr);
|
||||
};
|
||||
|
||||
struct Icon : public Sprite {
|
||||
template<typename... Args>
|
||||
Icon(Args... args) : Sprite(args...)
|
||||
{
|
||||
stretch = false;
|
||||
is_icon = true;
|
||||
}
|
||||
|
||||
Icon() {
|
||||
stretch = false;
|
||||
is_icon = true;
|
||||
};
|
||||
};
|
||||
|
||||
struct Rectangle {
|
||||
int padding = THEME.PADDING;
|
||||
sf::Color color = THEME.FILL_COLOR;
|
||||
|
|
|
@ -218,6 +218,7 @@ namespace guecs {
|
|||
sf::Shader* find_shader(Entity ent, bool is_shape);
|
||||
|
||||
void show_sprite(const string& region, const string& sprite_name);
|
||||
void show_icon(const string& region, const string& sprite_name);
|
||||
void show_text(const string& region, const wstring& content);
|
||||
void show_label(const string& region, const wstring& content);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue