How to achieve the double click effect on the UMG button?

:grinning: :grinning:

1 Like

I wouldn’t try it if I were you. You’re risking exploding the editor and damaging the fabric of our universe.


If you need buttons to perform something more advanced than click & forget (because that’s what the native buttons are supposed to do), you will need to make your own button. May I recommend the humble Border wrapped in a User Widget:

image

It supports double clicks from the get-go; having a user widget act as a button will also allow you to handle input with no ambiguity. You’ll be able to do pretty much anything, including inheritance (or what passes as inheritance in widgets).

2 Likes

something that may work (and what i did for one of my projects) was to use a timer by event function. worked well enough, even if it was a pain to setup. it did allow for stuff like triple click and more control over how you wanted feedback from the clicks (like color changes on text for example)
maybe fine if you are doing this for one or two buttons, but probably not recommended if you intend to use this code for more things than that.

1 Like

You then put the button with the above script in a user widget - making it reusable. But then you’re stuck again with input consumption, middle mouse clicks, dragging weirdness, and a myriad other issues arising as soon as one attempts something outside the box.

yeah lol.

== is amount of clicks to trigger button

retriggerable delay duration is time frame allowed for clicks to build up

2 Likes

Why are you counting mouse clicks with floats!? GJ otherwise.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.