2 #include "OptionsCustomColors.h"
3 #include "OptionsMgr.h"
5 namespace Options { namespace CustomColors
8 /** @brief Setting name for user-defined custom colors. */
9 const TCHAR Section[] = _T("Custom Colors");
11 void Init(COptionsMgr *pOptionsMgr)
13 for (int i = 0; i < 16; i++)
15 String valuename = strutils::format(_T("%s/%d"), Section, i);
16 pOptionsMgr->InitOption(valuename, RGB(255, 255, 255), true);
20 void Load(COptionsMgr *pOptionsMgr, COLORREF * colors)
22 for (int i = 0; i < 16; i++)
24 String valuename = strutils::format(_T("%s/%d"), Section, i);
25 colors[i] = pOptionsMgr->GetInt(valuename);
29 void Save(COptionsMgr *pOptionsMgr, const COLORREF * colors)
31 for (int i = 0; i < 16; i++)
33 String valuename = strutils::format(_T("%s/%d"), Section, i);
34 pOptionsMgr->SaveOption(valuename, static_cast<int>(colors[i]));