Advisor dialogs

- WIP debug/cheat console
- Rewrote README
- Updated Zack's avatar with something made by me
This commit is contained in:
Tony Bark 2021-05-20 18:17:44 -04:00
parent addbf91a36
commit 59ea5dd6f0
14 changed files with 206 additions and 88 deletions

View file

@ -1,7 +1,8 @@
extends AcceptDialog
export(String, FILE, "*.json") var dialogue_file
export var advisor_name: String
# "character" would be "name" but it's already used by the base class
export var character: String
export var rank: String
export(Texture) var avatar
export var dialog = 0
@ -18,7 +19,7 @@ onready var description_label = $Container/DescriptionLbl
func start_dialogue():
index_dialogue()
description_label.text = dialogue_keys[dialog].text
self.window_title = dialogue_keys[dialog].name
window_title = dialogue_keys[dialog].name
func index_dialogue():
@ -36,8 +37,7 @@ func load_dialogue(file_path):
func _ready():
load_dialogue(dialogue_file)
self.show()
start_dialogue()
avatar_texture.texture = avatar
name_label.text = advisor_name
name_label.text = character
rank_label.text = rank

11
scripts/core_gui.gd Normal file
View file

@ -0,0 +1,11 @@
extends Control
onready var debug_console = $Console
onready var advisor = $AdvsiorNotice
func _ready():
advisor.show()
func _process(delta):
if Input.is_action_just_released("ui_cheats"):
debug_console.show()

14
scripts/debug_console.gd Normal file
View file

@ -0,0 +1,14 @@
extends Control
onready var input_box = $Input
onready var output_box = $Output
func _ready():
input_box.grab_focus()
func output_text(text):
output_box.text = text + "\n"
func _on_Input_text_entered(new_text):
input_box.clear()
output_text(new_text)