You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
[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).
This commit is contained in:
32
platform/javascript/api/javascript_tools_editor_plugin.h
Normal file
32
platform/javascript/api/javascript_tools_editor_plugin.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user