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

Function SaveColors

WinArk/ThemeSystem.cpp:142–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142bool SaveColors(PCWSTR path, PCWSTR prefix, const ThemeColor* colors, int count) {
143 IniFile file(path);
144 CString text;
145
146 for (int i = 0; i < count; i++) {
147 text.Format(L"%s%d", prefix, i);
148 auto& info = colors[i];
149 if (!file.WriteColor(text, L"Color", info.Color))
150 return false;
151 file.WriteString(text, L"Name", info.Name);
152 }
153 return true;
154}
155
156bool LoadColors(PCWSTR path, PCWSTR prefix, ThemeColor* colors, int count) {
157 IniFile file(path);

Callers 2

OnSaveMethod · 0.85
SaveSettingsMethod · 0.85

Calls 2

WriteColorMethod · 0.80
WriteStringMethod · 0.45

Tested by

no test coverage detected