From 5b8469d7ac505ccb03a935237c2134e79ed6661d Mon Sep 17 00:00:00 2001 From: shweet Date: Fri, 26 Dec 2025 16:58:42 -0500 Subject: [PATCH] (int) --- src/imgui/window/animation_preview.cpp | 4 ++-- src/imgui/window/spritesheet_editor.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/imgui/window/animation_preview.cpp b/src/imgui/window/animation_preview.cpp index 79e6924..677bdb5 100644 --- a/src/imgui/window/animation_preview.cpp +++ b/src/imgui/window/animation_preview.cpp @@ -776,7 +776,7 @@ namespace anm2ed::imgui } if (isMouseDown && isMoveDragging) frame_change_apply( - {.positionX = (int)mousePos.x - moveOffset.x, .positionY = (int)mousePos.y - moveOffset.y}); + {.positionX = (int)(mousePos.x - moveOffset.x), .positionY = (int)(mousePos.y - moveOffset.y)}); if (isLeftPressed) frame_change_apply({.positionX = step}, anm2::SUBTRACT); if (isRightPressed) frame_change_apply({.positionX = step}, anm2::ADD); @@ -828,7 +828,7 @@ namespace anm2ed::imgui case tool::ROTATE: if (!item || frames.empty()) break; if (isBegin) document.snapshot(localize.get(EDIT_FRAME_ROTATION)); - if (isMouseDown) frame_change_apply({.rotation = mouseDelta.x}, anm2::ADD); + if (isMouseDown) frame_change_apply({.rotation = (int)mouseDelta.x}, anm2::ADD); if (isLeftPressed || isDownPressed) frame_change_apply({.rotation = step}, anm2::SUBTRACT); if (isUpPressed || isRightPressed) frame_change_apply({.rotation = step}, anm2::ADD); diff --git a/src/imgui/window/spritesheet_editor.cpp b/src/imgui/window/spritesheet_editor.cpp index f9b64b4..2f6a637 100644 --- a/src/imgui/window/spritesheet_editor.cpp +++ b/src/imgui/window/spritesheet_editor.cpp @@ -332,7 +332,8 @@ namespace anm2ed::imgui if (!item || frames.empty()) break; if (isBegin) document.snapshot(localize.get(EDIT_FRAME_PIVOT)); if (isMouseDown) - frame_change_apply({.pivotX = mousePos.x - frame->crop.x, .pivotY = mousePos.y - frame->crop.y}); + frame_change_apply( + {.pivotX = (int)(mousePos.x - frame->crop.x), .pivotY = (int)(mousePos.y - frame->crop.y)}); if (isLeftPressed) frame_change_apply({.pivotX = step}, anm2::SUBTRACT); if (isRightPressed) frame_change_apply({.pivotX = step}, anm2::ADD); if (isUpPressed) frame_change_apply({.pivotY = step}, anm2::SUBTRACT);