Subversion Repositories tpanel

Rev

Rev 108 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 108 Rev 137
Line 35... Line 35...
35
TColor::COLOR_T TColor::getAMXColor(const string& color)
35
TColor::COLOR_T TColor::getAMXColor(const string& color)
36
{
36
{
37
    DECL_TRACER("TColor::getAMXColor(const string& color)");
37
    DECL_TRACER("TColor::getAMXColor(const string& color)");
38
 
38
 
39
    if (color.empty())
39
    if (color.empty())
-
 
40
    {
-
 
41
        MSG_WARNING("Empty color name is ignored!");
40
        return TColor::COLOR_T();
42
        return TColor::COLOR_T();
-
 
43
    }
41
 
44
 
42
    size_t pos = color.find('#');
45
    size_t pos = color.find('#');
43
 
46
 
44
    if (pos == string::npos)
47
    if (pos == string::npos)
45
    {
48
    {
Line 53... Line 56...
53
        PDATA_T pd = mPalette->findColor(color);
56
        PDATA_T pd = mPalette->findColor(color);
54
 
57
 
55
        if (!pd.name.empty())
58
        if (!pd.name.empty())
56
            return splitColors(pd);
59
            return splitColors(pd);
57
 
60
 
-
 
61
        MSG_DEBUG("Color " << color << " not found in table!");
58
        return TColor::COLOR_T();
62
        return TColor::COLOR_T();
59
    }
63
    }
60
 
64
 
61
    // Check if we've an index number
65
    // Check if we've an index number
62
    if (color.length() <= 2 && isdigit(color[0]))
66
    if (color.length() <= 2 && isdigit(color[0]))