Skip to content

Conversation

@cryptoquick
Copy link
Member

@cryptoquick cryptoquick commented Mar 11, 2025

Splash Screen Implementation Changelog

Added

  • New SplashScreen variant to the View enum
  • Added splash_timer field to AppState to track the 1-second display time
  • Implemented render_splash_screen method with:
    • Black background
    • Centered logo at 50% scale
    • Efficient image loading using OnceLock
    • Proper error handling for image loading

Modified

  • Updated BitVaultApp::new() to start with the splash screen view
  • Enhanced update() method to:
    • Track splash screen timer
    • Request continuous repaints during splash screen display
    • Transition to appropriate view (Home or LockScreen) after splash screen

Technical Details

  • Used standard library's OnceLock for thread-safe, one-time image loading
  • Added multiple path resolution to find the splash logo image
  • Implemented atomic counter to track render calls for debugging
  • Added appropriate logging at trace and debug levels
  • Ensured timer starts immediately without requiring user interaction

Performance Optimizations

  • Image is loaded only once and reused across frames
  • Timer updates consistently at 60 FPS
  • Minimal memory footprint with efficient image handling

@cryptoquick cryptoquick added the enhancement New feature or request label Mar 11, 2025
@cryptoquick cryptoquick merged commit ce9dc64 into main Mar 22, 2025
1 check passed
@cryptoquick cryptoquick deleted the splashscreen branch March 22, 2025 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants