Merge branch 'force-critical-input-trickle' of https://github.com/bbbradsmith/furnace into force-critical-input-trickle
This commit is contained in:
commit
afe703faf2
4
extern/imgui_patched/imgui.cpp
vendored
4
extern/imgui_patched/imgui.cpp
vendored
|
@ -9574,7 +9574,9 @@ void ImGui::UpdateInputEvents(bool trickle_fast_inputs)
|
||||||
}
|
}
|
||||||
else if (e->Type == ImGuiInputEventType_Text)
|
else if (e->Type == ImGuiInputEventType_Text)
|
||||||
{
|
{
|
||||||
bool trickle_fast_inputs = true; // forcing trickle for Text event
|
// 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
|
// 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))
|
if (trickle_fast_inputs && ((key_changed && trickle_interleaved_keys_and_text) || mouse_button_changed != 0 || mouse_moved || mouse_wheeled))
|
||||||
|
|
|
@ -3235,19 +3235,6 @@ void FurnaceGUI::pointUp(int x, int y, int button) {
|
||||||
if (dragMobileEditButton) {
|
if (dragMobileEditButton) {
|
||||||
dragMobileEditButton=false;
|
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) {
|
void FurnaceGUI::pointMotion(int x, int y, int xrel, int yrel) {
|
||||||
|
@ -4502,6 +4489,21 @@ bool FurnaceGUI::loop() {
|
||||||
MEASURE(effectList,drawEffectList());
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
activateTutorial(GUI_TUTORIAL_OVERVIEW);
|
activateTutorial(GUI_TUTORIAL_OVERVIEW);
|
||||||
|
|
||||||
if (inspectorOpen) ImGui::ShowMetricsWindow(&inspectorOpen);
|
if (inspectorOpen) ImGui::ShowMetricsWindow(&inspectorOpen);
|
||||||
|
|
|
@ -938,6 +938,7 @@ void FurnaceGUI::drawPattern() {
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndDisabled();
|
ImGui::EndDisabled();
|
||||||
ImGui::PopStyleVar();
|
ImGui::PopStyleVar();
|
||||||
oldRow=curRow;
|
oldRow=curRow;
|
||||||
|
|
Loading…
Reference in a new issue