Init Project

This commit is contained in:
n0ffie 2025-04-09 14:33:59 +02:00
parent ad9c952b90
commit 0ca3c9cc64
7 changed files with 4141 additions and 0 deletions

43
src/main.cpp Normal file
View file

@ -0,0 +1,43 @@
//
// Created by n0ffie on 08/04/25.
//
#include <iostream>
#include <cigus.hpp>
class NewView : public cigus::UI::View {
public:
void body() override {
std::cout << "Hello World!" << std::endl;
Rectangle();
}
};
int main(int argc, char** argv) {
namespace UI = cigus::UI;
sf::RenderWindow window(sf::VideoMode({800, 600}), "Hello World!");
window.setFramerateLimit(60);
UI::Renderer renderer(cigus::Ref<UI::View>(new NewView()));
while (window.isOpen()) {
while (const std::optional event = window.pollEvent())
{
if (event->is<sf::Event::Closed>())
{
window.close();
}
}
window.clear();
renderer.render(window, sf::RenderStates());
window.display();
}
renderer.destroy();
return 0;
}