After 4.18 all my widgets are broken when using buttons.
1- Left Mouse click doesnt work:
At “OnMouseButonDown “ left Mouse buton doesnt work. It can be fix by using “ OnPreviewMouseButtonDown” BUT its brings us 2th and 3th bugs.
2- Drag Drop operation broken with left Mouse button :
When try to use “ Detect Drag If Pressed” node with using “ OnPreviewMouseButtonDown” :
a- Left Mouse click only work when double click.
b- When drag oparation over both buttons stays at hovered state. You need to hover/unhover again to fix it.
3- This is the best one. Double click with left Mouse buton doenst work.
I spent 2 days for it. Precise click doesnt fix it. And i know i can replace Buttons with borders but i have more then 10 widgets using this system. So it will cost me a lot if i redo all of them.
i am almost sure there is no fix for it yet, if I am wrong, i would apretiate it, if anyone can help me with that.
Generally speaking, you should stay away from dragging buttons. The behaviour you’re after was causing issues elsewhere and is no longer available. As you probably know since you’ve done your research, it seems.
10 widgets do not sound like a lot, really. However, when it comes to maintenance and updates, consider extending the widgets from a master class, use brushes to inject settings into widgets, store settings in vars / structs and so on.
In the future, when you need to modify something, it’s a matter of altering some data rather than manually redoing stuff. This will also give you the chance to let the user modify the colour scheme of the interface, for example.
Probably not the answer you were looking for, though
edit: the bug that was entered for this is flagged as By Design - I’d assume it’s going to stay this way.
edit2:
3- This is the best one. Double click
with left Mouse buton doenst work.
Thanks a lot for your answer these are good tips ^^
As far as I can tell, it is not possible to use the buttons at the moment and there will not be any fixes in the near future. So it is the most logical solution to redo it all over again.
When you detect drag if moved, make sure the Local Y position of the mouse is above the intended area, as you don’t want the entire window to drag if you click a button. Similar to a windows window frame.