move hud logic to system

This commit is contained in:
Travis Shears 2026-04-24 13:23:15 +02:00
parent 84db41dc51
commit 45bfeb5eb5
Signed by: travisshears
GPG key ID: CB9BF1910F3F7469
5 changed files with 69 additions and 72 deletions

View file

@ -16,10 +16,11 @@
(set self.x (- x (/ screen.canvas-w 2)))
(set self.y (- y (/ screen.canvas-h 2)))))))
(fn camera.draw89 [self]
(love.graphics.pop)) ; undo camera translation
(fn camera.draw99 [self]
(let [screen self.pool.data.screen canvas self.pool.data.canvas]
(love.graphics.pop) ; undo camera translation
(love.graphics.setCanvas) ; reset to root canvas
(color:reset-color)
(love.graphics.draw canvas 0 0 0 screen.scale screen.scale)))