Fixed replacement battler being invisible if its predecessor fainted and used the same sprite, refactoring

This commit is contained in:
Maruno17
2024-04-01 23:41:54 +01:00
parent a2af2c36f9
commit 494e646fd5
6 changed files with 64 additions and 84 deletions

View File

@@ -85,9 +85,7 @@ end
class Window_TextEntry < SpriteWindow_Base
def initialize(text, x, y, width, height, heading = nil, usedarkercolor = false)
super(x, y, width, height)
colors = getDefaultTextColors(self.windowskin)
@baseColor = colors[0]
@shadowColor = colors[1]
@baseColor, @shadowColor = getDefaultTextColors(self.windowskin)
if usedarkercolor
@baseColor = Color.new(16, 24, 32)
@shadowColor = Color.new(168, 184, 184)
@@ -264,9 +262,7 @@ end
class Window_MultilineTextEntry < SpriteWindow_Base
def initialize(text, x, y, width, height)
super(x, y, width, height)
colors = getDefaultTextColors(self.windowskin)
@baseColor = colors[0]
@shadowColor = colors[1]
@baseColor, @shadowColor = getDefaultTextColors(self.windowskin)
@helper = CharacterEntryHelper.new(text)
@firstline = 0
@cursorLine = 0