I'm using glfw with glad and imgui to create a launcher for my game engine. Currently this is the bit that does all of the imgui stuff:
bool projects = true;
bool versions = false;
ImGui::Begin("Tabs", 0, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize);
if (ImGui::Button("Projects"))
{
projects = true;
versions = false;
}
if (ImGui::Button("Editor Versions"))
{
projects = false;
versions = true;
}
ImGui::End();
if (projects)
{
ImGui::Begin("Projects", &projects, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize);
ImGui::End();
}
if (versions)
{
ImGui::Begin("Versions", &versions, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize);
ImGui::End();
}
I'm trying to make it so that when you click Editor Versions, it closes Projects and opens Versions and the other way around for Projects