You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
674 B
24 lines
674 B
2 years ago
|
extends Label
|
||
|
|
||
|
|
||
|
# Called when the node enters the scene tree for the first time.
|
||
|
func _ready():
|
||
|
var arguments = {}
|
||
|
for argument in OS.get_cmdline_user_args():
|
||
|
if argument.find("=") > -1:
|
||
|
var key_value = argument.split("=")
|
||
|
arguments[key_value[0].lstrip("--")] = key_value[1]
|
||
|
else:
|
||
|
# Options without an argument will be present in the dictionary,
|
||
|
# with the value set to an empty string.
|
||
|
arguments[argument.lstrip("--")] = ""
|
||
|
|
||
|
if "session" in arguments.keys():
|
||
|
set_text("Session " + arguments["session"])
|
||
|
else:
|
||
|
set_text("Session <Unknown>")
|
||
|
|
||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||
|
func _process(_delta):
|
||
|
pass
|