Focus is lost when clicking on widgets, even those marked as Visible. Buttons seem to be the only exception.
UI mode is set to Game and UI.
Focus is lost when clicking on widgets, even those marked as Visible. Buttons seem to be the only exception.
UI mode is set to Game and UI.
Hi,
what do you mean with “focus lost”? You mean the widget gets the focus when you click on it? Or you don’t want a click to go through the widget to the game? In the second case, you could override the mouse click function and set the return value to handled.
Can you explain it a bit more?
Regards,
Hello,
I have a few questions for you that will help narrow down what issue it is that you are experiencing.
Quick questions:
Hello,
We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.
Thank you.
I’m experiencing this too
On the image that I have some buttons on the left with keyboard focus on the “return to game” button.
If I click anywhere on the screen the buttons lose the focus
Hello gustavorios2,
Could you go through and answer the questions from my previous post that were directed at?
hi! thanks for the quick response.
I made a empty project explaining the widget strange behavior.
heres the link
link text
Maybe I’m just missing something.
THanks!
Hello gustavorios2,
After taking a quick look at your project, it appears that you will need to manage your inputs. I made the change below (set input mode ui only) and this appears to have resolved the issues mentioned in the project. I hope that this information helps.
Make it a great day
bIsFocusable = true; ?
I give my solution, I hope it will help you (and the other people who come to this forum and were looking for the solution like me, 30 minutes ago, before I found this little trick! ^^)
1- record the focused button in the Event Tick
2- Create a giant, invisible button, without pressed padding, which contains the entire menu.
3- When clicking on this giant invisible button (OnPress, not OnClick), set the focus to the current focused button
It works perfectly for me! ^^
Final result: https://streamable.com/kwm4c
Tip: you can remove the default dotted frame around the button by disabling this feature in project settings:
I was having the same issue. But adding only the Show Mouse Cursor enabled changed everything
I’m not sure this is a great solution but in my case, I set the focus back when it’s lost (due to mouse click):