diff --git a/ScreenPlayWallpaper/Godot/ScreenPlayGodot/main.gd b/ScreenPlayWallpaper/Godot/ScreenPlayGodot/main.gd index a34d3320..1752ef7d 100644 --- a/ScreenPlayWallpaper/Godot/ScreenPlayGodot/main.gd +++ b/ScreenPlayWallpaper/Godot/ScreenPlayGodot/main.gd @@ -2,6 +2,13 @@ extends Node3D @onready var screen_play_wallpaper = $ScreenPlayGodotWallpaper +var activeScreensList = [] +var projectPath = "" +var appID = "" +var volume = 0.0 +var fillmode = 0 +var checkWallpaperVisible = false + func _ready(): # "C:\\Code\\cpp\\ScreenPlay\\ScreenPlay\\Content\\wallpaper_godot_fjord\\fjord.zip" var path = "C:\\Code\\cpp\\ScreenPlay\\ScreenPlay\\Content\\wallpaper_godot_fjord\\fjord.zip" @@ -18,3 +25,30 @@ func _ready(): else: print("Failed to load the PCK file.") Engine.set_max_fps(24) + +func parse_args(): + var args = OS.get_cmdline_args() + var i = 0 + while i < args.size(): + match args[i]: + "--ActiveScreensList": + i += 1 + activeScreensList = args[i].split(",") + for idx in range(activeScreensList.size()): + activeScreensList[idx] = int(activeScreensList[idx]) + "--ProjectPath": + i += 1 + projectPath = args[i] + "--appID": + i += 1 + appID = args[i] + "--volume": + i += 1 + volume = float(args[i]) + "--fillmode": + i += 1 + fillmode = int(args[i]) + "--CheckWallpaperVisible": + i += 1 + checkWallpaperVisible = args[i].to_lower() == "true" + i += 1