"On Mouse Button Double Click" wont fire

I’ve been following UnrealGaimeDev’s series to make my inventory system on youtube, Im on this video:

Everything up to now is working exactly as it should be however in this most recent video i cannot get the OnMouseButtonDoubleClick to fire.

This is my blue print version of what he made:

I’ve tried disconnecting everything but the “is mouse button down” from the branch and still nothing.
If i preview the blue print while in play and double click in game the active route (sorry dont know its proper name) doesnt appear at all)
I have tried decreasing the required speed of the double click in the project settings and have my player controller set to: Show mouse cursor: True, Enable Click events: True, Enable Mouse Over events: True

Any help/pointers would be appreciated.

Not sure what you mean there Ninjin, Its an override function, it should fire each time the button is double clicked. Did i miss something?

This is workaround suitable only for your project. Not everybody can replace button with different element. Broken On Mouse Button event for left mouse click is 4.17 bug and hopefully it will be fixed soon.

It seems like we were watching the same inventory system tutorial) And yes, for me it also dont work

and to tell you the truth, problem is not only here, problem is everywhere what is connected to pressing left mouse button. The interesting thing is that everything works correctly, when the slot is empty. What I mean is every event fires correctly. But when the slot is filled, then problems arise.

Well, if “On Mouse Button Double Click” won’t even get fired, you are showing us the wrong blueprint. Show us the one where you call the function. <3

No everything right. We both overrided standart functions that fire automatically when user presses mouse button. The thing is that when right mouse button is used everything works and left mouse button worls only when the slot is empty.

It should but it doesnt fire on the left mouse at all

Well, I’m not a wizard and you can’t expect me or others to watch the whole tutorial and re-create everything, so adding what function you overwrote and where you call this function would be great to know.

You dont need to watch the whole thing:

Create a new project. (im using top down template for this example)
Create a widget and place a button on the canvas
override the function “OnMouseButtonDoubleClick”
drag off the OnMouseButtonDoubleClick and place a print string,
connect to return node and place a “handled” on the return value
save, compile, hit play

double left click, nothing
double right click or double middle mouse click and you WILL get the text.

It seems to be only on the left mouse button that there is an issue.

I’ve fixed this with the help of some none on the forum. It involves a little tom foolery but it works

If you make the the widget like this instead
[Overlay]
. [Border]
. [Image]
. [Text]

The do everything as you would have before but replace the button with the border and the set style with set brush
Then override the functions “one mouse enter” and “on mouse leave” and just set the brush in those to (OME) hovered brush and (OML) default brush it functions in exactly the same way as the button does.

Instead of OnMouseButtonDown use OnPreviewMouseButtonDown. It works on buttons.

1 Like

Thanks this works!

Another solution for this project
Duplicate onmousebuttondoubleclick
Run Onclicked(slotbutton) - Make your own doubleclickfunk as in throw widget on ‘-’ and ‘+’ buttons(incr,delay 0.3, click count etc…) Not so good but easy and fast
ps Anyone knows is it really bug?

Finally got the same problem with on mouse button click, only lmb doest hit event

Also, while debugging it crashes in 50% times using checkpoint on ‘onmousebuttondoubleclick’ etc xD

ok, thanks

Change in behavior in UE4 by design. Reference other threads here:

https://forums.unrealengine.com/unreal-engine/feedback-for-epic/1348178-please-include-drag-drop-fix-in-4-17-2

OnMouseButtonDoubleClick is still not being fired with umg buttons in 4.18. Can someone confirm this please?
Cheers,
J

This isn’t a solution for double click though?

Hi guys !

Is that me or does this problem stil occurs on 4.22 ?

I can’t manage to get my picture widget’s OnMouseDoubleClick event to fire when double clicking on left button, while it works with right button and with mouse up/down events :

I gues, I would manage to make some workaround, but it’s never as safe as using the native function.