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
+4 -2
View File
@@ -128,7 +128,8 @@ local function drawIntroBalls(battle)
end
local function drawHUDs(battle, slide)
if battle.enemy and not battle.showEnemyTrainer
local showStatus = battle:statusHUDVisible()
if showStatus and battle.enemy and not battle.showEnemyTrainer
and not battle.enemySendingOut and not battle:growInScale(battle.enemy)
and slide == 0 and not battle.introBalls and not battle.enemy.fainted then
drawStatusPanel(battle, battle.enemy, 0, 0, false)
@@ -139,7 +140,7 @@ local function drawHUDs(battle, slide)
-- item, not a HUD element (DisplayBattleMenu prints wNumSafariBalls inside
-- the battle menu box, engine/battle/core.asm:2074-2079), so it rides in
-- drawCommandMenu below like the classic layout's (#540).
if not battle.safari and battle.player and not battle.demo
if showStatus and not battle.safari and battle.player and not battle.demo
and not battle.showPlayerBack and slide == 0 then
drawStatusPanel(battle, battle.player, 184, 56, true)
end
@@ -255,6 +256,7 @@ local function drawMoveMenu(battle)
end
local function drawTextArea(battle)
if not battle:bottomUIVisible() then return end
if battle.phase == "messages" and (battle.current or battle.animPlaying) then
drawMessageBox(battle)
elseif battle.phase == "menu" then