mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-17 19:24:01 +02:00
feat(mods): expose battle UI visibility hooks
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user