|
|
|
@ -115,7 +115,7 @@ void CTeamMenu::ApplySchemeSettings(IScheme *pScheme)
@@ -115,7 +115,7 @@ void CTeamMenu::ApplySchemeSettings(IScheme *pScheme)
|
|
|
|
|
|
|
|
|
|
if ( *m_szMapName ) |
|
|
|
|
{ |
|
|
|
|
LoadMapPage( m_szMapName ); // reload the map description to pick up the color
|
|
|
|
|
LoadMapPage( NULL ); // reload the map description to pick up the color
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -185,6 +185,7 @@ void CTeamMenu::Update()
@@ -185,6 +185,7 @@ void CTeamMenu::Update()
|
|
|
|
|
void CTeamMenu::LoadMapPage( const char *mapName ) |
|
|
|
|
{ |
|
|
|
|
// Save off the map name so we can re-load the page in ApplySchemeSettings().
|
|
|
|
|
if( mapName ) |
|
|
|
|
Q_strncpy( m_szMapName, mapName, strlen( mapName ) + 1 ); |
|
|
|
|
|
|
|
|
|
char mapRES[ MAX_PATH ]; |
|
|
|
@ -193,14 +194,14 @@ void CTeamMenu::LoadMapPage( const char *mapName )
@@ -193,14 +194,14 @@ void CTeamMenu::LoadMapPage( const char *mapName )
|
|
|
|
|
uilanguage[0] = 0; |
|
|
|
|
engine->GetUILanguage( uilanguage, sizeof( uilanguage ) ); |
|
|
|
|
|
|
|
|
|
Q_snprintf( mapRES, sizeof( mapRES ), "resource/maphtml/%s_%s.html", mapName, uilanguage ); |
|
|
|
|
Q_snprintf( mapRES, sizeof( mapRES ), "resource/maphtml/%s_%s.html", m_szMapName, uilanguage ); |
|
|
|
|
|
|
|
|
|
bool bFoundHTML = false; |
|
|
|
|
|
|
|
|
|
if ( !g_pFullFileSystem->FileExists( mapRES ) ) |
|
|
|
|
{ |
|
|
|
|
// try english
|
|
|
|
|
Q_snprintf( mapRES, sizeof( mapRES ), "resource/maphtml/%s_english.html", mapName ); |
|
|
|
|
Q_snprintf( mapRES, sizeof( mapRES ), "resource/maphtml/%s_english.html", m_szMapName ); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -240,7 +241,7 @@ void CTeamMenu::LoadMapPage( const char *mapName )
@@ -240,7 +241,7 @@ void CTeamMenu::LoadMapPage( const char *mapName )
|
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Q_snprintf( mapRES, sizeof( mapRES ), "maps/%s.txt", mapName); |
|
|
|
|
Q_snprintf( mapRES, sizeof( mapRES ), "maps/%s.txt", m_szMapName); |
|
|
|
|
|
|
|
|
|
// if no map specific description exists, load default text
|
|
|
|
|
if( !g_pFullFileSystem->FileExists( mapRES ) ) |
|
|
|
|