gate_overlay: fix click-through sense, smooth the glow into a ramp - #25
Merged
Conversation
Two review follow-ups from TokitoAI/tokito#525's gate_overlay consumer: 1. The overlay claimed its rect with Sense::hover() and a doc comment claiming that blocked clicks to whatever's behind it. Under egui 0.35's hit-testing a hover-only rect never actually intercepts a click — Sense::click_and_drag() is what's needed to make "nothing behind it is clickable while gated" true. Fixed the comment to match. 2. The depth glow behind the card was two flat circle_filled discs, which reads as concentric rings rather than a soft glow. Replaced with a 7-step alpha ramp (lerp_color accent -> accent_2 outer to inner, gamma_multiply fading alpha per step) so it falls off smoothly instead of banding. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two follow-ups from the review of TokitoAI/tokito#525 (the Tokito Cloud sign-in gate built on
gate_overlay, merged as #24):gate_overlayclaimed its full rect withSense::hover()and a doc comment asserting that blocked clicks to whatever's behind it. That's false under egui 0.35's hit-testing — a hover-only rect never intercepts a click. Switched toSense::click_and_drag()(and fixed the comment).circle_filleddiscs — reads as concentric rings, not a glow. Replaced with a 7-step alpha ramp (colour driftingaccent→accent_2from rim to core, alpha fading per step viagamma_multiply) for a smoother falloff.Test plan
cargo buildcargo fmt --all -- --checkcargo clippy --all-targets -- -D warningsRUSTDOCFLAGS="-D warnings" cargo doc --no-deps🤖 Generated with Claude Code