From e4f5549cbd4f5c9eaa8b952f3a1db40fdf8942e1 Mon Sep 17 00:00:00 2001 From: nillerusr Date: Thu, 16 Feb 2023 17:16:35 +0300 Subject: [PATCH] serverbrowser: copy gametype to map name in quicklist --- serverbrowser/QuickListPanel.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/serverbrowser/QuickListPanel.cpp b/serverbrowser/QuickListPanel.cpp index 0b08ca02..19c17bb0 100644 --- a/serverbrowser/QuickListPanel.cpp +++ b/serverbrowser/QuickListPanel.cpp @@ -165,16 +165,16 @@ void CQuickListPanel::SetMapName( const char *pMapName ) //----------------------------------------------------------------------------- void CQuickListPanel::SetGameType( const char *pGameType ) { - if ( strlen ( pGameType ) == 0 ) - { - m_pGameTypeLabel->SetVisible( false ); + m_pGameTypeLabel->SetVisible( false ); + + if ( strlen ( pGameType ) == 0 || !m_pMapNameLabel ) return; - } char gametype[ 512 ]; - Q_snprintf( gametype, sizeof( gametype ), "(%s)", pGameType ); + Q_snprintf( gametype, sizeof( gametype ), "%s (%s)", m_szMapName, pGameType ); - m_pGameTypeLabel->SetText( gametype ); + m_pMapNameLabel->SetText( gametype ); + m_pMapNameLabel->SizeToContents(); } //-----------------------------------------------------------------------------