feat: animated GIF covers with config toggle and focus-based pausing
All checks were successful
Build plugin / build (push) Successful in 1m8s
All checks were successful
Build plugin / build (push) Successful in 1m8s
- Add settings menu with 'Animate GIF covers' toggle (default: off) - When enabled: extract all GIF frames via ffmpeg, build AnimatedTexture - When disabled: extract first frame only (static ImageTexture) - AnimatedTexture starts paused — unpauses only when card has focus - Focus-based pausing via gui_focus_changed signal (walks up to GameCard) - Parse GIF89a frame delays for accurate animation speed - Cache invalidation when setting changes (no restart needed) - Cache AnimatedTextures in memory to avoid re-extraction - Bump to v0.1.13
This commit is contained in:
parent
9be6847f14
commit
208dc58f28
5 changed files with 308 additions and 59 deletions
25
core/artprovider_settings.gd
Normal file
25
core/artprovider_settings.gd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
extends VBoxContainer
|
||||
|
||||
## Settings screen for the itch.io art provider.
|
||||
##
|
||||
## Provides a toggle for animated GIF covers. When enabled, GIF cover art
|
||||
## is extracted frame-by-frame and displayed as an AnimatedTexture that
|
||||
## pauses when the card loses focus.
|
||||
|
||||
var settings_manager := load("res://core/global/settings_manager.tres") as SettingsManager
|
||||
|
||||
const SETTING_SECTION := "plugin.artprovider"
|
||||
const SETTING_ANIMATED_GIFS := "animated_gifs"
|
||||
|
||||
@onready var animated_toggle: Toggle = $%AnimatedGifsToggle
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
animated_toggle.button_pressed = settings_manager.get_value(
|
||||
SETTING_SECTION, SETTING_ANIMATED_GIFS, false
|
||||
) as bool
|
||||
animated_toggle.toggled.connect(_on_animated_gifs_toggled)
|
||||
|
||||
|
||||
func _on_animated_gifs_toggled(pressed: bool) -> void:
|
||||
settings_manager.set_value(SETTING_SECTION, SETTING_ANIMATED_GIFS, pressed)
|
||||
Loading…
Add table
Add a link
Reference in a new issue