I18N: Switch to getting categories by index instead of by string lookup

Also gets rid of the shared_ptr usage, and generally makes things nicer.

Needed for later config refactorings, good to get in early.
This commit is contained in:
Henrik Rydgård committed 2023-04-07 10:35:01 +02:00
1 parent 07b8b6f35a
commit ee6234ecb6
65 files changed
+535 -516

No files matched your search

+3 -3
View File
@@ -35,8 +35,8 @@ void InstallZipScreen::CreateViews() {
File::FileInfo fileInfo;
bool success = File::GetFileInfo(zipPath_, &fileInfo);
auto di = GetI18NCategory("Dialog");
auto iz = GetI18NCategory("InstallZip");
auto di = GetI18NCategory(I18NCat::DIALOG);
auto iz = GetI18NCategory(I18NCat::INSTALLZIP);
Margins actionMenuMargins(0, 100, 15, 0);
@@ -112,7 +112,7 @@ UI::EventReturn InstallZipScreen::OnInstall(UI::EventParams &params) {
}
void InstallZipScreen::update() {
auto iz = GetI18NCategory("InstallZip");
auto iz = GetI18NCategory(I18NCat::INSTALLZIP);
using namespace UI;
if (g_GameManager.GetState() != GameManagerState::IDLE) {