1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

Add setting to opt-out of capitalization in the property inspector

This commit is contained in:
Pedro J. Estébanez
2017-04-26 13:41:41 +02:00
parent fce779a4ef
commit 7b315dc666
5 changed files with 14 additions and 8 deletions

View File

@@ -2764,10 +2764,7 @@ TreeItem *PropertyEditor::get_parent_node(String p_path, HashMap<String, TreeIte
item = tree->create_item(parent);
String name = (p_path.find("/") != -1) ? p_path.right(p_path.find_last("/") + 1) : p_path;
if (capitalize_paths)
item->set_text(0, name.capitalize());
else
item->set_text(0, name);
item->set_text(0, capitalize_paths ? name.capitalize() : name);
item->set_tooltip(0, p_path);
if (item->get_parent() != root) {
item->set_icon(0, get_icon("Folder", "EditorIcons"));
@@ -4287,9 +4284,15 @@ String PropertyEditor::get_selected_path() const {
return "";
}
void PropertyEditor::set_capitalize_paths(bool p_capitalize) {
bool PropertyEditor::is_capitalize_paths_enabled() const {
return capitalize_paths;
}
void PropertyEditor::set_enable_capitalize_paths(bool p_capitalize) {
capitalize_paths = p_capitalize;
update_tree_pending = true;
}
void PropertyEditor::set_autoclear(bool p_enable) {