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