minor change: update authentication messagebox options to include 'Remove' and handle profile removal

This commit is contained in:
Matthew Toro 2026-04-04 22:35:07 -04:00
parent 7d8163539c
commit 7b6342591c

View file

@ -524,7 +524,7 @@ void UIScene_MainMenu::ShowAuthMenu(int iPad, void *pClass)
s_authPad = iPad;
s_authParam = pClass;
static const wchar_t *authOptions[] = { L"Next", L"Use", L"Add", L"Back" };
static const wchar_t *authOptions[] = { L"Next", L"Use", L"Add", L"Remove" };
ShowAuthMessageBox(iPad, L"Authentication", BuildAuthProfileText(),
authOptions, 4, &UIScene_MainMenu::AuthMenuReturned, pClass, true);
}
@ -565,6 +565,16 @@ int UIScene_MainMenu::AuthMenuReturned(LPVOID lpParam, int iPad, const C4JStorag
ShowAuthAddMenu(iPad, lpParam);
break;
}
case C4JStorage::EMessage_ResultFourthOption:
{
if (!profiles.empty())
{
AuthProfileManager::removeSelectedProfile();
if (auto *scene = ui.FindScene(eUIScene_MessageBox))
static_cast<UIScene_MessageBox *>(scene)->updateContent(BuildAuthProfileText());
}
return 0;
}
default:
{
ui.NavigateBack(iPad);