Cover menu in the soundtrack popup ("Change cover"):
- Choose picture uploads a JPEG, PNG or WebP picture (up to 10 MB).
- Pick by ID uses a game's cover on SteamGridDB or an anime's on AniList.
- Remove cover deletes it, so the server searches for a new one.
- The server's reason is shown when it refuses a change.
After a change the new cover time is fetched, and the popup, the
statistics card and the quiz show the new cover.
Quiz: once the answer is shown, the soundtrack's cover shows to the left of
the titles. Cover and titles are centered together, left and right and up
and down, and each title keeps to two lines. Cover times come from the
soundtrack list, and songs keep their soundtrack's UUID, also in saves.
Requests can now send any body with its content type, and every 2xx answer
counts as success. Cover frames are 2:3 like the server's covers. Small
copies of real covers are used by the tests and screenshots.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
300 lines
8.4 KiB
Plaintext
300 lines
8.4 KiB
Plaintext
[gd_scene format=3]
|
|
|
|
[ext_resource type="Script" path="res://popups/soundtrack_stats_popup.gd" id="popup_script"]
|
|
|
|
[node name="SoundtrackStatsPopup" type="Control" unique_id=1213000001 node_paths=PackedStringArray("panel")]
|
|
layout_mode = 3
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
script = ExtResource("popup_script")
|
|
panel = NodePath("StatsPanel")
|
|
|
|
[node name="StatsPanel" type="Panel" parent="." unique_id=1213000002]
|
|
unique_name_in_owner = true
|
|
layout_mode = 0
|
|
offset_right = 700.0
|
|
offset_bottom = 800.0
|
|
theme_type_variation = &"PopupBackground"
|
|
|
|
[node name="TitleLabel" type="Label" parent="StatsPanel" unique_id=1213000003]
|
|
unique_name_in_owner = true
|
|
layout_mode = 0
|
|
offset_left = 20.0
|
|
offset_top = 12.0
|
|
offset_right = 680.0
|
|
offset_bottom = 50.0
|
|
theme_type_variation = &"Title"
|
|
horizontal_alignment = 1
|
|
text_overrun_behavior = 3
|
|
|
|
[node name="CoverFrame" type="Panel" parent="StatsPanel"]
|
|
unique_name_in_owner = true
|
|
clip_children = 2
|
|
layout_mode = 0
|
|
offset_left = 20.0
|
|
offset_top = 64.0
|
|
offset_right = 160.0
|
|
offset_bottom = 274.0
|
|
mouse_filter = 2
|
|
theme_type_variation = &"SoundtrackCover"
|
|
|
|
[node name="CoverPlaceholder" type="Label" parent="StatsPanel/CoverFrame"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
theme_type_variation = &"TitleMedium"
|
|
horizontal_alignment = 1
|
|
vertical_alignment = 1
|
|
|
|
[node name="CoverPicture" type="TextureRect" parent="StatsPanel/CoverFrame"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
mouse_filter = 2
|
|
expand_mode = 1
|
|
stretch_mode = 6
|
|
|
|
[node name="Info" type="VBoxContainer" parent="StatsPanel"]
|
|
layout_mode = 0
|
|
offset_left = 180.0
|
|
offset_top = 64.0
|
|
offset_right = 680.0
|
|
offset_bottom = 264.0
|
|
|
|
[node name="SummaryLabel" type="Label" parent="StatsPanel/Info" unique_id=1213000004]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
autowrap_mode = 3
|
|
|
|
[node name="NamesTitle" type="Label" parent="StatsPanel/Info"]
|
|
layout_mode = 2
|
|
theme_type_variation = &"HighlightMedium"
|
|
text = "Also known as"
|
|
|
|
[node name="NamesLabel" type="Label" parent="StatsPanel/Info"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
theme_type_variation = &"TextMedium"
|
|
autowrap_mode = 3
|
|
text_overrun_behavior = 3
|
|
max_lines_visible = 3
|
|
|
|
[node name="InfoButtons" type="HBoxContainer" parent="StatsPanel/Info"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 12
|
|
|
|
[node name="EditNamesButton" type="Button" parent="StatsPanel/Info/InfoButtons"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
text = "Edit names"
|
|
|
|
[node name="ChangeCoverButton" type="Button" parent="StatsPanel/Info/InfoButtons"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
text = "Change cover"
|
|
|
|
[node name="ScrollContainer" type="ScrollContainer" parent="StatsPanel" unique_id=1213000005]
|
|
unique_name_in_owner = true
|
|
layout_mode = 0
|
|
offset_left = 20.0
|
|
offset_top = 280.0
|
|
offset_right = 680.0
|
|
offset_bottom = 784.0
|
|
horizontal_scroll_mode = 0
|
|
|
|
[node name="SongList" type="VBoxContainer" parent="StatsPanel/ScrollContainer" unique_id=1213000006]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
|
|
[node name="NamesEditor" type="VBoxContainer" parent="StatsPanel"]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
layout_mode = 0
|
|
offset_left = 20.0
|
|
offset_top = 280.0
|
|
offset_right = 680.0
|
|
offset_bottom = 784.0
|
|
theme_override_constants/separation = 10
|
|
|
|
[node name="EditorTitle" type="Label" parent="StatsPanel/NamesEditor"]
|
|
layout_mode = 2
|
|
theme_type_variation = &"Title"
|
|
text = "Alternative names"
|
|
|
|
[node name="EditorHelp" type="Label" parent="StatsPanel/NamesEditor"]
|
|
layout_mode = 2
|
|
autowrap_mode = 3
|
|
text = "Other names the soundtrack goes by, e.g. short names or the name in another language. Search finds it by any of them."
|
|
|
|
[node name="EditorScroll" type="ScrollContainer" parent="StatsPanel/NamesEditor"]
|
|
layout_mode = 2
|
|
size_flags_vertical = 3
|
|
horizontal_scroll_mode = 0
|
|
|
|
[node name="EditorNames" type="VBoxContainer" parent="StatsPanel/NamesEditor/EditorScroll"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
|
|
[node name="AddRow" type="HBoxContainer" parent="StatsPanel/NamesEditor"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="NewNameField" type="LineEdit" parent="StatsPanel/NamesEditor/AddRow"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
placeholder_text = "Another name"
|
|
|
|
[node name="AddNameButton" type="Button" parent="StatsPanel/NamesEditor/AddRow"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
text = "Add"
|
|
|
|
[node name="EditorStatus" type="Label" parent="StatsPanel/NamesEditor"]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
layout_mode = 2
|
|
theme_type_variation = &"HighlightMedium"
|
|
autowrap_mode = 3
|
|
|
|
[node name="EditorButtons" type="HBoxContainer" parent="StatsPanel/NamesEditor"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 12
|
|
alignment = 2
|
|
|
|
[node name="CancelNamesButton" type="Button" parent="StatsPanel/NamesEditor/EditorButtons"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
text = "Cancel"
|
|
|
|
[node name="SaveNamesButton" type="Button" parent="StatsPanel/NamesEditor/EditorButtons"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
text = "Save"
|
|
|
|
[node name="CoverEditor" type="VBoxContainer" parent="StatsPanel"]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
layout_mode = 0
|
|
offset_left = 20.0
|
|
offset_top = 280.0
|
|
offset_right = 680.0
|
|
offset_bottom = 784.0
|
|
theme_override_constants/separation = 10
|
|
|
|
[node name="CoverEditorTitle" type="Label" parent="StatsPanel/CoverEditor"]
|
|
layout_mode = 2
|
|
theme_type_variation = &"Title"
|
|
text = "Cover"
|
|
|
|
[node name="CoverEditorHelp" type="Label" parent="StatsPanel/CoverEditor"]
|
|
layout_mode = 2
|
|
autowrap_mode = 3
|
|
text = "The server finds covers by itself. When it found the wrong one, or none, choose a picture of your own or the cover of a game on SteamGridDB or an anime on AniList. The server keeps a cover set here until it is removed."
|
|
|
|
[node name="PictureRow" type="HBoxContainer" parent="StatsPanel/CoverEditor"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 12
|
|
|
|
[node name="ChoosePictureButton" type="Button" parent="StatsPanel/CoverEditor/PictureRow"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
text = "Choose picture…"
|
|
|
|
[node name="RemoveCoverButton" type="Button" parent="StatsPanel/CoverEditor/PictureRow"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
text = "Remove cover"
|
|
|
|
[node name="SourceTitle" type="Label" parent="StatsPanel/CoverEditor"]
|
|
layout_mode = 2
|
|
theme_type_variation = &"HighlightMedium"
|
|
text = "Pick by ID"
|
|
|
|
[node name="SourceHelp" type="Label" parent="StatsPanel/CoverEditor"]
|
|
layout_mode = 2
|
|
theme_type_variation = &"TextMedium"
|
|
autowrap_mode = 3
|
|
text = "The ID is the number in the game's or anime's web address."
|
|
|
|
[node name="SourceRow" type="HBoxContainer" parent="StatsPanel/CoverEditor"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="CoverSourceButton" type="OptionButton" parent="StatsPanel/CoverEditor/SourceRow"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
selected = 0
|
|
item_count = 2
|
|
popup/item_0/text = "SteamGridDB"
|
|
popup/item_0/id = 0
|
|
popup/item_1/text = "AniList"
|
|
popup/item_1/id = 1
|
|
|
|
[node name="CoverIdField" type="LineEdit" parent="StatsPanel/CoverEditor/SourceRow"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
placeholder_text = "ID"
|
|
max_length = 50
|
|
|
|
[node name="UseSourceButton" type="Button" parent="StatsPanel/CoverEditor/SourceRow"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
text = "Use"
|
|
|
|
[node name="CoverEditorSpace" type="Control" parent="StatsPanel/CoverEditor"]
|
|
layout_mode = 2
|
|
size_flags_vertical = 3
|
|
mouse_filter = 2
|
|
|
|
[node name="CoverStatus" type="Label" parent="StatsPanel/CoverEditor"]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
layout_mode = 2
|
|
theme_type_variation = &"HighlightMedium"
|
|
autowrap_mode = 3
|
|
|
|
[node name="CoverEditorButtons" type="HBoxContainer" parent="StatsPanel/CoverEditor"]
|
|
layout_mode = 2
|
|
alignment = 2
|
|
|
|
[node name="CloseCoverButton" type="Button" parent="StatsPanel/CoverEditor/CoverEditorButtons"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
text = "Done"
|
|
|
|
[node name="PictureDialog" type="FileDialog" parent="."]
|
|
unique_name_in_owner = true
|
|
title = "Choose a cover picture"
|
|
initial_position = 2
|
|
size = Vector2i(800, 500)
|
|
ok_button_text = "Open"
|
|
file_mode = 0
|
|
access = 2
|
|
filters = PackedStringArray("*.jpg, *.jpeg, *.png, *.webp ; Pictures")
|
|
use_native_dialog = true
|