Dialogue animation
This commit is contained in:
parent
c0c68c8662
commit
1cb2c7ebdb
2 changed files with 11 additions and 0 deletions
|
|
@ -92,6 +92,8 @@ bbcode_enabled = true
|
||||||
text = "DIALOGUE_ENTRY_POINT"
|
text = "DIALOGUE_ENTRY_POINT"
|
||||||
scroll_following = true
|
scroll_following = true
|
||||||
selection_enabled = true
|
selection_enabled = true
|
||||||
|
visible_characters = 0
|
||||||
|
visible_ratio = 0.0
|
||||||
|
|
||||||
[node name="Actions" type="NinePatchRect" parent="MenuBackground"]
|
[node name="Actions" type="NinePatchRect" parent="MenuBackground"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,15 @@ extends NinePatchRect
|
||||||
|
|
||||||
@onready var dialogue = $DialogueView
|
@onready var dialogue = $DialogueView
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
var tween = create_tween() \
|
||||||
|
.tween_property(dialogue,"visible_ratio",1.0, 2)
|
||||||
|
print(len(dialogue.text))
|
||||||
|
|
||||||
func send_message(msg: Message):
|
func send_message(msg: Message):
|
||||||
var new_msg = tr(msg.fact + "_RECEIVED")
|
var new_msg = tr(msg.fact + "_RECEIVED")
|
||||||
|
var old_len = len(dialogue.get_parsed_text())
|
||||||
dialogue.append_text(new_msg)
|
dialogue.append_text(new_msg)
|
||||||
|
dialogue.visible_characters = old_len
|
||||||
|
var tween = create_tween() \
|
||||||
|
.tween_property(dialogue,"visible_ratio",1.0, 2)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue