[nostalgia/gfx/studio/tilesheet] Fix dragging cursor on image
All checks were successful
Build / build (push) Successful in 1m20s
All checks were successful
Build / build (push) Successful in 1m20s
This commit is contained in:
parent
00e52b6491
commit
3ccadba2f5
@ -462,7 +462,10 @@ void TileSheetEditorImGui::drawTileSheet(ox::Vec2 const&fbSize) noexcept {
|
|||||||
if (wheelh != 0) {
|
if (wheelh != 0) {
|
||||||
m_view.scrollH(fbSize, wheelh);
|
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;
|
m_prevMouseDownPos = mousePos;
|
||||||
switch (m_tool) {
|
switch (m_tool) {
|
||||||
case TileSheetTool::Draw:
|
case TileSheetTool::Draw:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user