diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-02-13 18:03:28 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-02-13 18:03:28 -0300 |
commit | 58cda02a389759d18176216c06f375d364cefef1 (patch) | |
tree | 4102902585d12ea6807ceaee1370136d29b601e1 /tools/editor/editor_node.cpp | |
parent | 1adc330b68b1f6ca18aac05daf88c7d4d757fd0a (diff) |
-fixed export templates not loading/exporting on Windows
-fixed TouchScreenButton with stretch2d
-fixed(?) OSX crash on startup (test!!)
-compilation fixes on windows
-CollisionPolygon editor works again
-find buttons en find dialog
-TileMap editor cleanup (removed "error", made nicer)
-viewport flicker fixed
-make .scn default extension for saving scenes
-export the rest of the network classes to gdscript
Diffstat (limited to 'tools/editor/editor_node.cpp')
-rw-r--r-- | tools/editor/editor_node.cpp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 2d9b0d21ab..dd5ae0007c 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -1111,10 +1111,20 @@ void EditorNode::_dialog_action(String p_file) { } int ret = unzGoToFirstFile(pkg); + int fc=0; //coun them - EditorProgress p("ltask","Loading Export Templates",1); + while(ret==UNZ_OK) { + fc++; + ret = unzGoToNextFile(pkg); + + } + + ret = unzGoToFirstFile(pkg); + + EditorProgress p("ltask","Loading Export Templates",fc); print_line("BEGIN IMPORT"); + fc=0; while(ret==UNZ_OK) { @@ -1123,19 +1133,25 @@ void EditorNode::_dialog_action(String p_file) { char fname[16384]; ret = unzGetCurrentFileInfo(pkg,&info,fname,16384,NULL,0,NULL,0); + String file=fname; Vector<uint8_t> data; data.resize(info.uncompressed_size); //read - unzOpenCurrentFile(pkg); - unzReadCurrentFile(pkg,data.ptr(),data.size()); + ret = unzOpenCurrentFile(pkg); + ret = unzReadCurrentFile(pkg,data.ptr(),data.size()); unzCloseCurrentFile(pkg); + print_line(fname); + //for(int i=0;i<512;i++) { + // print_line(itos(data[i])); + //} + file=file.get_file(); - p.step("Importing: "+file,0); + p.step("Importing: "+file,fc); print_line("IMPORT "+file); FileAccess *f = FileAccess::open(EditorSettings::get_singleton()->get_settings_path()+"/templates/"+file,FileAccess::WRITE); @@ -1146,6 +1162,7 @@ void EditorNode::_dialog_action(String p_file) { memdelete(f); ret = unzGoToNextFile(pkg); + fc++; } unzClose(pkg); |