feat(contacts): animated avatars (GIF/WebP) with a Settings toggle
Animate contact avatars end to end:
- texture_loader gains LoadAnimatedRGBA: decodes an image into a downscaled
RGBA frame sequence + per-frame durations — animated GIF via stb
(stbi_load_gif_from_memory) and animated WebP via libwebp's WebPAnimDecoder;
stills (and APNG, which stb reads as one image) return a single frame. Frames
are box-downscaled (smaller cap for animations) to bound VRAM, capped at 300.
- The contacts avatar cache now holds a frame sequence; currentAvatarFrame()
advances animated avatars by the ImGui clock and is used everywhere avatars
draw (list, cards, table, grid, preview). When a live animated frame is drawn
it flags the render loop (ConsumeContactsAvatarAnimation, clear-on-read) so
main.cpp keeps producing frames while animation plays and idles when it stops
or the contacts view is hidden.
- New animate_avatars setting (default on) + a Settings appearance toggle
("Animate avatars"); off shows the first frame only. currentAvatarFrame
honors it. +i18n (8 langs, CJK subset rebuilt for 帧/播/첫).
Verified: a 3-frame GIF and a 3-frame animated WebP both decode to 3 frames
with correct 120ms delays through the exact libwebp/stb calls used here.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
"amount_details": "金额详情",
|
||||
"amount_exceeds_balance": "金额超过余额",
|
||||
"amount_label": "金额:",
|
||||
"animate_avatars": "动画头像",
|
||||
"appearance": "外观",
|
||||
"auto_shield": "自动屏蔽挖矿",
|
||||
"av_intro": "挖矿软件经常被标记为潜在有害程序。请按照以下步骤启用矿池挖矿:",
|
||||
@@ -1329,6 +1330,7 @@
|
||||
"try_again": "重试",
|
||||
"tt_addr_url": "在区块浏览器中查看地址的基础 URL",
|
||||
"tt_address_book": "管理已保存的地址以快速发送",
|
||||
"tt_animate_avatars": "播放动画联系人头像(GIF / WebP);关闭时仅显示第一帧",
|
||||
"tt_auto_lock": "在此不活动时间后锁定钱包",
|
||||
"tt_auto_shield": "自动将透明余额转移到屏蔽地址以增强隐私",
|
||||
"tt_backup": "创建 wallet.dat 的备份",
|
||||
|
||||
Reference in New Issue
Block a user