fix: skip buttons (sorta) work via mouse now.

This commit is contained in:
tiger tiger tiger 2026-01-12 21:43:48 +01:00
parent b64def36e4
commit a91830d28b
2 changed files with 18 additions and 10 deletions

View File

@ -77,8 +77,7 @@ func _ready() -> void:
if skip_control is SkipControl and not Engine.is_editor_hint():
skip_control.skip.connect(skip_text)
if get_tree().root.get_child(-1) == self:
play()
# Clunky rebuild...
story_array = story_array
progress = progress
@ -123,12 +122,14 @@ func try_scroll():
func play():
print_debug("StoryPlayable.gd: %s.play()" % self.name)
# There's an ugly glitch here.
hide()
animation_player.play("RESET")
await animation_player.animation_finished
# Show ourselves before playing
get_parent().show() # Canvaslayer!
show()
get_parent().show() # Ensure visible Canvaslayer!
scroll_target = 0
@ -142,8 +143,15 @@ func play():
_:
animation_player.queue("en")
if name == "draven":
# Wait and get ready.
await get_tree().process_frame
show()
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
# Don't know how to do this.
#%StoryScroll.grab_focus()
if name == "draven":
await get_tree().process_frame
$AnimationPlayer/Music.play()