[SOLVED]We can renpy.set_focus, but how do we renpy.clear_focus? Similar to moving the mouse a little.
Posted: Fri Oct 21, 2022 6:31 pm
edit: code to clear / lose focus is down below, thx to Ocelot
We can renpy.set_focus, but how do we renpy.clear_focus? Similar to moving the mouse a little. I just want to clear the focus from any button.
Is there anything like this, or a way to simulate it?
I'm resorting to creating a fake empty button that does nothing, and setting focus to it, to simulate losing focus, but this doesn't seem right. I shouldn't have to do this.
We can renpy.set_focus, but how do we renpy.clear_focus? Similar to moving the mouse a little. I just want to clear the focus from any button.
Is there anything like this, or a way to simulate it?
Code: Select all
renpy.clear_focus()
Code: Select all
button:
xsize 0
ysize 0
id 'simulate_losing_focus_by_setting_focus_on_me'
keyboard_focus False
hover_sound None
activate_sound None
action NullAction()