diff --git a/extern/imgui_patched/imgui.cpp b/extern/imgui_patched/imgui.cpp index 90dc211f..ceb71b32 100644 --- a/extern/imgui_patched/imgui.cpp +++ b/extern/imgui_patched/imgui.cpp @@ -9522,6 +9522,8 @@ void ImGui::UpdateInputEvents(bool trickle_fast_inputs) } else if (e->Type == ImGuiInputEventType_MouseButton) { + bool trickle_fast_inputs = true; // forcing trickle for MouseButton event + // Trickling Rule: Stop processing queued events if we got multiple action on the same button const ImGuiMouseButton button = e->MouseButton.Button; IM_ASSERT(button >= 0 && button < ImGuiMouseButton_COUNT); @@ -9549,6 +9551,8 @@ void ImGui::UpdateInputEvents(bool trickle_fast_inputs) } else if (e->Type == ImGuiInputEventType_Key) { + bool trickle_fast_inputs = true; // forcing trickle for Key event + // Trickling Rule: Stop processing queued events if we got multiple action on the same button ImGuiKey key = e->Key.Key; IM_ASSERT(key != ImGuiKey_None); @@ -9570,6 +9574,10 @@ void ImGui::UpdateInputEvents(bool trickle_fast_inputs) } else if (e->Type == ImGuiInputEventType_Text) { + // forcing trickle for Text event, but only when interacting with keydown or mouse button + if ((key_changed && trickle_interleaved_keys_and_text) || mouse_button_changed != 0) + break; + // Trickling Rule: Stop processing queued events if keys/mouse have been interacted with if (trickle_fast_inputs && ((key_changed && trickle_interleaved_keys_and_text) || mouse_button_changed != 0 || mouse_moved || mouse_wheeled)) break; diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 7cdba4c6..f55a4903 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -3287,19 +3287,6 @@ void FurnaceGUI::pointUp(int x, int y, int button) { if (dragMobileEditButton) { dragMobileEditButton=false; } - if (selecting) { - if (!selectingFull) cursor=selEnd; - finishSelection(); - if (!mobileUI) { - demandScrollX=true; - if (cursor.xCoarse==selStart.xCoarse && cursor.xFine==selStart.xFine && cursor.y==selStart.y && - cursor.xCoarse==selEnd.xCoarse && cursor.xFine==selEnd.xFine && cursor.y==selEnd.y) { - if (!settings.cursorMoveNoScroll) { - updateScroll(cursor.y); - } - } - } - } } void FurnaceGUI::pointMotion(int x, int y, int xrel, int yrel) { @@ -4558,6 +4545,21 @@ bool FurnaceGUI::loop() { MEASURE(effectList,drawEffectList()); } + // release selection if mouse released + if (ImGui::IsMouseReleased(ImGuiMouseButton_Left) && selecting) { + if (!selectingFull) cursor=selEnd; + finishSelection(); + if (!mobileUI) { + demandScrollX=true; + if (cursor.xCoarse==selStart.xCoarse && cursor.xFine==selStart.xFine && cursor.y==selStart.y && + cursor.xCoarse==selEnd.xCoarse && cursor.xFine==selEnd.xFine && cursor.y==selEnd.y) { + if (!settings.cursorMoveNoScroll) { + updateScroll(cursor.y); + } + } + } + } + for (int i=0; igetTotalChannelCount(); i++) { keyHit1[i]-=0.2f; if (keyHit1[i]<0.0f) keyHit1[i]=0.0f; diff --git a/src/gui/pattern.cpp b/src/gui/pattern.cpp index 2805af02..a1ba6336 100644 --- a/src/gui/pattern.cpp +++ b/src/gui/pattern.cpp @@ -933,6 +933,7 @@ void FurnaceGUI::drawPattern() { ImGui::TableNextColumn(); } } + ImGui::EndDisabled(); ImGui::PopStyleVar(); oldRow=curRow;