serverbrowser: copy gametype to map name in quicklist

This commit is contained in:
nillerusr 2023-02-16 17:16:35 +03:00
parent 3b20e2404c
commit 080ecfb31b

View file

@ -165,16 +165,16 @@ void CQuickListPanel::SetMapName( const char *pMapName )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void CQuickListPanel::SetGameType( const char *pGameType ) 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; return;
}
char gametype[ 512 ]; 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();
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------