F.E.I.S/tests/imgui_demo.cpp
2022-03-23 02:20:07 +01:00

28 lines
658 B
C++

#define IMGUI_USER_CONFIG "imconfig-SFML.h"
#include <imgui-SFML.h>
#include <imgui.h>
#include <SFML/Graphics.hpp>
int main() {
sf::RenderWindow window(sf::VideoMode(800, 600), "demo");
window.setFramerateLimit(60);
ImGui::SFML::Init(window);
sf::Clock deltaClock;
while (true) {
sf::Event event;
while (window.pollEvent(event)) {
ImGui::SFML::ProcessEvent(event);
}
ImGui::SFML::Update(window, deltaClock.restart());
ImGui::ShowDemoWindow();
window.clear();
ImGui::SFML::Render(window);
window.display();
}
ImGui::SFML::Shutdown();
return 0;
}