The quiz (song, playlist, players, music player and the popups opened from it) moves into Quiz.tscn and the top panel into TopBar.tscn. The main window keeps only the top bar, the quiz and the popups opened from the top bar, so other views can be added next to the quiz later. Every node keeps its place on screen. Screenshots of every UI state before and after are pixel-identical, and a layout test checks each node against a baseline taken before the split.
23 lines
689 B
GDScript
23 lines
689 B
GDScript
class_name TopBar
|
|
extends Control
|
|
## The bar along the top of the main window, with the title and the buttons for things
|
|
## that are not part of a quiz.
|
|
|
|
signal search_pressed
|
|
signal sync_pressed
|
|
signal statistics_pressed
|
|
signal shortcuts_pressed
|
|
signal about_pressed
|
|
signal qr_pressed
|
|
|
|
@onready var sync_button: Button = $SyncButton
|
|
|
|
|
|
func _ready() -> void:
|
|
$SearchButton.pressed.connect(search_pressed.emit)
|
|
sync_button.pressed.connect(sync_pressed.emit)
|
|
$StatisticsButton.pressed.connect(statistics_pressed.emit)
|
|
$ShortcutsButton.pressed.connect(shortcuts_pressed.emit)
|
|
$AboutButton.pressed.connect(about_pressed.emit)
|
|
$QRButton.pressed.connect(qr_pressed.emit)
|