cleaning up collectables scene

This commit is contained in:
betalars 2023-07-15 01:07:29 +02:00
parent 50ec255b32
commit 56f36b0148
2 changed files with 11 additions and 12 deletions

View File

@ -47,15 +47,15 @@ class_name Collectable_Ui
if set_collected: if set_collected:
$Panel/Content/Buttons/VBoxContainer/put_back.show() $Panel/Content/Buttons/VBoxContainer/put_back.show()
if is_story: if is_story:
$Content/Buttons/VBoxContainer/put_back.disabled = true $Panel/Content/Buttons/VBoxContainer/put_back.disabled = true
$Content/Buttons/VBoxContainer/collect_or_listen.text = "listen again" $Panel/Content/Buttons/VBoxContainer/collect_or_listen.text = "listen again"
if State.allow_skipping: if State.allow_skipping:
$Content/Buttons/VBoxContainer/skip.text = "discard cards (skip)" $Panel/Content/Buttons/VBoxContainer/skip.text = "discard cards (skip)"
else: else:
$Content/Buttons/VBoxContainer/collect_or_listen.disabled = true $Panel/Content/Buttons/VBoxContainer/collect_or_listen.disabled = true
$Content/Buttons/VBoxContainer/put_back.show() $Panel/Content/Buttons/VBoxContainer/put_back.show()
else: else:
$Content/Buttons/VBoxContainer/collect_or_listen.disabled = false $Panel/Content/Buttons/VBoxContainer/collect_or_listen.disabled = false
@export var skipped: bool = false @export var skipped: bool = false
@ -63,13 +63,13 @@ class_name Collectable_Ui
set(new_name): set(new_name):
item_name = new_name item_name = new_name
if is_inside_tree(): if is_inside_tree():
$Content/Name.text = new_name $Panel/Content/Name.text = new_name
@export var content_notes: String = "": @export var content_notes: String = "":
set(new_notes): set(new_notes):
content_notes = new_notes content_notes = new_notes
if is_inside_tree(): if is_inside_tree():
$Content/Name.text = new_notes $Panel/Content/ContentNotes.text = new_notes
signal card_collected signal card_collected
@ -79,6 +79,9 @@ func _ready():
#$Panel/Content/Buttons/VBoxContainer/Summary.visible = State.provide_summaries #$Panel/Content/Buttons/VBoxContainer/Summary.visible = State.provide_summaries
#$Panel/Content/Buttons/VBoxContainer/skip.visible = State.allow_skipping #$Panel/Content/Buttons/VBoxContainer/skip.visible = State.allow_skipping
if visible and not collapsed: _show_buttons() if visible and not collapsed: _show_buttons()
item_name = item_name
content_notes = content_notes
func _hide_buttons(): func _hide_buttons():
if is_inside_tree(): if is_inside_tree():

View File

@ -110,7 +110,6 @@ layout_mode = 2
[node name="Name" type="Label" parent="Panel/Content"] [node name="Name" type="Label" parent="Panel/Content"]
layout_mode = 2 layout_mode = 2
theme_type_variation = &"HeaderLarge" theme_type_variation = &"HeaderLarge"
text = "old Mask"
horizontal_alignment = 1 horizontal_alignment = 1
[node name="ContentNotes" type="RichTextLabel" parent="Panel/Content"] [node name="ContentNotes" type="RichTextLabel" parent="Panel/Content"]
@ -118,9 +117,6 @@ visible = false
custom_minimum_size = Vector2(256, 0) custom_minimum_size = Vector2(256, 0)
layout_mode = 2 layout_mode = 2
bbcode_enabled = true bbcode_enabled = true
text = "[center] Content Notes:
Food, Blood, Gore, Whatever, I need a second line.
[/center]"
fit_content = true fit_content = true
[node name="Buttons" type="ScrollContainer" parent="Panel/Content"] [node name="Buttons" type="ScrollContainer" parent="Panel/Content"]