diff options
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r-- | editor/editor_properties.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 1c1d72e7d1..5f1e7273e5 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -72,6 +72,10 @@ void EditorPropertyText::update_property() { updating = false; } +void EditorPropertyText::set_placeholder(const String &p_string) { + text->set_placeholder(p_string); +} + void EditorPropertyText::_bind_methods() { ClassDB::bind_method(D_METHOD("_text_changed", "txt"), &EditorPropertyText::_text_changed); @@ -2783,6 +2787,9 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ } else { EditorPropertyText *editor = memnew(EditorPropertyText); + if (p_hint == PROPERTY_HINT_PLACEHOLDER_TEXT) { + editor->set_placeholder(p_hint_text); + } add_property_editor(p_path, editor); } } break; |