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

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
henvu50
Veteran
Posts: 337
Joined: Wed Aug 22, 2018 1:22 am
Contact:

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

#1 Post 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?

Post Reply

Who is online

Users browsing this forum: No registered users