22 lines
610 B
GDScript
22 lines
610 B
GDScript
extends Control
|
|
|
|
@onready var screen = $Margin/ConsoleScreen
|
|
@onready var next_patient_button = $Margin/NextPatient/CallNextPatient
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
Globals.console_message.connect(self.display)
|
|
reset()
|
|
|
|
|
|
#Displays a message on the console screen
|
|
func display(message):
|
|
var text = message.replace("\\n", "\n") #Replaces litteral backslashes by actual newlines (necessary because of Dialogue Manager)
|
|
screen.text = text
|
|
screen.show()
|
|
|
|
|
|
func reset(): #Resets to initial state
|
|
for node in [next_patient_button, screen]:
|
|
node.hide()
|