Bit more cleanup

This commit is contained in:
2025-05-06 18:11:37 -05:00
parent 0dfb9743f6
commit 12746a520e
61 changed files with 148 additions and 622 deletions

View File

@@ -1,25 +1,5 @@
class_name UISystem extends Control
enum Layer {
Game,
VN,
Test,
Debug
}
func addSubscene(subscene:Control, layer:Layer) -> void:
subscene.originalParent.remove_child.call_deferred(subscene)
match layer:
Layer.Game:
$LayerGame.add_child.call_deferred(subscene)
Layer.Debug:
$LayerDebug.add_child.call_deferred(subscene)
Layer.VN:
$LayerVN.add_child.call_deferred(subscene)
_:
push_error("Invalid layer: " + str(layer))
return
func removeSubscene(subscene:Control) -> void:
subscene.get_parent().remove_child(subscene)
func _process(delta: float) -> void:
# This needs to always be at the end of the parent node's tree
get_parent().move_child(self, get_parent().get_child_count() - 1)