1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

do not allow one letter struct names

This commit is contained in:
Alexander Medvednikov
2019-10-23 17:02:39 +03:00
parent c58c03167d
commit f14425ec18
3 changed files with 12 additions and 10 deletions

View File

@@ -324,23 +324,21 @@ fn (g &Game) draw_field() {
}
fn (g mut Game) draw_ui() {
if g.font_loaded {WinHeight / 2 + 2 * TextSize
if g.font_loaded {
g.ft.draw_text(1, 2, 'score: ' + g.score.str(), text_cfg)
if g.state == .gameover {
g.gg.draw_rect(0, WinHeight / 2 - TextSize, WinWidth,
5 * TextSize, UIColor)
5 * TextSize, UIColor)
g.ft.draw_text(1, WinHeight / 2 + 0 * TextSize, 'Game Over', text_cfg)
g.ft.draw_text(1, WinHeight / 2 + 2 * TextSize, 'SPACE to restart', text_cfg)
} else if g.state == .paused {
g.gg.draw_rect(0, WinHeight / 2 - TextSize, WinWidth,
5 * TextSize, UIColor)
5 * TextSize, UIColor)
g.ft.draw_text(1, WinHeight / 2 + 0 * TextSize, 'Game Paused', text_cfg)
g.ft.draw_text(1, WinHeight / 2 + 2 * TextSize, 'SPACE to resume', text_cfg)
}
}
g.gg.draw_rect(0, BlockSize, WinWidth, LimitThickness, UIColor)
}
fn (g mut Game) draw_scene() {