Skip to content

Commit e4f5549

Browse files
committed
serverbrowser: copy gametype to map name in quicklist
1 parent e10f298 commit e4f5549

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

serverbrowser/QuickListPanel.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,16 @@ void CQuickListPanel::SetMapName( const char *pMapName )
165165
//-----------------------------------------------------------------------------
166166
void CQuickListPanel::SetGameType( const char *pGameType )
167167
{
168-
if ( strlen ( pGameType ) == 0 )
169-
{
170-
m_pGameTypeLabel->SetVisible( false );
168+
m_pGameTypeLabel->SetVisible( false );
169+
170+
if ( strlen ( pGameType ) == 0 || !m_pMapNameLabel )
171171
return;
172-
}
173172

174173
char gametype[ 512 ];
175-
Q_snprintf( gametype, sizeof( gametype ), "(%s)", pGameType );
174+
Q_snprintf( gametype, sizeof( gametype ), "%s (%s)", m_szMapName, pGameType );
176175

177-
m_pGameTypeLabel->SetText( gametype );
176+
m_pMapNameLabel->SetText( gametype );
177+
m_pMapNameLabel->SizeToContents();
178178
}
179179

180180
//-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)