default_focus is not respected when showing a screen from another screen
When a screen contains a button that shows another screen, and the second screen has higher priority set via the default_focus attribute, focus is not transferred to the second screen.
Minimal example:
screen midmenu():
textbutton "Start" default_focus 10 action Start() xpos 250
screen main_menu():
textbutton "Get It Started" default_focus 9 action Show("midmenu")
I've fixed this, I believe. The new commit only invokes the default_focus behavior if the last event was not mouse or touch-based - that is, if the interaction was restarted using the keyboard, gamepad, or something more esoteric like a timer. That change prevented fighting between default_focus and the mouse focus system invoked in the next frame.
Happened again on 8.1.1, although my screen is more complex than that. Will need to make a minimal screen for repro, but will do after jam.