From 0a75950d8ed5e5e1c0896b26830be6c13c3b1000 Mon Sep 17 00:00:00 2001 From: Juicy Date: Fri, 28 May 2021 20:32:42 +0200 Subject: [PATCH] Dialog System --- ui/dialog.gd | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/dialog.gd b/ui/dialog.gd index 74f06c2..b4a651b 100644 --- a/ui/dialog.gd +++ b/ui/dialog.gd @@ -36,8 +36,9 @@ func _json_parser(): func textbox(id: String, left_bust: Texture = null, right_bust: Texture = null): var textbox = RPGH_DefaultTextbox.new() - var text = text_data["tb"][id].eng - textbox.text = text + var text = text_data[id].eng + var name = text_data[id].name + textbox.text = name + "\n" + text if !left_bust == null: textbox.left_artwork = left_bust if !right_bust == null: @@ -51,7 +52,7 @@ func textbox(id: String, left_bust: Texture = null, right_bust: Texture = null): func screen_text(id: String): var screen_text = RPGH_ScreenText.new() - var text = text_data["tb"][id].eng + var text = text_data[id].eng screen_text.text = text var is_no_textbox_opened = _current_textbox == null