MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / SetMainMenuSkin

Method SetMainMenuSkin

neo/framework/Session_menu.cpp:257–283  ·  view source on GitHub ↗

=============== idSessionLocal::SetMainMenuSkin =============== */

Source from the content-addressed store, hash-verified

255===============
256*/
257void 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===============

Callers

nothing calls this directly

Calls 8

vaFunction · 0.85
GetCVarStringMethod · 0.80
LeftMethod · 0.80
SetStateIntMethod · 0.80
IcmpMethod · 0.60
LengthMethod · 0.45
FindMethod · 0.45
RightMethod · 0.45

Tested by

no test coverage detected