So i am now loading all my schemes in the CBaseViewport Constructor like so:
   vgui::HScheme scheme;

vgui::scheme()->LoadSchemeFromFile("resource/VaminScheme.res","VaminScheme");

vgui::scheme()->LoadSchemeFromFile("resource/AbsentisScheme.res","AbsentisScheme");

vgui::scheme()->LoadSchemeFromFile("resource/OrderScheme.res","OrderScheme");
   scheme =
vgui::scheme()->LoadSchemeFromFile("resource/ClientScheme.res",
"ClientScheme");

Then in my Scoreboard's reset i have:
   C_BasePlayer *pPlayer = C_BasePlayer::GetLocalPlayer();
   vgui::HScheme scheme;
   if (pPlayer) {
       scheme = vgui::scheme()->GetScheme( pPlayer->GetSchemeName(false) );
   }
   else {

       scheme = vgui::scheme()->GetScheme( "ClientScheme" );
   }

   // set the scheme before any child control is created
   SetScheme(scheme);
   InvalidateLayout(false,true);
   vgui::Label* pTitle = (vgui::Label*)(FindChildByName("ServerName"));
   if (pTitle) {
       pTitle->SetScheme(scheme);
       pTitle->InvalidateLayout(false,true);
   }

   m_pPlayerList->SetScheme(scheme);
   m_pPlayerList->InvalidateLayout(false,true);

And the colors are still default HL2 orange... I can't figure out what's
wrong with my code, in debug the HScheme scheme var is set correctly to
a low number (usually 3, 4 or 5 depending on my team), the functions get
called right, but the colors just won't change :(


-- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.5 - Release Date: 03/02/2005



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Reply via email to