This commit is contained in:
2025-04-09 22:07:41 -05:00
parent 6db62591c4
commit e3bc75dea8
3 changed files with 17 additions and 4 deletions

View File

@@ -28,6 +28,16 @@ void TestImgui::onLoad() {
std::cout << "No WindowModule for TestImgui!\n";
std::abort();
}
ImguiModule* im = (ImguiModule*) moduleInstances["ImguiModule"];
if(!im) {
std::cout << "No ImguiModule for TestImgui!\n";
std::abort();
}
ImGui::SetCurrentContext(im->getContext());
}
void TestImgui::run() {
@@ -41,7 +51,7 @@ void TestImgui::run() {
static float f = 0.0f;
static int counter = 0;
ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
ImGui::Begin("TestImgui 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)