Meter is improved but needs a few more things.

This commit is contained in:
Zed A. Shaw 2026-04-19 17:59:04 -04:00
parent 3d44b7ccc5
commit 1950f45f46
5 changed files with 141 additions and 22 deletions

View file

@ -69,11 +69,16 @@ namespace guecs {
struct Meter {
float percent = 1.0f;
sf::Color color = THEME.BG_COLOR_DARK;
Rectangle bar;
int padding = THEME.PADDING;
Rectangle bar{padding, color};
// this is set automatically if a Rectangle is configured for the cell
Rectangle backing_rect{padding, color};
size_t $cell_w = 0;
size_t $cell_h = 0;
void init(lel::Cell& cell, guecs::Rectangle &bg);
void init(lel::Cell& cell);
void init(lel::Cell& cell, Rectangle& bg);
void render(lel::Cell& cell, sf::RenderTarget& window, sf::Shader *shader_ptr);
void render(sf::RenderTarget& window, sf::Shader *shader_ptr);
};
struct Effect {