Fixed long battle messages displaying weirdly

This commit is contained in:
Maruno17
2023-09-23 19:20:44 +01:00
parent b2c66b7b0c
commit d9c3898124
3 changed files with 10 additions and 13 deletions

View File

@@ -188,7 +188,7 @@ class Battle::Scene
cw.setText(msg)
PBDebug.log_message(msg)
yielded = false
timer_start = System.uptime
timer_start = nil
loop do
pbUpdate(cw)
if !cw.busy?
@@ -202,6 +202,7 @@ class Battle::Scene
@briefMessage = true
break
end
timer_start = System.uptime if !timer_start
if System.uptime - timer_start >= MESSAGE_PAUSE_TIME # Autoclose after 1 second
cw.text = ""
cw.visible = false
@@ -233,7 +234,7 @@ class Battle::Scene
cw.text = msg + "\1"
PBDebug.log_message(msg)
yielded = false
timer_start = System.uptime
timer_start = nil
loop do
pbUpdate(cw)
if !cw.busy?
@@ -242,6 +243,7 @@ class Battle::Scene
yielded = true
end
if !@battleEnd
timer_start = System.uptime if !timer_start
if System.uptime - timer_start >= MESSAGE_PAUSE_TIME * 3 # Autoclose after 3 seconds
cw.text = ""
cw.visible = false