Sort the scripts and scenes into folders
main/ holds the main window and top bar, quiz/ the quiz and its parts, player/ the music player, popups/ every popup and what they share, data/ the songs, players, playlist and settings, server/ the MusicServer client, common/ the list row and GameLog, and themes/ the themes and style boxes.
This commit is contained in:
1 parent
a0428e3475
commit
d77b72159d
115 files changed
+94
-84
No files matched your search
@@ -0,0 +1,27 @@
|
||||
class_name SongControls
|
||||
extends Control
|
||||
## The buttons for the song that is playing: show the answer, and go to the next song.
|
||||
|
||||
signal show_answer_pressed
|
||||
signal next_pressed
|
||||
|
||||
@onready var show_answer_button: Button = $ShowAnswerButton
|
||||
@onready var next_button: Button = $NextButton
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
show_answer_button.pressed.connect(show_answer_pressed.emit)
|
||||
next_button.pressed.connect(next_pressed.emit)
|
||||
|
||||
|
||||
## Enables Next while there is a downloaded song to play next.
|
||||
func set_next_enabled(enabled: bool) -> void:
|
||||
next_button.disabled = !enabled
|
||||
|
||||
|
||||
## Disables both buttons, e.g. while the server syncs the song list. Unlocking enables
|
||||
## Show answer again; Next comes back when the next song has been downloaded.
|
||||
func set_locked(locked: bool) -> void:
|
||||
show_answer_button.disabled = locked
|
||||
if locked:
|
||||
next_button.disabled = true
|
||||
Reference in new issue
Block a user