Files
MusicPlayer/quiz/QuizSettingsCard.tscn
T
SansanandClaude Opus 5.5 a735c515bf
Build / test (push) Successful in 1m40s
Build / build (push) Successful in 1m28s
Add Short songs and a choice of how random songs are picked (#30, #51)
Short songs (#30): a quiz settings switch and a Seconds per song row (30 by
default, 10-120 in steps of 5), saved with the quiz settings. Only part of
each quiz song plays, from a random point 10-60% into it, picked once per song
so restart and repeat play the same part. The progress bar, time and seeking
stay within the part, a hidden beginning counts inside it, and its end counts
as the song ending (repeat, stop or go to the next song as set).

Random songs (#51): the low-played switch in Settings is now a Normal / Low
played / Classic choice, stored as Settings.random_mode and not saved.
fetch_random_song(mode) picks /music/rand, /music/rand/low or
/music/rand/classic.

Closes #30
Closes #51

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 21:21:20 +02:00

220 lines
6.1 KiB
Plaintext

[gd_scene format=3]
[ext_resource type="Script" path="res://quiz/quiz_settings_card.gd" id="1_card_script"]
[node name="QuizSettingsCard" type="Control" node_paths=PackedStringArray("panel")]
layout_mode = 3
anchors_preset = 0
mouse_filter = 2
script = ExtResource("1_card_script")
panel = NodePath("CardPanel")
[node name="CardPanel" type="Panel" parent="."]
unique_name_in_owner = true
layout_mode = 0
offset_top = -470.0
offset_right = 440.0
theme_type_variation = &"PopupBackground"
[node name="VBox" type="VBoxContainer" parent="CardPanel"]
unique_name_in_owner = true
layout_mode = 0
offset_left = 16.0
offset_top = 12.0
offset_right = 424.0
[node name="TitleLabel" type="Label" parent="CardPanel/VBox"]
layout_mode = 2
theme_type_variation = &"Title"
text = "Quiz settings"
horizontal_alignment = 1
[node name="AutoRepeatCheckButton" type="CheckButton" parent="CardPanel/VBox"]
unique_name_in_owner = true
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "Auto repeat"
[node name="StopAfterCurrentCheckButton" type="CheckButton" parent="CardPanel/VBox"]
unique_name_in_owner = true
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "Stop after current"
[node name="HideNextTrackCheckButton" type="CheckButton" parent="CardPanel/VBox"]
unique_name_in_owner = true
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "Hide next track"
[node name="ShortSongsCheckButton" type="CheckButton" parent="CardPanel/VBox"]
unique_name_in_owner = true
layout_mode = 2
tooltip_text = "Play only a part of each song, from a random point, so more songs fit in a game"
focus_mode = 0
action_mode = 0
text = "Short songs"
[node name="ShortSongSecondsRow" type="HBoxContainer" parent="CardPanel/VBox"]
unique_name_in_owner = true
layout_mode = 2
[node name="Title" type="Label" parent="CardPanel/VBox/ShortSongSecondsRow"]
layout_mode = 2
size_flags_horizontal = 3
theme_type_variation = &"SettingsRowLabel"
text = "Seconds per song"
[node name="ShortSongSecondsLabel" type="Label" parent="CardPanel/VBox/ShortSongSecondsRow"]
unique_name_in_owner = true
custom_minimum_size = Vector2(48, 0)
layout_mode = 2
text = "30"
horizontal_alignment = 1
[node name="LowerShortSongSecondsButton" type="Button" parent="CardPanel/VBox/ShortSongSecondsRow"]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 0)
layout_mode = 2
focus_mode = 0
action_mode = 0
theme_type_variation = &"StepButton"
text = "-5"
[node name="IncreaseShortSongSecondsButton" type="Button" parent="CardPanel/VBox/ShortSongSecondsRow"]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 0)
layout_mode = 2
focus_mode = 0
action_mode = 0
theme_type_variation = &"StepButton"
text = "+5"
[node name="HideBeginningCheckButton" type="CheckButton" parent="CardPanel/VBox"]
unique_name_in_owner = true
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "Hide the beginning of songs"
[node name="HideForSecondsRow" type="HBoxContainer" parent="CardPanel/VBox"]
unique_name_in_owner = true
layout_mode = 2
[node name="Title" type="Label" parent="CardPanel/VBox/HideForSecondsRow"]
layout_mode = 2
size_flags_horizontal = 3
theme_type_variation = &"SettingsRowLabel"
text = "Seconds to hide"
[node name="HideForSecondsLabel" type="Label" parent="CardPanel/VBox/HideForSecondsRow"]
unique_name_in_owner = true
custom_minimum_size = Vector2(48, 0)
layout_mode = 2
text = "5"
horizontal_alignment = 1
[node name="LowerHideForSecondsButton" type="Button" parent="CardPanel/VBox/HideForSecondsRow"]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 0)
layout_mode = 2
focus_mode = 0
action_mode = 0
theme_type_variation = &"StepButton"
text = "-1"
[node name="IncreaseHideForSecondsButton" type="Button" parent="CardPanel/VBox/HideForSecondsRow"]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 0)
layout_mode = 2
focus_mode = 0
action_mode = 0
theme_type_variation = &"StepButton"
text = "+1"
[node name="HideLengthCheckButton" type="CheckButton" parent="CardPanel/VBox"]
unique_name_in_owner = true
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "Hide song length"
[node name="HideTicksCheckButton" type="CheckButton" parent="CardPanel/VBox"]
unique_name_in_owner = true
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "Hide ticks in the playbar"
[node name="WinningScoreRow" type="HBoxContainer" parent="CardPanel/VBox"]
unique_name_in_owner = true
layout_mode = 2
[node name="Title" type="Label" parent="CardPanel/VBox/WinningScoreRow"]
layout_mode = 2
size_flags_horizontal = 3
theme_type_variation = &"SettingsRowLabel"
text = "Winning score"
[node name="ScoreLabel" type="Label" parent="CardPanel/VBox/WinningScoreRow"]
unique_name_in_owner = true
custom_minimum_size = Vector2(48, 0)
layout_mode = 2
text = "20"
horizontal_alignment = 1
[node name="LowerButton" type="Button" parent="CardPanel/VBox/WinningScoreRow"]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 0)
layout_mode = 2
focus_mode = 0
action_mode = 0
theme_type_variation = &"StepButton"
text = "-1"
[node name="IncreaseButton" type="Button" parent="CardPanel/VBox/WinningScoreRow"]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 0)
layout_mode = 2
focus_mode = 0
action_mode = 0
theme_type_variation = &"StepButton"
text = "+1"
[node name="InspirationRow" type="HBoxContainer" parent="CardPanel/VBox"]
layout_mode = 2
[node name="Title" type="Label" parent="CardPanel/VBox/InspirationRow"]
layout_mode = 2
size_flags_horizontal = 3
theme_type_variation = &"SettingsRowLabel"
text = "Inspiration list speed"
[node name="InspirationListSpeedLabel" type="Label" parent="CardPanel/VBox/InspirationRow"]
unique_name_in_owner = true
custom_minimum_size = Vector2(48, 0)
layout_mode = 2
text = "1"
horizontal_alignment = 1
[node name="LowerInspirationSpeedButton" type="Button" parent="CardPanel/VBox/InspirationRow"]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 0)
layout_mode = 2
focus_mode = 0
action_mode = 0
theme_type_variation = &"StepButton"
text = "-1"
[node name="IncreaseInspirationSpeedButton" type="Button" parent="CardPanel/VBox/InspirationRow"]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 0)
layout_mode = 2
focus_mode = 0
action_mode = 0
theme_type_variation = &"StepButton"
text = "+1"