46 lines
1.3 KiB
GDScript
46 lines
1.3 KiB
GDScript
######################################
|
|
# THE CORE FRAMEWORK #
|
|
# MADE BY THE STAROPENSOURCE PROJECT #
|
|
# AND CONTRIBUTERS (THANK YOU!) #
|
|
# #
|
|
# COPYRIGHT 2023 THE STAROPENSOURCE #
|
|
# PROJECT AND CONTRIBUTERS #
|
|
# #
|
|
# LICENSED UNDER THE GNU GENERAL #
|
|
# PUBLIC LICENSE VERSION 3 (ONLY) #
|
|
######################################
|
|
extends Node
|
|
|
|
# CORE modules
|
|
var core = null
|
|
var logger = null
|
|
|
|
# Config
|
|
var config_enabled = null
|
|
var config_image = null
|
|
var config_image_size = null
|
|
var config_color = null
|
|
|
|
# Makes the splash screen pretty
|
|
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)
|
|
if config_enabled:
|
|
display()
|
|
else:
|
|
$Background.visible = false
|
|
|
|
# The next two functions are very self explanitory
|
|
func display() -> void:
|
|
if core.protection_mode: return
|
|
logger.info("CORE/splash.gd","Displaying splash screen")
|
|
get_tree().root.move_child($"/root/CORE/",0)
|
|
$Background.visible = true
|
|
|
|
func dissolve() -> void:
|
|
if core.protection_mode: return
|
|
logger.info("CORE/splash.gd","Dissolving splash screen")
|
|
$Background.visible = false
|