From 8abb0c8bc286b073f56c4d39628d824ee699d3eb Mon Sep 17 00:00:00 2001 From: Nemirtingas Date: Fri, 11 Oct 2019 00:25:44 +0200 Subject: [PATCH] Add close button for overlay --- overlay_experimental/steam_overlay.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/overlay_experimental/steam_overlay.cpp b/overlay_experimental/steam_overlay.cpp index ded3c2e..6d4fcd8 100644 --- a/overlay_experimental/steam_overlay.cpp +++ b/overlay_experimental/steam_overlay.cpp @@ -478,7 +478,9 @@ void Steam_Overlay::OverlayProc() ImGui::PushFont(font_default); - if (ImGui::Begin("SteamOverlay", nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoBringToFrontOnFocus)) + bool show; + + if (ImGui::Begin("SteamOverlay", &show, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoBringToFrontOnFocus)) { ImGui::LabelText("##label", "Username: %s(%llu) playing %u", settings->get_local_name(), @@ -514,6 +516,9 @@ void Steam_Overlay::OverlayProc() ImGui::End(); ImGui::PopFont(); + + if (!show) + ShowOverlay(false); }// if(show_overlay) }