=============== idSessionLocal::SetMainMenuSkin =============== */
| 255 | =============== |
| 256 | */ |
| 257 | void idSessionLocal::SetMainMenuSkin( void ) { |
| 258 | // skins |
| 259 | idStr str = cvarSystem->GetCVarString( "mod_validSkins" ); |
| 260 | idStr uiSkin = cvarSystem->GetCVarString( "ui_skin" ); |
| 261 | idStr skin; |
| 262 | int skinId = 1; |
| 263 | int count = 1; |
| 264 | while ( str.Length() ) { |
| 265 | int n = str.Find( ";" ); |
| 266 | if ( n >= 0 ) { |
| 267 | skin = str.Left( n ); |
| 268 | str = str.Right( str.Length() - n - 1 ); |
| 269 | } else { |
| 270 | skin = str; |
| 271 | str = ""; |
| 272 | } |
| 273 | if ( skin.Icmp( uiSkin ) == 0 ) { |
| 274 | skinId = count; |
| 275 | } |
| 276 | count++; |
| 277 | } |
| 278 | |
| 279 | for ( int i = 0; i < count; i++ ) { |
| 280 | guiMainMenu->SetStateInt( va( "skin%i", i+1 ), 0 ); |
| 281 | } |
| 282 | guiMainMenu->SetStateInt( va( "skin%i", skinId ), 1 ); |
| 283 | } |
| 284 | |
| 285 | /* |
| 286 | =============== |
nothing calls this directly
no test coverage detected