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

gg: mouse_move, mouse_down

This commit is contained in:
Alexander Medvednikov
2020-09-21 02:42:28 +02:00
parent 21c5ff681b
commit 8c8fe02000
2 changed files with 21 additions and 3 deletions

View File

@ -143,7 +143,9 @@ fn (mut game Game) showfps() {
ticks := f64(game.second_sw.elapsed().microseconds())/1000.0
if ticks > 999.0 {
fps := f64(game.frame - game.frame_old)*ticks/1000.0
eprintln('fps: ${fps:5.1f} | last frame took: ${last_frame_ms:6.3f}ms | frame: ${game.frame:6} ')
$if debug {
eprintln('fps: ${fps:5.1f} | last frame took: ${last_frame_ms:6.3f}ms | frame: ${game.frame:6} ')
}
game.second_sw.restart()
game.frame_old = game.frame
}