Add persistent HUD hook for tool mods

This commit is contained in:
Kevin Jacobson
2026-07-28 13:58:42 -07:00
parent aab980b05a
commit d09cf80da5
3 changed files with 49 additions and 0 deletions
+8
View File
@@ -255,6 +255,14 @@ function Game:draw()
end
Renderer:beginFrame(worldBelow)
self.stack:draw()
-- Persistent tool status belongs above every game state but inside the
-- active UI canvas, so it composes with palette/render mods and survives
-- menus, battles, and transitions without becoming an updating state.
if ModRuntime.wantsHook("render.hud") then
local width, height = Renderer:uiSize()
ModRuntime.call("render.hud", function() end, self,
{ width = width, height = height })
end
-- SGB colorization: the topmost state that knows its palette owns the
-- screen (overlays like text boxes inherit from what's beneath them);
-- the overworld's world pass colors each visible map area separately