From 3c0211b3e55870599e590f603a6642af340286a8 Mon Sep 17 00:00:00 2001 From: Nikola Petrov Date: Thu, 6 Feb 2025 01:30:10 +0100 Subject: [PATCH] Remove demoWindow --- view/inc/Vapp.hpp | 1 - view/src/Vapp.cpp | 11 ++++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/view/inc/Vapp.hpp b/view/inc/Vapp.hpp index 25752cb..d243115 100644 --- a/view/inc/Vapp.hpp +++ b/view/inc/Vapp.hpp @@ -19,7 +19,6 @@ public: void deinit(); private: - bool showDemoWindow = false; bool showSelection = false; sqlite3 *db; sqlite3_stmt *get_gen_num; diff --git a/view/src/Vapp.cpp b/view/src/Vapp.cpp index 6388e33..e766afd 100644 --- a/view/src/Vapp.cpp +++ b/view/src/Vapp.cpp @@ -18,7 +18,7 @@ void Vapp::init() treeTexture = LoadRenderTexture(sizeOfCanvas, sizeOfCanvas); canvas.init(sizeOfCanvas); - DnaManager::setUp(&manager, 0); + DnaManager::setUp(&manager, 0); sql::init(); sql::open(DB_NAME, &db); @@ -111,13 +111,12 @@ void Vapp::draw() { 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); if (ImGui::BeginMainMenuBar()) { - ImGui::MenuItem("Demo Window", nullptr, &showDemoWindow, enableAll); ImGui::MenuItem("Selection", nullptr, &showSelection, enableAll); if (ImGui::MenuItem("Draw", nullptr, false, enableAll)) { @@ -128,9 +127,6 @@ void Vapp::draw() ImGui::EndMainMenuBar(); } - if (showDemoWindow) - ImGui::ShowDemoWindow(&showDemoWindow); - if (showSelection) { ImGui::Begin("Selection", &showSelection); @@ -178,7 +174,7 @@ void Vapp::setUpManager() sqlite3_stmt *get_gen_stmt; 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; while (lodedGen < selected_gen) @@ -195,6 +191,7 @@ void Vapp::setUpManager() if ((unit.index != pos)) { // DOTO: SET ERROR + TraceLog(LOG_ERROR, "LOADING DNA"); sql::finalize(get_gen_stmt); return; }