INTS!!!!!!!
This commit is contained in:
@@ -739,7 +739,7 @@ namespace anm2ed::imgui
|
|||||||
auto item = document.item_get();
|
auto item = document.item_get();
|
||||||
auto useTool = tool;
|
auto useTool = tool;
|
||||||
auto step = isMod ? STEP_FAST : STEP;
|
auto step = isMod ? STEP_FAST : STEP;
|
||||||
mousePos = position_translate(zoom, pan, to_ivec2(ImGui::GetMousePos()) - to_ivec2(cursorScreenPos));
|
mousePos = position_translate(zoom, pan, to_vec2(ImGui::GetMousePos()) - to_vec2(cursorScreenPos));
|
||||||
|
|
||||||
if (isMouseMiddleDown) useTool = tool::PAN;
|
if (isMouseMiddleDown) useTool = tool::PAN;
|
||||||
if (tool == tool::MOVE && isMouseRightDown) useTool = tool::SCALE;
|
if (tool == tool::MOVE && isMouseRightDown) useTool = tool::SCALE;
|
||||||
@@ -771,12 +771,12 @@ namespace anm2ed::imgui
|
|||||||
if (isMouseClicked)
|
if (isMouseClicked)
|
||||||
{
|
{
|
||||||
moveOffset = settings.inputIsMoveToolSnapToMouse ? vec2() : mousePos - frame->position;
|
moveOffset = settings.inputIsMoveToolSnapToMouse ? vec2() : mousePos - frame->position;
|
||||||
moveOffset = ivec2(moveOffset);
|
|
||||||
isMoveDragging = true;
|
isMoveDragging = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isMouseDown && isMoveDragging)
|
if (isMouseDown && isMoveDragging)
|
||||||
frame_change_apply({.positionX = mousePos.x - moveOffset.x, .positionY = mousePos.y - moveOffset.y});
|
frame_change_apply(
|
||||||
|
{.positionX = (int)(mousePos.x - moveOffset.x), .positionY = (int)(mousePos.y - moveOffset.y)});
|
||||||
|
|
||||||
if (isLeftPressed) frame_change_apply({.positionX = step}, anm2::SUBTRACT);
|
if (isLeftPressed) frame_change_apply({.positionX = step}, anm2::SUBTRACT);
|
||||||
if (isRightPressed) frame_change_apply({.positionX = step}, anm2::ADD);
|
if (isRightPressed) frame_change_apply({.positionX = step}, anm2::ADD);
|
||||||
@@ -803,8 +803,7 @@ namespace anm2ed::imgui
|
|||||||
{
|
{
|
||||||
frame->scale += vec2(mouseDelta.x, mouseDelta.y);
|
frame->scale += vec2(mouseDelta.x, mouseDelta.y);
|
||||||
if (isMod) frame->scale = {frame->scale.x, frame->scale.x};
|
if (isMod) frame->scale = {frame->scale.x, frame->scale.x};
|
||||||
frame->scale = ivec2(frame->scale);
|
frame_change_apply({.scaleX = (int)frame->scale.x, .scaleY = (int)frame->scale.y});
|
||||||
frame_change_apply({.scaleX = frame->scale.x, .scaleY = frame->scale.y});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLeftPressed) frame_change_apply({.scaleX = step}, anm2::SUBTRACT);
|
if (isLeftPressed) frame_change_apply({.scaleX = step}, anm2::SUBTRACT);
|
||||||
|
|||||||
@@ -334,15 +334,15 @@ namespace anm2ed::imgui
|
|||||||
if (isMouseDown)
|
if (isMouseDown)
|
||||||
{
|
{
|
||||||
frame->crop = ivec2(frame->crop);
|
frame->crop = ivec2(frame->crop);
|
||||||
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 (isLeftPressed) frame_change_apply({.pivotX = step}, anm2::SUBTRACT);
|
||||||
if (isRightPressed) frame_change_apply({.pivotX = step}, anm2::ADD);
|
if (isRightPressed) frame_change_apply({.pivotX = step}, anm2::ADD);
|
||||||
if (isUpPressed) frame_change_apply({.pivotY = step}, anm2::SUBTRACT);
|
if (isUpPressed) frame_change_apply({.pivotY = step}, anm2::SUBTRACT);
|
||||||
if (isDownPressed) frame_change_apply({.pivotY = step}, anm2::ADD);
|
if (isDownPressed) frame_change_apply({.pivotY = step}, anm2::ADD);
|
||||||
|
|
||||||
frame->pivot = ivec2(frame->pivot);
|
frame_change_apply({.pivotX = (int)frame->pivot.x, .pivotY = (int)frame->pivot.y});
|
||||||
frame_change_apply({.pivotX = frame->pivot.x, .pivotY = frame->pivot.y});
|
|
||||||
|
|
||||||
if (isDuring)
|
if (isDuring)
|
||||||
{
|
{
|
||||||
@@ -364,7 +364,7 @@ namespace anm2ed::imgui
|
|||||||
if (isMouseClicked)
|
if (isMouseClicked)
|
||||||
{
|
{
|
||||||
cropAnchor = mousePos;
|
cropAnchor = mousePos;
|
||||||
frame_change_apply({.cropX = cropAnchor.x, .cropY = cropAnchor.y, .sizeX = {}, .sizeY = {}});
|
frame_change_apply({.cropX = (int)cropAnchor.x, .cropY = (int)cropAnchor.y, .sizeX = {}, .sizeY = {}});
|
||||||
}
|
}
|
||||||
if (isMouseDown)
|
if (isMouseDown)
|
||||||
{
|
{
|
||||||
|
|||||||
+47181
-74708
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user