Changing from RenderWindow to RenderTarget so the GUI can be rendered into a texture for zooming/saving.

This commit is contained in:
Zed A. Shaw 2025-10-31 11:05:29 -04:00
parent 070244269e
commit e8c178db6f
5 changed files with 16 additions and 16 deletions

View file

@ -95,7 +95,7 @@ namespace guecs {
});
}
void UI::debug_layout(sf::RenderWindow& window) {
void UI::debug_layout(sf::RenderTarget& window) {
query<lel::Cell>([&](const auto, auto &cell) {
sf::RectangleShape rect{{float(cell.w), float(cell.h)}};
rect.setPosition({float(cell.x), float(cell.y)});
@ -114,7 +114,7 @@ namespace guecs {
}
}
void UI::render(sf::RenderWindow& window) {
void UI::render(sf::RenderTarget& window) {
if(auto bg = get_if<Background>(MAIN)) {
bg->render(window);
}