update example code

This commit is contained in:
SweetId 2023-10-20 20:29:34 -04:00
parent 2a821c0cb3
commit c5bffa9c98
1 changed files with 15 additions and 1 deletions

View File

@ -64,6 +64,7 @@ int WinMain(int argc, char* argv[])
});
Nz::Imgui::Instance()->Init(window);
ImGui::EnsureContextOnThisThread();
MyImguiWindow mywindow;
float val = 0.f;
@ -84,8 +85,21 @@ int WinMain(int argc, char* argv[])
float deltaTime = updateClock.GetElapsedTime().AsSeconds();
Nz::Imgui::Instance()->Update(window, deltaTime);
ImGui::EnsureContextOnThisThread();
if (ImGui::BeginMainMenuBar())
{
if (ImGui::BeginMenu("Test"))
{
if (ImGui::MenuItem("Test", "Ctrl+O"))
printf("test\n");
ImGui::EndMenu();
}
ImGui::EndMainMenuBar();
}
if (ImGui::BeginPopupModal("toto"))
{
ImGui::EndPopup();
}
ImGui::Begin("Loop Window");
ImGui::Image(logo.get());
ImGui::ImageButton(logo.get());