Files
imnotsick/Scenes/screening_desk/console_screen.gd
T
2026-03-01 14:10:51 +01:00

22 lines
504 B
GDScript

extends RichTextLabel
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
Globals.console_message.connect(self.display)
hide()
#Displays a message on the console screen
func display(message):
var text_to_display = message
text_to_display = text_to_display.replace("\\n", "\n") #Replaces litteral backslashes by actual newlines (necessary because of Dialogue Manager)
text = text_to_display
show()
#Resets to initial state
func reset():
text = ""
hide()