| 66 | } |
| 67 | |
| 68 | RGBAColor DecodeColorValue(const char *value) |
| 69 | { |
| 70 | RGBAColor color{255}; |
| 71 | uint8_t counter = 0; |
| 72 | int charIndex = 0; |
| 73 | while (value[charIndex] != '\0') |
| 74 | { |
| 75 | if (charIndex == 0) |
| 76 | color.values[counter++] = atoi(value + charIndex++); |
| 77 | if (value[charIndex++] == ',') |
| 78 | { |
| 79 | color.values[counter++] = atoi(value + charIndex); |
| 80 | if (counter == 4) |
| 81 | break; |
| 82 | } |
| 83 | } |
| 84 | return color; |
| 85 | } |
| 86 | |
| 87 | int ParseConfigLine(void *dummy, const char *section, const char *name, const char *value) |
| 88 | { |