aboutsummaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-03-12 16:41:55 -0400
committeriamcheeseman <[email protected]>2026-03-12 16:41:55 -0400
commite3634a80ad29221b9fc0cc60a543027074096dd1 (patch)
tree485cb8f15523d21be36cc9c33283ba296a6337bd /main.lua
parent756a3446b66d86c7ee785b69e7103c79a12bdf13 (diff)
Move the UI rendering outside of the canvas
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/main.lua b/main.lua
index bbc2689..ed1a48a 100644
--- a/main.lua
+++ b/main.lua
@@ -48,14 +48,6 @@ function love.draw(dt)
ground2:draw()
player.box:draw()
- im.begin_step()
-
- fire_event(scn.on_ui)
-
- im.draw()
-
- im.end_step()
-
-- TODO: Take care of weird displays
lg.setCanvas()
local scr_width, scr_height = lg.getDimensions()
@@ -67,6 +59,14 @@ function love.draw(dt)
WindowScale, WindowScale,
SCR_WIDTH / 2, SCR_HEIGHT / 2)
+ im.begin_step()
+
+ fire_event(scn.on_ui)
+
+ im.draw()
+
+ im.end_step()
+
lg.print(tostring(love.timer.getFPS()))
lg.print("left "..tostring(player.box:touching_left()), 0, 20)
lg.print("right "..tostring(player.box:touching_right()), 0, 40)