feat(mods): expose battle UI visibility hooks

This commit is contained in:
AverageConsumer
2026-08-09 15:46:33 +02:00
parent 943ba5dcbf
commit b9e3c4a689
6 changed files with 70 additions and 5 deletions
+7
View File
@@ -7,11 +7,13 @@
-- the text is exhausted and A is pressed, then calls onDone.
local Font = require("src.render.Font")
local Runtime = require("src.mods.Runtime")
local Theme = require("src.ui.Theme")
local Timing = require("src.core.Timing")
local TextBox = {}
TextBox.__index = TextBox
TextBox.isTextBox = true
-- theme-free fallbacks; geometry resolves against Theme.textBox at
-- construction time, so an unthemed boot stays byte-identical
@@ -344,6 +346,11 @@ function TextBox:update(dt)
end
function TextBox:draw()
if Runtime.wantsHook("battle.bottom_ui_visible")
and Runtime.call("battle.bottom_ui_visible", function() return true end,
self) == false then
return
end
-- The dialogue box belongs against the bottom of the screen, not floating
-- in the middle of a zoomed-out letterbox. Declared per frame; the
-- renderer blits this region to the screen edge and the rest of the UI