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.
This commit is contained in:
1 parent
8d21b0617d
commit
b510aa47f2
34 files changed
+3074
-2525
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user