This repository has been archived on 2024-02-25. You can view files and clone it, but cannot push or open issues or pull requests.
Wol/Dialogue.gd

36 lines
624 B
GDScript3
Raw Normal View History

extends Control
func _ready():
pass
2021-11-20 12:20:33 +01:00
func continue_dialogue():
if $Tween.is_active():
$Tween.remove_all()
$RichTextLabel.percent_visible = 1.0
return
$Wol.resume()
func _on_Wol_line(line):
2021-11-20 12:20:33 +01:00
print(var2str(line))
$RichTextLabel.text = line.text
$Tween.remove_all()
$Tween.interpolate_property(
$RichTextLabel,
'percent_visible',
.0,
1.0,
.02 * line.text.length()
)
$Tween.start()
func _on_Wol_options(options):
prints('got some options', options)
func _input(event):
if event is InputEventKey and event.scancode == KEY_ENTER and event.pressed:
print('Pressed enter!')
continue_dialogue()