From c412cfc8fd665cf23ed5b41b537f02ec787d7121 Mon Sep 17 00:00:00 2001 From: Streamfire Date: Sun, 19 Apr 2020 16:36:36 +0200 Subject: [PATCH] fixed DialogBoxScene to work properly when childed to container --- src/Menus/DialogueBox/DialogueBox.tscn | 6 +----- src/World.tscn | 27 ++++++++++++++------------ 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/Menus/DialogueBox/DialogueBox.tscn b/src/Menus/DialogueBox/DialogueBox.tscn index 5f0de16..8d2ffde 100644 --- a/src/Menus/DialogueBox/DialogueBox.tscn +++ b/src/Menus/DialogueBox/DialogueBox.tscn @@ -65,11 +65,7 @@ anims/next_line = SubResource( 2 ) script = ExtResource( 4 ) [node name="CenterContainer" type="CenterContainer" parent="."] -anchor_left = 0.5 -anchor_right = 0.5 -margin_left = -240.0 -margin_top = 235.0 -margin_right = 240.0 +margin_right = 480.0 margin_bottom = 31.0 __meta__ = { "_edit_use_anchors_": false diff --git a/src/World.tscn b/src/World.tscn index 56b0c4f..9aa9ec1 100644 --- a/src/World.tscn +++ b/src/World.tscn @@ -127,23 +127,26 @@ FRICTION = 200 [node name="Bonfire" parent="." instance=ExtResource( 7 )] position = Vector2( 448, 104 ) -[node name="CenterContainer" type="CenterContainer" parent="."] -margin_right = 40.0 -margin_bottom = 40.0 -use_top_left = true -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="DialogueBox" parent="CenterContainer" instance=ExtResource( 19 )] -anchor_right = 0.0 -anchor_bottom = 0.0 - [node name="CanvasLayer" type="CanvasLayer" parent="."] [node name="DragNDropUI" parent="CanvasLayer" instance=ExtResource( 20 )] ObjectParent = NodePath("../..") +[node name="CenterContainer" type="CenterContainer" parent="CanvasLayer"] +anchor_right = 1.002 +anchor_bottom = 0.068 +margin_top = 9.0 +margin_right = 0.0399475 +margin_bottom = 44.64 +use_top_left = true +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="DialogueBox" parent="CanvasLayer/CenterContainer" instance=ExtResource( 19 )] +anchor_right = 0.0 +anchor_bottom = 0.0 + [editable path="YSort/minion"] [editable path="YSort/minion/Hurtbox"]