Brought the UIStack over from the previous game to use here.

This commit is contained in:
Zed A. Shaw 2026-04-08 23:01:05 -04:00
parent 25e3935170
commit 6aa1a877c9
7 changed files with 241 additions and 0 deletions

View file

@ -7,6 +7,7 @@
namespace guecs {
using std::make_shared;
// BUG: this seems to center things wrong in lel layouts
template<typename T>
void sfml_center_helper(T& obj, lel::Cell& cell, int padding) {
sf::Vector2f position{float(cell.x + padding), float(cell.y + padding)};

View file

@ -118,6 +118,8 @@ namespace guecs {
}
}
// BUG: either render detects that the things are initialized or there's
// another validator function I can call in debug modes to confirm they are
void UI::render(sf::RenderTarget& window) {
if(auto bg = get_if<Background>(MAIN)) {
bg->render(window);