diff --git a/src/gui/gui.h b/src/gui/gui.h index e96267036..9b1ec5e37 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -3016,6 +3016,7 @@ class FurnaceGUI { float calcBPM(const DivGroovePattern& speeds, float hz, int vN, int vD); + ImVec2 mapSelPoint(const SelectionPoint& s, float lineHeight); void patternRow(int i, bool isPlaying, float lineHeight, int chans, int ord, const DivPattern** patCache, bool inhibitSel); void drawMacroEdit(FurnaceGUIMacroDesc& i, int totalFit, float availableWidth, int index); diff --git a/src/gui/newPattern.cpp b/src/gui/newPattern.cpp index 7f2d40e06..859cd8db6 100644 --- a/src/gui/newPattern.cpp +++ b/src/gui/newPattern.cpp @@ -42,6 +42,12 @@ // this is ImGui's TABLE_BORDER_SIZE. #define PAT_BORDER_SIZE 1.0f +ImVec2 FurnaceGUI::mapSelPoint(const SelectionPoint& s, float lineHeight) { + int mappedXCoarse=s.xCoarse; + int mappedXFine=s.xFine; + return ImVec2(0,0); +} + void FurnaceGUI::drawPatternNew() { if (nextWindow==GUI_WINDOW_PATTERN) { patternOpen=true; @@ -239,8 +245,52 @@ void FurnaceGUI::drawPatternNew() { } } - // selection/cursor background - // TODO + // selection background + { + int ord=firstOrd; + int row=firstRow; + bool isPlaying=e->isPlaying(); + int curSelFindStage=0; + ImRect selRect; + SETUP_ORDER_ALPHA; + // we find the selection's Y position. + for (int j=0; jAddRectFilled( + selRect.Min, + selRect.Max, + ImGui::GetColorU32(); + ) + curSelFindStage=3; + break; + } + + if (++row>=e->curSubSong->patLen) { + row=0; + ord++; + SETUP_ORDER_ALPHA; + } + pos.y+=lineHeight; + } + } // channels and borders for (int i=0; i