mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Fixed party navigation on pokémon selection (#198)
* Fixed party navigation on pokémon selection On a selections like Battle Tower's, if player places the cursor into cancel and press up, the cursor doesn't move/loop. This was fixed. Co-authored-by: Maruno17 <serialcolour@hotmail.com>
This commit is contained in:
@@ -796,7 +796,7 @@ class PokemonParty_Scene
|
||||
when Input::LEFT
|
||||
loop do
|
||||
currentsel -= 1
|
||||
break unless currentsel > 0 && currentsel < @party.length && !@party[currentsel]
|
||||
break unless currentsel > 0 && currentsel < Settings::MAX_PARTY_SIZE && !@party[currentsel]
|
||||
end
|
||||
if currentsel >= @party.length && currentsel < Settings::MAX_PARTY_SIZE
|
||||
currentsel = @party.length - 1
|
||||
@@ -805,13 +805,10 @@ class PokemonParty_Scene
|
||||
when Input::RIGHT
|
||||
loop do
|
||||
currentsel += 1
|
||||
break unless currentsel < @party.length && !@party[currentsel]
|
||||
break unless currentsel < Settings::MAX_PARTY_SIZE && !@party[currentsel]
|
||||
end
|
||||
if currentsel == @party.length
|
||||
currentsel = Settings::MAX_PARTY_SIZE
|
||||
elsif currentsel == numsprites
|
||||
currentsel = 0
|
||||
currentsel = numsprites - 1 if currentsel >= @party.length
|
||||
if currentsel == numsprites
|
||||
currentsel = (@party.length == 0) ? Settings::MAX_PARTY_SIZE : 0
|
||||
end
|
||||
when Input::UP
|
||||
if currentsel >= Settings::MAX_PARTY_SIZE
|
||||
@@ -819,7 +816,7 @@ class PokemonParty_Scene
|
||||
while currentsel > 0 && currentsel < Settings::MAX_PARTY_SIZE && !@party[currentsel]
|
||||
currentsel -= 1
|
||||
end
|
||||
currentsel = numsprites - 1 if currentsel >= @party.length
|
||||
currentsel = numsprites - 1 if currentsel < Settings::MAX_PARTY_SIZE && currentsel >= @party.length
|
||||
else
|
||||
loop do
|
||||
currentsel -= 2
|
||||
@@ -840,8 +837,7 @@ class PokemonParty_Scene
|
||||
if currentsel >= @party.length && currentsel < Settings::MAX_PARTY_SIZE
|
||||
currentsel = Settings::MAX_PARTY_SIZE
|
||||
elsif currentsel >= numsprites
|
||||
currentsel = 0
|
||||
currentsel = numsprites - 1 if currentsel >= @party.length
|
||||
currentsel = (@party.length == 0) ? Settings::MAX_PARTY_SIZE : 0
|
||||
end
|
||||
end
|
||||
return currentsel
|
||||
|
||||
Reference in New Issue
Block a user