app: document the many-games scene and grey the unknown tile
A recording with no champion gets a neutral tile instead of a colour picked from an empty name. The README lists `--scene many`, which repeats the sample games to fill the list, and says why the scrollbar needs `--at 1`.
This commit is contained in:
1 parent
17c73925bf
commit
560f08cfb9
2 files changed
+9
-2
No files matched your search
@@ -21,8 +21,12 @@ cargo run -- --snap settings.png --scene settings
|
|||||||
cargo run -- --snap recording.png --scene recording
|
cargo run -- --snap recording.png --scene recording
|
||||||
cargo run -- --snap audio.png --scene audio
|
cargo run -- --snap audio.png --scene audio
|
||||||
cargo run -- --snap review.png --scene review
|
cargo run -- --snap review.png --scene review
|
||||||
|
cargo run -- --snap many.png --scene many --at 1 # 60 sample games, to see the scrollbar
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Pass `--at 1` when the screenshot depends on a laid-out size (the scrollbar does): layout callbacks
|
||||||
|
run after the first frame.
|
||||||
|
|
||||||
`--live` renders without sample data: the app talks to the daemon and reads the real timelines
|
`--live` renders without sample data: the app talks to the daemon and reads the real timelines
|
||||||
from disk. Loading them takes a few seconds with a large history, so give it time before `--at`.
|
from disk. Loading them takes a few seconds with a large history, so give it time before `--at`.
|
||||||
|
|
||||||
|
|||||||
@@ -324,8 +324,11 @@ fn portrait(p: Paint, champion: Option<&str>) -> El {
|
|||||||
hash.wrapping_mul(16777619) ^ byte as u32
|
hash.wrapping_mul(16777619) ^ byte as u32
|
||||||
})
|
})
|
||||||
.rem_euclid(360) as f32;
|
.rem_euclid(360) as f32;
|
||||||
let fill = rune::oklch(0.36, 0.075, hue);
|
let (fill, ink) = if name.is_empty() {
|
||||||
let ink = rune::oklch(0.94, 0.02, hue);
|
(p.t.control_off, p.muted())
|
||||||
|
} else {
|
||||||
|
(rune::oklch(0.36, 0.075, hue), rune::oklch(0.94, 0.02, hue))
|
||||||
|
};
|
||||||
el().key("portrait")
|
el().key("portrait")
|
||||||
.size(52.0, 52.0)
|
.size(52.0, 52.0)
|
||||||
.radius(radius::MD)
|
.radius(radius::MD)
|
||||||
|
|||||||
Reference in new issue
Block a user