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"

On Mouse Button Down not registering on Buttons

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.

https://blueprintue.com/blueprint/26xyexvu/

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.

By the way this is created mostly based on this tutorials, with some minor tweaks but the base is the same: https://www.youtube.com/watch?v=wyC5vl64V9k

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

  1. Create new project

  2. Place the UI widget to your Content directory(https://www.dropbox.com/s/xrv9kt664zbk4nc/NewHud.uasset?dl=0) - 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).

  3. Add the widget to the viewport and enable inputs https://blueprintue.com/blueprint/-3jr54k2/

  4. 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.

Product Version: UE 4.17
Tags:
more ▼

asked Aug 08 '17 at 08:27 AM in Blueprint Scripting

avatar image

aknarts
182 3 7 12

avatar image caleks Aug 11 '17 at 10:26 PM

same here. mouse down, on drag and double click all stopped working. i tried also do overrides again with no success. hmm.

avatar image Eightshot Aug 12 '17 at 03:34 PM
avatar image aknarts Aug 13 '17 at 09:44 AM

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.

avatar image Eightshot Aug 15 '17 at 12:01 PM

I've been discussing this over on the forum (Link: https://forums.unrealengine.com/showthread.php?152385-On-event-double-click-not-firing )

It may be worth checking that out and adding any input you may have.

avatar image Eightshot Aug 15 '17 at 12:02 PM

Just to double check, have you got the button set to precise click? that seems to fix the issue for some.

avatar image aknarts Aug 15 '17 at 04:21 PM

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.

avatar image umbrelluck Aug 14 '17 at 08:58 AM

The same for me

avatar image oppne Aug 15 '17 at 10:45 AM

Same here

avatar image Pharros Aug 16 '17 at 01:00 AM

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.

avatar image aknarts 5 days ago

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

same for me

more ▼

answered Aug 12 '17 at 12:34 PM

avatar image

Alfffffffffff
38 5 2 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Same here, i hope that they will fix this as soon as possible.,

more ▼

answered Aug 12 '17 at 09:10 PM

avatar image

Iderknatx
1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

more ▼

answered Aug 16 '17 at 09:25 AM

avatar image

Eightshot
40 4 4 4

avatar image Alfffffffffff Aug 16 '17 at 01:51 PM

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..

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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