vgui2/src/Scheme.cpp
Color CScheme::GetColor(const char *colorName, Color defaultColor)
{
	const char *pchT = LookupSchemeSetting(colorName);
	if (!pchT)
		return defaultColor;

	int r, g, b, a = 0;
	if (sscanf(pchT, "%d %d %d %d", &r, &g, &b, &a) >= 3)
		return Color(r, g, b, a);

	return defaultColor;
}
//-----------------------------------------------------------------------------
// Purpose: Gets a color from the scheme file
//-----------------------------------------------------------------------------
Gets a color from the scheme file
Gets a color from the scheme file
Color CScheme::GetColor(const char *colorName, Color defaultColor)
{
	const char *pchT = LookupSchemeSetting(colorName);
	if (!pchT)
		return defaultColor;
	int r, g, b, a = 0;
	if (sscanf(pchT, "%d %d %d %d", &r, &g, &b, &a) >= 3)
		return Color(r, g, b, a);
	return defaultColor;
}
Color CScheme :: GetColor ( const char * colorName , Color defaultColor ) { const char * pchT = LookupSchemeSetting ( colorName ) ; if ( ! pchT ) return defaultColor ; int r , g , b , a = 0 ; if ( sscanf ( pchT , " " , & r , & g , & b , & a ) >= 3 ) return Color ( r , g , b , a ) ; return defaultColor ; }
Purpose: Gets a color from the scheme file
Purpose : Gets a color from the scheme file