You need to use LoadSchemeFromFile() to make the scheme available for
panels, and you specify the friendly name for this scheme when it is
loaded. See CBaseHudChat::CBaseHudChat() for an example. A whole new
scheme may be overkill for simply altering colors, you could just define
custom color names in your base scheme and then in ApplySchemeSettings()
of your panel use SetBgColor( pScheme->GetColor( "colorname" ) ).
- Alfred
Original Message
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Imperio59
Sent: Friday, January 21, 2005 9:35 PM To:
hlcoders@list.valvesoftware.com Subject: [hlcoders] Adding Multiple
VGUI Schemes.
> I'm running into trouble with adding additional client schemes,
> essentially i'm trying to have one scheme per team to modify
> completely the look and feel of the VGUI elements every time you
> change teams.
> I made my own function to get the Scheme name based on wich team you
> currently are on, and made a new file called MyTeamScheme.res and put
> it in /resource/. In that scheme file i have a font named
> "DefaultBig" wich is also present in ClientScheme.res, however when
> it tries to load my own scheme file, it can't find the font
> anymore...
>
> How do i set up my new schemes so they will work propely and how do i
> name theme, because everywhere the call is SetScheme("ClientScheme")
> but the "name" tag is commented out in ClientScheme.res with a
> comment that says this is currently overriden in code...
> A. Where is it overriden (engine? SDK? VGUI code?) and B. How do i
> make this work? Is there another way to do this besides making one
> file per team?
___
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders