Add animations to popups, points, songs, the winner and the tabs (#48)
Popups fade in while growing and close the reverse way, with the backdrop fading along. The winner gets confetti, bouncing pictures and a score graph that draws itself from the left. Filtered statistics cards and search rows fade in, the tabs slide in from their side, and every button bounces on hover and click (ButtonBounce, now added to all buttons). In the player list the score pops on every point, the first point flashes the row, and a player on match point glows with a "Match point!" tag. A song starting fades in the title, flashes its row (kept across list rebuilds) and pops the play button. Common/anim.gd holds the helpers. A saved "Reduce animations" switch in Settings turns all movement off; the tests use it. The flash colours are theme colours (Palette first_point, match_point, flash) in every theme. Closes #48 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ae231975bd
commit
0fc3be79e1
31 files changed
+1510
-639
No files matched your search
@@ -1,7 +1,7 @@
|
||||
class_name SettingsPopup
|
||||
extends BasePopup
|
||||
## The application settings: which MusicServer or music folder to play from, the theme,
|
||||
## fullscreen, how many songs to download ahead, whether to prefer less played soundtracks
|
||||
## fullscreen, fewer animations, how many songs to download ahead, whether to prefer less played soundtracks
|
||||
## and whether plays count in the statistics, and a button that opens the folder the
|
||||
## settings are kept in. Opened from the Settings button in the top bar.
|
||||
##
|
||||
@@ -25,6 +25,7 @@ const PADDING: Vector2 = Vector2(20, 12)
|
||||
@onready var settings_panel: Panel = %SettingsPanel
|
||||
@onready var select_server_button: OptionButton = %SelectServerButton
|
||||
@onready var fullscreen_button: CheckButton = %FullscreenButton
|
||||
@onready var reduce_animations_button: CheckButton = %ReduceAnimationsButton
|
||||
@onready var theme_button: OptionButton = %ThemeButton
|
||||
@onready var cache_label: Label = %CacheLabel
|
||||
@onready var lower_cache_button: Button = %LowerCacheButton
|
||||
@@ -66,6 +67,8 @@ func _ready() -> void:
|
||||
cache_label.text = str(Playlist.number_of_tracks_to_preload)
|
||||
|
||||
fullscreen_button.pressed.connect(fullscreen)
|
||||
reduce_animations_button.button_pressed = Settings.reduce_animations
|
||||
reduce_animations_button.toggled.connect(set_reduce_animations)
|
||||
choose_folder_button.pressed.connect(folder_dialog.popup_centered)
|
||||
folder_dialog.dir_selected.connect(use_music_folder)
|
||||
use_server_button.pressed.connect(use_server)
|
||||
@@ -93,6 +96,12 @@ func select_theme(index: int) -> void:
|
||||
Settings.apply_theme(Settings.THEMES[index].id)
|
||||
|
||||
|
||||
## Turns every animation off or on, and saves it.
|
||||
func set_reduce_animations(on: bool) -> void:
|
||||
Settings.reduce_animations = on
|
||||
Settings.save_settings()
|
||||
|
||||
|
||||
func fullscreen() -> void:
|
||||
Settings.set_fullscreen(!Settings.fullscreen)
|
||||
|
||||
|
||||
Reference in new issue
Block a user