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"

How can i manually set a button widget to hovered state

I noticed that they have events for when the widget is pressed or clicked, but not for hovered. I want to be able to change the buttons color whent he widget is being hovered (which works fine for mouse). but i want to be able to do this for a gamepad as well. I found a function that Checks if it is hovered, but not to set the value.

Product Version: UE 4.10
Tags:
more ▼

asked Oct 17 '16 at 11:20 AM in Using UE4

avatar image

ViceVersa
1k 64 48 98

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

1 answer: sort voted first

This is probs a bit late but for any one also looking for this as I was. I've just figured out how to do it, you have to get the button you're trying to manipulate, get its current stytel and feed it to the set method. Just swap the normal and hovered state around. So normal set in set method is equal to hovered state in get method.

more ▼

answered Feb 06 '17 at 06:14 PM

avatar image

Angel1630
70 3 9 10

avatar image Andypants Jan 25 '18 at 01:01 PM

Please please elaborate...I've been searching for ages and it seems like you have the answer...if you can, please post a picture of your blueprint

avatar image Azaii Feb 09 '18 at 06:17 AM

This is how I did it. This is on the event constructed/begin play. I'm grabbing the default button and setting it's style as my "DefaultButton" style, then splitting the out pin into a struct, and creating a second button style called "HoverButton" which I'm then feeding the "hovered" style portion from the default button style into the default portion on the new button style. This is giving me two style variables I can easily plug in whenever I need to swap the styles out.

Hope that helped! Thanks to Angel1630 for giving me the original idea. Worked perfect!

alt text

(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