You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
GDExtension: add an interface for loading extra documentation
Adds two new GDExtension interface methods: - `editor_help_load_xml_from_utf8_chars` - `editor_help_load_xml_from_utf8_chars_and_len` Both of these methods parse the XML passed into an extra documentation container which, when needed, is merged into the main doc container. Co-Authored-By: Rémi Verschelde <rverschelde@gmail.com>
This commit is contained in:
@@ -1652,3 +1652,15 @@ Error DocTools::load_compressed(const uint8_t *p_data, int p_compressed_size, in
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
Error DocTools::load_xml(const uint8_t *p_data, int p_size) {
|
||||
Ref<XMLParser> parser = memnew(XMLParser);
|
||||
Error err = parser->_open_buffer(p_data, p_size);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
|
||||
_load(parser);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user