fixed navigation buttons on evo page not showing when switching from cry screen, thanks to @AsparagusEduardo for pointing it out

This commit is contained in:
TheXaman 2021-06-19 11:45:15 +02:00
parent 3c22d55130
commit a83ece83cd

View File

@ -7325,25 +7325,24 @@ static void EvoFormsPage_PrintAToggleUpdownEvos(void)
{
u8 x = 9;
u8 y = 0;
#ifdef POKEMON_EXPANSION
if (sPokedexView->selectedScreen == EVO_SCREEN)
{
if (!HGSS_DECAPPED)
AddTextPrinterParameterized3(WIN_NAVIGATION_BUTTONS, 0, x+9, y, sStatsPageNavigationTextColor, 0, gText_EVO_Buttons_PE);
else
AddTextPrinterParameterized3(WIN_NAVIGATION_BUTTONS, 0, x+9, y, sStatsPageNavigationTextColor, 0, gText_EVO_Buttons_Decapped_PE);
}
else if (sPokedexView->selectedScreen == FORMS_SCREEN)
{
if (!HGSS_DECAPPED)
AddTextPrinterParameterized3(WIN_NAVIGATION_BUTTONS, 0, x, y, sStatsPageNavigationTextColor, 0, gText_FORMS_Buttons_PE);
else
AddTextPrinterParameterized3(WIN_NAVIGATION_BUTTONS, 0, x, y, sStatsPageNavigationTextColor, 0, gText_FORMS_Buttons_Decapped_PE);
}
// DrawKeypadIcon(WIN_NAVIGATION_BUTTONS, 10, 5, 0); //(u8 windowId, u8 keypadIconId, u16 x, u16 y)
PutWindowTilemap(WIN_NAVIGATION_BUTTONS);
CopyWindowToVram(WIN_NAVIGATION_BUTTONS, 3);
#endif
if (sPokedexView->selectedScreen == EVO_SCREEN)
{
if (!HGSS_DECAPPED)
AddTextPrinterParameterized3(WIN_NAVIGATION_BUTTONS, 0, x+9, y, sStatsPageNavigationTextColor, 0, gText_EVO_Buttons_PE);
else
AddTextPrinterParameterized3(WIN_NAVIGATION_BUTTONS, 0, x+9, y, sStatsPageNavigationTextColor, 0, gText_EVO_Buttons_Decapped_PE);
}
else if (sPokedexView->selectedScreen == FORMS_SCREEN)
{
if (!HGSS_DECAPPED)
AddTextPrinterParameterized3(WIN_NAVIGATION_BUTTONS, 0, x, y, sStatsPageNavigationTextColor, 0, gText_FORMS_Buttons_PE);
else
AddTextPrinterParameterized3(WIN_NAVIGATION_BUTTONS, 0, x, y, sStatsPageNavigationTextColor, 0, gText_FORMS_Buttons_Decapped_PE);
}
// DrawKeypadIcon(WIN_NAVIGATION_BUTTONS, 10, 5, 0); //(u8 windowId, u8 keypadIconId, u16 x, u16 y)
PutWindowTilemap(WIN_NAVIGATION_BUTTONS);
CopyWindowToVram(WIN_NAVIGATION_BUTTONS, 3);
}
static void Task_LoadEvolutionScreen(u8 taskId)
{
@ -7388,6 +7387,7 @@ static void Task_LoadEvolutionScreen(u8 taskId)
case 3:
if (gTasks[taskId].data[1] == 0)
{
sPokedexView->selectedScreen = EVO_SCREEN;
//Icon
FreeMonIconPalettes(); //Free space for new pallete
LoadMonIconPalette(NationalPokedexNumToSpecies(sPokedexListItem->dexNum)); //Loads pallete for current mon
@ -7396,9 +7396,9 @@ static void Task_LoadEvolutionScreen(u8 taskId)
#endif
#ifdef POKEMON_EXPANSION
gTasks[taskId].data[4] = CreateMonIcon(NationalPokedexNumToSpecies(sPokedexListItem->dexNum), SpriteCB_MonIcon, 18, 31, 4, 0); //Create pokemon sprite
EvoFormsPage_PrintAToggleUpdownEvos(); //HGSS_Ui Navigation buttons
#endif
gSprites[gTasks[taskId].data[4]].oam.priority = 0;
EvoFormsPage_PrintAToggleUpdownEvos(); //HGSS_Ui Navigation buttons
}
gMain.state++;
break;