mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Add dedicated macros for property name extraction
* Replace case-by-case extraction with PNAME & GNAME * Fix group handling when group hint begins with property name * Exclude properties that are PROPERTY_USAGE_NOEDITOR
This commit is contained in:
parent
d8650fb182
commit
b657d0c76c
23 changed files with 211 additions and 190 deletions
|
@ -187,9 +187,9 @@ static const char *SPLASH_CONFIG_PATH = "res://android/build/res/drawable/splash
|
|||
static const char *GDNATIVE_LIBS_PATH = "res://android/build/libs/gdnativelibs.json";
|
||||
|
||||
static const int icon_densities_count = 6;
|
||||
static const char *launcher_icon_option = "launcher_icons/main_192x192";
|
||||
static const char *launcher_adaptive_icon_foreground_option = "launcher_icons/adaptive_foreground_432x432";
|
||||
static const char *launcher_adaptive_icon_background_option = "launcher_icons/adaptive_background_432x432";
|
||||
static const char *launcher_icon_option = PNAME("launcher_icons/main_192x192");
|
||||
static const char *launcher_adaptive_icon_foreground_option = PNAME("launcher_icons/adaptive_foreground_432x432");
|
||||
static const char *launcher_adaptive_icon_background_option = PNAME("launcher_icons/adaptive_background_432x432");
|
||||
|
||||
static const LauncherIcon launcher_icons[icon_densities_count] = {
|
||||
{ "res/mipmap-xxxhdpi-v4/icon.png", 192 },
|
||||
|
@ -1701,7 +1701,7 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
|
|||
Vector<PluginConfigAndroid> plugins_configs = get_plugins();
|
||||
for (int i = 0; i < plugins_configs.size(); i++) {
|
||||
print_verbose("Found Android plugin " + plugins_configs[i].name);
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "plugins/" + plugins_configs[i].name), false));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, vformat("%s/%s", PNAME("plugins"), plugins_configs[i].name)), false));
|
||||
}
|
||||
plugins_changed.clear();
|
||||
|
||||
|
@ -1709,7 +1709,7 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
|
|||
for (int i = 0; i < abis.size(); ++i) {
|
||||
String abi = abis[i];
|
||||
bool is_default = (abi == "armeabi-v7a" || abi == "arm64-v8a");
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "architectures/" + abi), is_default));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, vformat("%s/%s", PNAME("architectures"), abi)), is_default));
|
||||
}
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/debug", PROPERTY_HINT_GLOBAL_FILE, "*.keystore,*.jks"), ""));
|
||||
|
@ -1762,7 +1762,7 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
|
|||
|
||||
const char **perms = android_perms;
|
||||
while (*perms) {
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "permissions/" + String(*perms).to_lower()), false));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, vformat("%s/%s", PNAME("permissions"), String(*perms).to_lower())), false));
|
||||
perms++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue