From 56f36b01486c9fcbd3077f339c94714badd69c53 Mon Sep 17 00:00:00 2001 From: betalars Date: Sat, 15 Jul 2023 01:07:29 +0200 Subject: [PATCH] cleaning up collectables scene --- .../collectable/collectable_ui.gd | 19 +++++++++++-------- .../collectable/collectable_ui.tscn | 4 ---- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/logic-scenes/collectable/collectable_ui.gd b/src/logic-scenes/collectable/collectable_ui.gd index 96a4677..07da6c9 100644 --- a/src/logic-scenes/collectable/collectable_ui.gd +++ b/src/logic-scenes/collectable/collectable_ui.gd @@ -47,15 +47,15 @@ class_name Collectable_Ui if set_collected: $Panel/Content/Buttons/VBoxContainer/put_back.show() if is_story: - $Content/Buttons/VBoxContainer/put_back.disabled = true - $Content/Buttons/VBoxContainer/collect_or_listen.text = "listen again" + $Panel/Content/Buttons/VBoxContainer/put_back.disabled = true + $Panel/Content/Buttons/VBoxContainer/collect_or_listen.text = "listen again" if State.allow_skipping: - $Content/Buttons/VBoxContainer/skip.text = "discard cards (skip)" + $Panel/Content/Buttons/VBoxContainer/skip.text = "discard cards (skip)" else: - $Content/Buttons/VBoxContainer/collect_or_listen.disabled = true - $Content/Buttons/VBoxContainer/put_back.show() + $Panel/Content/Buttons/VBoxContainer/collect_or_listen.disabled = true + $Panel/Content/Buttons/VBoxContainer/put_back.show() else: - $Content/Buttons/VBoxContainer/collect_or_listen.disabled = false + $Panel/Content/Buttons/VBoxContainer/collect_or_listen.disabled = false @export var skipped: bool = false @@ -63,13 +63,13 @@ class_name Collectable_Ui set(new_name): item_name = new_name if is_inside_tree(): - $Content/Name.text = new_name + $Panel/Content/Name.text = new_name @export var content_notes: String = "": set(new_notes): content_notes = new_notes if is_inside_tree(): - $Content/Name.text = new_notes + $Panel/Content/ContentNotes.text = new_notes signal card_collected @@ -79,6 +79,9 @@ func _ready(): #$Panel/Content/Buttons/VBoxContainer/Summary.visible = State.provide_summaries #$Panel/Content/Buttons/VBoxContainer/skip.visible = State.allow_skipping if visible and not collapsed: _show_buttons() + + item_name = item_name + content_notes = content_notes func _hide_buttons(): if is_inside_tree(): diff --git a/src/logic-scenes/collectable/collectable_ui.tscn b/src/logic-scenes/collectable/collectable_ui.tscn index 2893e86..09070c1 100644 --- a/src/logic-scenes/collectable/collectable_ui.tscn +++ b/src/logic-scenes/collectable/collectable_ui.tscn @@ -110,7 +110,6 @@ layout_mode = 2 [node name="Name" type="Label" parent="Panel/Content"] layout_mode = 2 theme_type_variation = &"HeaderLarge" -text = "old Mask" horizontal_alignment = 1 [node name="ContentNotes" type="RichTextLabel" parent="Panel/Content"] @@ -118,9 +117,6 @@ visible = false custom_minimum_size = Vector2(256, 0) layout_mode = 2 bbcode_enabled = true -text = "[center] Content Notes: -Food, Blood, Gore, Whatever, I need a second line. -[/center]" fit_content = true [node name="Buttons" type="ScrollContainer" parent="Panel/Content"]