examples: show the tetris ghost by default

pull/10559/head
Delyan Angelov 2021-06-24 11:59:18 +03:00
parent 96adfc9d5b
commit 5a308005d5
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 3 additions and 2 deletions

View File

@ -115,7 +115,7 @@ mut:
// gg context for drawing
gg &gg.Context = voidptr(0)
font_loaded bool
show_ghost bool
show_ghost bool = true
// frame/time counters:
frame int
frame_old int
@ -226,7 +226,8 @@ fn (g &Game) draw_ghost() {
pos_y := g.move_ghost()
for i in 0 .. tetro_size {
tetro := g.tetro[i]
g.draw_block_color(pos_y + tetro.y, g.pos_x + tetro.x, gx.gray)
g.draw_block_color(pos_y + tetro.y, g.pos_x + tetro.x, gx.rgba(125, 125, 225,
40))
}
}
}