MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / LoadColors

Function LoadColors

WinArk/ThemeSystem.cpp:156–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156bool 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}

Callers 2

OnLoadMethod · 0.85
LoadSettingsMethod · 0.85

Calls 3

ReadColorMethod · 0.80
ReadStringMethod · 0.80
IsValidMethod · 0.45

Tested by

no test coverage detected