diff options
| author | Ignacio Etcheverry | 2017-09-02 21:52:45 +0200 |
|---|---|---|
| committer | Ignacio Etcheverry | 2017-09-02 21:52:45 +0200 |
| commit | 65509298306628bbbdd3caacb6a0ce5899fe147a (patch) | |
| tree | 483a062babd432753d8beea1fc8ae32fe3d6bab1 /editor/doc/doc_data.cpp | |
| parent | 0b747c29106e0e02f8c9b674cde418a7d270d987 (diff) | |
| download | godot-65509298306628bbbdd3caacb6a0ce5899fe147a.tar.gz godot-65509298306628bbbdd3caacb6a0ce5899fe147a.tar.zst godot-65509298306628bbbdd3caacb6a0ce5899fe147a.zip | |
Diffstat (limited to 'editor/doc/doc_data.cpp')
| -rw-r--r-- | editor/doc/doc_data.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp index 5975e5435..6848c43b6 100644 --- a/editor/doc/doc_data.cpp +++ b/editor/doc/doc_data.cpp @@ -634,6 +634,9 @@ static Error _parse_methods(Ref<XMLParser> &parser, Vector<DocData::MethodDoc> & ERR_FAIL_COND_V(!parser->has_attribute("type"), ERR_FILE_CORRUPT); method.return_type = parser->get_attribute_value("type"); + if (parser->has_attribute("enum")) { + method.return_enum = parser->get_attribute_value("enum"); + } } else if (name == "argument") { DocData::ArgumentDoc argument; @@ -916,7 +919,11 @@ Error DocData::save(const String &p_path) { if (m.return_type != "") { - _write_string(f, 3, "<return type=\"" + m.return_type + "\">"); + String enum_text; + if (m.return_enum != String()) { + enum_text = " enum=\"" + m.return_enum + "\""; + } + _write_string(f, 3, "<return type=\"" + m.return_type + "\"" + enum_text + ">"); _write_string(f, 3, "</return>"); } |
