mirror of
https://github.com/CrispyPin/ovr-utils.git
synced 2024-11-25 00:30:25 +01:00
make overlay plugin independent of settings manager
This commit is contained in:
parent
f0b0bc84b5
commit
e0c7def52d
4 changed files with 12 additions and 7 deletions
|
@ -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 )]
|
||||
|
|
6
ovr-utils/OverlaySettingsSync.tscn
Normal file
6
ovr-utils/OverlaySettingsSync.tscn
Normal 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 )
|
|
@ -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 )
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue