Browse Source

serverbrowser: copy gametype to map name in quicklist

serverbrowser
nillerusr 2 years ago
parent
commit
e4f5549cbd
  1. 12
      serverbrowser/QuickListPanel.cpp

12
serverbrowser/QuickListPanel.cpp

@ -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();
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

Loading…
Cancel
Save