Rewrote Pokémon storage screen code

This commit is contained in:
Maruno17
2024-10-13 23:41:42 +01:00
parent 61b6bb5aeb
commit 89c344dc00
15 changed files with 2523 additions and 173 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1267,13 +1267,19 @@ class PurifyChamberScene
pbRefresh
end
# TODO: Depending on which position is selected, make Shadow Pokémon/non-Shadow
# Pokémon in UI::PokemonStorage semi-transparent and don't let them be
# selected.
# TODO: Don't let eggs be selected.
# TODO: Don't let the last able Pokémon in the party be selected.
def pbChoosePokemon
visible = pbFadeOutAndHide(@sprites)
scene = PokemonStorageScene.new
screen = PokemonStorageScreen.new(scene, $PokemonStorage)
pos = screen.pbChoosePokemon
pbRefresh
pbFadeInAndShow(@sprites, visible)
pos = nil
pbFadeOutInWithUpdate(@sprites) do
screen = UI::PokemonStorage.new($PokemonStorage, mode: :choose_pokemon)
screen.main
pos = screen.result
pbRefresh
end
return pos
end
end

View File

@@ -779,6 +779,8 @@ def pbEnterNPCName(helptext, minlength, maxlength, initialText = "", id = 0, nof
return pbEnterText(helptext, minlength, maxlength, initialText, 3, id, nofadeout)
end
# TODO: maxlength for this is 16, so the entry screen should support showing 16
# characters.
def pbEnterBoxName(helptext, minlength, maxlength, initialText = "", nofadeout = false)
return pbEnterText(helptext, minlength, maxlength, initialText, 4, nil, nofadeout)
end