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"

[UMG] Button Press & Release

Are there any plans for having OnRelease events implemented for UMG Buttons in future versions? In particular I'm wanting to implement "hold" functionality, but even trying to do a workaround is odd because the normal mouse/touch events don't fire when pressing UMG buttons, so I can't even set a state variable saying if the button is down or not.

There seems to be some of that functionality in the "Border" widget, but embedding a button inside a border takes away the mouse event functionality.

Product Version: Not Selected
Tags:
more ▼

asked Oct 13 '14 at 05:54 PM in Blueprint Scripting

avatar image

Ruffian
31 5 8 16

avatar image Xarol Apr 02 '15 at 06:14 PM

I agree with Ruffian. Being able to handle click, hold, and release would be helpful. Thanks.

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

2 answers: sort voted first

Hello Ruffian,

There is no current functionality for this. However, I will be sure to put in a feature request for this function. Until then I may have a possible work around for you to try.

Items needed:

  1. New widget with only one button

  2. 2 Custom events inside your character blueprint

  3. One bool variable inside your character blueprint

Step 1:

Create a new widget and place only one button in this widget. You will need to disable this button within the behavior tab (this is to stop the button from consuming input of mouse click events). alt text

Step 2:

This will be done inside your character blueprint. Create 2 custom events (I named them "MouseOver" and "MouseNotOver"). These will fire off depending on if the mouse is over the button. You will then need a bool variable (I named mine "IsOver"). This will be used to tell the branch if the mouse is over the button. alt text

Step 3:

This will be done inside the widget blueprint. You will need to cast an "Event On Mouse Enter" to your character blueprint and to the custom event there in (in my case it is called "MouseOver"). Then you will need to cast an "Event On Mouse Leave" to your character blueprint and to the custom event there in (in my case it is called "MouseNotOver"). alt text

Step 4:

Add widget to view port.

This is Just an example. Please note that the button will be slightly grayed out and will not have a "click" animation. I hope this helps.

Cheers

holdhelp1.png (16.6 kB)
holdhelp2.png (100.9 kB)
holdhelp3.png (86.8 kB)
more ▼

answered Oct 23 '14 at 05:41 PM

avatar image

Rudy Q ♦♦ STAFF
47.4k 545 132 524

avatar image Rudy Q ♦♦ STAFF Oct 28 '14 at 07:43 PM

I have an update for this button that allows it to "fake" being clicked. This involves changing the background color. If you have the button above all you will need to do is add what's new in the following picture.

alt text

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

I made a releasable button with C++. You can check it out here : http://www.barisatamer.com/button-with-release-event/

more ▼

answered Feb 03 '15 at 06:21 AM

avatar image

barisatamer
61 1 70 13

(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