# splash.gd # Splash screen # # This file is part of StarOpenSource CORE (SOSCORE) # Made by the StarOpenSource Project and Contributers # Licensed under GNU GPLv3 extends Node @onready var core = get_node("/root/core") var config_enabled = null var config_image = null var config_image_size = null var config_color = null func load_configuration() -> void: if core.protection_mode: return config_enabled = core.config.splash_enabled config_image = core.config.splash_image config_image_size = core.config.splash_image_size config_color = core.config.splash_color func initialize() -> void: if core.protection_mode: return apply_config() if config_enabled: display() else: $Background.visible = false core.setready() func apply_config() -> void: if core.protection_mode: return $Background.color = config_color $Background/Image.texture = ResourceLoader.load(config_image) $Background/Image.size = Vector2i(config_image_size,config_image_size) func display() -> void: if core.protection_mode: return Logger.info("splash","Displaying splash screen") get_tree().root.move_child($"/root/ccr",0) $Background.visible = true func dissolve() -> void: if core.protection_mode: return Logger.info("splash","Dissolving splash screen") $Background.visible = false