New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltips on quickmenu break keyboard and gamepad focus #4372
Comments
I'm unable to reproduce this, using the following screens: screen tooltipscreen():
modal False
sensitive False
layer "master"
roll_forward True
$ tooltip = GetTooltip()
if tooltip:
text tooltip size 20 yalign 0.637 xalign 0.889 yoffset -38 outlines [(2,"#000000",0,0)]
image test idle = Solid("#800", xysize=(25, 25))
image test hover = Solid("#080", xysize=(25, 25))
image test insensitive = Solid("#222", xysize=(25, 25))
screen quick_menu():
## Ensure this appears on top of other screens.
zorder 100
use tooltipscreen
if quick_menu:
hbox:
style_prefix "quick"
xalign 0.5
yalign 1.0
spacing 10
imagebutton auto "test %s" focus_mask True action Rollback() tooltip _("Rollback")
imagebutton auto "test %s" focus_mask True action ShowMenu('history') tooltip _("History")
imagebutton auto "test %s" focus_mask True action Skip() alternate Skip(fast=True, confirm=True) tooltip _("Skip")
imagebutton auto "test %s" focus_mask True action Preference("auto-forward", "toggle") tooltip _("Auto-forward")
imagebutton auto "test %s" focus_mask True action ShowMenu('save') tooltip _("Save")
imagebutton auto "test %s" focus_mask True action QuickSave() tooltip _("Quick Save")
imagebutton auto "test %s" focus_mask True action QuickLoad() tooltip _("Quick Load")
imagebutton auto "test %s" focus_mask True action ShowMenu('preferences') tooltip _("Preferences") Could you try this in a new project, and see if this works for you? |
I actually can reproduce this in the following easy way in Renpy 8.0.3: Just insert a simple "tooltip" keyword on one of the imagebuttons inside a quick_menu screen. Doing this results in not being able to focus that button via a gamepad or keyboard. You don't even have to do anything with that tooltip by the way. edit: I just created a completely new project with Renpy 8.0.3, inserted <tooltip "Quick Save"> onto the quick save button in the quick_menu screen inside screens.rpy and then I was not able to gain focus on that textbutton via gamepad or keyboard. Other buttons work. And mouse works too. |
Still can't focus those buttons in a new clean project with that code. I'm running 7.5.3 on Windows, if that helps. |
Can you try on one of the latest nightlies from https://nightly.renpy.org ? That's what I'm testing against. |
I've tried on the new and old version. This one is fixed. |
When using the tooltip code from the documentation on a quickmenu, buttons with a tooltip attribute can no longer gain focus from mouse or keyboard, they can only be accessed with a mouse.
Buttons can be focused on the quickmenu while in the choice screen, and work on main menu and game menu buttons.
Code is pretty much unchanged from the documentation but for posterity:
`screen quick_menu():
zorder 100
screen tooltipscreen:
The text was updated successfully, but these errors were encountered: