Drop a breakpoint on the ApplySchemeSettings() call in your panel and
verify it picks up the scheme change and retrieves the new colors (and
then internally does a SetFgColor() or the like to cause the label to
paint with the new color).

- Alfred

----Original Message----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Imperio59
Sent: Friday, February 04, 2005 4:48 PM To:
[email protected] Subject: [hlcoders] Re: Custom Schemes
(again)

> So i am now loading all my schemes in the CBaseViewport Constructor
>     like so: vgui::HScheme scheme;
>
>
vgui::scheme()->LoadSchemeFromFile("resource/VaminScheme.res","VaminSche
me");
>
>
vgui::scheme()->LoadSchemeFromFile("resource/AbsentisScheme.res","Absent
isScheme");
>
>
vgui::scheme()->LoadSchemeFromFile("resource/OrderScheme.res","OrderSche
me");
>     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 :(

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

Reply via email to