Well, there's a few steps to it. The sprites and the text boxes are displayed in the class PokemonLoadScene (although the text itself is chosen elsewhere). What I did was create the def pbSetParty in that class, with a parameter of "trainer", and called it immediately after pbSetAuxiliaryWindow is called. The party is trainer.party, which is why "trainer" is a parameter - it wouldn't otherwise be accessible in pbSetParty.
You'll need to change the viewport's z to 99998, so that the Pokémon appear above the windows. The Pokémon icons themselves are instances of PokemonIconSprite, with a z of 99999.
That's a rough guide. If you know what you're doing, that should be enough of an explanation.