From bf3908de5c3f983a9094b2eaa54639daa21e9965 Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Tue, 6 Jul 2021 22:06:15 +0200 Subject: [PATCH] cleanup --- ovr-utils/overlay_manager.gd | 8 -------- ovr-utils/overlay_settings_sync.gd | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/ovr-utils/overlay_manager.gd b/ovr-utils/overlay_manager.gd index aaf84e7..a6a36ca 100644 --- a/ovr-utils/overlay_manager.gd +++ b/ovr-utils/overlay_manager.gd @@ -27,16 +27,8 @@ func _load_overlays(): func add_overlay(name): print("Adding overlay '", name, "'") -# var scene = load("res://overlays/" + type + ".tscn") -# if not scene: -# print("Unknown overlay type: '", type, "'") -# scene = load("res://special_overlays/UnknownType.tscn") - var instance = preload("res://addons/openvr_overlay/OverlayInstance.tscn").instance() - instance.name = name -# instance.overlay_scene = scene -# instance.type = type instance.add_child(preload("res://OverlaySettingsSync.tscn").instance()) add_child(instance) emit_signal("added_overlay", name) diff --git a/ovr-utils/overlay_settings_sync.gd b/ovr-utils/overlay_settings_sync.gd index dd965ad..8e714ff 100644 --- a/ovr-utils/overlay_settings_sync.gd +++ b/ovr-utils/overlay_settings_sync.gd @@ -1,10 +1,10 @@ extends Node - onready var p = get_parent() var loaded := false var _needs_sync := true + func _ready() -> void: p = get_parent() call_deferred("load_all")