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
@@ -1,5 +1,5 @@
|
||||
extends GdUnitTestSuite
|
||||
## The music player scene: the player bar and the auto repeat switch under it.
|
||||
## The music player scene: the player bar. Auto repeat is in the quiz settings card.
|
||||
|
||||
var _snapshot: AutoloadSnapshot
|
||||
var _runner: GdUnitSceneRunner
|
||||
@@ -24,27 +24,5 @@ func _click(control: Control) -> void:
|
||||
await _runner.await_input_processed()
|
||||
|
||||
|
||||
func test_auto_repeat_starts_on() -> void:
|
||||
assert_bool(_player.auto_repeat_button.button_pressed).is_true()
|
||||
|
||||
|
||||
func test_clicking_auto_repeat_turns_it_off_and_on() -> void:
|
||||
await _click(_player.auto_repeat_button)
|
||||
assert_bool(Settings.auto_repeat_song).is_false()
|
||||
assert_bool(_player.auto_repeat_button.button_pressed).is_false()
|
||||
|
||||
await _click(_player.auto_repeat_button)
|
||||
assert_bool(Settings.auto_repeat_song).is_true()
|
||||
|
||||
|
||||
func test_auto_repeat_is_under_the_player_bar() -> void:
|
||||
await _runner.simulate_frames(1)
|
||||
var bar: Rect2 = (_player.get_node("PlayerBar") as Control).get_global_rect()
|
||||
var repeat: Rect2 = _player.auto_repeat_button.get_global_rect()
|
||||
|
||||
assert_float(repeat.position.y).is_greater_equal(bar.end.y)
|
||||
assert_bool(_player.get_global_rect().encloses(repeat)).is_true()
|
||||
|
||||
|
||||
func test_empty_space_lets_clicks_through() -> void:
|
||||
assert_int(_player.mouse_filter).is_equal(Control.MOUSE_FILTER_IGNORE)
|
||||
Reference in new issue
Block a user