GUI: selection/scroll improvements
now you can scroll left/right by dragging selection to the side edges
This commit is contained in:
parent
f59cb23d9b
commit
dd9983778b
4 changed files with 29 additions and 2 deletions
|
|
@ -154,6 +154,7 @@ inline void FurnaceGUI::patternRow(int i, bool isPlaying, float lineHeight, int
|
|||
if (ImGui::IsItemActive() && CHECK_LONG_HOLD) {
|
||||
ImGui::InhibitInertialScroll();
|
||||
NOTIFY_LONG_HOLD;
|
||||
mobilePatSel=true;
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
// for each column
|
||||
|
|
@ -210,6 +211,7 @@ inline void FurnaceGUI::patternRow(int i, bool isPlaying, float lineHeight, int
|
|||
if (ImGui::IsItemActive() && CHECK_LONG_HOLD) {
|
||||
ImGui::InhibitInertialScroll();
|
||||
NOTIFY_LONG_HOLD;
|
||||
mobilePatSel=true;
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
|
||||
|
|
@ -253,6 +255,7 @@ inline void FurnaceGUI::patternRow(int i, bool isPlaying, float lineHeight, int
|
|||
if (ImGui::IsItemActive() && CHECK_LONG_HOLD) {
|
||||
ImGui::InhibitInertialScroll();
|
||||
NOTIFY_LONG_HOLD;
|
||||
mobilePatSel=true;
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
|
|
@ -290,6 +293,7 @@ inline void FurnaceGUI::patternRow(int i, bool isPlaying, float lineHeight, int
|
|||
if (ImGui::IsItemActive() && CHECK_LONG_HOLD) {
|
||||
ImGui::InhibitInertialScroll();
|
||||
NOTIFY_LONG_HOLD;
|
||||
mobilePatSel=true;
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
|
|
@ -342,6 +346,7 @@ inline void FurnaceGUI::patternRow(int i, bool isPlaying, float lineHeight, int
|
|||
if (ImGui::IsItemActive() && CHECK_LONG_HOLD) {
|
||||
ImGui::InhibitInertialScroll();
|
||||
NOTIFY_LONG_HOLD;
|
||||
mobilePatSel=true;
|
||||
}
|
||||
|
||||
// effect value
|
||||
|
|
@ -371,6 +376,7 @@ inline void FurnaceGUI::patternRow(int i, bool isPlaying, float lineHeight, int
|
|||
if (ImGui::IsItemActive() && CHECK_LONG_HOLD) {
|
||||
ImGui::InhibitInertialScroll();
|
||||
NOTIFY_LONG_HOLD;
|
||||
mobilePatSel=true;
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
|
|
@ -465,6 +471,7 @@ void FurnaceGUI::drawPattern() {
|
|||
ImGui::SetNextWindowScroll(ImVec2(-1.0f,nextScroll));
|
||||
nextScroll=-1.0f;
|
||||
nextAddScroll=0.0f;
|
||||
nextAddScrollX=0.0f;
|
||||
}
|
||||
ImDrawList* tdl=NULL;
|
||||
|
||||
|
|
@ -480,6 +487,10 @@ void FurnaceGUI::drawPattern() {
|
|||
nextScroll=-1.0f;
|
||||
nextAddScroll=0.0f;
|
||||
}
|
||||
if (nextAddScrollX!=0.0f) {
|
||||
ImGui::SetScrollX(ImGui::GetScrollX()+nextAddScrollX);
|
||||
nextAddScrollX=0.0f;
|
||||
}
|
||||
|
||||
ImGui::TableSetupScrollFreeze(1,1);
|
||||
for (int i=0; i<chans; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue