diff --git a/src/loader.gd b/src/loader.gd
index 564477d..fc88952 100644
--- a/src/loader.gd
+++ b/src/loader.gd
@@ -24,11 +24,10 @@ var logger: CoreLoggerInstance
# Preinitialization
func _init() -> void:
# Update configuration
- core_config.hide_window_on_shutdown = false
- #core_config.hide_window_on_shutdown = true
- #core_config.automatic_shutdown = false
if OS.is_debug_build(): core_config.logger_level = CoreTypes.LoggerLevel.DIAG
else: core_config.logger_level = CoreTypes.LoggerLevel.INFO
+
+ core_config.logui_enabled = false
# Preinitialize CORE Framework
core = await Core.new(core_config)
@@ -66,6 +65,7 @@ along with this program. If not, see .""")
# Apply command line arguments
logger.verb("Reloading CORE Configuration (applying cmdline args)")
core_config.logger_level = args["logger_level"]
+ core_config.logui_enabled = args["display_logui"]
core.reload_configuration(core_config)
# Initialize internals
@@ -110,8 +110,8 @@ func cleanup() -> void:
# Parses all arguments
func parse_cmdline() -> Dictionary:
logger.verb("Parsing command line arguments")
- var args: Dictionary = { "shutdown": false, "load_presentation": false, "presentation_path": "", "logger_level": core_config.logger_level }
- var processed: Dictionary = { "presentation": false, "logger_level": false }
+ var args: Dictionary = { "shutdown": false, "load_presentation": false, "presentation_path": "", "logger_level": core_config.logger_level, "display_logui": core_config.logui_enabled }
+ var processed: Dictionary = { "presentation": false, "logger_level": false, "display_logui": false }
for arg in OS.get_cmdline_user_args():
logger.diag(core.misc.stringify_variables("Parsing cmdline argument %arg%", { "arg": arg }))
@@ -132,6 +132,7 @@ Usage (development setup): /path/to/godot.binary -d -v --path . ++ Sets the logger level, defaults to DIAG in debug
builds and INFO in release builds.
+--display-logui Displays CORE's Log UI. May break stuff!
/path/to/presentation.pcar Path to the presentation Presencode should open.
If not supplied, a user interface will appear.
+++ PRESENCODE HELP +++""")
@@ -159,6 +160,15 @@ Further arguments:
"WARN": args["logger_level"] = CoreTypes.LoggerLevel.WARN
"ERROR": args["logger_level"] = CoreTypes.LoggerLevel.ERROR
_: logger.error(core.misc.stringify_variables("Unable to parse argument %arg%: Can't match logger level %got%, possible are: %expected%", { "arg": arg, "got": arg.replace("--logger-level=", ""), "expected": [ "DIAG", "VERB", "INFO", "WARN", "ERROR" ] }))
+ elif arg.contains("--display-logui"):
+ # Ensure this argument is not overridden
+ if processed["display_logui"]:
+ logger.error(core.misc.stringify_variables("Unable to parse argument %arg%: Already set", { "arg": arg }))
+ continue
+ processed["display_logui"] = true
+
+ # Update 'args'
+ args["display_logui"] = true
else:
if arg.begins_with("--"): logger.error(core.misc.stringify_variables("Unable to parse argument %arg%: Option not recognized", { "arg": arg }))
else: