You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
[Backout] - CL29484848
[FYI] benoit.gadreau Original CL Desc ----------------------------------------------------------------- New TRS Gizmo: CTRL + MMB does indirect manipulation on the Y axiz (CTRL+LMB does Z instead of CTRL+RMB+LMB) #rb brooke.hubert #rnx [CL 29499083 by bob tellez in ue5-main branch]
This commit is contained in:
@@ -107,14 +107,8 @@ void UTransformGizmo::SetupIndirectBehaviors()
|
||||
bIndirectManipulation = false;
|
||||
return OnTerminateDragSequence();
|
||||
};
|
||||
if (bCtrlMiddleDoesY)
|
||||
{
|
||||
// disable ctrl + mmb for that behavior
|
||||
MiddleClickDragBehavior->ModifierCheckFunc = [](const FInputDeviceState& InputState)
|
||||
{
|
||||
return !FInputDeviceState::IsCtrlKeyDown(InputState);
|
||||
};
|
||||
}
|
||||
// add this to enable indirect manipulation using CTRL + MMB
|
||||
// MiddleClickDragBehavior->ModifierCheckFunc = FInputDeviceState::IsCtrlKeyDown;
|
||||
AddInputBehavior(MiddleClickDragBehavior);
|
||||
|
||||
|
||||
@@ -122,10 +116,6 @@ void UTransformGizmo::SetupIndirectBehaviors()
|
||||
UMultiButtonClickDragBehavior* LeftRightClickDragBehavior = NewObject<UMultiButtonClickDragBehavior>();
|
||||
LeftRightClickDragBehavior->Initialize();
|
||||
LeftRightClickDragBehavior->EnableButton(EKeys::LeftMouseButton);
|
||||
if (bCtrlMiddleDoesY)
|
||||
{
|
||||
LeftRightClickDragBehavior->EnableButton(EKeys::MiddleMouseButton);
|
||||
}
|
||||
LeftRightClickDragBehavior->EnableButton(EKeys::RightMouseButton);
|
||||
LeftRightClickDragBehavior->ModifierCheckFunc = FInputDeviceState::IsCtrlKeyDown;
|
||||
LeftRightClickDragBehavior->CanBeginClickDragFunc = [this](const FInputDeviceRay&)
|
||||
@@ -159,15 +149,9 @@ void UTransformGizmo::SetupIndirectBehaviors()
|
||||
return OnTerminateDragSequence();
|
||||
};
|
||||
|
||||
auto GetAxis = [this](const FInputDeviceState& InInput)
|
||||
auto GetAxis = [](const FInputDeviceState& InInput)
|
||||
{
|
||||
const bool bAddX = InInput.Mouse.Left.bDown;
|
||||
if (bCtrlMiddleDoesY)
|
||||
{
|
||||
const bool bAddY = InInput.Mouse.Middle.bDown;
|
||||
const bool bAddZ = InInput.Mouse.Right.bDown;
|
||||
return bAddX ? EAxis::X : bAddY ? EAxis::Y : bAddZ ? EAxis::Z : EAxis::None;
|
||||
}
|
||||
const bool bAddY = InInput.Mouse.Right.bDown;
|
||||
return bAddX && bAddY ? EAxis::Z : bAddX ? EAxis::X : bAddY ? EAxis::Y : EAxis::None;
|
||||
};
|
||||
@@ -371,7 +355,7 @@ void UTransformGizmo::OnEndHover()
|
||||
|
||||
FInputRayHit UTransformGizmo::UpdateHoveredPart(const FInputDeviceRay& PressPos)
|
||||
{
|
||||
if (!HitTarget || !bVisible)
|
||||
if (!HitTarget)
|
||||
{
|
||||
return FInputRayHit();
|
||||
}
|
||||
@@ -717,7 +701,7 @@ void UTransformGizmo::EnableRotate(EAxisList::Type InAxisListToDraw)
|
||||
|
||||
if (RotateOuterCircleElement == nullptr)
|
||||
{
|
||||
RotateOuterCircleElement = MakeRotateCircleHandle(ETransformGizmoPartIdentifier::RotateAll, RotateOuterCircleRadius, RotateOuterCircleColor, false);
|
||||
RotateOuterCircleElement = MakeRotateCircleHandle(ETransformGizmoPartIdentifier::Default, RotateOuterCircleRadius, RotateOuterCircleColor, false);
|
||||
RotateOuterCircleElement->SetHittableState(false);
|
||||
GizmoElementRoot->Add(RotateOuterCircleElement);
|
||||
}
|
||||
@@ -1039,7 +1023,7 @@ UGizmoElementRectangle* UTransformGizmo::MakeTranslateScreenSpaceHandle()
|
||||
RectangleElement->SetViewAlignAxis(FVector::UpVector);
|
||||
RectangleElement->SetViewAlignNormal(-FVector::ForwardVector);
|
||||
RectangleElement->SetMaterial(TransparentVertexColorMaterial);
|
||||
RectangleElement->SetVertexColor(WhiteColor, true);
|
||||
RectangleElement->SetLineColor(ScreenSpaceColor);
|
||||
RectangleElement->SetHitMesh(true);
|
||||
RectangleElement->SetDrawMesh(false);
|
||||
RectangleElement->SetDrawLine(true);
|
||||
|
||||
@@ -834,8 +834,4 @@ protected:
|
||||
|
||||
/** Pending drag function to be called if bDeferDrag is true */
|
||||
TFunction<void()> PendingDragFunction;
|
||||
|
||||
/** Use Ctrl + MMB to do indirect manipulation on the Y axis */
|
||||
UPROPERTY()
|
||||
bool bCtrlMiddleDoesY = true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user