Compare commits
2 commits
5b70fab2f2
...
36492503be
Author | SHA1 | Date | |
---|---|---|---|
36492503be | |||
79e7da1afd |
4 changed files with 32 additions and 5 deletions
|
@ -21,5 +21,8 @@ var core: Core
|
|||
var logger: CoreLoggerInstance
|
||||
|
||||
# Required methods
|
||||
func load_resources() -> void: core.logger.crash("PresencodeEntrypoint", "Method load_resources was not overriden")
|
||||
func initialize() -> void: core.logger.crash("PresencodeEntrypoint", "Method initialize was not overriden")
|
||||
func switch_to_slide(_slide: int) -> void: core.logger.crash("PresencodeEntrypoint", "Method switch_to_slide was not overriden")
|
||||
|
||||
# Optional methods
|
||||
func play_animation(_type: PresencodeTypes.AnimationStage, _old_slide: int, _new_slide: int) -> void: pass
|
||||
|
|
20
src/classes/types.gd
Normal file
20
src/classes/types.gd
Normal file
|
@ -0,0 +1,20 @@
|
|||
# PRESENCODE SOURCE FILE
|
||||
# Copyright (c) 2024 JeremyStarTM & Contributors
|
||||
# Licensed under the GNU Affero General Public License v3
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends Node
|
||||
class_name PresencodeTypes
|
||||
|
||||
enum AnimationStage { BEFORE, AFTER }
|
|
@ -38,7 +38,6 @@ func _ready() -> void:
|
|||
# Register cleanup hook
|
||||
core.register_cleanup_hook(func() -> void: queue_free())
|
||||
|
||||
logger.info("Presentation loader is ready")
|
||||
|
||||
func load_presentation(load_path: String) -> String:
|
||||
logger.info(core.misc.stringify_variables("Loading presentation located at %path%", { "path": load_path }))
|
||||
|
@ -233,9 +232,15 @@ func inject_entrypoint() -> void:
|
|||
|
||||
# Instantiate new PresencodeEntrypoint
|
||||
var entrypoint_node: PresencodeEntrypoint = PresencodeEntrypoint.new()
|
||||
# Give the new node a name and the entrypoint script
|
||||
entrypoint_node.name = "Entrypoint"
|
||||
entrypoint_node.set_script(entrypoint)
|
||||
|
||||
# Update variables
|
||||
entrypoint_node.core = core
|
||||
entrypoint_node.logger = communication.get_source_path("src/" + manifest["entrypoint"])
|
||||
|
||||
# Add to SceneTree
|
||||
get_tree().root.add_child(entrypoint_node)
|
||||
|
||||
# Execute initialize()
|
||||
await entrypoint_node.initialize()
|
||||
|
|
|
@ -72,8 +72,7 @@ func _ready() -> void:
|
|||
update_splash()
|
||||
add_connections()
|
||||
|
||||
logger.info("User Interface is ready")
|
||||
|
||||
# Load higher quality wallpaper
|
||||
load_high_quality_wallpaper()
|
||||
|
||||
func load_high_quality_wallpaper() -> void:
|
||||
|
|
Loading…
Reference in a new issue