enter image description hereI wrote authorization by key in imgui, then I made an injection and a game selection (but it opened in a new window) I would like to make sure that after successful authorization, the old elements are deleted and new ones are drawn without adding a new window
made different windows but the authorization window did not close and it looked ugly
ImGui::SetNextWindowSize(ImVec2(284, 309));
if (ImGui::Begin("sd1", NULL, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings))
{
ImGui::InputText("##keyinput", &inputlicencekey, CHAR_MAX, ImGuiInputTextFlags_Password);
if (ImGui::Button("Login"))
{
if (&inputlicencekey == key)
{
logged = true;
}
}
}ImGui::End();
ImGui::SetNextWindowSize(ImVec2(284, 309));
if (!logged && ImGui::Begin("sd1", NULL, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings))
{
ImGui::Checkbox("Test", &testbool);
if (ImGui::Button("injcet"))
{
testbool = true;
}
ImGui::Text("Int");
ImGui::SliderInt("##dd", &inttest, 0.1f, 15.f);
ImGui::Text("Float");
}ImGui::End();