Remove demoWindow

This commit is contained in:
Nikola Petrov 2025-02-06 01:30:10 +01:00
parent bba921a2c4
commit 3c0211b3e5
2 changed files with 4 additions and 8 deletions

View File

@ -19,7 +19,6 @@ public:
void deinit(); void deinit();
private: private:
bool showDemoWindow = false;
bool showSelection = false; bool showSelection = false;
sqlite3 *db; sqlite3 *db;
sqlite3_stmt *get_gen_num; sqlite3_stmt *get_gen_num;

View File

@ -111,13 +111,12 @@ void Vapp::draw()
{ {
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
DrawTextureEx(bigTexture.texture, Vector2(0,0), 0.0f, 0.25f, WHITE); DrawTextureEx(bigTexture.texture, Vector2(0, 0), 0.0f, 0.25f, WHITE);
ImGui::DockSpaceOverViewport(0, NULL, ImGuiDockNodeFlags_PassthruCentralNode); ImGui::DockSpaceOverViewport(0, NULL, ImGuiDockNodeFlags_PassthruCentralNode);
if (ImGui::BeginMainMenuBar()) if (ImGui::BeginMainMenuBar())
{ {
ImGui::MenuItem("Demo Window", nullptr, &showDemoWindow, enableAll);
ImGui::MenuItem("Selection", nullptr, &showSelection, enableAll); ImGui::MenuItem("Selection", nullptr, &showSelection, enableAll);
if (ImGui::MenuItem("Draw", nullptr, false, enableAll)) if (ImGui::MenuItem("Draw", nullptr, false, enableAll))
{ {
@ -128,9 +127,6 @@ void Vapp::draw()
ImGui::EndMainMenuBar(); ImGui::EndMainMenuBar();
} }
if (showDemoWindow)
ImGui::ShowDemoWindow(&showDemoWindow);
if (showSelection) if (showSelection)
{ {
ImGui::Begin("Selection", &showSelection); ImGui::Begin("Selection", &showSelection);
@ -178,7 +174,7 @@ void Vapp::setUpManager()
sqlite3_stmt *get_gen_stmt; sqlite3_stmt *get_gen_stmt;
sql::prepare_v2(db, get_gen, -1, &get_gen_stmt, NULL); sql::prepare_v2(db, get_gen, -1, &get_gen_stmt, NULL);
DnaManager::cleanUp(&manager, selected_id); DnaManager::cleanUp(&manager, ids[selected_id]);
int lodedGen = -1; int lodedGen = -1;
while (lodedGen < selected_gen) while (lodedGen < selected_gen)
@ -195,6 +191,7 @@ void Vapp::setUpManager()
if ((unit.index != pos)) if ((unit.index != pos))
{ {
// DOTO: SET ERROR // DOTO: SET ERROR
TraceLog(LOG_ERROR, "LOADING DNA");
sql::finalize(get_gen_stmt); sql::finalize(get_gen_stmt);
return; return;
} }