Show every song in the statistics, as an alternative to the cards
A Soundtracks / Songs switch in the statistics toolbar shows a list of every song with its soundtrack and how often it was played. It is searched on both song and soundtrack names, filtered and sorted like the cards, and clicking a song shows its soundtrack's popup. The server has tens of thousands of songs, so the list only makes the rows on screen and reuses them while scrolling, songs are sorted once per load, and searching waits for a pause in typing. Closes #47
This commit is contained in:
1 parent
cd4331881c
commit
a4e6da4c28
14 files changed
+10058
-1670
No files matched your search
@@ -0,0 +1,68 @@
|
||||
[gd_scene format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://statistics/song_stats_list.gd" id="list_script"]
|
||||
|
||||
[node name="SongStatsList" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
script = ExtResource("list_script")
|
||||
|
||||
[node name="Layout" type="HBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Columns" type="VBoxContainer" parent="Layout"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Header" type="PanelContainer" parent="Layout/Columns"]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
theme_type_variation = &"SongStatsHeader"
|
||||
|
||||
[node name="Titles" type="HBoxContainer" parent="Layout/Columns/Header"]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
theme_override_constants/separation = 16
|
||||
|
||||
[node name="SongTitle" type="Label" parent="Layout/Columns/Header/Titles"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 3.0
|
||||
theme_type_variation = &"HighlightMedium"
|
||||
text = "Song"
|
||||
|
||||
[node name="SoundtrackTitle" type="Label" parent="Layout/Columns/Header/Titles"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 2.0
|
||||
theme_type_variation = &"HighlightMedium"
|
||||
text = "Soundtrack"
|
||||
|
||||
[node name="PlayedTitle" type="Label" parent="Layout/Columns/Header/Titles"]
|
||||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"HighlightMedium"
|
||||
text = "Played"
|
||||
horizontal_alignment = 2
|
||||
|
||||
[node name="RowsArea" type="Control" parent="Layout/Columns"]
|
||||
unique_name_in_owner = true
|
||||
clip_contents = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="ScrollBar" type="VScrollBar" parent="Layout"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
Reference in new issue
Block a user