As of the update, my drag and drop operations stopped working, what I narrowed it down to is that the drag operation is not detected because the On Mouse Button Down(Overridden) function does not trigger.
Worked great in 4.16, now it just does not trigger.
Not sure if I am doing something in the old way or if this is just plain wrong (I did debug on this and even though I am on the correct widget, mouse press on the button in the widget registers OK, But the On Mouse Button Down plainly does not register the mouse button down, tried printing just plain string instead of detecting drag and nothing.
Edit0: Moved Drag detect to On Mouse Move(with couple checks) which triggers correctly, but the Overridden function OnDragDetected does not trigger anyway for some reason
Removed and recreated all the overridden functions but they still do not trigger on the events they should be triggering at.
Edit1: Tested it on Linux and Mac with the same result.
Edit2: After some further experiments it seems that if you create button than the on mouse button down is captured by that button and not sent forward, But if I create just text widget, or size box with image in it the event registers OK and drag is detected and everything works as it should. (Created empty project with everything fresh to test it)
This did work in 4.16!
If anybody wants to reproduce this
Create new project
Place the UI widget to your Content directory(Dropbox - NewHud.uasset - Simplify your life) - or create your own, it is just plain widget with overridden On Mouse Button Down(see link in main thread), and with overridden On Drag Detected with print text, and couple elements placed in the canvas panel).
Try dragging from the button or from the text or from any element, once a button is involved the text will not be printed. - you can debug this one widget and see when the On Mouse Button Down is executed and when it is not.
Hi, that is the exact same issue, the button on the Hotkey widget catches the mouse event and does not let is pass through. If you want to get around it to be able to get the functionality you can drop the button as I do not think that he is using the buttons on clicked event in that tutorial. You will lose some of the graphics there(the hover and clicked effect) but otherwise it should work.
Well I never considered the forum to be more watched than thisā¦ Yes precise click is enabled, I am aware of the tutorial you were following but my setup is not based on that.
By the way in a sense the button there is used just for the visuals and the enabled/disabled functionality of it, you can easily live without it or create your own visuals to simulate mostly the same. You are setting up the Deactivated? variable anyway so you can use that to do some branches on the caught events.
I am in process of figuring out what change caused it but the engine code is not as readable as one would wish and the merges for releases are even less convenient for that.
Same here. Iāve tracked it down to exactly what youāve described. With enough testing, Iāve discovered that it still triggers for Right Click but not my Left Click. I wonder if it is a bug in 4.17 or there is another way to now do this.
Is not a matter of workaorunds. The problem itself is easy to fix. I would like to know if this is a real bug or is a intended rework of how mouse buttons and on buttons override worksā¦
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.
Well right click is not caught by the button as the onclick event so that is why right click would work. What is the somewhat recommended workaround is to ditch the button in the widget, use border or image instead of it(which you can style in much the same way as the button) and handle all the events by yourself.
This is, at least for me, still an issue with version 4.17.2. I get the same symptoms as with that bug except I have āDefault Viewport Mouse Capture Modeā set to permanent.
Hey! I have already fixed this issue on an older project, but this project was thrown away. We had to change the engine settings in visual studios to make it work. I will try and find it again!