- 5
- Posts
- 2
- Years
- Seen Sep 3, 2022
So currently I'm trying to re-position the rental Pokemon text, as it is about 5-10 pixels too high and gets cut off. I believe the correct script is
and I understand the following:
this sets the text window sprites
and this sets the rental pokemon. I tried setting the y-positions on the @sprites but it moves an entire window sprite. How would I do just the text?
Code:
UI_BattleSwap
Code:
def pbStartRentScene(rentals)
@rentals = rentals
@mode = 0 # rental (pick 3 out of 6 initial Pokémon)
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@viewport.z = 99999
@sprites = {}
addBackgroundPlane(@sprites, "bg", "rentbg", @viewport)
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
_INTL("RENTAL POKéMON"), 0, 0, Graphics.width, 64, @viewport
)
@sprites["list"] = Window_AdvancedCommandPokemonEx.newWithSize(
[], 0, 64, Graphics.width, Graphics.height - 128, @viewport
)
@sprites["help"] = Window_UnformattedTextPokemon.newWithSize(
"", 0, Graphics.height - 64, Graphics.width, 64, @viewport
)
@sprites["msgwindow"] = Window_AdvancedTextPokemon.newWithSize(
"", 0, Graphics.height - 64, Graphics.height, 64, @viewport
)
@sprites["msgwindow"].visible = false
pbUpdateChoices([])
pbDeactivateWindows(@sprites)
pbFadeInAndShow(@sprites) { pbUpdate }
end
this sets the text window sprites
Code:
def pbGetCommands(list, choices)
commands = []
list.length.times do |i|
pkmn = list[i]
category = pkmn.species_data.category
cmd = _INTL("{1} - {2} Pokémon", pkmn.speciesName, category)
cmd = "<c3=E82010,F8A8B8>" + cmd if choices.include?(i) # Red text
commands.push(cmd)
end
return commands
end
and this sets the rental pokemon. I tried setting the y-positions on the @sprites but it moves an entire window sprite. How would I do just the text?