//before ImGui::Begin(...);
static char login[64] = "";
static char password[64] = "";
static bool activated;
//after ImGui::Begin(...);
if(!activated) {
ImGui::InputText("Login", login, IM_ARRAYSIZE(login));
ImGui::InputText("Password", password, IM_ARRAYSIZE(password), ImGuiInputTextFlags_Password);
if(ImGui::Button("Log In"))
{
if(strcmp(login, "user") == 0 && strcmp(password, "good") == 0)
activated = true;
}
}
else {
ImGui::Text("Welcome, %s", login);
if(ImGui::Button("Load"))
{
//load and inject process
}
}