diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index e856d1ea9caf..b0fec00463df 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -619,245 +619,245 @@ Default delay for touch events. This only affects iOS devices. + + Optional name for the 2D physics layer 0. If left empty, the layer will display as "Layer 0". + - Optional name for the 2D physics layer 1. + Optional name for the 2D physics layer 1. If left empty, the layer will display as "Layer 1". - Optional name for the 2D physics layer 10. + Optional name for the 2D physics layer 10. If left empty, the layer will display as "Layer 10". - Optional name for the 2D physics layer 11. + Optional name for the 2D physics layer 11. If left empty, the layer will display as "Layer 11". - Optional name for the 2D physics layer 12. + Optional name for the 2D physics layer 12. If left empty, the layer will display as "Layer 12". - Optional name for the 2D physics layer 13. + Optional name for the 2D physics layer 13. If left empty, the layer will display as "Layer 13". - Optional name for the 2D physics layer 14. + Optional name for the 2D physics layer 14. If left empty, the layer will display as "Layer 14". - Optional name for the 2D physics layer 15. + Optional name for the 2D physics layer 15. If left empty, the layer will display as "Layer 15". - Optional name for the 2D physics layer 16. + Optional name for the 2D physics layer 16. If left empty, the layer will display as "Layer 16". - Optional name for the 2D physics layer 17. + Optional name for the 2D physics layer 17. If left empty, the layer will display as "Layer 17". - Optional name for the 2D physics layer 18. + Optional name for the 2D physics layer 18. If left empty, the layer will display as "Layer 18". - Optional name for the 2D physics layer 19. + Optional name for the 2D physics layer 19. If left empty, the layer will display as "Layer 19". - Optional name for the 2D physics layer 2. - - - Optional name for the 2D physics layer 20. + Optional name for the 2D physics layer 2. If left empty, the layer will display as "Layer 2". - Optional name for the 2D physics layer 3. + Optional name for the 2D physics layer 3. If left empty, the layer will display as "Layer 3". - Optional name for the 2D physics layer 4. + Optional name for the 2D physics layer 4. If left empty, the layer will display as "Layer 4". - Optional name for the 2D physics layer 5. + Optional name for the 2D physics layer 5. If left empty, the layer will display as "Layer 5". - Optional name for the 2D physics layer 6. + Optional name for the 2D physics layer 6. If left empty, the layer will display as "Layer 6". - Optional name for the 2D physics layer 7. + Optional name for the 2D physics layer 7. If left empty, the layer will display as "Layer 7". - Optional name for the 2D physics layer 8. + Optional name for the 2D physics layer 8. If left empty, the layer will display as "Layer 8". - Optional name for the 2D physics layer 9. + Optional name for the 2D physics layer 9. If left empty, the layer will display as "Layer 9". + + + Optional name for the 2D render layer 0. If left empty, the layer will display as "Layer 0". - Optional name for the 2D render layer 1. + Optional name for the 2D render layer 1. If left empty, the layer will display as "Layer 1". - Optional name for the 2D render layer 10. + Optional name for the 2D render layer 10. If left empty, the layer will display as "Layer 10". - Optional name for the 2D render layer 11. + Optional name for the 2D render layer 11. If left empty, the layer will display as "Layer 11". - Optional name for the 2D render layer 12. + Optional name for the 2D render layer 12. If left empty, the layer will display as "Layer 12". - Optional name for the 2D render layer 13. + Optional name for the 2D render layer 13. If left empty, the layer will display as "Layer 13". - Optional name for the 2D render layer 14. + Optional name for the 2D render layer 14. If left empty, the layer will display as "Layer 14". - Optional name for the 2D render layer 15. + Optional name for the 2D render layer 15. If left empty, the layer will display as "Layer 15". - Optional name for the 2D render layer 16. + Optional name for the 2D render layer 16. If left empty, the layer will display as "Layer 16". - Optional name for the 2D render layer 17. + Optional name for the 2D render layer 17. If left empty, the layer will display as "Layer 17". - Optional name for the 2D render layer 18. + Optional name for the 2D render layer 18. If left empty, the layer will display as "Layer 18". - Optional name for the 2D render layer 19. + Optional name for the 2D render layer 19. If left empty, the layer will display as "Layer 19". - Optional name for the 2D render layer 2. - - - Optional name for the 2D render layer 20. + Optional name for the 2D render layer 2. If left empty, the layer will display as "Layer 2". - Optional name for the 2D render layer 3. + Optional name for the 2D render layer 3. If left empty, the layer will display as "Layer 3". - Optional name for the 2D render layer 4. + Optional name for the 2D render layer 4. If left empty, the layer will display as "Layer 4". - Optional name for the 2D render layer 5. + Optional name for the 2D render layer 5. If left empty, the layer will display as "Layer 5". - Optional name for the 2D render layer 6. + Optional name for the 2D render layer 6. If left empty, the layer will display as "Layer 6". - Optional name for the 2D render layer 7. + Optional name for the 2D render layer 7. If left empty, the layer will display as "Layer 7". - Optional name for the 2D render layer 8. + Optional name for the 2D render layer 8. If left empty, the layer will display as "Layer 8". - Optional name for the 2D render layer 9. + Optional name for the 2D render layer 9. If left empty, the layer will display as "Layer 9". + + + Optional name for the 3D physics layer 0. If left empty, the layer will display as "Layer 0". - Optional name for the 3D physics layer 1. + Optional name for the 3D physics layer 1. If left empty, the layer will display as "Layer 1". - Optional name for the 3D physics layer 10. + Optional name for the 3D physics layer 10. If left empty, the layer will display as "Layer 10". - Optional name for the 3D physics layer 11. + Optional name for the 3D physics layer 11. If left empty, the layer will display as "Layer 11". - Optional name for the 3D physics layer 12. + Optional name for the 3D physics layer 12. If left empty, the layer will display as "Layer 12". - Optional name for the 3D physics layer 13. + Optional name for the 3D physics layer 13. If left empty, the layer will display as "Layer 13". - Optional name for the 3D physics layer 14. + Optional name for the 3D physics layer 14. If left empty, the layer will display as "Layer 14". - Optional name for the 3D physics layer 15. + Optional name for the 3D physics layer 15. If left empty, the layer will display as "Layer 15". - Optional name for the 3D physics layer 16. + Optional name for the 3D physics layer 16. If left empty, the layer will display as "Layer 16". - Optional name for the 3D physics layer 17. + Optional name for the 3D physics layer 17. If left empty, the layer will display as "Layer 17". - Optional name for the 3D physics layer 18. + Optional name for the 3D physics layer 18. If left empty, the layer will display as "Layer 18". - Optional name for the 3D physics layer 19. + Optional name for the 3D physics layer 19. If left empty, the layer will display as "Layer 19". - Optional name for the 3D physics layer 2. - - - Optional name for the 3D physics layer 20. + Optional name for the 3D physics layer 2. If left empty, the layer will display as "Layer 2". - Optional name for the 3D physics layer 3. + Optional name for the 3D physics layer 3. If left empty, the layer will display as "Layer 3". - Optional name for the 3D physics layer 4. + Optional name for the 3D physics layer 4. If left empty, the layer will display as "Layer 4". - Optional name for the 3D physics layer 5. + Optional name for the 3D physics layer 5. If left empty, the layer will display as "Layer 5". - Optional name for the 3D physics layer 6. + Optional name for the 3D physics layer 6. If left empty, the layer will display as "Layer 6". - Optional name for the 3D physics layer 7. + Optional name for the 3D physics layer 7. If left empty, the layer will display as "Layer 7". - Optional name for the 3D physics layer 8. + Optional name for the 3D physics layer 8. If left empty, the layer will display as "Layer 8". - Optional name for the 3D physics layer 9. + Optional name for the 3D physics layer 9. If left empty, the layer will display as "Layer 9". + + + Optional name for the 2D render layer 0. If left empty, the layer will display as "Layer 0". - Optional name for the 3D render layer 1. + Optional name for the 3D render layer 1. If left empty, the layer will display as "Layer 1". - Optional name for the 3D render layer 10. + Optional name for the 3D render layer 10. If left empty, the layer will display as "Layer 10". - Optional name for the 3D render layer 11. + Optional name for the 3D render layer 11. If left empty, the layer will display as "Layer 11". - Optional name for the 3D render layer 12. + Optional name for the 3D render layer 12. If left empty, the layer will display as "Layer 12". - Optional name for the 3D render layer 13. + Optional name for the 3D render layer 13. If left empty, the layer will display as "Layer 13". - Optional name for the 3D render layer 14 + Optional name for the 3D render layer 14. If left empty, the layer will display as "Layer 14" - Optional name for the 3D render layer 15. + Optional name for the 3D render layer 15. If left empty, the layer will display as "Layer 15". - Optional name for the 3D render layer 16. + Optional name for the 3D render layer 16. If left empty, the layer will display as "Layer 16". - Optional name for the 3D render layer 17. + Optional name for the 3D render layer 17. If left empty, the layer will display as "Layer 17". - Optional name for the 3D render layer 18. + Optional name for the 3D render layer 18. If left empty, the layer will display as "Layer 18". - Optional name for the 3D render layer 19. + Optional name for the 3D render layer 19. If left empty, the layer will display as "Layer 19". - Optional name for the 3D render layer 2. - - - Optional name for the 3D render layer 20. + Optional name for the 3D render layer 2. If left empty, the layer will display as "Layer 2". - Optional name for the 3D render layer 3. + Optional name for the 3D render layer 3. If left empty, the layer will display as "Layer 3". - Optional name for the 3D render layer 4. + Optional name for the 3D render layer 4. If left empty, the layer will display as "Layer 4". - Optional name for the 3D render layer 5. + Optional name for the 3D render layer 5. If left empty, the layer will display as "Layer 5". - Optional name for the 3D render layer 6. + Optional name for the 3D render layer 6. If left empty, the layer will display as "Layer 6". - Optional name for the 3D render layer 7. + Optional name for the 3D render layer 7. If left empty, the layer will display as "Layer 7". - Optional name for the 3D render layer 8. + Optional name for the 3D render layer 8. If left empty, the layer will display as "Layer 8". - Optional name for the 3D render layer 9. + Optional name for the 3D render layer 9. If left empty, the layer will display as "Layer 9". The locale to fall back to if a translation isn't available in a given language. If left empty, [code]en[/code] (English) will be used. diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 9c27b50a9ab1..8ba9fb6e3c15 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -725,12 +725,12 @@ void EditorPropertyLayers::setup(LayerType p_layer_type) { for (int i = 0; i < 20; i++) { String name; - if (ProjectSettings::get_singleton()->has_setting(basename + "/layer_" + itos(i + 1))) { - name = ProjectSettings::get_singleton()->get(basename + "/layer_" + itos(i + 1)); + if (ProjectSettings::get_singleton()->has_setting(basename + vformat("/layer_%d", i))) { + name = ProjectSettings::get_singleton()->get(basename + vformat("/layer_%d", i)); } if (name == "") { - name = TTR("Layer") + " " + itos(i + 1); + name = vformat(TTR("Layer %d"), i); } names.push_back(name); diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 30077aa6429b..bedbab6d4f86 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -936,10 +936,10 @@ void register_scene_types() { OS::get_singleton()->yield(); //may take time to init for (int i = 0; i < 20; i++) { - GLOBAL_DEF("layer_names/2d_render/layer_" + itos(i + 1), ""); - GLOBAL_DEF("layer_names/2d_physics/layer_" + itos(i + 1), ""); - GLOBAL_DEF("layer_names/3d_render/layer_" + itos(i + 1), ""); - GLOBAL_DEF("layer_names/3d_physics/layer_" + itos(i + 1), ""); + GLOBAL_DEF(vformat("layer_names/2d_render/layer_%d", i), ""); + GLOBAL_DEF(vformat("layer_names/2d_physics/layer_%d", i), ""); + GLOBAL_DEF(vformat("layer_names/3d_render/layer_%d", i), ""); + GLOBAL_DEF(vformat("layer_names/3d_physics/layer_%d", i), ""); } bool default_theme_hidpi = GLOBAL_DEF("gui/theme/use_hidpi", false);