make overlay plugin independent of settings manager

This commit is contained in:
Crispy 2021-06-15 18:52:41 +02:00
parent f0b0bc84b5
commit e0c7def52d
4 changed files with 12 additions and 7 deletions

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=4 format=2]
[gd_scene load_steps=5 format=2]
[ext_resource path="res://special_overlays/MainOverlay.tscn" type="PackedScene" id=1]
[ext_resource path="res://addons/openvr_overlay/OverlayInstance.tscn" type="PackedScene" id=2]
[ext_resource path="res://OverlaySettingsSync.tscn" type="PackedScene" id=3]
[ext_resource path="res://overlay_manager.gd" type="Script" id=4]
[node name="OverlayManager" type="Node"]
@ -10,3 +11,5 @@ script = ExtResource( 4 )
[node name="MainOverlay" parent="." instance=ExtResource( 2 )]
overlay_scene = ExtResource( 1 )
add_cursor = true
[node name="OverlaySettingsSync" parent="MainOverlay" instance=ExtResource( 3 )]

View file

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://overlay_settings_sync.gd" type="Script" id=1]
[node name="OverlaySettingsSync" type="Node"]
script = ExtResource( 1 )

View file

@ -1,7 +1,6 @@
[gd_scene load_steps=6 format=2]
[gd_scene load_steps=5 format=2]
[ext_resource path="res://addons/openvr_overlay/overlay_instance.gd" type="Script" id=1]
[ext_resource path="res://overlay_settings_sync.gd" type="Script" id=2]
[ext_resource path="res://addons/godot-openvr/OpenVROverlay.gdns" type="Script" id=3]
[sub_resource type="StyleBoxFlat" id=1]
@ -65,6 +64,3 @@ texture = SubResource( 2 )
expand = true
stretch_mode = 5
flip_v = true
[node name="OverlaySettingsSync" type="Node" parent="."]
script = ExtResource( 2 )

View file

@ -38,8 +38,8 @@ func add_overlay(type, name):
instance.name = name
instance.overlay_scene = scene
instance.type = type
instance.add_child(preload("res://OverlaySettingsSync.tscn").instance())
add_child(instance)
# instance.update_offset()
emit_signal("added_overlay", name)