JackEditor/main.cpp

50 lines
851 B
C++
Raw Normal View History

2024-03-28 16:46:43 +08:00
#include <SFML/System.hpp>
#include <cmath>
#include <cstdlib>
#include <initializer_list>
#include <iostream>
#include <cstdio>
2024-03-30 17:19:32 +08:00
#include <string>
2024-03-28 16:46:43 +08:00
#include <vector>
#include "gui/gui.hpp"
#include "gui/imgui/imgui.h"
#include "gui/imgui/imgui_stdlib.h"
#include "types.hpp"
using namespace std;
2024-04-02 15:20:37 +08:00
void ui_bundle();
void ui_map();
2024-03-30 17:19:32 +08:00
2024-03-28 16:46:43 +08:00
int main(int argc, char *argv[]) {
UI ui(sf::Vector2u(1200, 1000), "JackEditor");
while (ui.Update()) {
2024-04-02 15:20:37 +08:00
static bool demo_open = false;
static bool bundleOpen = false, mapOpen = true;
ig::BeginMainMenuBar();
ig::Checkbox("Demo Window", &demo_open);
ig::Separator();
ig::Checkbox("Bundle", &bundleOpen);
ig::Separator();
ig::Checkbox("Map", &mapOpen);
ig::EndMainMenuBar();
if (demo_open)
ig::ShowDemoWindow(&demo_open);
if (bundleOpen)
ui_bundle();
2024-03-28 16:46:43 +08:00
ui.Render();
}
return 0;
}