Also check font textures for new languages
This commit is contained in:
parent
0eb1913713
commit
d460c3863e
@ -120,9 +120,9 @@ void LangJapSelect(int8 action)
|
|||||||
void
|
void
|
||||||
CustomFrontendOptionsPopulate(void)
|
CustomFrontendOptionsPopulate(void)
|
||||||
{
|
{
|
||||||
// Moved to an array in MenuScreensCustom.cpp, but APIs are still available. see frontendoption.h
|
// Most of custom options are done statically in MenuScreensCustom.cpp, we add them here only if they're dependent to extra files
|
||||||
|
|
||||||
// These work only if we have neo folder, so they're dynamically added
|
// These work only if we have neo folder
|
||||||
int fd;
|
int fd;
|
||||||
#ifdef EXTENDED_PIPELINES
|
#ifdef EXTENDED_PIPELINES
|
||||||
const char *vehPipelineNames[] = { "FED_MFX", "FED_NEO" };
|
const char *vehPipelineNames[] = { "FED_MFX", "FED_NEO" };
|
||||||
@ -148,22 +148,29 @@ CustomFrontendOptionsPopulate(void)
|
|||||||
|
|
||||||
// Add outsourced language translations, if files are found
|
// Add outsourced language translations, if files are found
|
||||||
#ifdef MORE_LANGUAGES
|
#ifdef MORE_LANGUAGES
|
||||||
|
int fd2;
|
||||||
FrontendOptionSetCursor(MENUPAGE_LANGUAGE_SETTINGS, 5, false);
|
FrontendOptionSetCursor(MENUPAGE_LANGUAGE_SETTINGS, 5, false);
|
||||||
fd = CFileMgr::OpenFile("text/polish.gxt","r");
|
if (fd = CFileMgr::OpenFile("text/polish.gxt","r")) {
|
||||||
if (fd) {
|
if (fd2 = CFileMgr::OpenFile("models/fonts_p.txd","r")) {
|
||||||
FrontendOptionAddDynamic("FEL_POL", nil, nil, LangPolSelect, nil, nil);
|
FrontendOptionAddDynamic("FEL_POL", nil, nil, LangPolSelect, nil, nil);
|
||||||
|
CFileMgr::CloseFile(fd2);
|
||||||
|
}
|
||||||
CFileMgr::CloseFile(fd);
|
CFileMgr::CloseFile(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
fd = CFileMgr::OpenFile("text/russian.gxt","r");
|
if (fd = CFileMgr::OpenFile("text/russian.gxt","r")) {
|
||||||
if (fd) {
|
if (fd2 = CFileMgr::OpenFile("models/fonts_r.txd","r")) {
|
||||||
FrontendOptionAddDynamic("FEL_RUS", nil, nil, LangRusSelect, nil, nil);
|
FrontendOptionAddDynamic("FEL_RUS", nil, nil, LangRusSelect, nil, nil);
|
||||||
|
CFileMgr::CloseFile(fd2);
|
||||||
|
}
|
||||||
CFileMgr::CloseFile(fd);
|
CFileMgr::CloseFile(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
fd = CFileMgr::OpenFile("text/japanese.gxt","r");
|
if (fd = CFileMgr::OpenFile("text/japanese.gxt","r")) {
|
||||||
if (fd) {
|
if (fd2 = CFileMgr::OpenFile("models/fonts_j.txd","r")) {
|
||||||
FrontendOptionAddDynamic("FEL_JAP", nil, nil, LangJapSelect, nil, nil);
|
FrontendOptionAddDynamic("FEL_JAP", nil, nil, LangJapSelect, nil, nil);
|
||||||
|
CFileMgr::CloseFile(fd2);
|
||||||
|
}
|
||||||
CFileMgr::CloseFile(fd);
|
CFileMgr::CloseFile(fd);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user