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

@@ -413,14 +413,16 @@ 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
@megaButton.z = self.z - 1 @visibility["megaButton"] = @mode > 0
@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
@shiftButton.z = self.z - 1 @visibility["shiftButton"] = @shiftMode > 0
@shiftButton.z = self.z - 1
end end
def refresh def refresh