Make the music list, player list and inspiration list their own scenes
MusicListPanel, PlayersPanel (was Players) and InspirationList (was ScrollContainer) each get their own scene and script. They report what happens through signals, and the quiz wires them to the playlist, the music player, the log and the popups. Every node keeps its place on screen. Screenshots of every UI state are pixel-identical to before, the layout test still matches the original baseline, and each part is tested on its own as well as through the quiz.
This commit is contained in:
1 parent
3c7b4e5c9d
commit
8c1987807c
24 files changed
+932
-466
No files matched your search
@@ -12,12 +12,18 @@ const BASELINE_PATH: String = "res://tests/data/layout_baseline.json"
|
||||
|
||||
## Nodes that moved from the main window into the Quiz scene, by their old name.
|
||||
const QUIZ_NODES: Array[String] = [
|
||||
"Open", "FileDialog", "MusicListPanel", "ScrollContainer", "VBoxContainer",
|
||||
"MusicPlayer", "Players", "ResetPlaylistButton", "ResetPointsButton", "SettingsButton",
|
||||
"Open", "FileDialog", "MusicListPanel", "VBoxContainer",
|
||||
"MusicPlayer", "ResetPlaylistButton", "ResetPointsButton", "SettingsButton",
|
||||
"SoundTestButton", "ShowAnswerButton", "NextButton", "RepeatSongCheckButton",
|
||||
"DebugLabel", "SettingsWindow", "NewCharacterSelect", "WinnerWindow", "Log",
|
||||
]
|
||||
|
||||
## Nodes that moved into the Quiz scene and were renamed there: old name to new name.
|
||||
const RENAMED_QUIZ_NODES: Dictionary = {
|
||||
"Players": "PlayersPanel",
|
||||
"ScrollContainer": "InspirationList",
|
||||
}
|
||||
|
||||
## Nodes that moved from the main window into the TopBar scene, by their old name.
|
||||
const TOP_BAR_NODES: Array[String] = [
|
||||
"TopPanelContainer", "Title", "SearchButton", "SyncButton", "StatisticsButton",
|
||||
@@ -60,6 +66,8 @@ static func new_path(old_path: String) -> String:
|
||||
var first: String = old_path.get_slice("/", 0)
|
||||
if first in QUIZ_NODES:
|
||||
return "Quiz/" + old_path
|
||||
if first in RENAMED_QUIZ_NODES:
|
||||
return "Quiz/" + RENAMED_QUIZ_NODES[first] + old_path.trim_prefix(first)
|
||||
if first in TOP_BAR_NODES:
|
||||
return "TopBar/" + old_path
|
||||
return old_path
|
||||
|
||||
Reference in new issue
Block a user