Applied visiblity to hide sprite as opposed to negative src_rect.y

This commit is contained in:
m3rein
2020-09-07 16:50:42 +02:00
parent ba5eba832b
commit 56b03cd762

View File

@@ -414,12 +414,14 @@ class FightMenuDisplay < BattleMenuBase
def refreshMegaEvolutionButton def refreshMegaEvolutionButton
return if !USE_GRAPHICS return if !USE_GRAPHICS
@megaButton.src_rect.y = (@mode - 1) * @megaEvoBitmap.height / 2 @megaButton.src_rect.y = (@mode - 1) * @megaEvoBitmap.height / 2
@visibility["megaButton"] = @mode > 0
@megaButton.z = self.z - 1 @megaButton.z = self.z - 1
end end
def refreshShiftButton def refreshShiftButton
return if !USE_GRAPHICS return if !USE_GRAPHICS
@shiftButton.src_rect.y = (@shiftMode - 1) * @shiftBitmap.height @shiftButton.src_rect.y = (@shiftMode - 1) * @shiftBitmap.height
@visibility["shiftButton"] = @shiftMode > 0
@shiftButton.z = self.z - 1 @shiftButton.z = self.z - 1
end end