Page 1 of 1

Bug: Setting Start Button to default_focus True doesn't set focus.

Posted: Wed Jul 21, 2021 1:14 am
by henvu50
EDIT: Last thing I want to do is waste anyone's time, so I tested it again on a different computer running windows 10 home, using the latest stable 7.4.6 version for june 13. I was able to repeat the problem, so I know it's not my computer or mouse. The problem clearly exists and should be able to be reproduced.

EDIT: I tested this again and the Start still won't gain focus after the first launch. I restarted my computer, ensured no other apps were open. But, if I start a new game then exit back to the main menu, Start gains default focus. Can someone please test and confirm this bug?

I tested this in a new project with the latest pre-release: 7.4.7.1829
I also tested it in a new project using 7.4.5.1648

1. Make a new project and then modify the Start button in screens.rpy like this.

Code: Select all

# screens.rpy
screen navigation():
#.......
      textbutton _("Start") action Start() default_focus True
#.......      
2. Launch the game. You'll notice when you're at the main menu, the Start button won't be focused.

3. Start a new game (click Start), then exit back to the main menu and the Start button will be focused. So it does work in some cases.

So when the game first runs, the Start doesn't gain default_focus. I tried manually setting the Start button's focus using the on 'show' event with the new Renpy.set_focus() feature, and it did work for a moment, but something seems to snag away focus at the very last second when the main menu is done loading, and after launching the game for the first time. ( I made sure i'm not moving the mouse or anything either.) Can anyone repeat this problem?