From cd6396cada53e2bcc4f1dbb07e72cee92881b3a7 Mon Sep 17 00:00:00 2001 From: Noah Date: Fri, 28 Oct 2022 15:17:54 -0500 Subject: [PATCH] Commented notice() function --- Main_menu.gd | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Main_menu.gd b/Main_menu.gd index d57e40c..2e18b28 100644 --- a/Main_menu.gd +++ b/Main_menu.gd @@ -7,13 +7,21 @@ var local_version # The version installed on this computer var os_name # The simplified name of the OS (linux, or windows) var suffix # +# Load in the Notice_msg scene (Will be instanced) var Notice_msg = load("res://Notice_msg.tscn") +# Define notice() +# Takes a message and a type, then instances a new Notice_msg instance func notice(msg, type): + # Get a new Notice_msg instance, var notice = Notice_msg.instance() + # Pass arguments to notice node notice.message = msg notice.type = type + + # Set the position notice.set_position(Vector2(20, $Notices.get_child_count()*30)) + $Notices.add_child(notice) # Every _process tick