GUI: better inertial scroll inhibit logic
also better pattern editor mute in mobile
This commit is contained in:
parent
e7cfde9a2b
commit
f84469e4fd
5 changed files with 51 additions and 12 deletions
|
|
@ -61,6 +61,8 @@
|
|||
if (SDL_HapticRumblePlay(vibrator,0.5f,20)!=0) { \
|
||||
logV("could not vibrate: %s!",SDL_GetError()); \
|
||||
} \
|
||||
} else { \
|
||||
fputc(7,stderr); /* bell */ \
|
||||
}
|
||||
|
||||
#define BIND_FOR(x) getKeyName(actionKeys[x],true).c_str()
|
||||
|
|
|
|||
|
|
@ -734,19 +734,36 @@ void FurnaceGUI::drawPattern() {
|
|||
ImGui::SetTooltip("%s",e->getChannelName(i));
|
||||
}
|
||||
if (settings.channelFont==0) ImGui::PopFont();
|
||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) {
|
||||
if (settings.soloAction!=1 && soloTimeout>0 && soloChan==i) {
|
||||
e->toggleSolo(i);
|
||||
soloTimeout=0;
|
||||
} else {
|
||||
e->toggleMute(i);
|
||||
soloTimeout=20;
|
||||
soloChan=i;
|
||||
if (mobileUI) {
|
||||
if (ImGui::IsItemHovered()) {
|
||||
if (CHECK_LONG_HOLD) {
|
||||
NOTIFY_LONG_HOLD;
|
||||
e->toggleSolo(i);
|
||||
soloChan=i;
|
||||
}
|
||||
if (ImGui::IsMouseReleased(ImGuiMouseButton_Left) && !ImGui::WasInertialScroll()) {
|
||||
if (soloChan!=i) {
|
||||
e->toggleMute(i);
|
||||
} else {
|
||||
soloChan=-1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) {
|
||||
if (settings.soloAction!=1 && soloTimeout>0 && soloChan==i) {
|
||||
e->toggleSolo(i);
|
||||
soloTimeout=0;
|
||||
} else {
|
||||
e->toggleMute(i);
|
||||
soloTimeout=20;
|
||||
soloChan=i;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (muted) ImGui::PopStyleColor();
|
||||
ImGui::PopStyleColor(4);
|
||||
if (settings.soloAction!=2) if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
||||
if (settings.soloAction!=2 && !mobileUI) if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
||||
inhibitMenu=true;
|
||||
e->toggleSolo(i);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue