From bb86c10ce232f0304444cd1ae4e34884b39ed08e Mon Sep 17 00:00:00 2001 From: Ashetf2 Date: Thu, 24 Jul 2025 17:51:35 -0500 Subject: [PATCH] confirm dialog before opening browser --- src/game/client/tf/tf_hud_mainmenuoverride.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/game/client/tf/tf_hud_mainmenuoverride.cpp b/src/game/client/tf/tf_hud_mainmenuoverride.cpp index f7828cb2f3e..0096e60d7f4 100644 --- a/src/game/client/tf/tf_hud_mainmenuoverride.cpp +++ b/src/game/client/tf/tf_hud_mainmenuoverride.cpp @@ -1959,7 +1959,15 @@ void CHudMainMenuOverride::OnCommand( const char *command ) else if ( FStrEq( "watch_stream", command ) ) { //SetWatchStreamVisible( !m_pWatchStreamsPanel->IsVisible() ); - vgui::system()->ShellExecute( "open", "https://www.twitch.tv/directory/game/Team%20Fortress%202" ); + //vgui::system()->ShellExecute( "open", "https://www.twitch.tv/directory/game/Team%20Fortress%202" ); + + ShowConfirmDialog( "#TF_Watch_Streams_Title", "#TF_Watch_Streams_Text", + "#MessageBox_OK", + "#cancel", []( bool bConfirmed, void* pContext ) + { + if ( bConfirmed ) + vgui::system()->ShellExecute( "open", "https://www.twitch.tv/directory/game/Team%20Fortress%202" ); + } ); } else if ( FStrEq( "close_quest_map", command ) ) {