From f1bafc8a4f3ee7b95f0d181edc34343a80e793aa Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Thu, 9 Oct 2025 13:36:39 +0200 Subject: [PATCH] Fix: Tecla B ahora usa transiciones LERP suaves MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problema: - cycleTheme() cambiaba current_theme_index_ directamente - Se saltaba todo el sistema de transición LERP - Resultado: Cambio instantáneo/abrupto con tecla B Solución: - cycleTheme() ahora delega a switchToTheme(next_index) - switchToTheme() maneja snapshot + transición automáticamente - Resultado: Transición suave de 0.5s con tecla B ✅ Ahora TODAS las formas de cambiar tema tienen LERP: ✅ Numpad 1-0: Transición suave ✅ Tecla B: Transición suave (FIXED) ✅ DEMO mode: Transición suave 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- source/theme_manager.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/source/theme_manager.cpp b/source/theme_manager.cpp index 8ce7c74..534e8cc 100644 --- a/source/theme_manager.cpp +++ b/source/theme_manager.cpp @@ -289,13 +289,11 @@ void ThemeManager::update(float delta_time) { } void ThemeManager::cycleTheme() { - // Ciclar al siguiente tema con wraparound - current_theme_index_ = (current_theme_index_ + 1) % static_cast(themes_.size()); + // Calcular siguiente tema con wraparound + int next_theme_index = (current_theme_index_ + 1) % static_cast(themes_.size()); - // Si es tema dinámico, reiniciar progreso - if (themes_[current_theme_index_]->needsUpdate()) { - themes_[current_theme_index_]->resetProgress(); - } + // Usar switchToTheme() para obtener transición LERP automáticamente + switchToTheme(next_theme_index); } void ThemeManager::pauseDynamic() {