Fully converted to using the lel-guecs library externally now.
This commit is contained in:
parent
7c90eb6da1
commit
74a8599977
30 changed files with 139 additions and 1194 deletions
|
@ -1,32 +0,0 @@
|
|||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <fmt/core.h>
|
||||
#include "constants.hpp"
|
||||
#include "guecs.hpp"
|
||||
#include "textures.hpp"
|
||||
#include <fmt/xchar.h>
|
||||
|
||||
using namespace guecs;
|
||||
|
||||
TEST_CASE("prototype one gui", "[ecs-gui]") {
|
||||
guecs::UI gui;
|
||||
textures::init();
|
||||
|
||||
gui.position(0, 0, 1000, 500);
|
||||
gui.layout("[test1|test2|test3][test4|_|test5]");
|
||||
|
||||
for(auto& [name, cell] : gui.cells()) {
|
||||
auto button = gui.entity(name);
|
||||
gui.set<lel::Cell>(button, cell);
|
||||
gui.set<Rectangle>(button, {});
|
||||
gui.set<Clickable>(button, {});
|
||||
gui.set<Textual>(button, {L"whatever"});
|
||||
}
|
||||
|
||||
gui.init();
|
||||
|
||||
// at this point it's mostly ready but I'd need to render it to a window real quick
|
||||
sf::RenderWindow window;
|
||||
window.setSize({SCREEN_WIDTH, SCREEN_HEIGHT});
|
||||
gui.render(window);
|
||||
window.display();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue