Files
MusicPlayer/quiz/quiz_toolbar.gd
Sansan b510aa47f2
Build / test (push) Successful in 44s
Build / build (push) Successful in 1m13s
Split settings into a quiz card and an application Settings popup
- A Quiz settings button under the player bar opens a small card above
  it with the quiz settings, including Auto repeat, which moves there
  from under the player bar. The card does not dim the quiz, so it can
  be changed during a song, and grows to fit its rows.
- A Settings button in the top bar opens the application settings:
  server, fullscreen and songs to download ahead. Quick sync is gone,
  as the server no longer has it, and the server list is in Settings.
- Labels use sentence case, and seconds to hide show as whole numbers.
- Debug builds switch to the local server and a low winning score in
  the Settings autoload, before any scene asks the server for anything.
  The DEBUG label moves to the top bar, so it shows on every tab.
- Search moves from the top bar back to the quiz toolbar, as the
  Statistics tab has its own search.
2026-10-07 16:05:13 +02:00

26 lines
840 B
GDScript

class_name QuizToolbar
extends Control
## 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 sound_test_pressed
@onready var reset_playlist_button: Button = $ResetPlaylistButton
@onready var sound_test_button: Button = $SoundTestButton
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)
sound_test_button.pressed.connect(sound_test_pressed.emit)
## Disables the buttons that use the song list, e.g. while the server syncs it.
func set_locked(locked: bool) -> void:
reset_playlist_button.disabled = locked
sound_test_button.disabled = locked