diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-08-11 16:01:38 -0700 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-08-12 08:06:42 -0700 |
commit | 989acbbe810920e303ae248432a735b1a7e9f7d5 (patch) | |
tree | c995d87215b46936a620a99e49c20e6004ba557a /editor | |
parent | 7188cb60127c1f4e900f080adbc47a55645f1645 (diff) |
Uniformize layer names, script methods and documentation
- Back to 1-based layer names to make it clearer in editor UI
- Layer bit accessors are renamed to layer value and 1-based too
- Uniform errors and documentation in render and physics
- Fix a few remaining collision_layer used in place of collision_mask
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_properties.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 789cabea9a..31cfc19e6c 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -837,7 +837,7 @@ public: Vector2 offset; offset.y = rect2.size.y * 0.75; - draw_string(font, rect2.position + offset, itos(layer_index), HALIGN_CENTER, rect2.size.x, -1, on ? text_color_on : text_color); + draw_string(font, rect2.position + offset, itos(layer_index + 1), HALIGN_CENTER, rect2.size.x, -1, on ? text_color_on : text_color); ofs.x += bsize + 1; @@ -993,12 +993,12 @@ void EditorPropertyLayers::setup(LayerType p_layer_type) { for (int i = 0; i < layer_count; i++) { String name; - if (ProjectSettings::get_singleton()->has_setting(basename + vformat("/layer_%d", i))) { - name = ProjectSettings::get_singleton()->get(basename + vformat("/layer_%d", i)); + if (ProjectSettings::get_singleton()->has_setting(basename + vformat("/layer_%d", i + 1))) { + name = ProjectSettings::get_singleton()->get(basename + vformat("/layer_%d", i + 1)); } if (name == "") { - name = vformat(TTR("Layer %d"), i); + name = vformat(TTR("Layer %d"), i + 1); } names.push_back(name); |