| 154 | } |
| 155 | |
| 156 | bool LoadColors(PCWSTR path, PCWSTR prefix, ThemeColor* colors, int count) { |
| 157 | IniFile file(path); |
| 158 | if (!file.IsValid()) |
| 159 | return false; |
| 160 | |
| 161 | CString text; |
| 162 | for (int i = 0; i < count; i++) { |
| 163 | text.Format(L"%s%d", prefix, i); |
| 164 | auto& info = colors[i]; |
| 165 | info.Color = file.ReadColor(text, L"Color", info.Color); |
| 166 | info.Name = file.ReadString(text, L"Name", info.Name); |
| 167 | } |
| 168 | return true; |
| 169 | } |
no test coverage detected