mirror of
https://github.com/vlang/v.git
synced 2025-09-17 11:26:17 -04:00
examples: over print in digital_rain.v, to simulate the custom font used in the movie effect (#21846)
This commit is contained in:
parent
2cde320eee
commit
d7550c5c02
@ -36,7 +36,6 @@ fn main() {
|
||||
}
|
||||
|
||||
fn rain(mut app App) {
|
||||
// Create the drawing context
|
||||
app.ctx = gg.new_context(
|
||||
bg_color: gx.rgb(0, 0, 0)
|
||||
width: app.screen_size.width
|
||||
@ -151,6 +150,8 @@ fn draw_rain_column(rc RainColumn, app App) {
|
||||
}
|
||||
if i < rc.drops.len {
|
||||
app.ctx.draw_text(x, y, rc.drops[i].ascii_str(), cfg)
|
||||
app.ctx.draw_text(x, y, rc.drops[(i + 10) % rc.drops.len].ascii_str(),
|
||||
cfg)
|
||||
} else {
|
||||
vprintln('BAD i: ${i} | rc.drops.len: ${rc.drops.len}')
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user