GUI: simplify color load/save code

they are in guiConst.cpp now too.
This commit is contained in:
tildearrow 2022-04-06 02:30:12 -05:00
parent 95ce867ce3
commit 132c5007fa
3 changed files with 129 additions and 210 deletions

View file

@ -350,6 +350,118 @@ const FurnaceGUIActionDef guiActions[GUI_ACTION_MAX]={
};
#undef D
#define D(x,y,z) FurnaceGUIColorDef(#x,y,ImGui::ColorConvertFloat4ToU32(z))
const FurnaceGUIColorDef guiColors[GUI_COLOR_MAX]={
D(GUI_COLOR_BACKGROUND,"Background",ImVec4(0.1f,0.1f,0.1f,1.0f)),
D(GUI_COLOR_FRAME_BACKGROUND,"",ImVec4(0.0f,0.0f,0.0f,0.85f)),
D(GUI_COLOR_MODAL_BACKDROP,"",ImVec4(0.0f,0.0f,0.0f,0.55f)),
D(GUI_COLOR_HEADER,"",ImVec4(0.2f,0.2f,0.2f,1.0f)),
D(GUI_COLOR_TEXT,"",ImVec4(1.0f,1.0f,1.0f,1.0f)),
D(GUI_COLOR_ACCENT_PRIMARY,"",ImVec4(0.06f,0.53f,0.98f,1.0f)),
D(GUI_COLOR_ACCENT_SECONDARY,"",ImVec4(0.26f,0.59f,0.98f,1.0f)),
D(GUI_COLOR_BORDER,"",ImVec4(0.43f,0.43f,0.5f,0.5f)),
D(GUI_COLOR_BORDER_SHADOW,"",ImVec4(0.0f,0.0f,0.0f,0.0f)),
D(GUI_COLOR_TOGGLE_OFF,"",ImVec4(0.2f,0.2f,0.2f,1.0f)),
D(GUI_COLOR_TOGGLE_ON,"",ImVec4(0.2f,0.6f,0.2f,1.0f)),
D(GUI_COLOR_EDITING,"",ImVec4(0.2f,0.1f,0.1f,1.0f)),
D(GUI_COLOR_SONG_LOOP,"",ImVec4(0.3f,0.5f,0.8f,0.4f)),
D(GUI_COLOR_FILE_DIR,"",ImVec4(0.0f,1.0f,1.0f,1.0f)),
D(GUI_COLOR_FILE_SONG_NATIVE,"",ImVec4(0.5f,1.0f,0.5f,1.0f)),
D(GUI_COLOR_FILE_SONG_IMPORT,"",ImVec4(0.5f,1.0f,0.8f,1.0f)),
D(GUI_COLOR_FILE_INSTR,"",ImVec4(1.0f,0.5f,0.5f,1.0f)),
D(GUI_COLOR_FILE_AUDIO,"",ImVec4(1.0f,1.0f,0.5f,1.0f)),
D(GUI_COLOR_FILE_WAVE,"",ImVec4(1.0f,0.75f,0.5f,1.0f)),
D(GUI_COLOR_FILE_VGM,"",ImVec4(1.0f,1.0f,0.5f,1.0f)),
D(GUI_COLOR_FILE_FONT,"",ImVec4(0.3f,1.0f,0.6f,1.0f)),
D(GUI_COLOR_FILE_OTHER,"",ImVec4(0.7f,0.7f,0.7f,1.0f)),
D(GUI_COLOR_VOLMETER_LOW,"",ImVec4(0.2f,0.6f,0.2f,1.0f)),
D(GUI_COLOR_VOLMETER_HIGH,"",ImVec4(1.0f,0.9f,0.2f,1.0f)),
D(GUI_COLOR_VOLMETER_PEAK,"",ImVec4(1.0f,0.1f,0.1f,1.0f)),
D(GUI_COLOR_ORDER_ROW_INDEX,"",ImVec4(0.5f,0.8f,1.0f,1.0f)),
D(GUI_COLOR_ORDER_ACTIVE,"",ImVec4(0.4f,0.7f,1.0f,0.25f)),
D(GUI_COLOR_ORDER_SIMILAR,"",ImVec4(0.5f,1.0f,1.0f,1.0f)),
D(GUI_COLOR_ORDER_INACTIVE,"",ImVec4(1.0f,1.0f,1.0f,1.0f)),
D(GUI_COLOR_MACRO_VOLUME,"",ImVec4(0.2f,1.0f,0.0f,1.0f)),
D(GUI_COLOR_MACRO_PITCH,"",ImVec4(1.0f,0.8f,0.0f,1.0f)),
D(GUI_COLOR_MACRO_OTHER,"",ImVec4(0.0f,0.9f,1.0f,1.0f)),
D(GUI_COLOR_MACRO_WAVE,"",ImVec4(1.0f,0.4f,0.0f,1.0f)),
D(GUI_COLOR_INSTR_FM,"",ImVec4(0.6f,0.9f,1.0f,1.0f)),
D(GUI_COLOR_INSTR_STD,"",ImVec4(0.6f,1.0f,0.5f,1.0f)),
D(GUI_COLOR_INSTR_GB,"",ImVec4(1.0f,1.0f,0.5f,1.0f)),
D(GUI_COLOR_INSTR_C64,"",ImVec4(0.85f,0.8f,1.0f,1.0f)),
D(GUI_COLOR_INSTR_AMIGA,"",ImVec4(1.0f,0.5f,0.5f,1.0f)),
D(GUI_COLOR_INSTR_PCE,"",ImVec4(1.0f,0.8f,0.5f,1.0f)),
D(GUI_COLOR_INSTR_AY,"",ImVec4(1.0f,0.5f,1.0f,1.0f)),
D(GUI_COLOR_INSTR_AY8930,"",ImVec4(0.7f,0.5f,1.0f,1.0f)),
D(GUI_COLOR_INSTR_TIA,"",ImVec4(1.0f,0.6f,0.4f,1.0f)),
D(GUI_COLOR_INSTR_SAA1099,"",ImVec4(0.3f,0.3f,1.0f,1.0f)),
D(GUI_COLOR_INSTR_VIC,"",ImVec4(0.2f,1.0f,0.6f,1.0f)),
D(GUI_COLOR_INSTR_PET,"",ImVec4(1.0f,1.0f,0.8f,1.0f)),
D(GUI_COLOR_INSTR_VRC6,"",ImVec4(1.0f,0.9f,0.5f,1.0f)),
D(GUI_COLOR_INSTR_VRC6_SAW,"",ImVec4(0.8f,0.3f,0.0f,1.0f)),
D(GUI_COLOR_INSTR_OPLL,"",ImVec4(0.6f,0.7f,1.0f,1.0f)),
D(GUI_COLOR_INSTR_OPL,"",ImVec4(0.3f,1.0f,0.9f,1.0f)),
D(GUI_COLOR_INSTR_FDS,"",ImVec4(0.8f,0.5f,1.0f,1.0f)),
D(GUI_COLOR_INSTR_VBOY,"",ImVec4(1.0f,0.1f,0.1f,1.0f)),
D(GUI_COLOR_INSTR_N163,"",ImVec4(1.0f,0.4f,0.1f,1.0f)),
D(GUI_COLOR_INSTR_SCC,"",ImVec4(0.7f,1.0f,0.3f,1.0f)),
D(GUI_COLOR_INSTR_OPZ,"",ImVec4(0.2f,0.8f,1.0f,1.0f)),
D(GUI_COLOR_INSTR_POKEY,"",ImVec4(0.5f,1.0f,0.3f,1.0f)),
D(GUI_COLOR_INSTR_BEEPER,"",ImVec4(0.0f,1.0f,0.0f,1.0f)),
D(GUI_COLOR_INSTR_SWAN,"",ImVec4(0.3f,0.5f,1.0f,1.0f)),
D(GUI_COLOR_INSTR_MIKEY,"",ImVec4(0.5f,1.0f,0.3f,1.0f)),
D(GUI_COLOR_INSTR_VERA,"",ImVec4(0.4f,0.6f,1.0f,1.0f)),
D(GUI_COLOR_INSTR_X1_010,"",ImVec4(0.3f,0.5f,1.0f,1.0f)),
D(GUI_COLOR_INSTR_UNKNOWN,"",ImVec4(0.3f,0.3f,0.3f,1.0f)),
D(GUI_COLOR_CHANNEL_FM,"",ImVec4(0.2f,0.8f,1.0f,1.0f)),
D(GUI_COLOR_CHANNEL_PULSE,"",ImVec4(0.4f,1.0f,0.2f,1.0f)),
D(GUI_COLOR_CHANNEL_NOISE,"",ImVec4(0.8f,0.8f,0.8f,1.0f)),
D(GUI_COLOR_CHANNEL_WAVE,"",ImVec4(1.0f,0.9f,0.2f,1.0f)),
D(GUI_COLOR_CHANNEL_PCM,"",ImVec4(1.0f,0.5f,0.2f,1.0f)),
D(GUI_COLOR_CHANNEL_OP,"",ImVec4(0.2f,0.4f,1.0f,1.0f)),
D(GUI_COLOR_CHANNEL_MUTED,"",ImVec4(0.5f,0.5f,0.5f,1.0f)),
D(GUI_COLOR_PATTERN_PLAY_HEAD,"",ImVec4(1.0f,1.0f,1.0f,0.25f)),
D(GUI_COLOR_PATTERN_CURSOR,"",ImVec4(0.1f,0.3f,0.5f,1.0f)),
D(GUI_COLOR_PATTERN_CURSOR_HOVER,"",ImVec4(0.2f,0.4f,0.6f,1.0f)),
D(GUI_COLOR_PATTERN_CURSOR_ACTIVE,"",ImVec4(0.2f,0.5f,0.7f,1.0f)),
D(GUI_COLOR_PATTERN_SELECTION,"",ImVec4(0.15f,0.15f,0.2f,1.0f)),
D(GUI_COLOR_PATTERN_SELECTION_HOVER,"",ImVec4(0.2f,0.2f,0.3f,1.0f)),
D(GUI_COLOR_PATTERN_SELECTION_ACTIVE,"",ImVec4(0.4f,0.4f,0.5f,1.0f)),
D(GUI_COLOR_PATTERN_HI_1,"",ImVec4(0.6f,0.6f,0.6f,0.2f)),
D(GUI_COLOR_PATTERN_HI_2,"",ImVec4(0.5f,0.8f,1.0f,0.2f)),
D(GUI_COLOR_PATTERN_ROW_INDEX,"",ImVec4(0.5f,0.8f,1.0f,1.0f)),
D(GUI_COLOR_PATTERN_ACTIVE,"",ImVec4(1.0f,1.0f,1.0f,1.0f)),
D(GUI_COLOR_PATTERN_INACTIVE,"",ImVec4(0.5f,0.5f,0.5f,1.0f)),
D(GUI_COLOR_PATTERN_INS,"",ImVec4(0.4f,0.7f,1.0f,1.0f)),
D(GUI_COLOR_PATTERN_INS_WARN,"",ImVec4(1.0f,1.0f,0.1f,1.0f)),
D(GUI_COLOR_PATTERN_INS_ERROR,"",ImVec4(1.0f,0.1f,0.1f,1.0f)),
D(GUI_COLOR_PATTERN_VOLUME_MAX,"",ImVec4(0.0f,1.0f,0.0f,1.0f)),
D(GUI_COLOR_PATTERN_VOLUME_HALF,"",ImVec4(0.0f,0.75f,0.0f,1.0f)),
D(GUI_COLOR_PATTERN_VOLUME_MIN,"",ImVec4(0.0f,0.5f,0.0f,1.0f)),
D(GUI_COLOR_PATTERN_EFFECT_INVALID,"",ImVec4(1.0f,0.0f,0.0f,1.0f)),
D(GUI_COLOR_PATTERN_EFFECT_PITCH,"",ImVec4(1.0f,1.0f,0.0f,1.0f)),
D(GUI_COLOR_PATTERN_EFFECT_VOLUME,"",ImVec4(0.0f,1.0f,0.0f,1.0f)),
D(GUI_COLOR_PATTERN_EFFECT_PANNING,"",ImVec4(0.0f,1.0f,1.0f,1.0f)),
D(GUI_COLOR_PATTERN_EFFECT_SONG,"",ImVec4(1.0f,0.0f,0.0f,1.0f)),
D(GUI_COLOR_PATTERN_EFFECT_TIME,"",ImVec4(0.5f,0.0f,1.0f,1.0f)),
D(GUI_COLOR_PATTERN_EFFECT_SPEED,"",ImVec4(1.0f,0.0f,1.0f,1.0f)),
D(GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,"",ImVec4(0.5f,1.0f,0.0f,1.0f)),
D(GUI_COLOR_PATTERN_EFFECT_SYS_SECONDARY,"",ImVec4(0.0f,1.0f,0.5f,1.0f)),
D(GUI_COLOR_PATTERN_EFFECT_MISC,"",ImVec4(0.3f,0.3f,1.0f,1.0f)),
D(GUI_COLOR_EE_VALUE,"",ImVec4(0.0f,1.0f,1.0f,1.0f)),
D(GUI_COLOR_PLAYBACK_STAT,"",ImVec4(0.6f,0.6f,0.6f,1.0f)),
};
#undef D
// define systems.
const int availableSystems[]={
DIV_SYSTEM_YM2612,

View file

@ -27,6 +27,14 @@ struct FurnaceGUIActionDef {
name(n), friendlyName(fn), defaultBind(db) {}
};
struct FurnaceGUIColorDef {
const char* name;
const char* friendlyName;
unsigned int defaultColor;
FurnaceGUIColorDef(const char* n, const char* fn, unsigned int dc):
name(n), friendlyName(fn), defaultColor(dc) {}
};
extern const int opOrder[4];
extern const char* noteNames[180];
extern const char* noteNamesG[180];
@ -36,5 +44,6 @@ extern const char* sampleDepths[17];
extern const char* resampleStrats[];
extern const int availableSystems[];
extern const FurnaceGUIActionDef guiActions[];
extern const FurnaceGUIColorDef guiColors[];
extern const int altValues[24];
extern const int vgmVersions[6];

View file

@ -1477,9 +1477,6 @@ void FurnaceGUI::syncSettings() {
e->setMidiDirect(midiMap.directChannel);
}
#define PUT_UI_COLOR(source) e->setConf(#source,(int)ImGui::GetColorU32(uiColors[source]));
#define SAVE_KEYBIND(x) e->setConf("keybind_" #x,actionKeys[x]);
void FurnaceGUI::commitSettings() {
e->setConf("mainFontSize",settings.mainFontSize);
e->setConf("patFontSize",settings.patFontSize);
@ -1538,104 +1535,10 @@ void FurnaceGUI::commitSettings() {
e->setConf("titleBarSys",settings.titleBarSys);
e->setConf("frameBorders",settings.frameBorders);
PUT_UI_COLOR(GUI_COLOR_BACKGROUND);
PUT_UI_COLOR(GUI_COLOR_FRAME_BACKGROUND);
PUT_UI_COLOR(GUI_COLOR_MODAL_BACKDROP);
PUT_UI_COLOR(GUI_COLOR_HEADER);
PUT_UI_COLOR(GUI_COLOR_TEXT);
PUT_UI_COLOR(GUI_COLOR_ACCENT_PRIMARY);
PUT_UI_COLOR(GUI_COLOR_ACCENT_SECONDARY);
PUT_UI_COLOR(GUI_COLOR_BORDER);
PUT_UI_COLOR(GUI_COLOR_BORDER_SHADOW);
PUT_UI_COLOR(GUI_COLOR_TOGGLE_ON);
PUT_UI_COLOR(GUI_COLOR_TOGGLE_OFF);
PUT_UI_COLOR(GUI_COLOR_EDITING);
PUT_UI_COLOR(GUI_COLOR_SONG_LOOP);
PUT_UI_COLOR(GUI_COLOR_FILE_DIR);
PUT_UI_COLOR(GUI_COLOR_FILE_SONG_NATIVE);
PUT_UI_COLOR(GUI_COLOR_FILE_SONG_IMPORT);
PUT_UI_COLOR(GUI_COLOR_FILE_INSTR);
PUT_UI_COLOR(GUI_COLOR_FILE_AUDIO);
PUT_UI_COLOR(GUI_COLOR_FILE_WAVE);
PUT_UI_COLOR(GUI_COLOR_FILE_VGM);
PUT_UI_COLOR(GUI_COLOR_FILE_FONT);
PUT_UI_COLOR(GUI_COLOR_FILE_OTHER);
PUT_UI_COLOR(GUI_COLOR_VOLMETER_LOW);
PUT_UI_COLOR(GUI_COLOR_VOLMETER_HIGH);
PUT_UI_COLOR(GUI_COLOR_VOLMETER_PEAK);
PUT_UI_COLOR(GUI_COLOR_ORDER_ROW_INDEX);
PUT_UI_COLOR(GUI_COLOR_ORDER_ACTIVE);
PUT_UI_COLOR(GUI_COLOR_ORDER_SIMILAR);
PUT_UI_COLOR(GUI_COLOR_ORDER_INACTIVE);
PUT_UI_COLOR(GUI_COLOR_MACRO_VOLUME);
PUT_UI_COLOR(GUI_COLOR_MACRO_PITCH);
PUT_UI_COLOR(GUI_COLOR_MACRO_OTHER);
PUT_UI_COLOR(GUI_COLOR_MACRO_WAVE);
PUT_UI_COLOR(GUI_COLOR_INSTR_FM);
PUT_UI_COLOR(GUI_COLOR_INSTR_STD);
PUT_UI_COLOR(GUI_COLOR_INSTR_GB);
PUT_UI_COLOR(GUI_COLOR_INSTR_C64);
PUT_UI_COLOR(GUI_COLOR_INSTR_AMIGA);
PUT_UI_COLOR(GUI_COLOR_INSTR_PCE);
PUT_UI_COLOR(GUI_COLOR_INSTR_AY);
PUT_UI_COLOR(GUI_COLOR_INSTR_AY8930);
PUT_UI_COLOR(GUI_COLOR_INSTR_TIA);
PUT_UI_COLOR(GUI_COLOR_INSTR_SAA1099);
PUT_UI_COLOR(GUI_COLOR_INSTR_VIC);
PUT_UI_COLOR(GUI_COLOR_INSTR_PET);
PUT_UI_COLOR(GUI_COLOR_INSTR_VRC6);
PUT_UI_COLOR(GUI_COLOR_INSTR_VRC6_SAW);
PUT_UI_COLOR(GUI_COLOR_INSTR_OPLL);
PUT_UI_COLOR(GUI_COLOR_INSTR_OPL);
PUT_UI_COLOR(GUI_COLOR_INSTR_FDS);
PUT_UI_COLOR(GUI_COLOR_INSTR_VBOY);
PUT_UI_COLOR(GUI_COLOR_INSTR_N163);
PUT_UI_COLOR(GUI_COLOR_INSTR_SCC);
PUT_UI_COLOR(GUI_COLOR_INSTR_OPZ);
PUT_UI_COLOR(GUI_COLOR_INSTR_POKEY);
PUT_UI_COLOR(GUI_COLOR_INSTR_BEEPER);
PUT_UI_COLOR(GUI_COLOR_INSTR_SWAN);
PUT_UI_COLOR(GUI_COLOR_INSTR_MIKEY);
PUT_UI_COLOR(GUI_COLOR_INSTR_VERA);
PUT_UI_COLOR(GUI_COLOR_INSTR_X1_010);
PUT_UI_COLOR(GUI_COLOR_INSTR_UNKNOWN);
PUT_UI_COLOR(GUI_COLOR_CHANNEL_FM);
PUT_UI_COLOR(GUI_COLOR_CHANNEL_PULSE);
PUT_UI_COLOR(GUI_COLOR_CHANNEL_NOISE);
PUT_UI_COLOR(GUI_COLOR_CHANNEL_PCM);
PUT_UI_COLOR(GUI_COLOR_CHANNEL_WAVE);
PUT_UI_COLOR(GUI_COLOR_CHANNEL_OP);
PUT_UI_COLOR(GUI_COLOR_CHANNEL_MUTED);
PUT_UI_COLOR(GUI_COLOR_PATTERN_PLAY_HEAD);
PUT_UI_COLOR(GUI_COLOR_PATTERN_CURSOR);
PUT_UI_COLOR(GUI_COLOR_PATTERN_CURSOR_HOVER);
PUT_UI_COLOR(GUI_COLOR_PATTERN_CURSOR_ACTIVE);
PUT_UI_COLOR(GUI_COLOR_PATTERN_SELECTION);
PUT_UI_COLOR(GUI_COLOR_PATTERN_SELECTION_HOVER);
PUT_UI_COLOR(GUI_COLOR_PATTERN_SELECTION_ACTIVE);
PUT_UI_COLOR(GUI_COLOR_PATTERN_HI_1);
PUT_UI_COLOR(GUI_COLOR_PATTERN_HI_2);
PUT_UI_COLOR(GUI_COLOR_PATTERN_ROW_INDEX);
PUT_UI_COLOR(GUI_COLOR_PATTERN_ACTIVE);
PUT_UI_COLOR(GUI_COLOR_PATTERN_INACTIVE);
PUT_UI_COLOR(GUI_COLOR_PATTERN_INS);
PUT_UI_COLOR(GUI_COLOR_PATTERN_INS_WARN);
PUT_UI_COLOR(GUI_COLOR_PATTERN_INS_ERROR);
PUT_UI_COLOR(GUI_COLOR_PATTERN_VOLUME_MIN);
PUT_UI_COLOR(GUI_COLOR_PATTERN_VOLUME_HALF);
PUT_UI_COLOR(GUI_COLOR_PATTERN_VOLUME_MAX);
PUT_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_INVALID);
PUT_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_PITCH);
PUT_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_VOLUME);
PUT_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_PANNING);
PUT_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_SONG);
PUT_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_TIME);
PUT_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_SPEED);
PUT_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY);
PUT_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_SYS_SECONDARY);
PUT_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_MISC);
PUT_UI_COLOR(GUI_COLOR_EE_VALUE);
PUT_UI_COLOR(GUI_COLOR_PLAYBACK_STAT);
// colors
for (int i=0; i<GUI_COLOR_MAX; i++) {
e->setConf(guiColors[i].name,(int)ImGui::GetColorU32(uiColors[i]));
}
// keybinds
for (int i=0; i<GUI_ACTION_MAX; i++) {
@ -1728,9 +1631,6 @@ void FurnaceGUI::parseKeybinds() {
#define IGFD_FileStyleByExtension IGFD_FileStyleByExtention
#define GET_UI_COLOR(target,def) \
uiColors[target]=ImGui::ColorConvertU32ToFloat4(e->getConfInt(#target,ImGui::GetColorU32(def)));
#ifdef _WIN32
#define SYSTEM_FONT_PATH_1 "C:\\Windows\\Fonts\\segoeui.ttf"
#define SYSTEM_FONT_PATH_2 "C:\\Windows\\Fonts\\tahoma.ttf"
@ -1767,112 +1667,10 @@ void FurnaceGUI::applyUISettings() {
if (settings.dpiScale>=0.5f) dpiScale=settings.dpiScale;
GET_UI_COLOR(GUI_COLOR_BACKGROUND,ImVec4(0.1f,0.1f,0.1f,1.0f));
GET_UI_COLOR(GUI_COLOR_FRAME_BACKGROUND,ImVec4(0.0f,0.0f,0.0f,0.85f));
GET_UI_COLOR(GUI_COLOR_MODAL_BACKDROP,ImVec4(0.0f,0.0f,0.0f,0.55f));
GET_UI_COLOR(GUI_COLOR_HEADER,ImVec4(0.2f,0.2f,0.2f,1.0f));
GET_UI_COLOR(GUI_COLOR_TEXT,ImVec4(1.0f,1.0f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_ACCENT_PRIMARY,ImVec4(0.06f,0.53f,0.98f,1.0f));
GET_UI_COLOR(GUI_COLOR_ACCENT_SECONDARY,ImVec4(0.26f,0.59f,0.98f,1.0f));
GET_UI_COLOR(GUI_COLOR_BORDER,ImVec4(0.43f,0.43f,0.5f,0.5f));
GET_UI_COLOR(GUI_COLOR_BORDER_SHADOW,ImVec4(0.0f,0.0f,0.0f,0.0f));
GET_UI_COLOR(GUI_COLOR_TOGGLE_ON,ImVec4(0.2f,0.6f,0.2f,1.0f));
GET_UI_COLOR(GUI_COLOR_TOGGLE_OFF,ImVec4(0.2f,0.2f,0.2f,1.0f));
GET_UI_COLOR(GUI_COLOR_EDITING,ImVec4(0.2f,0.1f,0.1f,1.0f));
GET_UI_COLOR(GUI_COLOR_SONG_LOOP,ImVec4(0.3f,0.5f,0.8f,0.4f));
GET_UI_COLOR(GUI_COLOR_FILE_DIR,ImVec4(0.0f,1.0f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_FILE_SONG_NATIVE,ImVec4(0.5f,1.0f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_FILE_SONG_IMPORT,ImVec4(0.5f,1.0f,0.8f,1.0f));
GET_UI_COLOR(GUI_COLOR_FILE_INSTR,ImVec4(1.0f,0.5f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_FILE_AUDIO,ImVec4(1.0f,1.0f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_FILE_WAVE,ImVec4(1.0f,0.75f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_FILE_VGM,ImVec4(1.0f,1.0f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_FILE_FONT,ImVec4(0.3f,1.0f,0.6f,1.0f));
GET_UI_COLOR(GUI_COLOR_FILE_OTHER,ImVec4(0.7f,0.7f,0.7f,1.0f));
GET_UI_COLOR(GUI_COLOR_VOLMETER_LOW,ImVec4(0.2f,0.6f,0.2f,1.0f));
GET_UI_COLOR(GUI_COLOR_VOLMETER_HIGH,ImVec4(1.0f,0.9f,0.2f,1.0f));
GET_UI_COLOR(GUI_COLOR_VOLMETER_PEAK,ImVec4(1.0f,0.1f,0.1f,1.0f));
GET_UI_COLOR(GUI_COLOR_ORDER_ROW_INDEX,ImVec4(0.5f,0.8f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_ORDER_ACTIVE,ImVec4(0.4f,0.7f,1.0f,0.25f));
GET_UI_COLOR(GUI_COLOR_ORDER_SIMILAR,ImVec4(0.5f,1.0f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_ORDER_INACTIVE,ImVec4(1.0f,1.0f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_MACRO_VOLUME,ImVec4(0.2f,1.0f,0.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_MACRO_PITCH,ImVec4(1.0f,0.8f,0.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_MACRO_OTHER,ImVec4(0.0f,0.9f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_MACRO_WAVE,ImVec4(1.0f,0.4f,0.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_FM,ImVec4(0.6f,0.9f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_STD,ImVec4(0.6f,1.0f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_GB,ImVec4(1.0f,1.0f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_C64,ImVec4(0.85f,0.8f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_AMIGA,ImVec4(1.0f,0.5f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_PCE,ImVec4(1.0f,0.8f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_AY,ImVec4(1.0f,0.5f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_AY8930,ImVec4(0.7f,0.5f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_TIA,ImVec4(1.0f,0.6f,0.4f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_SAA1099,ImVec4(0.3f,0.3f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_VIC,ImVec4(0.2f,1.0f,0.6f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_PET,ImVec4(1.0f,1.0f,0.8f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_VRC6,ImVec4(1.0f,0.9f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_VRC6_SAW,ImVec4(0.8f,0.3f,0.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_OPLL,ImVec4(0.6f,0.7f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_OPL,ImVec4(0.3f,1.0f,0.9f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_FDS,ImVec4(0.8f,0.5f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_VBOY,ImVec4(1.0f,0.1f,0.1f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_N163,ImVec4(1.0f,0.4f,0.1f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_SCC,ImVec4(0.7f,1.0f,0.3f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_OPZ,ImVec4(0.2f,0.8f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_POKEY,ImVec4(0.5f,1.0f,0.3f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_BEEPER,ImVec4(0.0f,1.0f,0.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_SWAN,ImVec4(0.3f,0.5f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_MIKEY,ImVec4(0.5f,1.0f,0.3f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_VERA,ImVec4(0.4f,0.6f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_X1_010,ImVec4(0.3f,0.5f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_UNKNOWN,ImVec4(0.3f,0.3f,0.3f,1.0f));
GET_UI_COLOR(GUI_COLOR_CHANNEL_FM,ImVec4(0.2f,0.8f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_CHANNEL_PULSE,ImVec4(0.4f,1.0f,0.2f,1.0f));
GET_UI_COLOR(GUI_COLOR_CHANNEL_NOISE,ImVec4(0.8f,0.8f,0.8f,1.0f));
GET_UI_COLOR(GUI_COLOR_CHANNEL_PCM,ImVec4(1.0f,0.9f,0.2f,1.0f));
GET_UI_COLOR(GUI_COLOR_CHANNEL_WAVE,ImVec4(1.0f,0.5f,0.2f,1.0f));
GET_UI_COLOR(GUI_COLOR_CHANNEL_OP,ImVec4(0.2f,0.4f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_CHANNEL_MUTED,ImVec4(0.5f,0.5f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_PLAY_HEAD,ImVec4(1.0f,1.0f,1.0f,0.25f));
GET_UI_COLOR(GUI_COLOR_PATTERN_CURSOR,ImVec4(0.1f,0.3f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_CURSOR_HOVER,ImVec4(0.2f,0.4f,0.6f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_CURSOR_ACTIVE,ImVec4(0.2f,0.5f,0.7f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_SELECTION,ImVec4(0.15f,0.15f,0.2f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_SELECTION_HOVER,ImVec4(0.2f,0.2f,0.3f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_SELECTION_ACTIVE,ImVec4(0.4f,0.4f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_HI_1,ImVec4(0.6f,0.6f,0.6f,0.2f));
GET_UI_COLOR(GUI_COLOR_PATTERN_HI_2,ImVec4(0.5f,0.8f,1.0f,0.2f));
GET_UI_COLOR(GUI_COLOR_PATTERN_ROW_INDEX,ImVec4(0.5f,0.8f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_ACTIVE,ImVec4(1.0f,1.0f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_INACTIVE,ImVec4(0.5f,0.5f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_INS,ImVec4(0.4f,0.7f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_INS_WARN,ImVec4(1.0f,1.0f,0.1f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_INS_ERROR,ImVec4(1.0f,0.1f,0.1f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_VOLUME_MIN,ImVec4(0.0f,0.5f,0.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_VOLUME_HALF,ImVec4(0.0f,0.75f,0.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_VOLUME_MAX,ImVec4(0.0f,1.0f,0.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_INVALID,ImVec4(1.0f,0.0f,0.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_PITCH,ImVec4(1.0f,1.0f,0.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_VOLUME,ImVec4(0.0f,1.0f,0.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_PANNING,ImVec4(0.0f,1.0f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_SONG,ImVec4(1.0f,0.0f,0.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_TIME,ImVec4(0.5f,0.0f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_SPEED,ImVec4(1.0f,0.0f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,ImVec4(0.5f,1.0f,0.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_SYS_SECONDARY,ImVec4(0.0f,1.0f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_PATTERN_EFFECT_MISC,ImVec4(0.3f,0.3f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_EE_VALUE,ImVec4(0.0f,1.0f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_PLAYBACK_STAT,ImVec4(0.6f,0.6f,0.6f,1.0f));
// colors
for (int i=0; i<GUI_COLOR_MAX; i++) {
uiColors[i]=ImGui::ColorConvertU32ToFloat4(e->getConfInt(guiColors[i].name,guiColors[i].defaultColor));
}
for (int i=0; i<64; i++) {
ImVec4 col1=uiColors[GUI_COLOR_PATTERN_VOLUME_MIN];