Brought the UIStack over from the previous game to use here.
This commit is contained in:
parent
25e3935170
commit
6aa1a877c9
7 changed files with 241 additions and 0 deletions
|
|
@ -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)};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue