diff --git a/src/gui/gui.h b/src/gui/gui.h index 381b3b427..ca4333343 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -113,6 +113,7 @@ enum FurnaceGUIColors { GUI_COLOR_ORDER_ROW_INDEX, GUI_COLOR_ORDER_ACTIVE, + GUI_COLOR_ORDER_SELECTED, GUI_COLOR_ORDER_SIMILAR, GUI_COLOR_ORDER_INACTIVE, diff --git a/src/gui/guiConst.cpp b/src/gui/guiConst.cpp index 0445704ed..80a76c43d 100644 --- a/src/gui/guiConst.cpp +++ b/src/gui/guiConst.cpp @@ -742,6 +742,7 @@ const FurnaceGUIColorDef guiColors[GUI_COLOR_MAX]={ 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_SELECTED,"",ImVec4(0.6f,0.8f,1.0f,0.75f)), 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)), diff --git a/src/gui/orders.cpp b/src/gui/orders.cpp index 914217787..16a9c1bbb 100644 --- a/src/gui/orders.cpp +++ b/src/gui/orders.cpp @@ -19,8 +19,10 @@ #include "gui.h" #include +#include #include "IconsFontAwesome4.h" #include "imgui_internal.h" +#include "../ta-log.h" void FurnaceGUI::drawMobileOrderSel() { if (!portrait) return; @@ -129,6 +131,7 @@ void FurnaceGUI::drawOrders() { } } ImGui::TableNextRow(0,lineHeight); + ImVec2 ra=ImGui::GetContentRegionAvail(); ImGui::TableNextColumn(); ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_ORDER_ROW_INDEX]); for (int i=0; igetTotalChannelCount(); i++) { @@ -141,6 +144,14 @@ void FurnaceGUI::drawOrders() { ImGui::TableNextRow(0,lineHeight); if (oldOrder1==i) ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0,ImGui::GetColorU32(uiColors[GUI_COLOR_ORDER_ACTIVE])); ImGui::TableNextColumn(); + if ((!followPattern && curOrder==i) || (followPattern && oldOrder1==i)) { + // draw a border + ImDrawList* dl=ImGui::GetWindowDrawList(); + ImVec2 rBegin=ImGui::GetCursorScreenPos(); + rBegin.y-=ImGui::GetStyle().CellPadding.y; + ImVec2 rEnd=ImVec2(rBegin.x+ra.x,rBegin.y+lineHeight); + dl->AddRect(rBegin,rEnd,ImGui::GetColorU32(uiColors[GUI_COLOR_ORDER_SELECTED]),2.0f*dpiScale); + } ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_ORDER_ROW_INDEX]); bool highlightLoop=(i>=loopOrder && i<=loopEnd); if (highlightLoop) ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg,ImGui::GetColorU32(uiColors[GUI_COLOR_SONG_LOOP])); diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 70a435fc5..da803e923 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -1811,7 +1811,8 @@ void FurnaceGUI::drawSettings() { } if (ImGui::TreeNode("Orders")) { UI_COLOR_CONFIG(GUI_COLOR_ORDER_ROW_INDEX,"Order number"); - UI_COLOR_CONFIG(GUI_COLOR_ORDER_ACTIVE,"Current order background"); + UI_COLOR_CONFIG(GUI_COLOR_ORDER_ACTIVE,"Playing order background"); + UI_COLOR_CONFIG(GUI_COLOR_ORDER_SELECTED,"Selected order"); UI_COLOR_CONFIG(GUI_COLOR_ORDER_SIMILAR,"Similar patterns"); UI_COLOR_CONFIG(GUI_COLOR_ORDER_INACTIVE,"Inactive patterns"); ImGui::TreePop();