Rewrote summary screen code

This commit is contained in:
Maruno17
2024-08-24 17:00:06 +01:00
parent 2c6fe70f0c
commit 45127be5b6
13 changed files with 1446 additions and 73 deletions

View File

@@ -702,9 +702,7 @@ class PokemonParty_Scene
def pbSummary(pkmnid, inbattle = false)
oldsprites = pbFadeOutAndHide(@sprites)
scene = PokemonSummary_Scene.new
screen = PokemonSummaryScreen.new(scene, inbattle)
screen.pbStartScreen(@party, pkmnid)
UI::PokemonSummary.new(@party, pkmnid)
yield if block_given?
pbRefresh
pbFadeInAndShow(@sprites, oldsprites)

File diff suppressed because it is too large Load Diff

View File

@@ -1246,16 +1246,16 @@ class PokemonStorageScene
def pbSummary(selected, heldpoke)
oldsprites = pbFadeOutAndHide(@sprites)
scene = PokemonSummary_Scene.new
screen = PokemonSummaryScreen.new(scene)
if heldpoke
screen.pbStartScreen([heldpoke], 0)
UI::PokemonSummary.new(heldpoke)
elsif selected[0] == -1
@selection = screen.pbStartScreen(@storage.party, selected[1])
screen = UI::PokemonSummary.new(@storage.party, selected[1])
@selection = screen.result
pbPartySetArrow(@sprites["arrow"], @selection)
pbUpdateOverlay(@selection, @storage.party)
else
@selection = screen.pbStartScreen(@storage.boxes[selected[0]], selected[1])
screen = UI::PokemonSummary.new(@storage.boxes[selected[0]], selected[1])
@selection = screen.result
pbSetArrow(@sprites["arrow"], @selection)
pbUpdateOverlay(@selection)
end

View File

@@ -95,7 +95,7 @@ class MoveRelearner_Scene
textpos.push([accuracy == 0 ? "---" : "#{accuracy}%", 468, 184, :center,
Color.new(64, 64, 64), Color.new(176, 176, 176)])
pbDrawTextPositions(overlay, textpos)
imagepos.push(["Graphics/UI/category", 436, 116, 0, category * CATEGORY_ICON_SIZE[1], *CATEGORY_ICON_SIZE])
imagepos.push(["Graphics/UI/category", 436, 116, 0, category * GameData::Move::CATEGORY_ICON_SIZE[1], *GameData::Move::CATEGORY_ICON_SIZE])
if @sprites["commands"].index < @moves.length - 1
imagepos.push(["Graphics/UI/Move Reminder/buttons", 48, 350, 0, 0, 76, 32])
end

View File

@@ -1232,9 +1232,7 @@ class PurifyChamberScene
def pbSummary(pos, heldpkmn)
if heldpkmn
oldsprites = pbFadeOutAndHide(@sprites)
scene = PokemonSummary_Scene.new
screen = PokemonSummaryScreen.new(scene)
screen.pbStartScreen([heldpkmn], 0)
UI::PokemonSummary.new(heldpkmn)
pbFadeInAndShow(@sprites, oldsprites)
return
end
@@ -1251,9 +1249,8 @@ class PurifyChamberScene
end
return if party.length == 0
oldsprites = pbFadeOutAndHide(@sprites)
scene = PokemonSummary_Scene.new
screen = PokemonSummaryScreen.new(scene)
selection = screen.pbStartScreen(party, startindex)
screen = UI::PokemonSummary.new(party, startindex)
selection = screen.result
@sprites["setview"].cursor = indexes[selection]
pbFadeInAndShow(@sprites, oldsprites)
end