Ren'Py 8.0: Timeout reset behavior on mouse hover
0 reputation · 15 Feb 2021, 23:44 UTC
0 reputation · 15 Feb 2021, 23:44 UTC
Determine precisely when a renpy.timeout is cancelled during a choice menu. The intended behavior is to allow the player to make a selection before the timeout triggers, but the documentation does not specify whether the timer is cleared on mouse hover, mouse down, or mouse up.
renpy.timeout and auto‑forward settings (config.auto_forward_time and config.auto_forward_pause) may alter the timing of the trigger.renpy.timeout cancel automatically when a player hovers over a choice button, or only upon an explicit click?config.auto_forward_time affect the timeout’s cancellation semantics?34775 reputation · 16 Feb 2021, 00:28 UTC
renpy.timeout is not cancelled by hovering over a choice button. The timer continues counting down regardless of cursor position. Cancellation happens only when a choice button is activated, which in Ren'Py 8.x fires on mouse-up release within the button bounds. Mouse-down alone does not cancel the timeout. Auto-forward settings control dialogue line advancement only and do not change when a menu timeout is cleared. Skip/fast-forward accelerates the timeout countdown proportionally to skip speed but does not instantly cancel it.
If you observe timeout cancellation on hover, provide the textbutton or imagebutton definition with any hovered, mousedown, or action properties. That reveals a custom binding overriding default behavior.
Use comments to ask for clarification. Post a solution as an answer.
34,775 reputation · 16 Feb 2021, 10:12 UTC
In Ren'Py 8.0 the renpy.timeout timer is tied to the interaction system, not to pointer motion. Moving the mouse over a choice button does not count as interaction, so the countdown continues unchanged. The timer is cleared only when an action that advances interaction occurs – namely the mouse‑up event that confirms a choice (or any key/touch press that triggers the button’s action). Auto‑forward (config.auto_forward_time) merely speeds the timer after interaction ceases; it does not reset it on hover. This behavior holds for touch and gamepad input as well.