Editorial illustration: Tabs and orderly page transitions

Tabs and orderly page transitions

The problem I needed to solve

Rapid tab changes can activate two screens or leave an earlier animation unfinished. I wanted the final selection and visual state to agree.

Implementation in this snapshot

TabGroupManager.SelectTab validates its index and stores a later choice in queuedIndex during switching. SwitchToRoutine sequences the old page’s exit before the next page’s entrance.

The design decision and its cost

Original RectTransform positions and scales are cached. Nested tab groups can reset to their defaults, and button listeners are retained explicitly.

Current boundaries

This behavior depends on correct page structure and references. Finding child content and animating items is not a universal guarantee for arbitrary layouts; it needs checking in the actual menu.

Three quick taps and one final destination

A user may tap the shop and then customization while the games page is exiting. SelectTab stores a request in queuedIndex when isSwitching is true. This is not a queue of every tap: a new request replaces the previous one. The policy preserves the latest pending destination. After switching, a valid pending index different from currentIndex triggers another SelectTab. Intermediate taps are not individually guaranteed execution.

SwitchToRoutine completes AnimateOut, disables and restores the previous page, then changes currentIndex and button visuals before entering the next page. NotifyTargetSelected, OnSelected and TabChanged run after entrance. This matters to consumers refreshing selected content. Changing the index and finishing the visual transition are separate moments: CurrentIndex can describe the destination while entrance motion is still running.

Caching the authored RectTransform position and scale lets animation offsets be applied relative to the design and removed afterward. useUnscaledTime supports UI timing independent of game timeScale. Nested groups may reset to defaults when their parent is selected, affecting whether an inner page is retained. Cached button listeners allow removing the same delegate in OnDestroy. These details explain lifecycle behavior without proving every arbitrary layout or incomplete Inspector reference works correctly.

What this stage taught me

For me, a tab means more than changing a button color. Active content, child state and entrance/exit motion should express one selection, especially under repeated taps.

Explore Dalo

Latest devlogs

Editorial illustration: Pasur launch and telemetry in the shared structure

Pasur launch and telemetry in the shared structure

Adding Pasur needs both a correct mode handoff and valid public telemetry.

Read article
Editorial illustration: Pasur bot decisions from capture options

Pasur bot decisions from capture options

My teammate’s Pasur bot chooses among legal options without inspecting hidden opposing cards.

Read article
Editorial illustration: Capturing table cards in Pasur

Capturing table cards in Pasur

In my teammate’s implementation, Pasur combines selecting a hand card with selecting table cards. Its rules must produce valid sets and prohibit ignoring an available capture.

Read article
Dalo