UE-39845 Issue Reopen

Build Type: ‘Binary’ build

Build version: Version: 4.16.0-3452394+++UE4+Release-4.16

Detailed description of the issue:

I am reporting this issue UE-39845 again. There is a test project in the ticket. I don’t know how this issue passed that test and marked as fixed. I am using UWidgetInteractionComponent::IsOverInteractableWidget() to detect if mouse is over scrollbar. It seems it always returns false; In UWidgetInteractionComponent::DetermineWidgetUnderPointer(), all SWidgets’ IsInteractable() (under pointer) are checked to determine if there is an Interactable widget. I have suggested override IsInteractable function in SScrollbar class, like:

virtual bool IsInteractable() const override
{
return IsEnabled();
}

I just can’t believe how this ticket passed test!

Thank you,

Hi,

Let’s clarify this issue a little bit more. My suggestion overriding the IsInteractable function is originated from Cody Haskell’s commit (fc03448b67704d0bd76be9584aa1753988191479). There is an override IsInteractable function in SButton.cpp (https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Source/Runtime/Slate/Private/Widgets/Input/SButton.cpp#L365-L368).

The SScrollbar can be thought as a SButton with certain special features,e.g. you can drag SScrollbar vertically/horizontally. But It still perseveres the general interactable properties as SButton. This is a consistent and simple concept. I believe this is also the original intention of Cody Haskell when he overridden the IsInteractable() function in SButton.cpp.

After I overridden IsInteractable function in SScrollbar, my issues are gone.

in UMG, an interactable Widget does
not mean the Widget can be interacted
with, but rather whether or not analog
cursors should slow down when hovering
over the widget.

It will be much less confusing, if we define an interactable Widget: an interactable Widget means the Widget can be interacted with, it also slows down analog cursors when hovering over the widget.

Thank you,

What are you trying to do?
Let me answer this question first, so you can help me.
I have a scrollbox (with scrollbar) and a button on a 3D widget. I want to be able to drag and move the 3D widget, if the cursor isn’t over the button or the scrollbar. If the cursor is over the button, it should push the button. if over the scrollbar, it should drag scrollbar and scroll the scrollbox.
I use UWidgetInteractionComponent::IsOverInteractableWidget() to detect if cursor is over an interactable widget.
Do you know what’s alternative way?
Thank you,

Hi ,

Sorry for the confusion here. We should have provided more information when UE-39845 was closed out. The current behavior is actually expected. IsOverInteractableWidget() will return false when over a scrollbar because UMG does not consider the scrollbar to be interactable. It really isn’t a good choice of terminology in this case, because in UMG, an interactable Widget does not mean the Widget can be interacted with, but rather whether or not analog cursors should slow down when hovering over the widget.

The changes that were made in the fix were to make the WidgetInteractionComponent first check to see if the Widget is enabled before checking to see if it is over an interactable or keyboard focusable Widget.

Hello ,

Sorry for the lengthy delay in getting back to you on this issue. I tried running some tests in 4.18.3, and the same results still occur. There is a pull request that has been submitted to our GitHub repo that implements the IsInteractable() function for SScrollBox, but that does not appear to have been reviewed yet.

I tried to find a way to accomplish what you were trying, but could not come up with anything straightforward. It may be possible to hide the ScrollBar and place a slider widget in that location. You could then set the position of the scroll bar based on the position of the slider. That is just speculation though, since I have not actually tested that setup.

Hi
Thanks. I am glad to know the fix eventually there. It just takes so long.

Apparently still there in UE5.3…