View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002703 | NoesisGUI | Unreal | public | 2023-09-27 13:01 | 2023-11-02 11:43 |
| Reporter | paula.flamingfowl | Assigned To | hcpizzi | ||
| Priority | normal | Severity | feature | ||
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.2 | ||||
| Target Version | 3.2.3 | Fixed in Version | 3.2.3 | ||
| Summary | 0002703: Mouse enhanced input actions not triggering | ||||
| Description | We have a set of cards that are selected by clicking them, and should be deselected if we right click them or any part of the screen. If we right click any part of the screen without noesis UI, it works correctly. While investigating this, we realized that if we change the NativeOnMouseButtonDown function return value when hit, the right click works but there are other issues with changing this | ||||
| Steps To Reproduce | Create a UI with a button, import it and add it to the viewport. | ||||
| Attached Files | |||||
| Platform | Windows | ||||
|
Hi Paula, I think I've fixed the issue. We weren't taking into account whether the event was handled by Noesis or not. I've added that check and it fixes your repro case. Could you give this patch a try? Thanks. 2703.patch (6,150 bytes)
Index: NoesisInstance.cpp
@@ -1589,18 +1596,22 @@
if (IsGamepadSimulatedClick)
{
- XamlView->KeyDown(Noesis::Key_GamepadAccept);
- return FReply::Handled().PreventThrottling().CaptureMouse(MyWidget.Pin().ToSharedRef());
+ bool Handled = XamlView->KeyDown(Noesis::Key_GamepadAccept);
+
+ if (Handled)
+ {
+ return FReply::Handled().PreventThrottling().CaptureMouse(MyWidget.Pin().ToSharedRef());
+ }
}
else
{
FVector2D Position = MyGeometry.AbsoluteToLocal(MouseEvent.GetScreenSpacePosition()) * MyGeometry.Scale;
- bool hit = HitTest(Position);
+ bool Hit = HitTest(Position);
Noesis::MouseButton MouseButton = GetNoesisMouseButton(MouseEvent.GetEffectingButton());
- XamlView->MouseButtonDown(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y), MouseButton);
+ bool Handled = XamlView->MouseButtonDown(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y), MouseButton);
- if (hit)
+ if (Handled && Hit)
{
return FReply::Handled().PreventThrottling();
}
@@ -1618,18 +1629,22 @@
if (IsGamepadSimulatedClick)
{
IsGamepadSimulatedClick = false;
- XamlView->KeyUp(Noesis::Key_GamepadAccept);
- return FReply::Handled().PreventThrottling();
+ bool Handled = XamlView->KeyUp(Noesis::Key_GamepadAccept);
+
+ if (Handled)
+ {
+ return FReply::Handled().PreventThrottling();
+ }
}
else
{
FVector2D Position = MyGeometry.AbsoluteToLocal(MouseEvent.GetScreenSpacePosition()) * MyGeometry.Scale;
- bool hit = HitTest(Position);
+ bool Hit = HitTest(Position);
Noesis::MouseButton MouseButton = GetNoesisMouseButton(MouseEvent.GetEffectingButton());
- XamlView->MouseButtonUp(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y), MouseButton);
+ bool Handled = XamlView->MouseButtonUp(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y), MouseButton);
- if (hit)
+ if (Handled && Hit)
{
return FReply::Handled().PreventThrottling();
}
@@ -1645,11 +1660,11 @@
if (EnableMouse && XamlView && !MouseEvent.GetCursorDelta().IsZero()) // Ignore synthetic events that are messing with the tooltip code.
{
FVector2D Position = MyGeometry.AbsoluteToLocal(MouseEvent.GetScreenSpacePosition()) * MyGeometry.Scale;
- bool hit = HitTest(Position);
+ bool Hit = HitTest(Position);
- XamlView->MouseMove(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y));
+ bool Handled = XamlView->MouseMove(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y));
- if (hit)
+ if (Handled && Hit)
{
return FReply::Handled().PreventThrottling();
}
@@ -1664,12 +1679,12 @@
if (EnableMouse && XamlView)
{
FVector2D Position = MyGeometry.AbsoluteToLocal(MouseEvent.GetScreenSpacePosition()) * MyGeometry.Scale;
- bool hit = HitTest(Position);
+ bool Hit = HitTest(Position);
float WheelDelta = MouseEvent.GetWheelDelta();
- XamlView->MouseWheel(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y), FPlatformMath::RoundToInt(WheelDelta * 120.f));
+ bool Handled = XamlView->MouseWheel(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y), FPlatformMath::RoundToInt(WheelDelta * 120.f));
- if (hit)
+ if (Handled && Hit)
{
return FReply::Handled().PreventThrottling();
}
@@ -1684,12 +1699,12 @@
if (EnableTouch && XamlView)
{
FVector2D Position = MyGeometry.AbsoluteToLocal(TouchEvent.GetScreenSpacePosition()) * MyGeometry.Scale;
- bool hit = HitTest(Position);
+ bool Hit = HitTest(Position);
uint32 PointerIndex = TouchEvent.GetPointerIndex();
- XamlView->TouchDown(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y), PointerIndex);
+ bool Handled = XamlView->TouchDown(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y), PointerIndex);
- if (hit)
+ if (Handled && Hit)
{
return FReply::Handled().PreventThrottling();
}
@@ -1704,12 +1719,12 @@
if (EnableTouch && XamlView)
{
FVector2D Position = MyGeometry.AbsoluteToLocal(TouchEvent.GetScreenSpacePosition()) * MyGeometry.Scale;
- bool hit = HitTest(Position);
+ bool Hit = HitTest(Position);
uint32 PointerIndex = TouchEvent.GetPointerIndex();
- XamlView->TouchMove(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y), PointerIndex);
+ bool Handled = XamlView->TouchMove(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y), PointerIndex);
- if (hit)
+ if (Handled && Hit)
{
return FReply::Handled().PreventThrottling();
}
@@ -1724,12 +1739,12 @@
if (EnableTouch && XamlView)
{
FVector2D Position = MyGeometry.AbsoluteToLocal(TouchEvent.GetScreenSpacePosition()) * MyGeometry.Scale;
- bool hit = HitTest(Position);
+ bool Hit = HitTest(Position);
uint32 PointerIndex = TouchEvent.GetPointerIndex();
- XamlView->TouchUp(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y), PointerIndex);
+ bool Handled = XamlView->TouchUp(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y), PointerIndex);
- if (hit)
+ if (Handled && Hit)
{
return FReply::Handled().PreventThrottling();
}
@@ -1749,12 +1764,12 @@
if (EnableMouse && XamlView)
{
FVector2D Position = MyGeometry.AbsoluteToLocal(MouseEvent.GetScreenSpacePosition()) * MyGeometry.Scale;
- bool hit = HitTest(Position);
+ bool Hit = HitTest(Position);
Noesis::MouseButton MouseButton = GetNoesisMouseButton(MouseEvent.GetEffectingButton());
- XamlView->MouseDoubleClick(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y), MouseButton);
+ bool Handled = XamlView->MouseDoubleClick(FPlatformMath::RoundToInt(Position.X), FPlatformMath::RoundToInt(Position.Y), MouseButton);
- if (hit)
+ if (Handled && Hit)
{
return FReply::Handled().PreventThrottling();
}
|
|
|
The patch works!!! thanks :) |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2023-09-27 13:01 | paula.flamingfowl | New Issue | |
| 2023-09-27 13:01 | paula.flamingfowl | Tag Attached: enhanced input | |
| 2023-09-27 13:01 | paula.flamingfowl | Tag Attached: Unreal | |
| 2023-09-27 13:01 | paula.flamingfowl | File Added: noesis.PNG | |
| 2023-09-27 13:01 | paula.flamingfowl | File Added: Video-detail-page (1).webm | |
| 2023-09-27 18:03 | jsantos | Assigned To | => hcpizzi |
| 2023-09-27 18:03 | jsantos | Status | new => assigned |
| 2023-09-27 18:03 | jsantos | Target Version | => 3.2.2 |
| 2023-09-27 18:04 | jsantos | Target Version | 3.2.2 => 3.2.3 |
| 2023-10-25 12:37 | hcpizzi | Note Added: 0008882 | |
| 2023-10-25 12:37 | hcpizzi | File Added: 2703.patch | |
| 2023-10-25 12:37 | hcpizzi | Status | assigned => feedback |
| 2023-10-31 15:50 | paula.flamingfowl | Note Added: 0008915 | |
| 2023-10-31 15:50 | paula.flamingfowl | Status | feedback => assigned |
| 2023-11-02 11:43 | hcpizzi | Status | assigned => resolved |
| 2023-11-02 11:43 | hcpizzi | Resolution | open => fixed |
| 2023-11-02 11:43 | hcpizzi | Fixed in Version | => 3.2.3 |