Start on MainGUI

This commit is contained in:
2025-04-10 13:19:59 -05:00
parent ab2a101777
commit 23037d065d

View File

@@ -1,24 +1,24 @@
#include "TestImgui.h" #include "MainGUI.h"
#include "modules/ImguiModule/src/ImguiModule.h" #include "modules/ImguiModule/src/ImguiModule.h"
TestImgui::TestImgui(Archimedes::App* a, void* h) : Archimedes::Module(a, h) { MainGUI::MainGUI(Archimedes::App* a, void* h) : Archimedes::Module(a, h) {
name = "TestImgui"; name = "MainGUI";
ImguiModule* im = new ImguiModule(a, nullptr); ImguiModule* im = new ImguiModule(a, nullptr);
deps[im->getName()] = im; deps[im->getName()] = im;
} }
TestImgui::~TestImgui() { MainGUI::~MainGUI() {
} }
void TestImgui::onLoad() { void MainGUI::onLoad() {
ImguiModule* im = (ImguiModule*) moduleInstances["ImguiModule"]; ImguiModule* im = (ImguiModule*) moduleInstances["ImguiModule"];
if(!im) { if(!im) {
std::cout << "No ImguiModule for TestImgui!\n"; std::cout << "No ImguiModule for MainGUI!\n";
std::abort(); std::abort();
} }
@@ -26,18 +26,13 @@ void TestImgui::onLoad() {
} }
void TestImgui::run() { void MainGUI::run() {
if(demo)
ImGui::ShowDemoWindow(&this->demo);
else
app->end();
{ {
ImGuiIO& io = ImGui::GetIO(); ImGuiIO& io = ImGui::GetIO();
static float f = 0.0f; static float f = 0.0f;
static int counter = 0; static int counter = 0;
ImGui::Begin("TestImgui Module"); // Create a window called "Hello, world!" and append into it. ImGui::Begin("MainGUI Module"); // Create a window called "Hello, world!" and append into it.
ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)