switch debugtoggle and pausetoggle to release, and logic fixes

This commit is contained in:
milek7
2023-05-28 21:07:38 +02:00
parent 3df159024b
commit 54e5e186a3
5 changed files with 27 additions and 26 deletions

View File

@@ -231,21 +231,15 @@ driver_ui::render_() {
if( ( ImGui::Button( STR_C("Resume"), ImVec2( 150, 0 ) ) )
|| ( ImGui::IsKeyReleased( ImGui::GetKeyIndex( ImGuiKey_Escape ) ) ) )
{
m_relay.post(user_command::pausetoggle, 0.0, 0.0, GLFW_PRESS, 0);
m_relay.post(user_command::pausetoggle, 0.0, 0.0, GLFW_RELEASE, 0);
}
if( ImGui::Button( STR_C("Quit"), ImVec2( 150, 0 ) ) ) {
Application.queue_quit(false);
}
if (!m_paused)
{
m_pause_modal_opened = false;
ImGui::CloseCurrentPopup();
}
ImGui::EndPopup();
}
if (m_paused && !m_pause_modal_opened)
{
m_pause_modal_opened = true;
ImGui::EndPopup();
} else if (m_paused) {
ImGui::OpenPopup(popupheader);
}