From bf686590afc88aaa9fe3b0a202f5afe0553154c1 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 16 May 2025 21:22:49 -0500 Subject: [PATCH] Squashed 'deps/nostalgia/' changes from 00e52b64..3ccadba2 3ccadba2 [nostalgia/gfx/studio/tilesheet] Fix dragging cursor on image git-subtree-dir: deps/nostalgia git-subtree-split: 3ccadba2f5d80ba866862f1545ab16fc637e6bee --- .../gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp b/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp index 2c574aa..bd1c00f 100644 --- a/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp +++ b/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp @@ -462,7 +462,10 @@ void TileSheetEditorImGui::drawTileSheet(ox::Vec2 const&fbSize) noexcept { if (wheelh != 0) { m_view.scrollH(fbSize, wheelh); } - if (ImGui::IsMouseClicked(0) && m_prevMouseDownPos != mousePos) { + using ImGui::IsMouseClicked; + using ImGui::IsMouseDragging; + if ((IsMouseDragging(ImGuiMouseButton_Left) || IsMouseClicked(ImGuiMouseButton_Left)) + && m_prevMouseDownPos != mousePos) { m_prevMouseDownPos = mousePos; switch (m_tool) { case TileSheetTool::Draw: