x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Slate] Precise tap on button in ScrollBox is hard to be preformed

I have several Buttons in ScrollBox, all Buttons have Touch Method set to Precise Tap, so I can scroll by finger movement. But it is very hard to Click the button, it requires very accurate and quick touch, otherwise UMG will treat my action as scrolling and clicking will be ignored. How can I fix it? May be it is possible to set some king of threshold for scrolling swipe?

I test on Samsung Galaxy S8 and Google Pixel.

Product Version: UE 4.16
Tags:
more ▼

asked Aug 10 '17 at 12:29 PM in Using UE4

avatar image

RenovatioNova
117 6 11 17

avatar image Dune Nov 06 '18 at 09:22 AM

I have also recently noticed this happening, did you ever find a solution? I'm currently looking at taking the location when pressed and comparing when released, and if they haven't changed using that as a press.

The Precise tap on phones and tablets especially, seem to be highly inconsistent in a scroll box.

avatar image RenovatioNova Nov 06 '18 at 01:53 PM

I have created my own button using only BP which is capturing mouse input and process it inside. If difference between start click position and current drag position of cursor is greater then X then I throw mouse input further into scrollbar, otherwise it is marked as captured.

avatar image Dune Nov 07 '18 at 03:38 PM

Do you have an example of this at all? I have created my own button and OnPressed, I get the current mouse position:

 UWidgetLayoutLibrary::GetMousePositionScaledByDPI(PlayerController, StartPressLoc.X, StartPressLoc.Y);

I then wait for the button released event and then get the location again and do a comparison:

 UWidgetLayoutLibrary::GetMousePositionScaledByDPI(PlayerController, EndPressLoc.X, EndPressLoc.Y);
 
 const float DistanceMovedSquared = (StartPressLoc - EndPressLoc).SizeSquared();
 const float MaxDist = 1.f;
 if (DistanceMovedSquared < MaxDist)
 {
     // Button Pressed
 }

avatar image RenovatioNova Nov 08 '18 at 07:48 AM

It was a long time ago, sorry. I was using only Blueprints to solve this problem.

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question