GUI: prepare to add auto-clone feature

This commit is contained in:
tildearrow 2023-10-18 00:00:23 -05:00
parent 74d2e7e329
commit d5da4d7e52
5 changed files with 35 additions and 3 deletions

View file

@ -101,7 +101,11 @@ inline void FurnaceGUI::patternRow(int i, bool isPlaying, float lineHeight, int
// check overflow highlight
if (settings.overflowHighlight) {
if (edit && cursor.y==i && curWindowLast==GUI_WINDOW_PATTERN) {
ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0,ImGui::GetColorU32(uiColors[GUI_COLOR_EDITING]));
if (editClone && !isPatUnique && secondTimer<0.5) {
ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0,ImGui::GetColorU32(uiColors[GUI_COLOR_EDITING_CLONE]));
} else {
ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0,ImGui::GetColorU32(uiColors[GUI_COLOR_EDITING]));
}
} else if (isPlaying && oldRow==i && ord==playOrder) {
ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0,ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PLAY_HEAD]));
} else if (e->curSubSong->hilightB>0 && !(i%e->curSubSong->hilightB)) {
@ -112,7 +116,11 @@ inline void FurnaceGUI::patternRow(int i, bool isPlaying, float lineHeight, int
} else {
isPushing=true;
if (edit && cursor.y==i && curWindowLast==GUI_WINDOW_PATTERN) {
ImGui::PushStyleColor(ImGuiCol_Header,ImGui::GetColorU32(uiColors[GUI_COLOR_EDITING]));
if (editClone && !isPatUnique && secondTimer<0.5) {
ImGui::PushStyleColor(ImGuiCol_Header,ImGui::GetColorU32(uiColors[GUI_COLOR_EDITING_CLONE]));
} else {
ImGui::PushStyleColor(ImGuiCol_Header,ImGui::GetColorU32(uiColors[GUI_COLOR_EDITING]));
}
} else if (isPlaying && oldRow==i && ord==playOrder) {
ImGui::PushStyleColor(ImGuiCol_Header,ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PLAY_HEAD]));
} else if (e->curSubSong->hilightB>0 && !(i%e->curSubSong->hilightB)) {