Btw: every time you use "set timer by event" it is good to promote the return value to variable and once you do not need the timer anymore just use it to "clear and invalidate timer by handle" becasue if you use this in widget in game (like inventory or something) the timer will go forever until you turn off the game, change map etc.
Ah, I figured it out. Make sure to go to the project settings > Common Input Settings > Windows and then make sure "Enabled Enhanced Input Support" is checked. I don't think it automatically does this even if you check it in the plugins.
I have a problem. My UI hides the mouse and only uses the keyboard to control the buttons. It enters the interface by default. Although the keyboard is focused, it cannot respond to the Enter key for interaction. The Enter key only works after pressing the arrow keys to switch buttons. Although the mouse is hidden, after I click the mouse, the Enter key does not work again. I need to switch the button again. I don’t know how to solve it.
@@ТкачевВладимир-ш4ы maybe the timer that triggers the function stops when paused? don´t know if theres a onfocus event but that seams a more reasonable place to put that instead of checking on a timer
I worked around this problem by creating a boolean variable. After the Custom Event "Focus", I set the bool to false. After the Branch of the "Loop Body" "true", I set the boolean to true. Then, in the For Each Loop "Completed", I added a branch that checks the boolean, and in the false, it sets the focus to the play button. I don't know if I like it, but worked by now.
Btw: every time you use "set timer by event" it is good to promote the return value to variable and once you do not need the timer anymore just use it to "clear and invalidate timer by handle" becasue if you use this in widget in game (like inventory or something) the timer will go forever until you turn off the game, change map etc.
where would you call that, on Event BeginPlay in the level BP or at the end of the Timer Event Call after setting the Hovered Color?
Ah, I figured it out. Make sure to go to the project settings > Common Input Settings > Windows and then make sure "Enabled Enhanced Input Support" is checked. I don't think it automatically does this even if you check it in the plugins.
Hey just a quick tip if you hold control when you chose the anchors it will set everything to zero saving you a step.
odd, it's not working for me. I mean, the color change isn't working. Everything else is, but the buttons' background color doesn't change.
Same
@@Joseph_Richard did you figure out a workaround?
@@derf0007 I have the same issue did you find a workaround
@@harvzgames9622 yes, you have to go to project settings and make sure it is enabled lol. It doesn’t enable by default
@@derf0007 what setting do I change in project settings
This works on controller but keyboard navigation is set to the arrow keys. Does anyone know how to get this to work with WASD as well?
I really need this video.
how do you make control rumble on menu select?
Force Feedback.
Timer doesn't work when the game is paused.
I do the same as in the video and the button blurs too :(
Love this video. Can you do one without the button showing?
I have a problem. My UI hides the mouse and only uses the keyboard to control the buttons. It enters the interface by default. Although the keyboard is focused, it cannot respond to the Enter key for interaction. The Enter key only works after pressing the arrow keys to switch buttons. Although the mouse is hidden, after I click the mouse, the Enter key does not work again. I need to switch the button again. I don’t know how to solve it.
please teach using interface instead of casting
Great video, can You make like toturiol for shader, like one used in bodycam Game, yo make Game more realistic... Please
it works perfectly for me. but the game is not paused. if I add the set game pause node, then changing the button colors no longer works.
Hi. Have you solved this problem? I have a similar situation.
@@ТкачевВладимир-ш4ы maybe the timer that triggers the function stops when paused? don´t know if theres a onfocus event but that seams a more reasonable place to put that instead of checking on a timer
@@orlandobascunan7531 how to do it?
Too many tutorials use bad practises like timers for keyboard focus. There's many built in functions for event driven logic you could've used.
Please walk us through it
The only issue i have eight now is that if i click on the background so anything else that isn't the buttons the mouse cursor disappears
I worked around this problem by creating a boolean variable.
After the Custom Event "Focus", I set the bool to false.
After the Branch of the "Loop Body" "true", I set the boolean to true.
Then, in the For Each Loop "Completed", I added a branch that checks the boolean, and in the false, it sets the focus to the play button.
I don't know if I like it, but worked by now.
You can try with the node: input mode UI only, this example has the Game and UI, so you can still interact with the background.
If this doesnt work for you try putting the same logic he did on a tick event. Hope this helps someone. God bless you =)