diff --git a/data/settings.gd b/data/settings.gd index f86a8d2..3a4aa1e 100644 --- a/data/settings.gd +++ b/data/settings.gd @@ -8,6 +8,15 @@ const MAX_NUMBER_OF_PLAYERS: int = 7 ## but apart, e.g. "lttp" for "A Link to the Past". Shorter searches only find names ## that contain the text, since a letter or two in order matches most of the library. const LETTERS_FOR_LOOSE_SEARCH: int = 3 +## The MusicServers that can be picked in the settings. +const SERVERS: Array[String] = [ + "https://music.sanplex.xyz", "https://tmusic.sanplex.xyz", "https://rmusic.sanplex.xyz", + "https://old-music.sanplex.xyz", "http://localhost:8080", +] +## The server debug builds use. +const DEBUG_SERVER: String = "http://localhost:8080" +## The winning score debug builds start with, so a game is quick to win while testing. +const DEBUG_WINNING_SCORE: int = 5 var default_path: String = "https://music.sanplex.xyz" ## Password for getting an API token from the server. Any password works when the @@ -39,6 +48,16 @@ var character_select_open: bool = false var version: String = ProjectSettings.get_setting("application/config/version", "") +# Autoloads are ready before any scene, so debug builds use the local server and the +# low winning score from the very first request +func _ready() -> void: + if OS.has_feature("debug"): + is_debug = true + default_path = DEBUG_SERVER + selected_server = SERVERS.find(DEBUG_SERVER) + winning_score = DEBUG_WINNING_SCORE + + func delete_children(node: Node) -> void: for n: Node in node.get_children(): node.remove_child(n) diff --git a/icons/settings_light_icon.svg b/icons/settings_light_icon.svg new file mode 100644 index 0000000..bd8f3b3 --- /dev/null +++ b/icons/settings_light_icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/icons/settings_light_icon.svg.import b/icons/settings_light_icon.svg.import new file mode 100644 index 0000000..ce4580e --- /dev/null +++ b/icons/settings_light_icon.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bylmore1gmmnr" +path="res://.godot/imported/settings_light_icon.svg-2b0876b2265a32eb81d9266290ab6204.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icons/settings_light_icon.svg" +dest_files=["res://.godot/imported/settings_light_icon.svg-2b0876b2265a32eb81d9266290ab6204.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/main/MainWindow.tscn b/main/MainWindow.tscn index 6013bf1..b3c6ef9 100644 --- a/main/MainWindow.tscn +++ b/main/MainWindow.tscn @@ -11,6 +11,7 @@ [ext_resource type="PackedScene" uid="uid://bijh5h5yrivm3" path="res://popups/LogPopup.tscn" id="14_26rwn"] [ext_resource type="PackedScene" path="res://statistics/StatisticsView.tscn" id="statistics_view_scene"] [ext_resource type="PackedScene" path="res://popups/SoundtrackStatsPopup.tscn" id="soundtrack_stats_popup_scene"] +[ext_resource type="PackedScene" uid="uid://dldpeo5y3l5hq" path="res://popups/SettingsPopup.tscn" id="settings_popup_scene"] [node name="MainWindow" type="Control" unique_id=407149696] layout_mode = 3 @@ -92,6 +93,15 @@ offset_top = 190.0 offset_right = 1310.0 offset_bottom = 890.0 +[node name="SettingsPopup" parent="." unique_id=1323246978 instance=ExtResource("settings_popup_scene")] +unique_name_in_owner = true +visible = false +layout_mode = 1 +offset_left = 700.0 +offset_top = 454.0 +offset_right = 700.0 +offset_bottom = 454.0 + [node name="SoundtrackStatsPopup" parent="." unique_id=1213999001 instance=ExtResource("soundtrack_stats_popup_scene")] visible = false layout_mode = 1 diff --git a/main/TopBar.tscn b/main/TopBar.tscn index 4089b9b..13cb8f4 100644 --- a/main/TopBar.tscn +++ b/main/TopBar.tscn @@ -2,14 +2,6 @@ [ext_resource type="Script" path="res://main/top_bar.gd" id="top_bar_script"] -[sub_resource type="InputEventKey" id="InputEventKey_ujjlu"] -device = -1 -alt_pressed = true -keycode = 83 - -[sub_resource type="Shortcut" id="Shortcut_fbju4"] -events = [SubResource("InputEventKey_ujjlu")] - [sub_resource type="ButtonGroup" id="ButtonGroup_tabs"] [node name="TopBar" type="Control" unique_id=1489162753] @@ -36,17 +28,18 @@ size_flags_horizontal = 0 theme_type_variation = &"Title" text = "Music Player Randomizer" -[node name="SyncButton" type="Button" parent="." unique_id=1228313556] +[node name="DebugLabel" type="Label" parent="." unique_id=1959221257] +visible = false layout_mode = 0 -offset_left = 1538.0 -offset_top = 8.0 -offset_right = 1608.0 -offset_bottom = 48.0 -focus_mode = 0 -action_mode = 0 -text = "Sync" +offset_left = 384.0 +offset_top = 12.0 +offset_right = 470.0 +offset_bottom = 50.0 +theme_type_variation = &"HighlightLarge" +text = "DEBUG" +vertical_alignment = 1 -[node name="SearchButton" type="Button" parent="." unique_id=1782453581] +[node name="SyncButton" type="Button" parent="." unique_id=1228313556] layout_mode = 0 offset_left = 1450.0 offset_top = 8.0 @@ -54,8 +47,17 @@ offset_right = 1520.0 offset_bottom = 48.0 focus_mode = 0 action_mode = 0 -shortcut = SubResource("Shortcut_fbju4") -text = "Search" +text = "Sync" + +[node name="SettingsButton" type="Button" parent="." unique_id=1228313557] +layout_mode = 0 +offset_left = 1538.0 +offset_top = 8.0 +offset_right = 1608.0 +offset_bottom = 48.0 +focus_mode = 0 +action_mode = 0 +text = "Settings" [node name="ShortcutsButton" type="Button" parent="." unique_id=2066498226] layout_mode = 0 diff --git a/main/main_window.gd b/main/main_window.gd index cd1bc1c..6786a09 100644 --- a/main/main_window.gd +++ b/main/main_window.gd @@ -16,6 +16,7 @@ var popup_backdrop: PopupBackdrop @onready var qr_popup: QRPopup = %QRPopup @onready var about_popup: AboutPopup = %AboutPopup @onready var log_popup: LogPopup = %LogPopup +@onready var settings_popup: SettingsPopup = %SettingsPopup @onready var statistics_view: StatisticsView = $StatisticsView @onready var soundtrack_stats_popup: SoundtrackStatsPopup = $SoundtrackStatsPopup @@ -24,12 +25,15 @@ func _ready() -> void: popup_backdrop = PopupBackdrop.add_to(self, _popups()) if OS.has_feature("macos"): GameLog.debug("is_mac") - top_bar.search_pressed.connect(show_search) + quiz.search_pressed.connect(show_search) top_bar.sync_pressed.connect(sync_soundtracks) top_bar.tab_selected.connect(show_tab) top_bar.shortcuts_pressed.connect(show_shortcuts) top_bar.about_pressed.connect(show_about) top_bar.qr_pressed.connect(show_qr) + top_bar.settings_pressed.connect(settings_popup.open) + settings_popup.server_changed.connect(quiz.on_server_changed) + settings_popup.visibility_changed.connect(_on_settings_popup_visibility_changed) sync_popup.sync_started.connect(_on_sync_started) sync_popup.sync_finished.connect(_on_sync_finished) @@ -57,7 +61,14 @@ func _input(event: InputEvent) -> void: func _popups() -> Array[BasePopup]: return [search_popup, sync_popup, qr_popup, shortcuts_popup, about_popup, log_popup, - soundtrack_stats_popup] + soundtrack_stats_popup, settings_popup] + + +# How many songs to download ahead can be changed in the settings. Waiting until the +# settings are closed avoids starting downloads while the number is clicked up and down. +func _on_settings_popup_visibility_changed() -> void: + if !settings_popup.visible: + quiz.song_loader.fill_cache() func show_search() -> void: diff --git a/main/top_bar.gd b/main/top_bar.gd index 017f979..ae09e90 100644 --- a/main/top_bar.gd +++ b/main/top_bar.gd @@ -3,8 +3,8 @@ extends Control ## The bar along the top of the main window, with the title, the Quiz and Statistics tabs ## and the buttons for things that are not part of a quiz. -signal search_pressed signal sync_pressed +signal settings_pressed signal shortcuts_pressed signal about_pressed signal qr_pressed @@ -12,13 +12,16 @@ signal qr_pressed signal tab_selected(tab: StringName) @onready var sync_button: Button = $SyncButton +@onready var debug_label: Label = $DebugLabel @onready var quiz_tab: Button = $QuizTab @onready var statistics_tab: Button = $StatisticsTab func _ready() -> void: - $SearchButton.pressed.connect(search_pressed.emit) + # Debug builds use the local server, see Settings + debug_label.visible = Settings.is_debug sync_button.pressed.connect(sync_pressed.emit) + $SettingsButton.pressed.connect(settings_pressed.emit) $ShortcutsButton.pressed.connect(shortcuts_pressed.emit) $AboutButton.pressed.connect(about_pressed.emit) $QRButton.pressed.connect(qr_pressed.emit) diff --git a/player/MusicPlayer.tscn b/player/MusicPlayer.tscn index 72c4ee5..10a1357 100644 --- a/player/MusicPlayer.tscn +++ b/player/MusicPlayer.tscn @@ -95,13 +95,3 @@ unique_name_in_owner = true custom_minimum_size = Vector2(100, 0) layout_mode = 2 size_flags_vertical = 4 - -[node name="RepeatSongCheckButton" type="CheckButton" parent="."] -layout_mode = 0 -offset_top = 40.0 -offset_right = 144.0 -offset_bottom = 71.0 -focus_mode = 0 -button_pressed = true -action_mode = 0 -text = "Auto repeat" diff --git a/player/music_player.gd b/player/music_player.gd index dffc0cc..8aa0edc 100644 --- a/player/music_player.gd +++ b/player/music_player.gd @@ -1,7 +1,7 @@ class_name MusicPlayer extends Control -## The bar that plays the songs, with play, restart, progress and volume, and the -## auto repeat switch under it. +## The bar that plays the songs, with play, restart, progress and volume. Whether a song +## repeats is a quiz setting ([code]Settings.auto_repeat_song[/code]). signal update_song_list signal play_next_song @@ -22,7 +22,6 @@ var song_finished: bool = false @onready var progress_slider: HSlider = %MusicPlayerSlider @onready var volume_slider: VolumeSlider = %VolumeSlider @onready var music_time_label: Label = %MusicTimeLabel -@onready var auto_repeat_button: CheckButton = $RepeatSongCheckButton func _ready() -> void: @@ -32,11 +31,6 @@ func _ready() -> void: progress_slider.drag_ended.connect(_on_drag_ended) audio_player.finished.connect(_on_finished) - auto_repeat_button.pressed.connect(_on_auto_repeat_pressed) - - -func _on_auto_repeat_pressed() -> void: - Settings.auto_repeat_song = !Settings.auto_repeat_song func _process(_delta: float) -> void: diff --git a/popups/SettingsPopup.tscn b/popups/SettingsPopup.tscn index c1fb029..ec1e560 100644 --- a/popups/SettingsPopup.tscn +++ b/popups/SettingsPopup.tscn @@ -15,241 +15,79 @@ panel = NodePath("SettingsPanel") [node name="SettingsPanel" type="Panel" parent="." unique_id=45537159] unique_name_in_owner = true layout_mode = 0 -offset_right = 500.0 -offset_bottom = 640.0 +offset_right = 520.0 +offset_bottom = 172.0 theme_type_variation = &"PopupBackground" -[node name="ScrollContainer" type="ScrollContainer" parent="SettingsPanel" unique_id=1325795358] +[node name="VBoxContainer" type="VBoxContainer" parent="SettingsPanel" unique_id=1796635163] +unique_name_in_owner = true layout_mode = 0 offset_left = 20.0 -offset_top = 8.0 -offset_right = 480.0 -offset_bottom = 632.0 -horizontal_scroll_mode = 0 +offset_top = 12.0 +offset_right = 500.0 +offset_bottom = 160.0 -[node name="VBoxContainer" type="VBoxContainer" parent="SettingsPanel/ScrollContainer" unique_id=1796635163] -clip_contents = true +[node name="Label" type="Label" parent="SettingsPanel/VBoxContainer" unique_id=1111531402] layout_mode = 2 -size_flags_horizontal = 3 - -[node name="Label" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=1111531402] -layout_mode = 2 -size_flags_vertical = 0 theme_type_variation = &"Title" text = "Settings" horizontal_alignment = 1 -[node name="StopAfterCurrentCheckButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=508305575] +[node name="ServerRow" type="HBoxContainer" parent="SettingsPanel/VBoxContainer" unique_id=434350695] +layout_mode = 2 + +[node name="Title" type="Label" parent="SettingsPanel/VBoxContainer/ServerRow" unique_id=434350696] +layout_mode = 2 +theme_type_variation = &"SettingsRowLabel" +text = "Server" + +[node name="SelectServerButton" type="OptionButton" parent="SettingsPanel/VBoxContainer/ServerRow" unique_id=434350694] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 -button_pressed = true -action_mode = 0 -text = "Stop after current" +focus_mode = 0 -[node name="HideNextTrackCheckButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=1568244599] +[node name="FullscreenButton" type="CheckButton" parent="SettingsPanel/VBoxContainer" unique_id=400304684] unique_name_in_owner = true layout_mode = 2 -size_flags_horizontal = 3 -button_pressed = true -action_mode = 0 -text = "Hide next track" - -[node name="AddToDatabaseCheckButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=1673750542] -unique_name_in_owner = true -layout_mode = 2 -size_flags_horizontal = 3 -action_mode = 0 -text = "Turn on played to database" - -[node name="LowPlayedCheckButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=1672657048] -unique_name_in_owner = true -layout_mode = 2 -size_flags_horizontal = 3 -action_mode = 0 -text = "Use low played mode" - -[node name="HideBeginningCheckButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=1370617867] -unique_name_in_owner = true -layout_mode = 2 -size_flags_horizontal = 3 -action_mode = 0 -text = "Hide beginning of songs" - -[node name="HideForSecondsHBoxContainer" type="HBoxContainer" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=1368485120] -unique_name_in_owner = true -layout_mode = 2 - -[node name="HideForSecondsTitle" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer" unique_id=1822369383] -unique_name_in_owner = true -layout_mode = 2 -size_flags_horizontal = 3 -text = "Hide Start Seconds: " - -[node name="HideForSecondsLabel" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer" unique_id=1580108945] -unique_name_in_owner = true -custom_minimum_size = Vector2(48, 0) -layout_mode = 2 -text = "5.0" -horizontal_alignment = 1 - -[node name="LowerHideForSecondsButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer" unique_id=180643442] -unique_name_in_owner = true -custom_minimum_size = Vector2(30, 2.08165e-12) -layout_mode = 2 focus_mode = 0 -action_mode = 0 -text = "-1" - -[node name="IncreaseHideForSecondsButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer" unique_id=340681770] -unique_name_in_owner = true -custom_minimum_size = Vector2(30, 2.08165e-12) -layout_mode = 2 -focus_mode = 0 -action_mode = 0 -text = "+1" - -[node name="HideLengthCheckButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=67806372] -unique_name_in_owner = true -layout_mode = 2 -size_flags_horizontal = 3 -action_mode = 0 -text = "Hide length of songs" - -[node name="HideTicksCheckButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=706322752] -unique_name_in_owner = true -layout_mode = 2 -size_flags_horizontal = 3 -action_mode = 0 -text = "Hide ticks in playbar" - -[node name="HBoxContainer" type="HBoxContainer" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=2140610992] -layout_mode = 2 - -[node name="Label2" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer" unique_id=1892907487] -layout_mode = 2 -size_flags_horizontal = 3 -text = "Winning Score: " - -[node name="ScoreLabel" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer" unique_id=444542662] -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="SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer" unique_id=614806355] -unique_name_in_owner = true -custom_minimum_size = Vector2(30, 2.08165e-12) -layout_mode = 2 -focus_mode = 0 -action_mode = 0 -text = "-1" - -[node name="IncreaseButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer" unique_id=1837169457] -unique_name_in_owner = true -custom_minimum_size = Vector2(30, 2.08165e-12) -layout_mode = 2 -focus_mode = 0 -action_mode = 0 -text = "+1" - -[node name="CacheHBoxContainer" type="HBoxContainer" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=658210492] -layout_mode = 2 - -[node name="CacheTitleLabel" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer" unique_id=365012193] -layout_mode = 2 -size_flags_horizontal = 3 -text = "Predownload songs: " - -[node name="CacheLabel" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer" unique_id=1558370172] -unique_name_in_owner = true -custom_minimum_size = Vector2(48, 0) -layout_mode = 2 -text = "1" -horizontal_alignment = 1 - -[node name="LowerCacheButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer" unique_id=1990385038] -unique_name_in_owner = true -custom_minimum_size = Vector2(30, 2.08165e-12) -layout_mode = 2 -focus_mode = 0 -action_mode = 0 -text = "-1" - -[node name="IncreaseCacheButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer" unique_id=1806295533] -unique_name_in_owner = true -custom_minimum_size = Vector2(30, 2.08165e-12) -layout_mode = 2 -focus_mode = 0 -action_mode = 0 -text = "+1" - -[node name="InspirationHBoxContainer" type="HBoxContainer" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=1686756540] -layout_mode = 2 - -[node name="InspirationListSpeedTitle" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer" unique_id=1397861506] -layout_mode = 2 -size_flags_horizontal = 3 -text = "Inspiration List Speed: " - -[node name="InspirationListSpeedLabel" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer" unique_id=867387668] -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="SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer" unique_id=845209534] -unique_name_in_owner = true -custom_minimum_size = Vector2(30, 2.08165e-12) -layout_mode = 2 -focus_mode = 0 -action_mode = 0 -text = "-1" - -[node name="IncreaseInspirationSpeedButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer" unique_id=1122701153] -unique_name_in_owner = true -custom_minimum_size = Vector2(30, 2.08165e-12) -layout_mode = 2 -focus_mode = 0 -action_mode = 0 -text = "+1" - -[node name="SelectServerButton" type="OptionButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=434350694] -unique_name_in_owner = true -layout_mode = 2 -selected = 0 -item_count = 5 -popup/item_0/text = "https://music.sanplex.xyz" -popup/item_0/id = 1 -popup/item_1/text = "https://tmusic.sanplex.xyz" -popup/item_1/id = 2 -popup/item_2/text = "https://rmusic.sanplex.xyz" -popup/item_2/id = 3 -popup/item_3/text = "https://old-music.sanplex.xyz" -popup/item_3/id = 4 -popup/item_4/text = "http://localhost:8080" -popup/item_4/id = 5 - -[node name="FullscreenButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=400304684] -unique_name_in_owner = true -layout_mode = 2 -size_flags_horizontal = 3 text = "Fullscreen" -[node name="QuickSyncButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=49497448] -visible = false +[node name="CacheRow" type="HBoxContainer" parent="SettingsPanel/VBoxContainer" unique_id=658210492] +layout_mode = 2 + +[node name="CacheTitleLabel" type="Label" parent="SettingsPanel/VBoxContainer/CacheRow" unique_id=365012193] layout_mode = 2 size_flags_horizontal = 3 -button_pressed = true -action_mode = 0 -text = "Quick sync" +theme_type_variation = &"SettingsRowLabel" +text = "Songs to download ahead" -[node name="LocalButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=905844805] +[node name="CacheLabel" type="Label" parent="SettingsPanel/VBoxContainer/CacheRow" unique_id=1558370172] +unique_name_in_owner = true +custom_minimum_size = Vector2(48, 0) +layout_mode = 2 +text = "1" +horizontal_alignment = 1 + +[node name="LowerCacheButton" type="Button" parent="SettingsPanel/VBoxContainer/CacheRow" unique_id=1990385038] +unique_name_in_owner = true +custom_minimum_size = Vector2(30, 0) +layout_mode = 2 +focus_mode = 0 +action_mode = 0 +text = "-1" + +[node name="IncreaseCacheButton" type="Button" parent="SettingsPanel/VBoxContainer/CacheRow" unique_id=1806295533] +unique_name_in_owner = true +custom_minimum_size = Vector2(30, 0) +layout_mode = 2 +focus_mode = 0 +action_mode = 0 +text = "+1" + +[node name="LocalButton" type="CheckButton" parent="SettingsPanel/VBoxContainer" unique_id=905844805] unique_name_in_owner = true visible = false layout_mode = 2 -size_flags_horizontal = 3 disabled = true text = "Local" diff --git a/popups/settings_popup.gd b/popups/settings_popup.gd index bb65ecc..c9c0104 100644 --- a/popups/settings_popup.gd +++ b/popups/settings_popup.gd @@ -1,89 +1,39 @@ class_name SettingsPopup extends BasePopup -## The settings: how songs are shown and played, the winning score, the song cache, -## which MusicServer to use and fullscreen. +## The application settings: which MusicServer to use, fullscreen and how many songs to +## download ahead. Opened from the Settings button in the top bar. +## +## The quiz settings, such as the winning score, are in [QuizSettingsCard]. ## Emitted when another MusicServer is picked. signal server_changed @onready var settings_panel: Panel = %SettingsPanel -@onready var stop_after_current_button: CheckButton = %StopAfterCurrentCheckButton -@onready var hide_next_track_button: CheckButton = %HideNextTrackCheckButton -@onready var add_to_database_button: CheckButton = %AddToDatabaseCheckButton -@onready var low_played_button: CheckButton = %LowPlayedCheckButton -@onready var hide_beginning_button: CheckButton = %HideBeginningCheckButton -@onready var hide_length_button: CheckButton = %HideLengthCheckButton -@onready var hide_ticks_button: CheckButton = %HideTicksCheckButton -@onready var score_label: Label = %ScoreLabel -@onready var lower_winning_score_button: Button = %LowerButton -@onready var increase_winning_score_button: Button = %IncreaseButton +@onready var select_server_button: OptionButton = %SelectServerButton +@onready var fullscreen_button: CheckButton = %FullscreenButton @onready var cache_label: Label = %CacheLabel @onready var lower_cache_button: Button = %LowerCacheButton @onready var increase_cache_button: Button = %IncreaseCacheButton -@onready var inspiration_speed_label: Label = %InspirationListSpeedLabel -@onready var lower_inspiration_speed_button: Button = %LowerInspirationSpeedButton -@onready var increase_inspiration_speed_button: Button = %IncreaseInspirationSpeedButton -@onready var hide_for_seconds_label: Label = %HideForSecondsLabel -@onready var lower_hide_for_seconds_button: Button = %LowerHideForSecondsButton -@onready var increase_hide_for_seconds_button: Button = %IncreaseHideForSecondsButton -@onready var select_server_button: OptionButton = %SelectServerButton -@onready var fullscreen_button: CheckButton = %FullscreenButton @onready var local_button: CheckButton = %LocalButton func _ready() -> void: + for server: String in Settings.SERVERS: + select_server_button.add_item(server) fullscreen_button.button_pressed = Settings.fullscreen - select_server_button.selected = Settings.selected_server + select_server_button.select(Settings.selected_server) + cache_label.text = str(Playlist.number_of_tracks_to_preload) - stop_after_current_button.pressed.connect(stop_after_current) - hide_next_track_button.pressed.connect(hide_next_track) - add_to_database_button.pressed.connect(add_to_database) - low_played_button.pressed.connect(low_played) - hide_beginning_button.pressed.connect(hide_beginning) - hide_length_button.pressed.connect(hide_length) - hide_ticks_button.pressed.connect(hide_ticks) - lower_winning_score_button.pressed.connect(lower_winning_score) - increase_winning_score_button.pressed.connect(increase_winning_score) - lower_cache_button.pressed.connect(lower_cache) - increase_cache_button.pressed.connect(increase_cache) - lower_inspiration_speed_button.pressed.connect(lower_inspiration_speed) - increase_inspiration_speed_button.pressed.connect(increase_inspiration_speed) - lower_hide_for_seconds_button.pressed.connect(lower_hide_for_seconds) - increase_hide_for_seconds_button.pressed.connect(increase_hide_for_seconds) fullscreen_button.pressed.connect(fullscreen) local_button.pressed.connect(local_play) - - stop_after_current_button.button_pressed = Settings.stop_after_current - hide_next_track_button.button_pressed = Settings.hide_next_track - add_to_database_button.button_pressed = Settings.add_to_stats - low_played_button.button_pressed = Settings.use_low_played_mode - hide_beginning_button.button_pressed = Settings.hide_beginning - hide_length_button.button_pressed = Settings.hide_length - hide_ticks_button.button_pressed = Settings.hide_ticks - score_label.text = str(Settings.winning_score) - cache_label.text = str(Playlist.number_of_tracks_to_preload) - inspiration_speed_label.text = str(Settings.inspiration_list_speed) - hide_for_seconds_label.text = str(Settings.hide_for_seconds) - fullscreen_button.button_pressed = Settings.fullscreen - update_hide_for_seconds_enabled() - select_server_button.select(Settings.selected_server) + lower_cache_button.pressed.connect(lower_cache) + increase_cache_button.pressed.connect(increase_cache) select_server_button.item_selected.connect(select_server) visibility_changed.connect(_on_visibility_changed) # Alt+Enter switches fullscreen from the main window, which resizes the window get_window().size_changed.connect(_update_fullscreen_button) -# Settings can change outside this popup, e.g. winning turns statistics off -func _on_visibility_changed() -> void: - if visible: - add_to_database_button.button_pressed = Settings.add_to_stats - _update_fullscreen_button() - - -func _update_fullscreen_button() -> void: - fullscreen_button.set_pressed_no_signal(Settings.fullscreen) - - func fullscreen() -> void: Settings.fullscreen = !Settings.fullscreen if Settings.fullscreen: @@ -96,59 +46,8 @@ func local_play() -> void: Settings.play_local = !Settings.play_local -func stop_after_current() -> void: - Settings.stop_after_current = !Settings.stop_after_current - - -func hide_next_track() -> void: - Settings.hide_next_track = !Settings.hide_next_track - - -func add_to_database() -> void: - Settings.add_to_stats = !Settings.add_to_stats - - -func low_played() -> void: - Settings.use_low_played_mode = !Settings.use_low_played_mode - - -func hide_beginning() -> void: - Settings.hide_beginning = !Settings.hide_beginning - update_hide_for_seconds_enabled() - - -func update_hide_for_seconds_enabled() -> void: - var enabled: bool = Settings.hide_beginning - %HideForSecondsHBoxContainer.visible = enabled - - -func hide_length() -> void: - Settings.hide_length = !Settings.hide_length - - -func hide_ticks() -> void: - Settings.hide_ticks = !Settings.hide_ticks - - -func lower_winning_score() -> void: - Settings.winning_score = max(Settings.winning_score - 1, 1) - score_label.text = str(Settings.winning_score) - - -func increase_winning_score() -> void: - Settings.winning_score += 1 - score_label.text = str(Settings.winning_score) - - -func set_winning_score(new_score: int) -> void: - Settings.winning_score = new_score - score_label.text = str(Settings.winning_score) - - func lower_cache() -> void: - Playlist.number_of_tracks_to_preload -= 1 - if Playlist.number_of_tracks_to_preload < 1: - Playlist.number_of_tracks_to_preload = 1 + Playlist.number_of_tracks_to_preload = maxi(Playlist.number_of_tracks_to_preload - 1, 1) cache_label.text = str(Playlist.number_of_tracks_to_preload) @@ -157,52 +56,29 @@ func increase_cache() -> void: cache_label.text = str(Playlist.number_of_tracks_to_preload) -func lower_inspiration_speed() -> void: - Settings.inspiration_list_speed -= 1 - if Settings.inspiration_list_speed < 1: - Settings.inspiration_list_speed = 1 - inspiration_speed_label.text = str(Settings.inspiration_list_speed) - - -func increase_inspiration_speed() -> void: - Settings.inspiration_list_speed += 1 - inspiration_speed_label.text = str(Settings.inspiration_list_speed ) - - -func lower_hide_for_seconds() -> void: - Settings.hide_for_seconds -= 1.0 - if Settings.hide_for_seconds < 0: - Settings.hide_for_seconds = 0 - hide_for_seconds_label.text = str(Settings.hide_for_seconds) - - -func increase_hide_for_seconds() -> void: - Settings.hide_for_seconds += 1.0 - if Settings.hide_for_seconds > 10.0: - Settings.hide_for_seconds = 10.0 - hide_for_seconds_label.text = str(Settings.hide_for_seconds) - - func select_server(new_server: int) -> void: GameLog.debug("select_server") - Settings.default_path = select_server_button.get_item_text(new_server) - Settings.selected_server = new_server - GameLog.debug("Settings.default_path: " + Settings.default_path) - GameLog.debug("Settings.selected_server: " + str(Settings.selected_server)) - GameLog.debug("new_server: " + str(new_server)) - GameLog.debug("select_server_button.get_item_text(new_server): ", - select_server_button.get_item_text(new_server)) - server_changed.emit() + _use_server(new_server) +## Picks [param new_server] in the list and uses it. func set_selected_server(new_server: int) -> void: GameLog.debug("set_selected_server") select_server_button.select(new_server) - Settings.default_path = select_server_button.get_item_text(new_server) + _use_server(new_server) + + +func _use_server(new_server: int) -> void: + Settings.default_path = Settings.SERVERS[new_server] Settings.selected_server = new_server GameLog.debug("Settings.default_path: " + Settings.default_path) - GameLog.debug("Settings.selected_server: " + str(Settings.selected_server)) - GameLog.debug("new_server: " + str(new_server)) - GameLog.debug("select_server_button.get_item_text(new_server): ", - select_server_button.get_item_text(new_server)) server_changed.emit() + + +func _on_visibility_changed() -> void: + if visible: + _update_fullscreen_button() + + +func _update_fullscreen_button() -> void: + fullscreen_button.set_pressed_no_signal(Settings.fullscreen) diff --git a/quiz/Quiz.tscn b/quiz/Quiz.tscn index 5500b2f..2fc3c00 100644 --- a/quiz/Quiz.tscn +++ b/quiz/Quiz.tscn @@ -3,7 +3,8 @@ [ext_resource type="Script" path="res://quiz/quiz.gd" id="quiz_script"] [ext_resource type="PackedScene" uid="uid://ds15cgsf8vpvc" path="res://player/MusicPlayer.tscn" id="5_emn36"] [ext_resource type="PackedScene" uid="uid://cdy4kvemwaiom" path="res://popups/CharacterSelectPopup.tscn" id="6_dhrvg"] -[ext_resource type="PackedScene" uid="uid://dldpeo5y3l5hq" path="res://popups/SettingsPopup.tscn" id="11_k62u5"] +[ext_resource type="PackedScene" path="res://quiz/QuizSettingsCard.tscn" id="scene_QuizSettingsCard"] +[ext_resource type="Texture2D" path="res://icons/settings_light_icon.svg" id="settings_icon"] [ext_resource type="PackedScene" uid="uid://cxlsmxnrp0agh" path="res://popups/WinnerPopup.tscn" id="17_winner_window"] [ext_resource type="PackedScene" path="res://quiz/MusicListPanel.tscn" id="scene_MusicListPanel"] [ext_resource type="PackedScene" path="res://quiz/PlayersPanel.tscn" id="scene_PlayersPanel"] @@ -90,14 +91,6 @@ offset_top = 944.0 offset_right = 368.0 offset_bottom = 975.0 -[node name="SettingsPopup" parent="." unique_id=1323246978 instance=ExtResource("11_k62u5")] -visible = false -layout_mode = 1 -offset_left = 710.0 -offset_top = 220.0 -offset_right = 710.0 -offset_bottom = 220.0 - [node name="CharacterSelectPopup" parent="." unique_id=1679856322 instance=ExtResource("6_dhrvg")] unique_name_in_owner = true visible = false @@ -116,18 +109,25 @@ offset_top = 80.0 offset_right = 160.0 offset_bottom = 80.0 -[node name="DebugLabel" type="Label" parent="." unique_id=1959221257] +[node name="QuizSettingsButton" type="Button" parent="." unique_id=1323246979] +layout_mode = 0 +offset_left = 64.0 +offset_top = 1030.0 +offset_right = 224.0 +offset_bottom = 1066.0 +focus_mode = 0 +action_mode = 0 +text = "Quiz settings" +icon = ExtResource("settings_icon") +expand_icon = true + +[node name="QuizSettingsCard" parent="." unique_id=1323246980 instance=ExtResource("scene_QuizSettingsCard")] visible = false layout_mode = 0 -offset_left = 974.0 -offset_top = 904.0 -offset_right = 1014.0 -offset_bottom = 927.0 -scale = Vector2(3, 3) -text = "DEBUG" -horizontal_alignment = 1 -vertical_alignment = 1 -autowrap_mode = 2 +offset_left = 64.0 +offset_top = 984.0 +offset_right = 64.0 +offset_bottom = 984.0 [node name="SongLoader" type="Node" parent="." unique_id=1520867349] script = ExtResource("song_loader_script") diff --git a/quiz/QuizSettingsCard.tscn b/quiz/QuizSettingsCard.tscn new file mode 100644 index 0000000..d77c269 --- /dev/null +++ b/quiz/QuizSettingsCard.tscn @@ -0,0 +1,183 @@ +[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="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 +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 +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="LowPlayedCheckButton" type="CheckButton" parent="CardPanel/VBox"] +unique_name_in_owner = true +layout_mode = 2 +focus_mode = 0 +action_mode = 0 +text = "Prefer less played soundtracks" + +[node name="AddToDatabaseCheckButton" type="CheckButton" parent="CardPanel/VBox"] +unique_name_in_owner = true +layout_mode = 2 +focus_mode = 0 +action_mode = 0 +text = "Count plays in statistics" + +[node name="WinningScoreRow" type="HBoxContainer" parent="CardPanel/VBox"] +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 +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 +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 +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 +text = "+1" diff --git a/quiz/QuizToolbar.tscn b/quiz/QuizToolbar.tscn index d03b7e6..f74c7ff 100644 --- a/quiz/QuizToolbar.tscn +++ b/quiz/QuizToolbar.tscn @@ -2,6 +2,14 @@ [ext_resource type="Script" path="res://quiz/quiz_toolbar.gd" id="part_script"] +[sub_resource type="InputEventKey" id="InputEventKey_search"] +device = -1 +alt_pressed = true +keycode = 83 + +[sub_resource type="Shortcut" id="Shortcut_search"] +events = [SubResource("InputEventKey_search")] + [node name="QuizToolbar" type="Control" unique_id=1873301941] layout_mode = 3 offset_right = 495.0 @@ -9,31 +17,32 @@ offset_bottom = 31.0 mouse_filter = 2 script = ExtResource("part_script") -[node name="ResetPlaylistButton" type="Button" parent="." unique_id=1754155620] +[node name="SearchButton" type="Button" parent="." unique_id=1782453581] layout_mode = 0 offset_right = 111.0 offset_bottom = 31.0 focus_mode = 0 action_mode = 0 +shortcut = SubResource("Shortcut_search") +text = "Search" + +[node name="ResetPlaylistButton" type="Button" parent="." unique_id=1754155620] +layout_mode = 0 +offset_left = 128.0 +offset_right = 239.0 +offset_bottom = 31.0 +focus_mode = 0 +action_mode = 0 text = "Reset playlist" [node name="ResetPointsButton" type="Button" parent="." unique_id=942880776] layout_mode = 0 -offset_left = 128.0 -offset_right = 239.0 -offset_bottom = 31.0 -focus_mode = 0 -action_mode = 0 -text = "Reset points" - -[node name="SettingsButton" type="Button" parent="." unique_id=1193400323] -layout_mode = 0 offset_left = 256.0 offset_right = 367.0 offset_bottom = 31.0 focus_mode = 0 action_mode = 0 -text = "Settings" +text = "Reset points" [node name="SoundTestButton" type="Button" parent="." unique_id=1332971879] layout_mode = 0 diff --git a/quiz/quiz.gd b/quiz/quiz.gd index 81f78fc..70197aa 100644 --- a/quiz/quiz.gd +++ b/quiz/quiz.gd @@ -1,7 +1,7 @@ class_name Quiz extends Control ## The quiz: the song that is playing, the playlist, the players and their points, and -## the popups opened from here (settings, character select, winner and log). +## the popups opened from here (the quiz settings card, character select and winner). ## ## The main window shows the quiz below its top bar. Pictures and buttons keep the ## positions they had in the main window, so the quiz fills the whole window and lets @@ -12,6 +12,9 @@ extends Control signal server_changed +## Emitted when Search is pressed. The Search popup is in the main window. +signal search_pressed + ## Emitted with a line for the game log, e.g. when a player gets a point. signal event_logged(text: String) @@ -30,28 +33,23 @@ var popup_backdrop: PopupBackdrop @onready var now_playing: NowPlaying = $NowPlaying @onready var players_panel: PlayersPanel = $PlayersPanel @onready var toolbar: QuizToolbar = $QuizToolbar -@onready var settings_popup: SettingsPopup = $SettingsPopup +@onready var quiz_settings_card: QuizSettingsCard = $QuizSettingsCard +@onready var quiz_settings_button: Button = $QuizSettingsButton @onready var winner_popup: WinnerPopup = %WinnerPopup @onready var song_controls: SongControls = $SongControls @onready var song_loader: SongLoader = $SongLoader @onready var music_list_panel: MusicListPanel = $MusicListPanel @onready var character_select_popup: CharacterSelectPopup = %CharacterSelectPopup @onready var music_player: MusicPlayer = $MusicPlayer -@onready var debug_label: Label = $DebugLabel func _ready() -> void: popup_backdrop = PopupBackdrop.add_to(self, _popups()) - if OS.has_feature("debug"): - GameLog.debug("is_debug") - debug_label.visible = true - Settings.is_debug = true - settings_popup.set_winning_score(5) - settings_popup.set_selected_server(4) song_controls.next_pressed.connect(play_next_song) song_controls.show_answer_pressed.connect(show_answer_pressed) toolbar.sound_test_pressed.connect(music_player.get_sound_test_song) - toolbar.settings_pressed.connect(show_settings) + toolbar.search_pressed.connect(search_pressed.emit) + quiz_settings_button.pressed.connect(quiz_settings_card.toggle) toolbar.reset_playlist_pressed.connect(reset_playlist) toolbar.reset_points_pressed.connect(reset_points) song_loader.song_list_loaded.connect(update_song_list) @@ -64,8 +62,6 @@ func _ready() -> void: players_panel.change_character_requested.connect(_on_change_character_requested) music_player.play_next_song.connect(play_next_song) music_player.update_song_list.connect(update_song_list) - settings_popup.server_changed.connect(_on_server_changed) - settings_popup.visibility_changed.connect(_on_settings_popup_visibility_changed) open_button.pressed.connect(open) @@ -115,8 +111,9 @@ func refresh_from_server() -> void: character_select_popup.load_characters() -func _on_server_changed() -> void: - GameLog.debug("_on_server_changed") +## Reloads everything from the server picked in the settings and starts a new game. +func on_server_changed() -> void: + GameLog.debug("on_server_changed") refresh_from_server() reset_points() server_changed.emit() @@ -139,15 +136,9 @@ func play_next_song() -> void: song_loader.fetch_song_if_idle() +# The quiz settings card is left out: it does not dim the quiz func _popups() -> Array[BasePopup]: - return [settings_popup, character_select_popup, winner_popup] - - -# The cache size can be changed in the settings. Waiting until the settings are closed -# avoids starting downloads while the user is still clicking the number up and down. -func _on_settings_popup_visibility_changed() -> void: - if !settings_popup.visible: - song_loader.fill_cache() + return [character_select_popup, winner_popup] func _on_song_added() -> void: @@ -204,11 +195,6 @@ func reset_points() -> void: stats_paused_by_win = false -func show_settings() -> void: - GameLog.debug("show_settings") - settings_popup.open() - - # Each new player's points reach the music player, the log and the winner popup. func _on_player_added(new_player_object: PlayerObject) -> void: new_player_object.first_point_triggered.connect(music_player._on_point_triggered.bind("first")) diff --git a/quiz/quiz_settings_card.gd b/quiz/quiz_settings_card.gd new file mode 100644 index 0000000..3e9f5e4 --- /dev/null +++ b/quiz/quiz_settings_card.gd @@ -0,0 +1,130 @@ +class_name QuizSettingsCard +extends BasePopup +## The quiz settings, in a small card that opens above the Quiz settings button by the +## music player: how songs are played and hidden, statistics, the winning score and the +## inspiration list. It does not dim the quiz, so it can be changed during a song. +## +## The card's bottom edge is where the card is placed, just above the player bar, and +## it grows upward to fit its rows. +## +## The application settings, such as the server, are in [SettingsPopup]. + +## The most seconds of a song's beginning that can be hidden. +const MAX_HIDE_SECONDS: float = 10.0 +## Space between the rows and the card's edges. +const PADDING: Vector2 = Vector2(16, 12) + +@onready var card_panel: Panel = %CardPanel +@onready var rows: VBoxContainer = %VBox +@onready var auto_repeat_button: CheckButton = %AutoRepeatCheckButton +@onready var stop_after_current_button: CheckButton = %StopAfterCurrentCheckButton +@onready var hide_next_track_button: CheckButton = %HideNextTrackCheckButton +@onready var hide_beginning_button: CheckButton = %HideBeginningCheckButton +@onready var hide_for_seconds_row: HBoxContainer = %HideForSecondsRow +@onready var hide_for_seconds_label: Label = %HideForSecondsLabel +@onready var lower_hide_for_seconds_button: Button = %LowerHideForSecondsButton +@onready var increase_hide_for_seconds_button: Button = %IncreaseHideForSecondsButton +@onready var hide_length_button: CheckButton = %HideLengthCheckButton +@onready var hide_ticks_button: CheckButton = %HideTicksCheckButton +@onready var low_played_button: CheckButton = %LowPlayedCheckButton +@onready var add_to_database_button: CheckButton = %AddToDatabaseCheckButton +@onready var score_label: Label = %ScoreLabel +@onready var lower_winning_score_button: Button = %LowerButton +@onready var increase_winning_score_button: Button = %IncreaseButton +@onready var inspiration_speed_label: Label = %InspirationListSpeedLabel +@onready var lower_inspiration_speed_button: Button = %LowerInspirationSpeedButton +@onready var increase_inspiration_speed_button: Button = %IncreaseInspirationSpeedButton + + +func _ready() -> void: + auto_repeat_button.toggled.connect(func(on: bool) -> void: Settings.auto_repeat_song = on) + stop_after_current_button.toggled.connect( + func(on: bool) -> void: Settings.stop_after_current = on) + hide_next_track_button.toggled.connect( + func(on: bool) -> void: Settings.hide_next_track = on) + hide_beginning_button.toggled.connect(_on_hide_beginning_toggled) + hide_length_button.toggled.connect(func(on: bool) -> void: Settings.hide_length = on) + hide_ticks_button.toggled.connect(func(on: bool) -> void: Settings.hide_ticks = on) + low_played_button.toggled.connect( + func(on: bool) -> void: Settings.use_low_played_mode = on) + add_to_database_button.toggled.connect(func(on: bool) -> void: Settings.add_to_stats = on) + lower_winning_score_button.pressed.connect(lower_winning_score) + increase_winning_score_button.pressed.connect(increase_winning_score) + lower_inspiration_speed_button.pressed.connect(lower_inspiration_speed) + increase_inspiration_speed_button.pressed.connect(increase_inspiration_speed) + lower_hide_for_seconds_button.pressed.connect(lower_hide_for_seconds) + increase_hide_for_seconds_button.pressed.connect(increase_hide_for_seconds) + visibility_changed.connect(_on_visibility_changed) + show_settings() + + +## Shows the current settings. Some change outside this card, e.g. winning turns +## statistics off, so this runs every time the card opens. +func show_settings() -> void: + auto_repeat_button.set_pressed_no_signal(Settings.auto_repeat_song) + stop_after_current_button.set_pressed_no_signal(Settings.stop_after_current) + hide_next_track_button.set_pressed_no_signal(Settings.hide_next_track) + hide_beginning_button.set_pressed_no_signal(Settings.hide_beginning) + hide_length_button.set_pressed_no_signal(Settings.hide_length) + hide_ticks_button.set_pressed_no_signal(Settings.hide_ticks) + low_played_button.set_pressed_no_signal(Settings.use_low_played_mode) + add_to_database_button.set_pressed_no_signal(Settings.add_to_stats) + hide_for_seconds_row.visible = Settings.hide_beginning + hide_for_seconds_label.text = "%d" % Settings.hide_for_seconds + score_label.text = str(Settings.winning_score) + inspiration_speed_label.text = str(Settings.inspiration_list_speed) + _fit_to_rows() + + +func lower_winning_score() -> void: + set_winning_score(Settings.winning_score - 1) + + +func increase_winning_score() -> void: + set_winning_score(Settings.winning_score + 1) + + +## Sets the winning score, never below 1. +func set_winning_score(new_score: int) -> void: + Settings.winning_score = maxi(new_score, 1) + score_label.text = str(Settings.winning_score) + + +func lower_inspiration_speed() -> void: + Settings.inspiration_list_speed = maxi(Settings.inspiration_list_speed - 1, 1) + inspiration_speed_label.text = str(Settings.inspiration_list_speed) + + +func increase_inspiration_speed() -> void: + Settings.inspiration_list_speed += 1 + inspiration_speed_label.text = str(Settings.inspiration_list_speed) + + +func lower_hide_for_seconds() -> void: + Settings.hide_for_seconds = maxf(Settings.hide_for_seconds - 1.0, 0.0) + hide_for_seconds_label.text = "%d" % Settings.hide_for_seconds + + +func increase_hide_for_seconds() -> void: + Settings.hide_for_seconds = minf(Settings.hide_for_seconds + 1.0, MAX_HIDE_SECONDS) + hide_for_seconds_label.text = "%d" % Settings.hide_for_seconds + + +func _on_hide_beginning_toggled(on: bool) -> void: + Settings.hide_beginning = on + hide_for_seconds_row.visible = on + _fit_to_rows() + + +# Grows or shrinks the card upward, keeping its bottom edge in place +func _fit_to_rows() -> void: + var height: float = rows.get_combined_minimum_size().y + PADDING.y * 2 + card_panel.position.y = -height + card_panel.size.y = height + rows.position = PADDING + rows.size = Vector2(card_panel.size.x - PADDING.x * 2, height - PADDING.y * 2) + + +func _on_visibility_changed() -> void: + if visible: + show_settings() diff --git a/quiz/quiz_settings_card.gd.uid b/quiz/quiz_settings_card.gd.uid new file mode 100644 index 0000000..8aad756 --- /dev/null +++ b/quiz/quiz_settings_card.gd.uid @@ -0,0 +1 @@ +uid://dsap67d5cdg34 diff --git a/quiz/quiz_toolbar.gd b/quiz/quiz_toolbar.gd index 81818f3..76af3c0 100644 --- a/quiz/quiz_toolbar.gd +++ b/quiz/quiz_toolbar.gd @@ -1,11 +1,11 @@ class_name QuizToolbar extends Control -## The row of quiz buttons under the top bar: reset playlist, reset points, settings -## and sound test. +## The row of quiz buttons under the top bar: search, reset playlist, reset points and +## sound test. +signal search_pressed signal reset_playlist_pressed signal reset_points_pressed -signal settings_pressed signal sound_test_pressed @onready var reset_playlist_button: Button = $ResetPlaylistButton @@ -13,9 +13,9 @@ signal sound_test_pressed func _ready() -> void: + $SearchButton.pressed.connect(search_pressed.emit) reset_playlist_button.pressed.connect(reset_playlist_pressed.emit) $ResetPointsButton.pressed.connect(reset_points_pressed.emit) - $SettingsButton.pressed.connect(settings_pressed.emit) sound_test_button.pressed.connect(sound_test_pressed.emit) diff --git a/tests/data/layout_baseline.json b/tests/data/layout_baseline.json index 368b757..bd254c1 100644 --- a/tests/data/layout_baseline.json +++ b/tests/data/layout_baseline.json @@ -792,15 +792,6 @@ ], "visible": false }, - "Quiz/DebugLabel": { - "rect": [ - 974.0, - 904.0, - 120.0, - 69.0 - ], - "visible": true - }, "Quiz/FileDialog": { "rect": [ 0.0, @@ -1152,15 +1143,6 @@ ], "visible": true }, - "Quiz/MusicPlayer/RepeatSongCheckButton": { - "rect": [ - 64.0, - 1032.0, - 144.0, - 31.0 - ], - "visible": true - }, "Quiz/NowPlaying": { "rect": [ 64.0, @@ -1314,6 +1296,258 @@ ], "visible": false }, + "Quiz/QuizSettingsButton": { + "rect": [ + 64.0, + 1030.0, + 160.0, + 36.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard": { + "rect": [ + 64.0, + 984.0, + 0.0, + 0.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel": { + "rect": [ + 64.0, + 575.0, + 440.0, + 409.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox": { + "rect": [ + 80.0, + 587.0, + 408.0, + 385.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/AddToDatabaseCheckButton": { + "rect": [ + 80.0, + 587.0, + 231.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/AutoRepeatCheckButton": { + "rect": [ + 80.0, + 587.0, + 140.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideBeginningCheckButton": { + "rect": [ + 80.0, + 587.0, + 263.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow": { + "rect": [ + 80.0, + 587.0, + 254.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/HideForSecondsLabel": { + "rect": [ + 80.0, + 587.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/IncreaseHideForSecondsButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/LowerHideForSecondsButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/Title": { + "rect": [ + 80.0, + 587.0, + 134.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideLengthCheckButton": { + "rect": [ + 80.0, + 587.0, + 178.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideNextTrackCheckButton": { + "rect": [ + 80.0, + 587.0, + 167.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideTicksCheckButton": { + "rect": [ + 80.0, + 587.0, + 235.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow": { + "rect": [ + 80.0, + 587.0, + 294.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/IncreaseInspirationSpeedButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/InspirationListSpeedLabel": { + "rect": [ + 80.0, + 587.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/LowerInspirationSpeedButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/Title": { + "rect": [ + 80.0, + 587.0, + 174.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/LowPlayedCheckButton": { + "rect": [ + 80.0, + 587.0, + 285.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/StopAfterCurrentCheckButton": { + "rect": [ + 80.0, + 587.0, + 187.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/TitleLabel": { + "rect": [ + 80.0, + 587.0, + 156.0, + 35.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow": { + "rect": [ + 80.0, + 587.0, + 242.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/IncreaseButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/LowerButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/ScoreLabel": { + "rect": [ + 80.0, + 587.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/Title": { + "rect": [ + 80.0, + 587.0, + 122.0, + 31.0 + ], + "visible": false + }, "Quiz/QuizToolbar": { "rect": [ 1360.0, @@ -1325,7 +1559,7 @@ }, "Quiz/QuizToolbar/ResetPlaylistButton": { "rect": [ - 1360.0, + 1488.0, 64.0, 111.0, 31.0 @@ -1334,16 +1568,16 @@ }, "Quiz/QuizToolbar/ResetPointsButton": { "rect": [ - 1488.0, + 1616.0, 64.0, 111.0, 31.0 ], "visible": true }, - "Quiz/QuizToolbar/SettingsButton": { + "Quiz/QuizToolbar/SearchButton": { "rect": [ - 1616.0, + 1360.0, 64.0, 111.0, 31.0 @@ -1359,330 +1593,6 @@ ], "visible": true }, - "Quiz/SettingsPopup": { - "rect": [ - 710.0, - 220.0, - 1920.0, - 1080.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel": { - "rect": [ - 710.0, - 220.0, - 500.0, - 640.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer": { - "rect": [ - 730.0, - 228.0, - 460.0, - 624.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer": { - "rect": [ - 730.0, - 228.0, - 296.0, - 490.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/AddToDatabaseCheckButton": { - "rect": [ - 730.0, - 228.0, - 260.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer": { - "rect": [ - 730.0, - 228.0, - 280.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/CacheLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/CacheTitleLabel": { - "rect": [ - 730.0, - 228.0, - 160.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/IncreaseCacheButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/LowerCacheButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/FullscreenButton": { - "rect": [ - 730.0, - 228.0, - 127.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer": { - "rect": [ - 730.0, - 228.0, - 239.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/IncreaseButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/Label2": { - "rect": [ - 730.0, - 228.0, - 119.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/LowerButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/ScoreLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideBeginningCheckButton": { - "rect": [ - 730.0, - 228.0, - 233.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer": { - "rect": [ - 730.0, - 228.0, - 274.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/HideForSecondsLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/HideForSecondsTitle": { - "rect": [ - 730.0, - 228.0, - 154.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/IncreaseHideForSecondsButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/LowerHideForSecondsButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideLengthCheckButton": { - "rect": [ - 730.0, - 228.0, - 206.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideNextTrackCheckButton": { - "rect": [ - 730.0, - 228.0, - 167.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideTicksCheckButton": { - "rect": [ - 730.0, - 228.0, - 205.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer": { - "rect": [ - 730.0, - 228.0, - 296.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/IncreaseInspirationSpeedButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/InspirationListSpeedLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/InspirationListSpeedTitle": { - "rect": [ - 730.0, - 228.0, - 176.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/LowerInspirationSpeedButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/Label": { - "rect": [ - 730.0, - 228.0, - 97.0, - 35.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/LocalButton": { - "rect": [ - 730.0, - 228.0, - 89.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/LowPlayedCheckButton": { - "rect": [ - 730.0, - 228.0, - 213.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/QuickSyncButton": { - "rect": [ - 730.0, - 228.0, - 131.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/SelectServerButton": { - "rect": [ - 730.0, - 228.0, - 267.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/StopAfterCurrentCheckButton": { - "rect": [ - 730.0, - 228.0, - 187.0, - 31.0 - ], - "visible": false - }, "Quiz/SongControls": { "rect": [ 65.0, @@ -2178,6 +2088,132 @@ ], "visible": false }, + "SettingsPopup": { + "rect": [ + 700.0, + 454.0, + 1920.0, + 1080.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel": { + "rect": [ + 700.0, + 454.0, + 520.0, + 172.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer": { + "rect": [ + 720.0, + 466.0, + 480.0, + 148.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow": { + "rect": [ + 720.0, + 466.0, + 331.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/CacheLabel": { + "rect": [ + 720.0, + 466.0, + 48.0, + 23.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/CacheTitleLabel": { + "rect": [ + 720.0, + 466.0, + 211.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/IncreaseCacheButton": { + "rect": [ + 720.0, + 466.0, + 30.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/LowerCacheButton": { + "rect": [ + 720.0, + 466.0, + 30.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/FullscreenButton": { + "rect": [ + 720.0, + 466.0, + 127.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/Label": { + "rect": [ + 720.0, + 466.0, + 97.0, + 35.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/LocalButton": { + "rect": [ + 720.0, + 466.0, + 89.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow": { + "rect": [ + 720.0, + 466.0, + 106.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow/SelectServerButton": { + "rect": [ + 720.0, + 466.0, + 40.0, + 20.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow/Title": { + "rect": [ + 720.0, + 466.0, + 62.0, + 31.0 + ], + "visible": false + }, "ShortcutsPopup": { "rect": [ 610.0, @@ -3285,6 +3321,15 @@ ], "visible": true }, + "TopBar/DebugLabel": { + "rect": [ + 384.0, + 12.0, + 86.0, + 38.0 + ], + "visible": true + }, "TopBar/QRButton": { "rect": [ 1802.0, @@ -3303,9 +3348,9 @@ ], "visible": true }, - "TopBar/SearchButton": { + "TopBar/SettingsButton": { "rect": [ - 1450.0, + 1538.0, 8.0, 70.0, 40.0 @@ -3332,7 +3377,7 @@ }, "TopBar/SyncButton": { "rect": [ - 1538.0, + 1450.0, 8.0, 70.0, 40.0 @@ -4151,15 +4196,6 @@ ], "visible": false }, - "Quiz/DebugLabel": { - "rect": [ - 974.0, - 904.0, - 120.0, - 69.0 - ], - "visible": true - }, "Quiz/FileDialog": { "rect": [ 0.0, @@ -4511,15 +4547,6 @@ ], "visible": true }, - "Quiz/MusicPlayer/RepeatSongCheckButton": { - "rect": [ - 64.0, - 1032.0, - 144.0, - 31.0 - ], - "visible": true - }, "Quiz/NowPlaying": { "rect": [ 64.0, @@ -4889,6 +4916,258 @@ ], "visible": false }, + "Quiz/QuizSettingsButton": { + "rect": [ + 64.0, + 1030.0, + 160.0, + 36.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard": { + "rect": [ + 64.0, + 984.0, + 0.0, + 0.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel": { + "rect": [ + 64.0, + 575.0, + 440.0, + 409.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox": { + "rect": [ + 80.0, + 587.0, + 408.0, + 385.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/AddToDatabaseCheckButton": { + "rect": [ + 80.0, + 587.0, + 231.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/AutoRepeatCheckButton": { + "rect": [ + 80.0, + 587.0, + 140.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideBeginningCheckButton": { + "rect": [ + 80.0, + 587.0, + 263.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow": { + "rect": [ + 80.0, + 587.0, + 254.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/HideForSecondsLabel": { + "rect": [ + 80.0, + 587.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/IncreaseHideForSecondsButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/LowerHideForSecondsButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/Title": { + "rect": [ + 80.0, + 587.0, + 134.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideLengthCheckButton": { + "rect": [ + 80.0, + 587.0, + 178.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideNextTrackCheckButton": { + "rect": [ + 80.0, + 587.0, + 167.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideTicksCheckButton": { + "rect": [ + 80.0, + 587.0, + 235.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow": { + "rect": [ + 80.0, + 587.0, + 294.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/IncreaseInspirationSpeedButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/InspirationListSpeedLabel": { + "rect": [ + 80.0, + 587.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/LowerInspirationSpeedButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/Title": { + "rect": [ + 80.0, + 587.0, + 174.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/LowPlayedCheckButton": { + "rect": [ + 80.0, + 587.0, + 285.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/StopAfterCurrentCheckButton": { + "rect": [ + 80.0, + 587.0, + 187.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/TitleLabel": { + "rect": [ + 80.0, + 587.0, + 156.0, + 35.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow": { + "rect": [ + 80.0, + 587.0, + 242.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/IncreaseButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/LowerButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/ScoreLabel": { + "rect": [ + 80.0, + 587.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/Title": { + "rect": [ + 80.0, + 587.0, + 122.0, + 31.0 + ], + "visible": false + }, "Quiz/QuizToolbar": { "rect": [ 1360.0, @@ -4900,7 +5179,7 @@ }, "Quiz/QuizToolbar/ResetPlaylistButton": { "rect": [ - 1360.0, + 1488.0, 64.0, 111.0, 31.0 @@ -4909,16 +5188,16 @@ }, "Quiz/QuizToolbar/ResetPointsButton": { "rect": [ - 1488.0, + 1616.0, 64.0, 111.0, 31.0 ], "visible": true }, - "Quiz/QuizToolbar/SettingsButton": { + "Quiz/QuizToolbar/SearchButton": { "rect": [ - 1616.0, + 1360.0, 64.0, 111.0, 31.0 @@ -4934,330 +5213,6 @@ ], "visible": true }, - "Quiz/SettingsPopup": { - "rect": [ - 710.0, - 220.0, - 1920.0, - 1080.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel": { - "rect": [ - 710.0, - 220.0, - 500.0, - 640.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer": { - "rect": [ - 730.0, - 228.0, - 460.0, - 624.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer": { - "rect": [ - 730.0, - 228.0, - 296.0, - 490.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/AddToDatabaseCheckButton": { - "rect": [ - 730.0, - 228.0, - 260.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer": { - "rect": [ - 730.0, - 228.0, - 280.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/CacheLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/CacheTitleLabel": { - "rect": [ - 730.0, - 228.0, - 160.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/IncreaseCacheButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/LowerCacheButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/FullscreenButton": { - "rect": [ - 730.0, - 228.0, - 127.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer": { - "rect": [ - 730.0, - 228.0, - 239.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/IncreaseButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/Label2": { - "rect": [ - 730.0, - 228.0, - 119.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/LowerButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/ScoreLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideBeginningCheckButton": { - "rect": [ - 730.0, - 228.0, - 233.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer": { - "rect": [ - 730.0, - 228.0, - 274.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/HideForSecondsLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/HideForSecondsTitle": { - "rect": [ - 730.0, - 228.0, - 154.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/IncreaseHideForSecondsButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/LowerHideForSecondsButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideLengthCheckButton": { - "rect": [ - 730.0, - 228.0, - 206.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideNextTrackCheckButton": { - "rect": [ - 730.0, - 228.0, - 167.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideTicksCheckButton": { - "rect": [ - 730.0, - 228.0, - 205.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer": { - "rect": [ - 730.0, - 228.0, - 296.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/IncreaseInspirationSpeedButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/InspirationListSpeedLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/InspirationListSpeedTitle": { - "rect": [ - 730.0, - 228.0, - 176.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/LowerInspirationSpeedButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/Label": { - "rect": [ - 730.0, - 228.0, - 97.0, - 35.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/LocalButton": { - "rect": [ - 730.0, - 228.0, - 89.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/LowPlayedCheckButton": { - "rect": [ - 730.0, - 228.0, - 213.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/QuickSyncButton": { - "rect": [ - 730.0, - 228.0, - 131.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/SelectServerButton": { - "rect": [ - 730.0, - 228.0, - 267.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/StopAfterCurrentCheckButton": { - "rect": [ - 730.0, - 228.0, - 187.0, - 31.0 - ], - "visible": false - }, "Quiz/SongControls": { "rect": [ 65.0, @@ -5753,6 +5708,132 @@ ], "visible": false }, + "SettingsPopup": { + "rect": [ + 700.0, + 454.0, + 1920.0, + 1080.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel": { + "rect": [ + 700.0, + 454.0, + 520.0, + 172.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer": { + "rect": [ + 720.0, + 466.0, + 480.0, + 148.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow": { + "rect": [ + 720.0, + 466.0, + 331.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/CacheLabel": { + "rect": [ + 720.0, + 466.0, + 48.0, + 23.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/CacheTitleLabel": { + "rect": [ + 720.0, + 466.0, + 211.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/IncreaseCacheButton": { + "rect": [ + 720.0, + 466.0, + 30.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/LowerCacheButton": { + "rect": [ + 720.0, + 466.0, + 30.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/FullscreenButton": { + "rect": [ + 720.0, + 466.0, + 127.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/Label": { + "rect": [ + 720.0, + 466.0, + 97.0, + 35.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/LocalButton": { + "rect": [ + 720.0, + 466.0, + 89.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow": { + "rect": [ + 720.0, + 466.0, + 106.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow/SelectServerButton": { + "rect": [ + 720.0, + 466.0, + 40.0, + 20.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow/Title": { + "rect": [ + 720.0, + 466.0, + 62.0, + 31.0 + ], + "visible": false + }, "ShortcutsPopup": { "rect": [ 610.0, @@ -6860,6 +6941,15 @@ ], "visible": true }, + "TopBar/DebugLabel": { + "rect": [ + 384.0, + 12.0, + 86.0, + 38.0 + ], + "visible": true + }, "TopBar/QRButton": { "rect": [ 1802.0, @@ -6878,9 +6968,9 @@ ], "visible": true }, - "TopBar/SearchButton": { + "TopBar/SettingsButton": { "rect": [ - 1450.0, + 1538.0, 8.0, 70.0, 40.0 @@ -6907,7 +6997,7 @@ }, "TopBar/SyncButton": { "rect": [ - 1538.0, + 1450.0, 8.0, 70.0, 40.0 @@ -7780,15 +7870,6 @@ ], "visible": false }, - "Quiz/DebugLabel": { - "rect": [ - 974.0, - 904.0, - 120.0, - 69.0 - ], - "visible": true - }, "Quiz/FileDialog": { "rect": [ 0.0, @@ -8203,15 +8284,6 @@ ], "visible": true }, - "Quiz/MusicPlayer/RepeatSongCheckButton": { - "rect": [ - 64.0, - 1032.0, - 144.0, - 31.0 - ], - "visible": true - }, "Quiz/NowPlaying": { "rect": [ 64.0, @@ -8581,6 +8653,258 @@ ], "visible": false }, + "Quiz/QuizSettingsButton": { + "rect": [ + 64.0, + 1030.0, + 160.0, + 36.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard": { + "rect": [ + 64.0, + 984.0, + 0.0, + 0.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel": { + "rect": [ + 64.0, + 575.0, + 440.0, + 409.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox": { + "rect": [ + 80.0, + 587.0, + 408.0, + 385.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/AddToDatabaseCheckButton": { + "rect": [ + 80.0, + 587.0, + 231.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/AutoRepeatCheckButton": { + "rect": [ + 80.0, + 587.0, + 140.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideBeginningCheckButton": { + "rect": [ + 80.0, + 587.0, + 263.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow": { + "rect": [ + 80.0, + 587.0, + 254.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/HideForSecondsLabel": { + "rect": [ + 80.0, + 587.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/IncreaseHideForSecondsButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/LowerHideForSecondsButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/Title": { + "rect": [ + 80.0, + 587.0, + 134.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideLengthCheckButton": { + "rect": [ + 80.0, + 587.0, + 178.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideNextTrackCheckButton": { + "rect": [ + 80.0, + 587.0, + 167.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideTicksCheckButton": { + "rect": [ + 80.0, + 587.0, + 235.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow": { + "rect": [ + 80.0, + 587.0, + 294.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/IncreaseInspirationSpeedButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/InspirationListSpeedLabel": { + "rect": [ + 80.0, + 587.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/LowerInspirationSpeedButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/Title": { + "rect": [ + 80.0, + 587.0, + 174.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/LowPlayedCheckButton": { + "rect": [ + 80.0, + 587.0, + 285.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/StopAfterCurrentCheckButton": { + "rect": [ + 80.0, + 587.0, + 187.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/TitleLabel": { + "rect": [ + 80.0, + 587.0, + 156.0, + 35.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow": { + "rect": [ + 80.0, + 587.0, + 242.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/IncreaseButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/LowerButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/ScoreLabel": { + "rect": [ + 80.0, + 587.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/Title": { + "rect": [ + 80.0, + 587.0, + 122.0, + 31.0 + ], + "visible": false + }, "Quiz/QuizToolbar": { "rect": [ 1360.0, @@ -8592,7 +8916,7 @@ }, "Quiz/QuizToolbar/ResetPlaylistButton": { "rect": [ - 1360.0, + 1488.0, 64.0, 111.0, 31.0 @@ -8601,16 +8925,16 @@ }, "Quiz/QuizToolbar/ResetPointsButton": { "rect": [ - 1488.0, + 1616.0, 64.0, 111.0, 31.0 ], "visible": true }, - "Quiz/QuizToolbar/SettingsButton": { + "Quiz/QuizToolbar/SearchButton": { "rect": [ - 1616.0, + 1360.0, 64.0, 111.0, 31.0 @@ -8626,330 +8950,6 @@ ], "visible": true }, - "Quiz/SettingsPopup": { - "rect": [ - 710.0, - 220.0, - 1920.0, - 1080.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel": { - "rect": [ - 710.0, - 220.0, - 500.0, - 640.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer": { - "rect": [ - 730.0, - 228.0, - 460.0, - 624.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer": { - "rect": [ - 730.0, - 228.0, - 296.0, - 490.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/AddToDatabaseCheckButton": { - "rect": [ - 730.0, - 228.0, - 260.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer": { - "rect": [ - 730.0, - 228.0, - 280.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/CacheLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/CacheTitleLabel": { - "rect": [ - 730.0, - 228.0, - 160.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/IncreaseCacheButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/LowerCacheButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/FullscreenButton": { - "rect": [ - 730.0, - 228.0, - 127.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer": { - "rect": [ - 730.0, - 228.0, - 239.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/IncreaseButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/Label2": { - "rect": [ - 730.0, - 228.0, - 119.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/LowerButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/ScoreLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideBeginningCheckButton": { - "rect": [ - 730.0, - 228.0, - 233.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer": { - "rect": [ - 730.0, - 228.0, - 274.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/HideForSecondsLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/HideForSecondsTitle": { - "rect": [ - 730.0, - 228.0, - 154.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/IncreaseHideForSecondsButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/LowerHideForSecondsButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideLengthCheckButton": { - "rect": [ - 730.0, - 228.0, - 206.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideNextTrackCheckButton": { - "rect": [ - 730.0, - 228.0, - 167.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideTicksCheckButton": { - "rect": [ - 730.0, - 228.0, - 205.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer": { - "rect": [ - 730.0, - 228.0, - 296.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/IncreaseInspirationSpeedButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/InspirationListSpeedLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/InspirationListSpeedTitle": { - "rect": [ - 730.0, - 228.0, - 176.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/LowerInspirationSpeedButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/Label": { - "rect": [ - 730.0, - 228.0, - 97.0, - 35.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/LocalButton": { - "rect": [ - 730.0, - 228.0, - 89.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/LowPlayedCheckButton": { - "rect": [ - 730.0, - 228.0, - 213.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/QuickSyncButton": { - "rect": [ - 730.0, - 228.0, - 131.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/SelectServerButton": { - "rect": [ - 730.0, - 228.0, - 267.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/StopAfterCurrentCheckButton": { - "rect": [ - 730.0, - 228.0, - 187.0, - 31.0 - ], - "visible": false - }, "Quiz/SongControls": { "rect": [ 65.0, @@ -9445,6 +9445,132 @@ ], "visible": false }, + "SettingsPopup": { + "rect": [ + 700.0, + 454.0, + 1920.0, + 1080.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel": { + "rect": [ + 700.0, + 454.0, + 520.0, + 172.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer": { + "rect": [ + 720.0, + 466.0, + 480.0, + 148.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow": { + "rect": [ + 720.0, + 466.0, + 331.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/CacheLabel": { + "rect": [ + 720.0, + 466.0, + 48.0, + 23.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/CacheTitleLabel": { + "rect": [ + 720.0, + 466.0, + 211.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/IncreaseCacheButton": { + "rect": [ + 720.0, + 466.0, + 30.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/LowerCacheButton": { + "rect": [ + 720.0, + 466.0, + 30.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/FullscreenButton": { + "rect": [ + 720.0, + 466.0, + 127.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/Label": { + "rect": [ + 720.0, + 466.0, + 97.0, + 35.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/LocalButton": { + "rect": [ + 720.0, + 466.0, + 89.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow": { + "rect": [ + 720.0, + 466.0, + 106.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow/SelectServerButton": { + "rect": [ + 720.0, + 466.0, + 40.0, + 20.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow/Title": { + "rect": [ + 720.0, + 466.0, + 62.0, + 31.0 + ], + "visible": false + }, "ShortcutsPopup": { "rect": [ 610.0, @@ -10552,6 +10678,15 @@ ], "visible": true }, + "TopBar/DebugLabel": { + "rect": [ + 384.0, + 12.0, + 86.0, + 38.0 + ], + "visible": true + }, "TopBar/QRButton": { "rect": [ 1802.0, @@ -10570,9 +10705,9 @@ ], "visible": true }, - "TopBar/SearchButton": { + "TopBar/SettingsButton": { "rect": [ - 1450.0, + 1538.0, 8.0, 70.0, 40.0 @@ -10599,7 +10734,7 @@ }, "TopBar/SyncButton": { "rect": [ - 1538.0, + 1450.0, 8.0, 70.0, 40.0 @@ -11443,6 +11578,251 @@ "visible": true } }, + "popup_QuizSettings": { + "Quiz/QuizSettingsCard": { + "rect": [ + 64.0, + 984.0, + 0.0, + 0.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel": { + "rect": [ + 64.0, + 575.0, + 440.0, + 409.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox": { + "rect": [ + 80.0, + 587.0, + 408.0, + 385.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/AddToDatabaseCheckButton": { + "rect": [ + 80.0, + 871.0, + 408.0, + 31.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/AutoRepeatCheckButton": { + "rect": [ + 80.0, + 626.0, + 408.0, + 31.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideBeginningCheckButton": { + "rect": [ + 80.0, + 731.0, + 408.0, + 31.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow": { + "rect": [ + 80.0, + 587.0, + 254.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/HideForSecondsLabel": { + "rect": [ + 80.0, + 587.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/IncreaseHideForSecondsButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/LowerHideForSecondsButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/Title": { + "rect": [ + 80.0, + 587.0, + 134.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideLengthCheckButton": { + "rect": [ + 80.0, + 766.0, + 408.0, + 31.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideNextTrackCheckButton": { + "rect": [ + 80.0, + 696.0, + 408.0, + 31.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideTicksCheckButton": { + "rect": [ + 80.0, + 801.0, + 408.0, + 31.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow": { + "rect": [ + 80.0, + 941.0, + 408.0, + 31.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/IncreaseInspirationSpeedButton": { + "rect": [ + 458.0, + 941.0, + 30.0, + 31.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/InspirationListSpeedLabel": { + "rect": [ + 372.0, + 945.0, + 48.0, + 23.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/LowerInspirationSpeedButton": { + "rect": [ + 424.0, + 941.0, + 30.0, + 31.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/Title": { + "rect": [ + 80.0, + 941.0, + 288.0, + 31.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/LowPlayedCheckButton": { + "rect": [ + 80.0, + 836.0, + 408.0, + 31.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/StopAfterCurrentCheckButton": { + "rect": [ + 80.0, + 661.0, + 408.0, + 31.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/TitleLabel": { + "rect": [ + 80.0, + 587.0, + 408.0, + 35.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow": { + "rect": [ + 80.0, + 906.0, + 408.0, + 31.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/IncreaseButton": { + "rect": [ + 458.0, + 906.0, + 30.0, + 31.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/LowerButton": { + "rect": [ + 424.0, + 906.0, + 30.0, + 31.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/ScoreLabel": { + "rect": [ + 372.0, + 910.0, + 48.0, + 23.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/Title": { + "rect": [ + 80.0, + 906.0, + 288.0, + 31.0 + ], + "visible": true + } + }, "popup_Search": { "SearchPopup": { "rect": [ @@ -11970,326 +12350,128 @@ } }, "popup_SettingsWindow": { - "Quiz/SettingsPopup": { + "SettingsPopup": { "rect": [ - 710.0, - 220.0, + 700.0, + 454.0, 1920.0, 1080.0 ], "visible": true }, - "Quiz/SettingsPopup/SettingsPanel": { + "SettingsPopup/SettingsPanel": { "rect": [ - 710.0, - 220.0, - 500.0, - 640.0 + 700.0, + 454.0, + 520.0, + 172.0 ], "visible": true }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer": { + "SettingsPopup/SettingsPanel/VBoxContainer": { "rect": [ - 730.0, - 228.0, - 460.0, - 624.0 + 720.0, + 466.0, + 480.0, + 148.0 ], "visible": true }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer": { + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow": { "rect": [ - 730.0, - 228.0, - 460.0, - 455.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/AddToDatabaseCheckButton": { - "rect": [ - 730.0, - 337.0, - 460.0, + 720.0, + 575.0, + 480.0, 31.0 ], "visible": true }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer": { + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/CacheLabel": { "rect": [ - 730.0, - 547.0, - 460.0, - 31.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/CacheLabel": { - "rect": [ - 1074.0, - 551.0, + 1084.0, + 579.0, 48.0, 23.0 ], "visible": true }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/CacheTitleLabel": { + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/CacheTitleLabel": { "rect": [ - 730.0, - 551.0, - 340.0, - 23.0 + 720.0, + 575.0, + 360.0, + 31.0 ], "visible": true }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/IncreaseCacheButton": { + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/IncreaseCacheButton": { "rect": [ - 1160.0, - 547.0, + 1170.0, + 575.0, 30.0, 31.0 ], "visible": true }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/LowerCacheButton": { + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/LowerCacheButton": { "rect": [ - 1126.0, - 547.0, + 1136.0, + 575.0, 30.0, 31.0 ], "visible": true }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/FullscreenButton": { + "SettingsPopup/SettingsPanel/VBoxContainer/FullscreenButton": { "rect": [ - 730.0, - 652.0, - 460.0, + 720.0, + 540.0, + 480.0, 31.0 ], "visible": true }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer": { + "SettingsPopup/SettingsPanel/VBoxContainer/Label": { "rect": [ - 730.0, - 512.0, - 460.0, - 31.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/IncreaseButton": { - "rect": [ - 1160.0, - 512.0, - 30.0, - 31.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/Label2": { - "rect": [ - 730.0, - 516.0, - 340.0, - 23.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/LowerButton": { - "rect": [ - 1126.0, - 512.0, - 30.0, - 31.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/ScoreLabel": { - "rect": [ - 1074.0, - 516.0, - 48.0, - 23.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideBeginningCheckButton": { - "rect": [ - 730.0, - 407.0, - 460.0, - 31.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer": { - "rect": [ - 730.0, - 228.0, - 274.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/HideForSecondsLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/HideForSecondsTitle": { - "rect": [ - 730.0, - 228.0, - 154.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/IncreaseHideForSecondsButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/LowerHideForSecondsButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideLengthCheckButton": { - "rect": [ - 730.0, - 442.0, - 460.0, - 31.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideNextTrackCheckButton": { - "rect": [ - 730.0, - 302.0, - 460.0, - 31.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideTicksCheckButton": { - "rect": [ - 730.0, - 477.0, - 460.0, - 31.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer": { - "rect": [ - 730.0, - 582.0, - 460.0, - 31.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/IncreaseInspirationSpeedButton": { - "rect": [ - 1160.0, - 582.0, - 30.0, - 31.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/InspirationListSpeedLabel": { - "rect": [ - 1074.0, - 586.0, - 48.0, - 23.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/InspirationListSpeedTitle": { - "rect": [ - 730.0, - 586.0, - 340.0, - 23.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/LowerInspirationSpeedButton": { - "rect": [ - 1126.0, - 582.0, - 30.0, - 31.0 - ], - "visible": true - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/Label": { - "rect": [ - 730.0, - 228.0, - 460.0, + 720.0, + 466.0, + 480.0, 35.0 ], "visible": true }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/LocalButton": { + "SettingsPopup/SettingsPanel/VBoxContainer/LocalButton": { "rect": [ - 730.0, - 228.0, + 720.0, + 466.0, 89.0, 31.0 ], "visible": false }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/LowPlayedCheckButton": { + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow": { "rect": [ - 730.0, - 372.0, - 460.0, + 720.0, + 505.0, + 480.0, 31.0 ], "visible": true }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/QuickSyncButton": { + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow/SelectServerButton": { "rect": [ - 730.0, - 228.0, - 131.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/SelectServerButton": { - "rect": [ - 730.0, - 617.0, - 460.0, + 786.0, + 505.0, + 414.0, 31.0 ], "visible": true }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/StopAfterCurrentCheckButton": { + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow/Title": { "rect": [ - 730.0, - 267.0, - 460.0, + 720.0, + 505.0, + 62.0, 31.0 ], "visible": true @@ -14808,15 +14990,6 @@ ], "visible": false }, - "Quiz/DebugLabel": { - "rect": [ - 974.0, - 904.0, - 120.0, - 69.0 - ], - "visible": true - }, "Quiz/FileDialog": { "rect": [ 0.0, @@ -15168,15 +15341,6 @@ ], "visible": true }, - "Quiz/MusicPlayer/RepeatSongCheckButton": { - "rect": [ - 64.0, - 1032.0, - 144.0, - 31.0 - ], - "visible": true - }, "Quiz/NowPlaying": { "rect": [ 64.0, @@ -15330,6 +15494,258 @@ ], "visible": false }, + "Quiz/QuizSettingsButton": { + "rect": [ + 64.0, + 1030.0, + 160.0, + 36.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard": { + "rect": [ + 64.0, + 984.0, + 0.0, + 0.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel": { + "rect": [ + 64.0, + 575.0, + 440.0, + 409.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox": { + "rect": [ + 80.0, + 587.0, + 408.0, + 385.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/AddToDatabaseCheckButton": { + "rect": [ + 80.0, + 587.0, + 231.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/AutoRepeatCheckButton": { + "rect": [ + 80.0, + 587.0, + 140.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideBeginningCheckButton": { + "rect": [ + 80.0, + 587.0, + 263.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow": { + "rect": [ + 80.0, + 587.0, + 254.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/HideForSecondsLabel": { + "rect": [ + 80.0, + 587.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/IncreaseHideForSecondsButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/LowerHideForSecondsButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/Title": { + "rect": [ + 80.0, + 587.0, + 134.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideLengthCheckButton": { + "rect": [ + 80.0, + 587.0, + 178.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideNextTrackCheckButton": { + "rect": [ + 80.0, + 587.0, + 167.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideTicksCheckButton": { + "rect": [ + 80.0, + 587.0, + 235.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow": { + "rect": [ + 80.0, + 587.0, + 294.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/IncreaseInspirationSpeedButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/InspirationListSpeedLabel": { + "rect": [ + 80.0, + 587.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/LowerInspirationSpeedButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/Title": { + "rect": [ + 80.0, + 587.0, + 174.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/LowPlayedCheckButton": { + "rect": [ + 80.0, + 587.0, + 285.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/StopAfterCurrentCheckButton": { + "rect": [ + 80.0, + 587.0, + 187.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/TitleLabel": { + "rect": [ + 80.0, + 587.0, + 156.0, + 35.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow": { + "rect": [ + 80.0, + 587.0, + 242.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/IncreaseButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/LowerButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/ScoreLabel": { + "rect": [ + 80.0, + 587.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/Title": { + "rect": [ + 80.0, + 587.0, + 122.0, + 31.0 + ], + "visible": false + }, "Quiz/QuizToolbar": { "rect": [ 1360.0, @@ -15341,7 +15757,7 @@ }, "Quiz/QuizToolbar/ResetPlaylistButton": { "rect": [ - 1360.0, + 1488.0, 64.0, 111.0, 31.0 @@ -15350,16 +15766,16 @@ }, "Quiz/QuizToolbar/ResetPointsButton": { "rect": [ - 1488.0, + 1616.0, 64.0, 111.0, 31.0 ], "visible": true }, - "Quiz/QuizToolbar/SettingsButton": { + "Quiz/QuizToolbar/SearchButton": { "rect": [ - 1616.0, + 1360.0, 64.0, 111.0, 31.0 @@ -15375,330 +15791,6 @@ ], "visible": true }, - "Quiz/SettingsPopup": { - "rect": [ - 710.0, - 220.0, - 1920.0, - 1080.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel": { - "rect": [ - 710.0, - 220.0, - 500.0, - 640.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer": { - "rect": [ - 730.0, - 228.0, - 460.0, - 624.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer": { - "rect": [ - 730.0, - 228.0, - 296.0, - 490.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/AddToDatabaseCheckButton": { - "rect": [ - 730.0, - 228.0, - 260.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer": { - "rect": [ - 730.0, - 228.0, - 280.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/CacheLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/CacheTitleLabel": { - "rect": [ - 730.0, - 228.0, - 160.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/IncreaseCacheButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/LowerCacheButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/FullscreenButton": { - "rect": [ - 730.0, - 228.0, - 127.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer": { - "rect": [ - 730.0, - 228.0, - 239.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/IncreaseButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/Label2": { - "rect": [ - 730.0, - 228.0, - 119.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/LowerButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/ScoreLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideBeginningCheckButton": { - "rect": [ - 730.0, - 228.0, - 233.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer": { - "rect": [ - 730.0, - 228.0, - 274.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/HideForSecondsLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/HideForSecondsTitle": { - "rect": [ - 730.0, - 228.0, - 154.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/IncreaseHideForSecondsButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/LowerHideForSecondsButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideLengthCheckButton": { - "rect": [ - 730.0, - 228.0, - 206.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideNextTrackCheckButton": { - "rect": [ - 730.0, - 228.0, - 167.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideTicksCheckButton": { - "rect": [ - 730.0, - 228.0, - 205.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer": { - "rect": [ - 730.0, - 228.0, - 296.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/IncreaseInspirationSpeedButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/InspirationListSpeedLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/InspirationListSpeedTitle": { - "rect": [ - 730.0, - 228.0, - 176.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/LowerInspirationSpeedButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/Label": { - "rect": [ - 730.0, - 228.0, - 97.0, - 35.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/LocalButton": { - "rect": [ - 730.0, - 228.0, - 89.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/LowPlayedCheckButton": { - "rect": [ - 730.0, - 228.0, - 213.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/QuickSyncButton": { - "rect": [ - 730.0, - 228.0, - 131.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/SelectServerButton": { - "rect": [ - 730.0, - 228.0, - 267.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/StopAfterCurrentCheckButton": { - "rect": [ - 730.0, - 228.0, - 187.0, - 31.0 - ], - "visible": false - }, "Quiz/SongControls": { "rect": [ 65.0, @@ -16194,6 +16286,132 @@ ], "visible": false }, + "SettingsPopup": { + "rect": [ + 700.0, + 454.0, + 1920.0, + 1080.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel": { + "rect": [ + 700.0, + 454.0, + 520.0, + 172.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer": { + "rect": [ + 720.0, + 466.0, + 480.0, + 148.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow": { + "rect": [ + 720.0, + 466.0, + 331.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/CacheLabel": { + "rect": [ + 720.0, + 466.0, + 48.0, + 23.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/CacheTitleLabel": { + "rect": [ + 720.0, + 466.0, + 211.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/IncreaseCacheButton": { + "rect": [ + 720.0, + 466.0, + 30.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/LowerCacheButton": { + "rect": [ + 720.0, + 466.0, + 30.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/FullscreenButton": { + "rect": [ + 720.0, + 466.0, + 127.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/Label": { + "rect": [ + 720.0, + 466.0, + 97.0, + 35.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/LocalButton": { + "rect": [ + 720.0, + 466.0, + 89.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow": { + "rect": [ + 720.0, + 466.0, + 106.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow/SelectServerButton": { + "rect": [ + 720.0, + 466.0, + 40.0, + 20.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow/Title": { + "rect": [ + 720.0, + 466.0, + 62.0, + 31.0 + ], + "visible": false + }, "ShortcutsPopup": { "rect": [ 610.0, @@ -17301,6 +17519,15 @@ ], "visible": true }, + "TopBar/DebugLabel": { + "rect": [ + 384.0, + 12.0, + 86.0, + 38.0 + ], + "visible": true + }, "TopBar/QRButton": { "rect": [ 1802.0, @@ -17319,9 +17546,9 @@ ], "visible": true }, - "TopBar/SearchButton": { + "TopBar/SettingsButton": { "rect": [ - 1450.0, + 1538.0, 8.0, 70.0, 40.0 @@ -17348,7 +17575,7 @@ }, "TopBar/SyncButton": { "rect": [ - 1538.0, + 1450.0, 8.0, 70.0, 40.0 @@ -22358,15 +22585,6 @@ ], "visible": false }, - "Quiz/DebugLabel": { - "rect": [ - 974.0, - 904.0, - 120.0, - 69.0 - ], - "visible": true - }, "Quiz/FileDialog": { "rect": [ 0.0, @@ -22781,15 +22999,6 @@ ], "visible": true }, - "Quiz/MusicPlayer/RepeatSongCheckButton": { - "rect": [ - 64.0, - 1032.0, - 144.0, - 31.0 - ], - "visible": true - }, "Quiz/NowPlaying": { "rect": [ 64.0, @@ -23159,6 +23368,258 @@ ], "visible": false }, + "Quiz/QuizSettingsButton": { + "rect": [ + 64.0, + 1030.0, + 160.0, + 36.0 + ], + "visible": true + }, + "Quiz/QuizSettingsCard": { + "rect": [ + 64.0, + 984.0, + 0.0, + 0.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel": { + "rect": [ + 64.0, + 575.0, + 440.0, + 409.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox": { + "rect": [ + 80.0, + 587.0, + 408.0, + 385.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/AddToDatabaseCheckButton": { + "rect": [ + 80.0, + 871.0, + 408.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/AutoRepeatCheckButton": { + "rect": [ + 80.0, + 626.0, + 408.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideBeginningCheckButton": { + "rect": [ + 80.0, + 731.0, + 408.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow": { + "rect": [ + 80.0, + 587.0, + 254.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/HideForSecondsLabel": { + "rect": [ + 80.0, + 587.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/IncreaseHideForSecondsButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/LowerHideForSecondsButton": { + "rect": [ + 80.0, + 587.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideForSecondsRow/Title": { + "rect": [ + 80.0, + 587.0, + 134.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideLengthCheckButton": { + "rect": [ + 80.0, + 766.0, + 408.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideNextTrackCheckButton": { + "rect": [ + 80.0, + 696.0, + 408.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/HideTicksCheckButton": { + "rect": [ + 80.0, + 801.0, + 408.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow": { + "rect": [ + 80.0, + 941.0, + 408.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/IncreaseInspirationSpeedButton": { + "rect": [ + 458.0, + 941.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/InspirationListSpeedLabel": { + "rect": [ + 372.0, + 945.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/LowerInspirationSpeedButton": { + "rect": [ + 424.0, + 941.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/InspirationRow/Title": { + "rect": [ + 80.0, + 941.0, + 288.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/LowPlayedCheckButton": { + "rect": [ + 80.0, + 836.0, + 408.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/StopAfterCurrentCheckButton": { + "rect": [ + 80.0, + 661.0, + 408.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/TitleLabel": { + "rect": [ + 80.0, + 587.0, + 408.0, + 35.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow": { + "rect": [ + 80.0, + 906.0, + 408.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/IncreaseButton": { + "rect": [ + 458.0, + 906.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/LowerButton": { + "rect": [ + 424.0, + 906.0, + 30.0, + 31.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/ScoreLabel": { + "rect": [ + 372.0, + 910.0, + 48.0, + 23.0 + ], + "visible": false + }, + "Quiz/QuizSettingsCard/CardPanel/VBox/WinningScoreRow/Title": { + "rect": [ + 80.0, + 906.0, + 288.0, + 31.0 + ], + "visible": false + }, "Quiz/QuizToolbar": { "rect": [ 1360.0, @@ -23170,7 +23631,7 @@ }, "Quiz/QuizToolbar/ResetPlaylistButton": { "rect": [ - 1360.0, + 1488.0, 64.0, 111.0, 31.0 @@ -23179,16 +23640,16 @@ }, "Quiz/QuizToolbar/ResetPointsButton": { "rect": [ - 1488.0, + 1616.0, 64.0, 111.0, 31.0 ], "visible": true }, - "Quiz/QuizToolbar/SettingsButton": { + "Quiz/QuizToolbar/SearchButton": { "rect": [ - 1616.0, + 1360.0, 64.0, 111.0, 31.0 @@ -23204,330 +23665,6 @@ ], "visible": true }, - "Quiz/SettingsPopup": { - "rect": [ - 710.0, - 220.0, - 1920.0, - 1080.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel": { - "rect": [ - 710.0, - 220.0, - 500.0, - 640.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer": { - "rect": [ - 730.0, - 228.0, - 460.0, - 624.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer": { - "rect": [ - 730.0, - 228.0, - 460.0, - 455.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/AddToDatabaseCheckButton": { - "rect": [ - 730.0, - 337.0, - 460.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer": { - "rect": [ - 730.0, - 547.0, - 460.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/CacheLabel": { - "rect": [ - 1074.0, - 551.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/CacheTitleLabel": { - "rect": [ - 730.0, - 551.0, - 340.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/IncreaseCacheButton": { - "rect": [ - 1160.0, - 547.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer/LowerCacheButton": { - "rect": [ - 1126.0, - 547.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/FullscreenButton": { - "rect": [ - 730.0, - 652.0, - 460.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer": { - "rect": [ - 730.0, - 512.0, - 460.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/IncreaseButton": { - "rect": [ - 1160.0, - 512.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/Label2": { - "rect": [ - 730.0, - 516.0, - 340.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/LowerButton": { - "rect": [ - 1126.0, - 512.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer/ScoreLabel": { - "rect": [ - 1074.0, - 516.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideBeginningCheckButton": { - "rect": [ - 730.0, - 407.0, - 460.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer": { - "rect": [ - 730.0, - 228.0, - 274.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/HideForSecondsLabel": { - "rect": [ - 730.0, - 228.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/HideForSecondsTitle": { - "rect": [ - 730.0, - 228.0, - 154.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/IncreaseHideForSecondsButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer/LowerHideForSecondsButton": { - "rect": [ - 730.0, - 228.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideLengthCheckButton": { - "rect": [ - 730.0, - 442.0, - 460.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideNextTrackCheckButton": { - "rect": [ - 730.0, - 302.0, - 460.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/HideTicksCheckButton": { - "rect": [ - 730.0, - 477.0, - 460.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer": { - "rect": [ - 730.0, - 582.0, - 460.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/IncreaseInspirationSpeedButton": { - "rect": [ - 1160.0, - 582.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/InspirationListSpeedLabel": { - "rect": [ - 1074.0, - 586.0, - 48.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/InspirationListSpeedTitle": { - "rect": [ - 730.0, - 586.0, - 340.0, - 23.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer/LowerInspirationSpeedButton": { - "rect": [ - 1126.0, - 582.0, - 30.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/Label": { - "rect": [ - 730.0, - 228.0, - 460.0, - 35.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/LocalButton": { - "rect": [ - 730.0, - 228.0, - 89.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/LowPlayedCheckButton": { - "rect": [ - 730.0, - 372.0, - 460.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/QuickSyncButton": { - "rect": [ - 730.0, - 228.0, - 131.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/SelectServerButton": { - "rect": [ - 730.0, - 617.0, - 460.0, - 31.0 - ], - "visible": false - }, - "Quiz/SettingsPopup/SettingsPanel/ScrollContainer/VBoxContainer/StopAfterCurrentCheckButton": { - "rect": [ - 730.0, - 267.0, - 460.0, - 31.0 - ], - "visible": false - }, "Quiz/SongControls": { "rect": [ 65.0, @@ -24086,6 +24223,132 @@ ], "visible": false }, + "SettingsPopup": { + "rect": [ + 700.0, + 454.0, + 1920.0, + 1080.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel": { + "rect": [ + 700.0, + 454.0, + 520.0, + 172.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer": { + "rect": [ + 720.0, + 466.0, + 480.0, + 148.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow": { + "rect": [ + 720.0, + 575.0, + 480.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/CacheLabel": { + "rect": [ + 1084.0, + 579.0, + 48.0, + 23.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/CacheTitleLabel": { + "rect": [ + 720.0, + 575.0, + 360.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/IncreaseCacheButton": { + "rect": [ + 1170.0, + 575.0, + 30.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/CacheRow/LowerCacheButton": { + "rect": [ + 1136.0, + 575.0, + 30.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/FullscreenButton": { + "rect": [ + 720.0, + 540.0, + 480.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/Label": { + "rect": [ + 720.0, + 466.0, + 480.0, + 35.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/LocalButton": { + "rect": [ + 720.0, + 466.0, + 89.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow": { + "rect": [ + 720.0, + 505.0, + 480.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow/SelectServerButton": { + "rect": [ + 786.0, + 505.0, + 414.0, + 31.0 + ], + "visible": false + }, + "SettingsPopup/SettingsPanel/VBoxContainer/ServerRow/Title": { + "rect": [ + 720.0, + 505.0, + 62.0, + 31.0 + ], + "visible": false + }, "ShortcutsPopup": { "rect": [ 610.0, @@ -25193,6 +25456,15 @@ ], "visible": true }, + "TopBar/DebugLabel": { + "rect": [ + 384.0, + 12.0, + 86.0, + 38.0 + ], + "visible": true + }, "TopBar/QRButton": { "rect": [ 1802.0, @@ -25211,9 +25483,9 @@ ], "visible": true }, - "TopBar/SearchButton": { + "TopBar/SettingsButton": { "rect": [ - 1450.0, + 1538.0, 8.0, 70.0, 40.0 @@ -25240,7 +25512,7 @@ }, "TopBar/SyncButton": { "rect": [ - 1538.0, + 1450.0, 8.0, 70.0, 40.0 diff --git a/tests/fakes/main_window_test_suite.gd b/tests/fakes/main_window_test_suite.gd index 33c786b..2879f36 100644 --- a/tests/fakes/main_window_test_suite.gd +++ b/tests/fakes/main_window_test_suite.gd @@ -41,8 +41,6 @@ func before_test() -> void: _runner = scene_runner("res://main/MainWindow.tscn") _window = _runner.scene() _quiz = _window.get_node("Quiz") - # The debug build lowers the winning score on startup; keep it out of reach - Settings.winning_score = 20 ## Override to change the fake server before the window starts and sends its first diff --git a/tests/fakes/ui_tour.gd b/tests/fakes/ui_tour.gd index ee1dda2..344e181 100644 --- a/tests/fakes/ui_tour.gd +++ b/tests/fakes/ui_tour.gd @@ -57,6 +57,7 @@ const POPUPS: Array[Array] = [ ["SettingsWindow", "SettingsPopup"], ["QRWindow", "QRPopup"], ["NewCharacterSelect", "CharacterSelectPopup"], ["ShortcutsWindow", "ShortcutsPopup"], ["AboutWindow", "AboutPopup"], ["WinnerWindow", "WinnerPopup"], ["Log", "LogPopup"], + ["QuizSettings", "QuizSettingsCard"], ] var _main: Control @@ -175,8 +176,6 @@ static func prepare_autoloads() -> void: ## Runs the tour. [param on_state] is called (and awaited) with the name of each state ## and the popup that is open in it, or [code]null[/code] when no popup is open. func run(on_state: Callable) -> void: - # The debug build lowers the winning score on startup; keep it out of reach - Settings.winning_score = 20 _stop_caret_blink(_main) await _settle() await on_state.call("startup", null) diff --git a/tests/integration/test_log_and_qr_popups.gd b/tests/integration/test_log_and_qr_popups.gd index df546c5..41e8665 100644 --- a/tests/integration/test_log_and_qr_popups.gd +++ b/tests/integration/test_log_and_qr_popups.gd @@ -63,9 +63,9 @@ func test_qr_popup_has_a_title_and_the_search_address() -> void: func test_qr_code_follows_the_server_picked_in_the_settings() -> void: _qr.open() _qr.close() - Settings.default_path = "http://localhost:8080" + Settings.default_path = "http://another-server:8080" _qr.open() - assert_str(_qr.url_label.text).is_equal("http://localhost:8080/search") - assert_str(_qr.qr_code_rect.data).is_equal("http://localhost:8080/search") + assert_str(_qr.url_label.text).is_equal("http://another-server:8080/search") + assert_str(_qr.qr_code_rect.data).is_equal("http://another-server:8080/search") diff --git a/tests/integration/test_main_window.gd b/tests/integration/test_main_window.gd index 4c4b989..58e4f6a 100644 --- a/tests/integration/test_main_window.gd +++ b/tests/integration/test_main_window.gd @@ -161,15 +161,15 @@ func test_cache_keeps_filling_after_a_failed_download() -> void: func _open_settings() -> void: - _press("QuizToolbar/SettingsButton") + (_window.get_node("TopBar/SettingsButton") as Button).pressed.emit() func _close_settings() -> void: - (_quiz.get_node("SettingsPopup") as Control).visible = false + (_window.get_node("SettingsPopup") as Control).visible = false func _press_settings_button(unique_name: String) -> void: - (_quiz.get_node("SettingsPopup").get_node("%" + unique_name) as Button).pressed.emit() + (_window.get_node("SettingsPopup").get_node("%" + unique_name) as Button).pressed.emit() func test_raising_cache_size_does_not_download_while_settings_are_open() -> void: diff --git a/tests/integration/test_music_player_scene.gd b/tests/integration/test_music_player_scene.gd index 2080ab5..dc08d1a 100644 --- a/tests/integration/test_music_player_scene.gd +++ b/tests/integration/test_music_player_scene.gd @@ -1,5 +1,5 @@ extends GdUnitTestSuite -## The music player scene: the player bar and the auto repeat switch under it. +## The music player scene: the player bar. Auto repeat is in the quiz settings card. var _snapshot: AutoloadSnapshot var _runner: GdUnitSceneRunner @@ -24,27 +24,5 @@ func _click(control: Control) -> void: await _runner.await_input_processed() -func test_auto_repeat_starts_on() -> void: - assert_bool(_player.auto_repeat_button.button_pressed).is_true() - - -func test_clicking_auto_repeat_turns_it_off_and_on() -> void: - await _click(_player.auto_repeat_button) - assert_bool(Settings.auto_repeat_song).is_false() - assert_bool(_player.auto_repeat_button.button_pressed).is_false() - - await _click(_player.auto_repeat_button) - assert_bool(Settings.auto_repeat_song).is_true() - - -func test_auto_repeat_is_under_the_player_bar() -> void: - await _runner.simulate_frames(1) - var bar: Rect2 = (_player.get_node("PlayerBar") as Control).get_global_rect() - var repeat: Rect2 = _player.auto_repeat_button.get_global_rect() - - assert_float(repeat.position.y).is_greater_equal(bar.end.y) - assert_bool(_player.get_global_rect().encloses(repeat)).is_true() - - func test_empty_space_lets_clicks_through() -> void: assert_int(_player.mouse_filter).is_equal(Control.MOUSE_FILTER_IGNORE) diff --git a/tests/integration/test_popups.gd b/tests/integration/test_popups.gd index 918cbf2..cb00c67 100644 --- a/tests/integration/test_popups.gd +++ b/tests/integration/test_popups.gd @@ -6,11 +6,12 @@ extends MainWindowTestSuite ## Popups in the main window: the ones opened from the top bar, and the log. const MAIN_POPUPS: Array[String] = [ "SearchPopup", "SyncPopup", "QRPopup", "ShortcutsPopup", "AboutPopup", "LogPopup", + "SettingsPopup", ] ## Popups opened from the quiz, in the Quiz scene. const QUIZ_POPUPS: Array[String] = [ - "SettingsPopup", "CharacterSelectPopup", "WinnerPopup", + "CharacterSelectPopup", "WinnerPopup", ] @@ -20,7 +21,7 @@ func _popup(node_name: String) -> BasePopup: ## The backdrop that shows behind [param popup]. -func _backdrop(popup: BasePopup = _popup("SettingsPopup")) -> ColorRect: +func _backdrop(popup: BasePopup = _popup("CharacterSelectPopup")) -> ColorRect: return popup.get_parent().get_node("PopupBackdrop") @@ -32,12 +33,12 @@ func _outside(popup: BasePopup) -> Vector2: func test_backdrops_are_hidden_without_popups() -> void: - assert_bool(_backdrop(_popup("SettingsPopup")).visible).is_false() + assert_bool(_backdrop(_popup("CharacterSelectPopup")).visible).is_false() assert_bool(_backdrop(_popup("AboutPopup")).visible).is_false() func test_backdrops_cover_the_whole_window() -> void: - for node_name: String in ["SettingsPopup", "AboutPopup"]: + for node_name: String in ["CharacterSelectPopup", "AboutPopup"]: var popup: BasePopup = _popup(node_name) popup.open() diff --git a/tests/integration/test_quiz_settings_card.gd b/tests/integration/test_quiz_settings_card.gd new file mode 100644 index 0000000..bf303ed --- /dev/null +++ b/tests/integration/test_quiz_settings_card.gd @@ -0,0 +1,160 @@ +extends MainWindowTestSuite +## The quiz settings card: opened from the button under the player bar, it changes the +## quiz settings without dimming or stopping the quiz. + +var _card: QuizSettingsCard +var _button: Button + + +func before_test() -> void: + super() + _card = _quiz.get_node("QuizSettingsCard") + _button = _quiz.get_node("QuizSettingsButton") + + +func _open() -> void: + await _click_at(_button.get_global_rect().get_center()) + await _runner.simulate_frames(1) + + +func test_button_opens_the_card_above_it_without_dimming() -> void: + await _open() + + assert_bool(_card.visible).is_true() + var card: Rect2 = _card.card_panel.get_global_rect() + var button: Rect2 = _button.get_global_rect() + assert_float(card.end.y).is_less_equal(button.position.y) + var bar: Rect2 = (_quiz.get_node("MusicPlayer/PlayerBar") as Control).get_global_rect() + assert_float(card.end.y).override_failure_message("The card covers the player bar") \ + .is_less_equal(bar.position.y) + assert_float(card.position.x).is_equal(button.position.x) + assert_bool(Rect2(Vector2.ZERO, Vector2(1920, 1080)).encloses(card)).is_true() + assert_bool((_quiz.get_node("PopupBackdrop") as Control).visible).is_false() + assert_bool((_window.get_node("PopupBackdrop") as Control).visible).is_false() + + +func test_song_keeps_playing_while_the_card_is_open() -> void: + await _play_first_song() + + await _open() + + assert_int(Playlist.currently_playing_song).is_equal(0) + assert_bool((_quiz.get_node("MusicPlayer") as MusicPlayer).audio_player.stream_paused) \ + .is_false() + + +func test_clicking_outside_closes_it_without_pressing_what_is_behind() -> void: + await _open() + var reset_button: Button = _quiz.get_node("QuizToolbar/ResetPlaylistButton") + + await _click_at(reset_button.get_global_rect().get_center()) + + assert_bool(_card.visible).is_false() + assert_int(_server.count("/music/reset")).is_equal(0) + + +func test_button_closes_an_open_card() -> void: + await _open() + + await _click_at(_button.get_global_rect().get_center()) + + assert_bool(_card.visible).is_false() + + +func test_each_toggle_changes_its_setting() -> void: + var toggles: Dictionary = { + "auto_repeat_button": "auto_repeat_song", + "stop_after_current_button": "stop_after_current", + "hide_next_track_button": "hide_next_track", + "hide_beginning_button": "hide_beginning", + "hide_length_button": "hide_length", + "hide_ticks_button": "hide_ticks", + "low_played_button": "use_low_played_mode", + "add_to_database_button": "add_to_stats", + } + await _open() + for button_name: String in toggles: + var toggle: CheckButton = _card.get(button_name) + var before: bool = Settings.get(toggles[button_name]) + assert_bool(toggle.button_pressed).override_failure_message(button_name) \ + .is_equal(before) + + await _click_at(toggle.get_global_rect().get_center()) + + assert_bool(Settings.get(toggles[button_name])).override_failure_message( + button_name + " did not change its setting").is_equal(!before) + assert_bool(toggle.button_pressed).is_equal(!before) + + +func test_card_shows_settings_changed_elsewhere() -> void: + await _open() + _card.close() + Settings.add_to_stats = false + Settings.auto_repeat_song = false + + await _open() + + assert_bool(_card.add_to_database_button.button_pressed).is_false() + assert_bool(_card.auto_repeat_button.button_pressed).is_false() + + +func test_seconds_to_hide_only_show_while_hiding_the_beginning() -> void: + Settings.hide_beginning = false + await _open() + assert_bool(_card.hide_for_seconds_row.visible).is_false() + + _card.hide_beginning_button.button_pressed = true + + assert_bool(_card.hide_for_seconds_row.visible).is_true() + assert_str(_card.hide_for_seconds_label.text).is_equal("%d" % Settings.hide_for_seconds) + + +func test_seconds_to_hide_are_whole_numbers_between_0_and_10() -> void: + Settings.hide_for_seconds = 9.0 + await _open() + + _card.increase_hide_for_seconds_button.pressed.emit() + _card.increase_hide_for_seconds_button.pressed.emit() + assert_float(Settings.hide_for_seconds).is_equal(10.0) + assert_str(_card.hide_for_seconds_label.text).is_equal("10") + for i: int in 12: + _card.lower_hide_for_seconds_button.pressed.emit() + assert_float(Settings.hide_for_seconds).is_equal(0.0) + assert_str(_card.hide_for_seconds_label.text).is_equal("0") + + +func test_winning_score_goes_up_and_down_but_not_below_one() -> void: + Settings.winning_score = 2 + await _open() + + _card.increase_winning_score_button.pressed.emit() + assert_int(Settings.winning_score).is_equal(3) + for i: int in 5: + _card.lower_winning_score_button.pressed.emit() + assert_int(Settings.winning_score).is_equal(1) + assert_str(_card.score_label.text).is_equal("1") + + +func test_auto_repeat_in_the_card_is_what_the_player_uses() -> void: + Settings.auto_repeat_song = true + await _open() + + await _click_at(_card.auto_repeat_button.get_global_rect().get_center()) + + assert_bool(Settings.auto_repeat_song).is_false() + assert_object(_quiz.get_node("MusicPlayer").get_node_or_null("RepeatSongCheckButton")) \ + .is_null() + + +func test_card_grows_upward_for_the_seconds_row() -> void: + Settings.hide_beginning = false + await _open() + var closed_row: Rect2 = _card.card_panel.get_global_rect() + + _card.hide_beginning_button.button_pressed = true + + var open_row: Rect2 = _card.card_panel.get_global_rect() + assert_float(open_row.end.y).is_equal(closed_row.end.y) + assert_float(open_row.size.y).is_greater(closed_row.size.y) + # Every row stays inside the card + assert_bool(open_row.encloses(_card.rows.get_global_rect())).is_true() diff --git a/tests/integration/test_quiz_settings_card.gd.uid b/tests/integration/test_quiz_settings_card.gd.uid new file mode 100644 index 0000000..3d864ff --- /dev/null +++ b/tests/integration/test_quiz_settings_card.gd.uid @@ -0,0 +1 @@ +uid://idy30j6v07pe diff --git a/tests/integration/test_quiz_toolbar.gd b/tests/integration/test_quiz_toolbar.gd index 8a9800f..3c1d21e 100644 --- a/tests/integration/test_quiz_toolbar.gd +++ b/tests/integration/test_quiz_toolbar.gd @@ -3,9 +3,9 @@ extends GdUnitTestSuite ## buttons that use the song list. const BUTTON_SIGNALS: Dictionary = { + "SearchButton": "search_pressed", "ResetPlaylistButton": "reset_playlist_pressed", "ResetPointsButton": "reset_points_pressed", - "SettingsButton": "settings_pressed", "SoundTestButton": "sound_test_pressed", } @@ -40,8 +40,9 @@ func test_clicking_each_button_reports_it() -> void: func test_buttons_are_in_order_left_to_right() -> void: - var lefts: Array = ["ResetPlaylistButton", "ResetPointsButton", "SettingsButton", - "SoundTestButton"].map(func(n: String) -> float: return _button(n).position.x) + var lefts: Array = ["SearchButton", "ResetPlaylistButton", "ResetPointsButton", + "SoundTestButton"] \ + .map(func(n: String) -> float: return _button(n).position.x) for i: int in lefts.size() - 1: assert_float(lefts[i]).is_less(lefts[i + 1]) @@ -53,7 +54,6 @@ func test_locking_disables_only_buttons_that_use_the_song_list() -> void: assert_bool(_button("ResetPlaylistButton").disabled).is_true() assert_bool(_button("SoundTestButton").disabled).is_true() assert_bool(_button("ResetPointsButton").disabled).is_false() - assert_bool(_button("SettingsButton").disabled).is_false() func test_unlocking_enables_them_again() -> void: diff --git a/tests/integration/test_scene_split.gd b/tests/integration/test_scene_split.gd index 6b0e607..b67f4c4 100644 --- a/tests/integration/test_scene_split.gd +++ b/tests/integration/test_scene_split.gd @@ -7,6 +7,7 @@ extends MainWindowTestSuite const MAIN_WINDOW_CHILDREN: Array[String] = [ "Background", "TopBar", "Quiz", "PopupBackdrop", "SearchPopup", "SyncPopup", "QRPopup", "ShortcutsPopup", "StatisticsView", "AboutPopup", "LogPopup", "SoundtrackStatsPopup", + "SettingsPopup", ] ## The parts of the quiz and the scene each one comes from. @@ -27,14 +28,15 @@ const LOCKED_BY_SYNC: Array[String] = [ ] const TOP_BAR_CHILDREN: Array[String] = [ - "TopPanelContainer", "Title", "SyncButton", "SearchButton", "ShortcutsButton", + "TopPanelContainer", "Title", "SyncButton", "SettingsButton", "ShortcutsButton", + "DebugLabel", "AboutButton", "QRButton", "QuizTab", "StatisticsTab", ] ## Each top bar button and the popup it opens in the main window. const TOP_BAR_POPUPS: Dictionary = { - "SearchButton": "SearchPopup", "SyncButton": "SyncPopup", + "SettingsButton": "SettingsPopup", "ShortcutsButton": "ShortcutsPopup", "AboutButton": "AboutPopup", "QRButton": "QRPopup", @@ -76,9 +78,13 @@ func test_quiz_downloads_songs_with_a_song_loader() -> void: assert_object(_quiz.song_loader).is_instanceof(SongLoader) -func test_auto_repeat_is_part_of_the_music_player() -> void: - assert_object(_quiz.get_node("MusicPlayer/RepeatSongCheckButton")).is_instanceof(CheckButton) - assert_object(_quiz.get_node_or_null("RepeatSongCheckButton")).is_null() +func test_quiz_settings_button_sits_under_the_player_bar() -> void: + var player: Control = _quiz.get_node("MusicPlayer") + var bar: Rect2 = (player.get_node("PlayerBar") as Control).get_global_rect() + var button: Rect2 = (_quiz.get_node("QuizSettingsButton") as Control).get_global_rect() + + assert_float(button.position.y).is_greater_equal(bar.end.y) + assert_float(button.position.x).is_equal(player.get_global_rect().position.x) func test_top_bar_holds_only_title_and_buttons() -> void: @@ -190,8 +196,8 @@ func test_loaded_song_list_shows_in_the_music_list() -> void: func test_quiz_popup_backdrop_covers_the_top_bar() -> void: - var settings: BasePopup = _quiz.get_node("SettingsPopup") - settings.open() + var character_select: CharacterSelectPopup = _quiz.get_node("CharacterSelectPopup") + character_select.show_grid("Crono") await _runner.simulate_frames(1) var backdrop: Control = _quiz.get_node("PopupBackdrop") @@ -202,15 +208,15 @@ func test_quiz_popup_backdrop_covers_the_top_bar() -> void: func test_click_on_top_bar_while_quiz_popup_is_open_only_closes_it() -> void: - var settings: BasePopup = _quiz.get_node("SettingsPopup") - var search: BasePopup = _window.get_node("SearchPopup") - settings.open() + var character_select: CharacterSelectPopup = _quiz.get_node("CharacterSelectPopup") + var about: BasePopup = _window.get_node("AboutPopup") + character_select.show_grid("Crono") await _runner.simulate_frames(1) - await _click_at(_center(_top_bar_button("SearchButton"))) + await _click_at(_center(_top_bar_button("AboutButton"))) - assert_bool(settings.visible).is_false() - assert_bool(search.visible).is_false() + assert_bool(character_select.visible).is_false() + assert_bool(about.visible).is_false() func test_sync_disables_quiz_buttons_until_finished() -> void: @@ -245,7 +251,7 @@ func test_changing_server_reloads_search_and_quiz() -> void: var player: PlayerObject = _add_player("Crono") player.add_point() - _quiz.get_node("SettingsPopup").server_changed.emit() + _window.get_node("SettingsPopup").server_changed.emit() assert_int(_server.count("/music/all/order")).is_equal(search_loads + 1) assert_int(_server.count("/music/all")).is_equal(inspiration_loads + 1) @@ -274,7 +280,7 @@ func test_alt_down_lowers_the_volume() -> void: func test_alt_enter_switches_fullscreen_and_settings_shows_it() -> void: - var settings: BasePopup = _quiz.get_node("SettingsPopup") + var settings: BasePopup = _window.get_node("SettingsPopup") var was_fullscreen: bool = Settings.fullscreen await _press_keys([KEY_ALT, KEY_ENTER]) @@ -284,3 +290,26 @@ func test_alt_enter_switches_fullscreen_and_settings_shows_it() -> void: assert_bool(settings.fullscreen_button.button_pressed).is_equal(!was_fullscreen) await _press_keys([KEY_ALT, KEY_ENTER]) assert_bool(Settings.fullscreen).is_equal(was_fullscreen) + + +func test_debug_label_is_in_the_top_bar_and_stays_on_the_statistics_tab() -> void: + var label: Label = _window.get_node("TopBar/DebugLabel") + assert_bool(label.visible).is_equal(Settings.is_debug) + + _top_bar_button("StatisticsTab").pressed.emit() + + assert_bool(label.is_visible_in_tree()).is_equal(Settings.is_debug) + + +func test_search_is_in_the_quiz_toolbar_and_opens_the_search_popup() -> void: + assert_object(_window.get_node_or_null("TopBar/SearchButton")).is_null() + + await _click_at(_center(_quiz.get_node("QuizToolbar/SearchButton"))) + + assert_bool((_window.get_node("SearchPopup") as Control).visible).is_true() + + +func test_alt_s_opens_search() -> void: + await _press_keys([KEY_ALT, KEY_S]) + + assert_bool((_window.get_node("SearchPopup") as Control).visible).is_true() diff --git a/tests/integration/test_search_popup.gd b/tests/integration/test_search_popup.gd index 4bee82a..d1d8211 100644 --- a/tests/integration/test_search_popup.gd +++ b/tests/integration/test_search_popup.gd @@ -20,7 +20,7 @@ func before_test() -> void: func _open() -> void: - await _click_at(_window.get_node("TopBar/SearchButton").get_global_rect().get_center()) + await _click_at(_quiz.get_node("QuizToolbar/SearchButton").get_global_rect().get_center()) await _runner.simulate_frames(1) diff --git a/tests/integration/test_stats_after_win.gd b/tests/integration/test_stats_after_win.gd index 02cf849..9e5e1bc 100644 --- a/tests/integration/test_stats_after_win.gd +++ b/tests/integration/test_stats_after_win.gd @@ -12,7 +12,7 @@ func before_test() -> void: func _stats_checkbox() -> CheckButton: - return _quiz.get_node("SettingsPopup").get_node("%AddToDatabaseCheckButton") + return _quiz.get_node("QuizSettingsCard").get_node("%AddToDatabaseCheckButton") func test_winning_turns_statistics_off() -> void: @@ -41,7 +41,7 @@ func test_statistics_turned_off_by_hand_stay_off_after_reset() -> void: func test_settings_checkbox_shows_statistics_off_after_win() -> void: await _give_point_with_keybind(1) - _press("QuizToolbar/SettingsButton") + _press("QuizSettingsButton") assert_bool(_stats_checkbox().button_pressed).is_false() @@ -56,8 +56,8 @@ func test_songs_after_a_win_are_not_counted() -> void: func test_winning_score_cannot_go_below_one() -> void: - _press("QuizToolbar/SettingsButton") - var lower_button: Button = _quiz.get_node("SettingsPopup").get_node("%LowerButton") + _press("QuizSettingsButton") + var lower_button: Button = _quiz.get_node("QuizSettingsCard").get_node("%LowerButton") for i: int in 3: lower_button.pressed.emit() diff --git a/tests/integration/test_theme.gd b/tests/integration/test_theme.gd index 85754bd..3137cfa 100644 --- a/tests/integration/test_theme.gd +++ b/tests/integration/test_theme.gd @@ -17,6 +17,7 @@ const STYLES: Dictionary = { "DarkSpacer": "Panel", "CharacterCard": "Panel", "CharacterCardHover": "Panel", + "SettingsRowLabel": "Label", "MusicList": "PanelContainer", "SongRow": "PanelContainer", "ShortcutRowDark": "PanelContainer", diff --git a/tests/unit/test_music_server_client.gd b/tests/unit/test_music_server_client.gd index 87ce2fb..db2c7d0 100644 --- a/tests/unit/test_music_server_client.gd +++ b/tests/unit/test_music_server_client.gd @@ -324,7 +324,7 @@ func test_changing_server_gets_a_new_token() -> void: _server.respond_json("/music/info", {}) MusicServerClient.fetch_song_info(func(_data: SongInfo) -> void: pass) - Settings.default_path = "http://localhost:8080" + Settings.default_path = "http://another-server:8080" MusicServerClient.fetch_song_info(func(_data: SongInfo) -> void: pass) Settings.default_path = previous_path diff --git a/themes/main_theme.tres b/themes/main_theme.tres index eccc716..0ad8ee5 100644 --- a/themes/main_theme.tres +++ b/themes/main_theme.tres @@ -930,6 +930,8 @@ SearchField/base_type = &"LineEdit" SearchField/font_sizes/font_size = 28 SearchResult/base_type = &"RichTextLabel" SearchResult/font_sizes/normal_font_size = 22 +SettingsRowLabel/base_type = &"Label" +SettingsRowLabel/styles/normal = SubResource("StyleBoxEmpty_s5e0q") ShortcutRowDark/base_type = &"PanelContainer" ShortcutRowDark/styles/panel = SubResource("StyleBoxFlat_anjdx") SongRow/base_type = &"PanelContainer"