summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-02-25 09:31:47 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-02-25 09:31:47 -0300
commitb2ce682f6ed9493423be257a5b2e87126692a94f (patch)
tree705a351239b0f87c0e7166c5948716a054ca98d8 /tools
parent06e358199f0c038e781753001d9292349f2040ad (diff)
-scripts are converted to bytecode on export
-fix bug in doc where touchscreen events were not documented
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/editor_node.cpp9
-rw-r--r--tools/editor/editor_node.h8
-rw-r--r--tools/editor/editor_settings.cpp2
-rw-r--r--tools/editor/io_plugins/editor_font_import_plugin.cpp7
4 files changed, 24 insertions, 2 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index ae350e3b99..2f7b6759b9 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -3058,6 +3058,12 @@ void EditorNode::register_editor_types() {
// ObjectTypeDB::register_type<EditorPostImport>();
}
+void EditorNode::unregister_editor_types() {
+
+ _init_callbacks.clear();
+}
+
+
void EditorNode::stop_child_process() {
_menu_option_confirm(RUN_STOP,false);
@@ -3193,6 +3199,7 @@ void EditorNode::_file_dialog_unregister(FileDialog *p_dialog){
singleton->file_dialogs.erase(p_dialog);
}
+Vector<EditorNodeInitCallback> EditorNode::_init_callbacks;
Error EditorNode::export_platform(const String& p_platform, const String& p_path, bool p_debug,const String& p_password,bool p_quit_after) {
@@ -4155,6 +4162,8 @@ EditorNode::EditorNode() {
// Ref<ImageTexture> it = gui_base->get_icon("logo","Icons");
// OS::get_singleton()->set_icon( it->get_data() );
+ for(int i=0;i<_init_callbacks.size();i++)
+ _init_callbacks[i]();
}
diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h
index 30504aa08e..87f17247c3 100644
--- a/tools/editor/editor_node.h
+++ b/tools/editor/editor_node.h
@@ -91,6 +91,9 @@
+
+typedef void (*EditorNodeInitCallback)();
+
class EditorNode : public Node {
OBJ_TYPE( EditorNode, Node );
@@ -393,6 +396,8 @@ class EditorNode : public Node {
static EditorNode *singleton;
+ static Vector<EditorNodeInitCallback> _init_callbacks;
+
protected:
void _notification(int p_what);
static void _bind_methods();
@@ -463,6 +468,7 @@ public:
Error export_platform(const String& p_platform, const String& p_path, bool p_debug,const String& p_password,bool p_quit_after=false);
static void register_editor_types();
+ static void unregister_editor_types();
Control *get_gui_base() { return gui_base; }
@@ -481,6 +487,8 @@ public:
~EditorNode();
void get_singleton(const char* arg1, bool arg2);
+ static void add_init_callback(EditorNodeInitCallback p_callback) { _init_callbacks.push_back(p_callback); }
+
};
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp
index 53b5a8a47d..09d55650c8 100644
--- a/tools/editor/editor_settings.cpp
+++ b/tools/editor/editor_settings.cpp
@@ -413,7 +413,7 @@ void EditorSettings::_load_defaults() {
set("on_save/compress_binary_resources",true);
set("on_save/save_modified_external_resources",true);
set("on_save/save_paths_as_relative",false);
- set("on_save/save_paths_without_extension",true);
+ set("on_save/save_paths_without_extension",false);
set("text_editor/create_signal_callbacks",true);
diff --git a/tools/editor/io_plugins/editor_font_import_plugin.cpp b/tools/editor/io_plugins/editor_font_import_plugin.cpp
index 7c38b105fd..4de68c7f4c 100644
--- a/tools/editor/io_plugins/editor_font_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_font_import_plugin.cpp
@@ -884,15 +884,20 @@ Ref<Font> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMetadata
++missing;
};
};
- printf("total %i/%i\n", missing, import_chars.size());
+ print_line("total_chars: "+itos(font_data_list.size()));
/* KERNING */
for(int i=0;i<font_data_list.size();i++) {
+ if (font_data_list[i]->character>512)
+ continue;
for(int j=0;j<font_data_list.size();j++) {
+ if (font_data_list[j]->character>512)
+ continue;
+
FT_Vector delta;
FT_Get_Kerning( face, font_data_list[i]->glyph,font_data_list[j]->glyph, FT_KERNING_DEFAULT, &delta );