Files
MusicPlayer/statistics/StatisticsView.tscn
T
Sansan a21b6e9b22
Build / test (push) Successful in 40s
Build / build (push) Successful in 1m16s
Add a Statistics tab with a card for every soundtrack
Part of #41. The top bar has Quiz and Statistics tabs instead of the
Statistics button. The Statistics tab replaces the quiz below the top bar
(the song keeps playing) and shows every soundtrack as a card with its
plays, last played date and most and least played songs, loaded from the
new GET /api/v1/statistics/soundtracks. The cards can be searched (with
the Search popup's matching, now in SoundtrackSearch), filtered on played
or never played, and sorted A-Z, Z-A, most or least played. Clicking a
card opens a popup with all its songs.

Screenshots of the other states only differ in the top bar, and the
layout baseline is taken again with the new statistics states.
2026-10-06 23:33:00 +02:00

133 lines
3.3 KiB
Plaintext

[gd_scene format=3]
[ext_resource type="Script" path="res://statistics/statistics_view.gd" id="view_script"]
[node name="StatisticsView" type="Panel" unique_id=1212000001]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = 56.0
grow_horizontal = 2
grow_vertical = 2
theme_type_variation = &"WindowBackground"
script = ExtResource("view_script")
[node name="Toolbar" type="HBoxContainer" parent="." unique_id=1212000002]
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
offset_left = 32.0
offset_top = 16.0
offset_right = -32.0
offset_bottom = 56.0
grow_horizontal = 2
theme_override_constants/separation = 12
[node name="SearchField" type="LineEdit" parent="Toolbar" unique_id=1212000003]
unique_name_in_owner = true
custom_minimum_size = Vector2(480, 0)
layout_mode = 2
placeholder_text = "Search soundtracks"
clear_button_enabled = true
[node name="ClearButton" type="Button" parent="Toolbar" unique_id=1212000004]
unique_name_in_owner = true
layout_mode = 2
focus_mode = 0
text = "Clear"
[node name="CountLabel" type="Label" parent="Toolbar" unique_id=1212000005]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
horizontal_alignment = 1
[node name="ShowLabel" type="Label" parent="Toolbar" unique_id=1212000006]
layout_mode = 2
text = "Show"
[node name="ShowOption" type="OptionButton" parent="Toolbar" unique_id=1212000007]
unique_name_in_owner = true
custom_minimum_size = Vector2(160, 0)
layout_mode = 2
focus_mode = 0
selected = 0
item_count = 3
popup/item_0/text = "All"
popup/item_0/id = 0
popup/item_1/text = "Played"
popup/item_1/id = 1
popup/item_2/text = "Never played"
popup/item_2/id = 2
[node name="SortLabel" type="Label" parent="Toolbar" unique_id=1212000008]
layout_mode = 2
text = "Sort"
[node name="SortOption" type="OptionButton" parent="Toolbar" unique_id=1212000009]
unique_name_in_owner = true
custom_minimum_size = Vector2(160, 0)
layout_mode = 2
focus_mode = 0
selected = 0
item_count = 4
popup/item_0/text = "A-Z"
popup/item_0/id = 0
popup/item_1/text = "Z-A"
popup/item_1/id = 1
popup/item_2/text = "Most played"
popup/item_2/id = 2
popup/item_3/text = "Least played"
popup/item_3/id = 3
[node name="ScrollContainer" type="ScrollContainer" parent="." unique_id=1212000010]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 32.0
offset_top = 72.0
offset_right = -32.0
offset_bottom = -16.0
grow_horizontal = 2
grow_vertical = 2
horizontal_scroll_mode = 0
[node name="CardGrid" type="GridContainer" parent="ScrollContainer" unique_id=1212000011]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
theme_type_variation = &"StatisticsGrid"
columns = 6
[node name="StatusLabel" type="Label" parent="." unique_id=1212000012]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 14
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_top = -40.0
offset_bottom = -4.0
grow_horizontal = 2
grow_vertical = 2
theme_type_variation = &"Title"
horizontal_alignment = 1
[node name="RetryButton" type="Button" parent="." unique_id=1212000013]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -50.0
offset_top = 8.0
offset_right = 50.0
offset_bottom = 48.0
grow_horizontal = 2
grow_vertical = 2
focus_mode = 0
text = "Retry"