Use language.iscustom

This commit is contained in:
fed 2023-02-24 20:14:44 +01:00
parent 541b1b2059
commit fe9e7889f8
4 changed files with 8 additions and 1 deletions

View File

@ -83,7 +83,7 @@ LUI.MenuBuilder.registerType("choose_language_menu", function(a1)
LUI.Options.AddOptionTextInfo(menu)
if language.isnonlatin() and config.get("language") ~= "czech" then
if (language.isnonlatin() and not language.iscustom()) then
if (config.get("disable_custom_fonts")) then
menu:AddHelp({
name = "add_button_helper_text",

View File

@ -125,6 +125,11 @@ namespace language
return asian_languages.contains(current());
}
bool is_custom()
{
return custom_languages.contains(current());
}
void set(const std::string& lang)
{
config::set("language", lang);

View File

@ -16,4 +16,5 @@ namespace language
bool is_slavic();
bool is_arabic();
bool is_asian();
bool is_custom();
}

View File

@ -239,6 +239,7 @@ namespace ui_scripting
language_table["isslavic"] = language::is_slavic;
language_table["isarabic"] = language::is_arabic;
language_table["isasian"] = language::is_asian;
language_table["iscustom"] = language::is_custom;
lua["language"] = language_table;