Skip to content

Add synchronized auto show/hide fade cycle for text and image sources#58

Merged
kzryzstof merged 4 commits into
mainfrom
copilot/add-auto-show-hide-feature
Apr 13, 2026
Merged

Add synchronized auto show/hide fade cycle for text and image sources#58
kzryzstof merged 4 commits into
mainfrom
copilot/add-auto-show-hide-feature

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 13, 2026

Adds per-source auto visibility cycling so text and image sources can alternate between visible and hidden states with fade transitions. The feature is configurable in source properties, defaults to disabled (always visible), and uses a shared wall-clock phase so all enabled sources transition in lockstep.

  • Shared visibility cycle primitive

    • Added visibility_cycle common module to compute cycle opacity from:
      • enabled
      • show_duration
      • hide_duration
      • fade_duration
    • Uses wall-clock (os_gettime_ns) phase math so enabled sources stay synchronized across source instances.
  • Text source integration

    • Extended common text config with auto-visibility settings.
    • Added properties in text source UI:
      • Auto show/hide toggle
      • Visible duration
      • Hidden duration
      • Fade duration
    • Composed opacity as:
      • existing content-transition fade (text change)
      • × auto-visibility fade (show/hide cycle)
  • Image source integration

    • Added auto-visibility properties/defaults to image sources with property pages:
      • Achievement Icon
      • Gamerpic
      • Game Cover
    • Applied cycle opacity in render path; icon source now multiplies icon-transition opacity by cycle opacity.
  • State persistence for text-backed sources

    • Added persisted fields for auto-visibility settings in state.c for:
      • Gamerscore
      • Gamertag
      • Achievement Name
      • Achievement Description
      • Achievements Count
    • Defaults preserve prior behavior (enabled = false, effectively always visible).
const float visibility_opacity = auto_visibility_get_opacity(&config->auto_visibility);
const float final_opacity = text_source->transition.opacity * visibility_opacity;
set_color_with_opacity(text_source, settings, config, final_opacity);

@kzryzstof kzryzstof marked this pull request as ready for review April 13, 2026 02:18
@kzryzstof kzryzstof merged commit eb7dfef into main Apr 13, 2026
1 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants