Fix menu option, show textbox when save failed

In my last commit, I accidentally inverted whether the description says
ON or OFF.
This commit is contained in:
NyakoFox
2024-09-26 13:32:46 -03:00
committed by Misa Elizabeth Kai
parent e58fd606cf
commit 41d5e688e9
5 changed files with 23 additions and 7 deletions

View File

@@ -828,7 +828,7 @@ static void savetele_textbox_success(textboxclass* THIS)
THIS->pad(3, 3);
}
static void savetele_textbox_fail(textboxclass* THIS)
static void save_textbox_fail(textboxclass* THIS)
{
THIS->lines.clear();
THIS->lines.push_back(loc::gettext("ERROR: Could not save game!"));
@@ -836,6 +836,15 @@ static void savetele_textbox_fail(textboxclass* THIS)
THIS->pad(1, 1);
}
void Game::show_save_fail(void)
{
graphics.createtextboxflipme("", -1, 12, TEXT_COLOUR("red"));
graphics.textboxprintflags(PR_FONT_INTERFACE);
graphics.textboxcenterx();
graphics.textboxtimer(50);
graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, save_textbox_fail);
}
void Game::savetele_textbox(void)
{
if (inspecial() || map.custommode)
@@ -853,11 +862,7 @@ void Game::savetele_textbox(void)
}
else
{
graphics.createtextboxflipme("", -1, 12, TEXT_COLOUR("red"));
graphics.textboxprintflags(PR_FONT_INTERFACE);
graphics.textboxcenterx();
graphics.textboxtimer(50);
graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, savetele_textbox_fail);
show_save_fail();
}
graphics.textboxapplyposition();
}