godot/platform/javascript/api/javascript_tools_editor_plugin.h
Fabio Alessandrelli 55f04952c5 [HTML5] Add JavaScriptToolsEditorPlugin.
A new editor plugin, specific to HTML5, that provide some extra features
needed to make the editor usable on that platform.

For now, it adds a "Download project sources" option in the "Tool" menu,
so the user can download the work done as a zip file (from the browser
storage).
2020-10-14 11:20:20 +02:00

32 lines
766 B
C++

#ifndef JAVASCRIPT_TOOLS_EDITOR_PLUGIN_H
#define JAVASCRIPT_TOOLS_EDITOR_PLUGIN_H
#if defined(TOOLS_ENABLED) && defined(JAVASCRIPT_ENABLED)
#include "core/io/zip_io.h"
#include "editor/editor_plugin.h"
class JavaScriptToolsEditorPlugin : public EditorPlugin {
GDCLASS(JavaScriptToolsEditorPlugin, EditorPlugin);
private:
void _zip_file(String p_path, String p_base_path, zipFile p_zip);
void _zip_recursive(String p_path, String p_base_path, zipFile p_zip);
protected:
static void _bind_methods();
void _downalod_zip(Variant p_v);
public:
static void initialize();
JavaScriptToolsEditorPlugin(EditorNode *p_editor);
};
#else
class JavaScriptToolsEditorPlugin {
public:
static void initialize() {}
};
#endif
#endif // JAVASCRIPT_TOOLS_EDITOR_PLUGIN_H