diff options
-rw-r--r-- | core/bind/core_bind.cpp | 14 | ||||
-rw-r--r-- | core/io/resource_format_binary.cpp | 18 | ||||
-rw-r--r-- | core/io/resource_format_text.cpp (renamed from scene/resources/scene_format_text.cpp) | 2 | ||||
-rw-r--r-- | core/io/resource_format_text.h (renamed from scene/resources/scene_format_text.h) | 0 | ||||
-rw-r--r-- | core/register_core_types.cpp | 14 | ||||
-rw-r--r-- | core/resource.cpp | 7 | ||||
-rw-r--r-- | core/translation.cpp | 12 | ||||
-rw-r--r-- | drivers/unix/os_unix.cpp | 4 | ||||
-rw-r--r-- | modules/gdscript/gd_compiler.cpp | 1 | ||||
-rw-r--r-- | scene/gui/menu_button.cpp | 3 | ||||
-rw-r--r-- | scene/gui/popup.cpp | 4 | ||||
-rw-r--r-- | scene/register_scene_types.cpp | 18 | ||||
-rw-r--r-- | tools/editor/editor_node.cpp | 2 | ||||
-rw-r--r-- | tools/editor/io_plugins/editor_texture_import_plugin.cpp | 2 | ||||
-rw-r--r-- | tools/editor/plugins/canvas_item_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | tools/editor/scene_tree_editor.cpp | 12 | ||||
-rw-r--r-- | tools/editor_fonts/LICENSE.DroidSans.txt | 13 | ||||
-rw-r--r-- | tools/editor_fonts/LICENSE.SourceCodePro.txt | 94 |
18 files changed, 151 insertions, 71 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 9df31124f8..d16db3883e 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -857,7 +857,6 @@ void _OS::print_all_textures_by_size() { for(List<_OSCoreBindImg>::Element *E=imgs.front();E;E=E->next()) { - print_line(E->get().path+" - "+String::humanize_size(E->get().vram)+" ("+E->get().size+") - total:"+String::humanize_size(total) ); total-=E->get().vram; } } @@ -891,19 +890,6 @@ void _OS::print_resources_by_type(const Vector<String>& p_types) { type_count[r->get_type()]++; - - print_line(r->get_type()+": "+r->get_path()); - - List<String> metas; - r->get_meta_list(&metas); - for (List<String>::Element* me = metas.front(); me; me = me->next()) { - print_line(" "+String(me->get()) + ": " + r->get_meta(me->get())); - }; - } - - for(Map<String,int>::Element *E=type_count.front();E;E=E->next()) { - - print_line(E->key()+" count: "+itos(E->get())); } }; diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 58f3a4df2b..343a54e0d7 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -1105,14 +1105,9 @@ void ResourceFormatLoaderBinary::get_recognized_extensions_for_type(const String for(List<String>::Element *E=extensions.front();E;E=E->next()) { String ext = E->get().to_lower(); - if (ext=="res") - continue; -// p_extensions->push_back("x"+ext); p_extensions->push_back(ext); } - p_extensions->push_back("res"); - } void ResourceFormatLoaderBinary::get_recognized_extensions(List<String> *p_extensions) const{ @@ -1122,12 +1117,9 @@ void ResourceFormatLoaderBinary::get_recognized_extensions(List<String> *p_exten for(List<String>::Element *E=extensions.front();E;E=E->next()) { String ext = E->get().to_lower(); - if (ext=="res") - continue; p_extensions->push_back(ext); } - p_extensions->push_back("res"); } bool ResourceFormatLoaderBinary::handles_type(const String& p_type) const{ @@ -2270,16 +2262,8 @@ bool ResourceFormatSaverBinary::recognize(const RES& p_resource) const { void ResourceFormatSaverBinary::get_recognized_extensions(const RES& p_resource,List<String> *p_extensions) const { - - //here comes the sun, lalalala String base = p_resource->get_base_extension().to_lower(); - if (base!="res") { - - p_extensions->push_back(base); - } - - p_extensions->push_back("res"); - + p_extensions->push_back(base); } diff --git a/scene/resources/scene_format_text.cpp b/core/io/resource_format_text.cpp index 95645107d4..ed4fbdfb73 100644 --- a/scene/resources/scene_format_text.cpp +++ b/core/io/resource_format_text.cpp @@ -26,7 +26,7 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "scene_format_text.h" +#include "resource_format_text.h" #include "globals.h" #include "version.h" diff --git a/scene/resources/scene_format_text.h b/core/io/resource_format_text.h index 6122a1f9d8..6122a1f9d8 100644 --- a/scene/resources/scene_format_text.h +++ b/core/io/resource_format_text.h diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp index 97bd5f2a32..65427b1ea7 100644 --- a/core/register_core_types.cpp +++ b/core/register_core_types.cpp @@ -42,6 +42,7 @@ #include "translation.h" #include "compressed_translation.h" #include "io/translation_loader_po.h" +#include "io/resource_format_text.h" #include "io/resource_format_xml.h" #include "io/resource_format_binary.h" #include "io/stream_peer_ssl.h" @@ -53,6 +54,9 @@ #include "input_map.h" #include "undo_redo.h" + +static ResourceFormatSaverText *resource_saver_text=NULL; +static ResourceFormatLoaderText *resource_loader_text=NULL; #ifdef XML_ENABLED static ResourceFormatSaverXML *resource_saver_xml=NULL; static ResourceFormatLoaderXML *resource_loader_xml=NULL; @@ -96,6 +100,11 @@ void register_core_types() { resource_format_po = memnew( TranslationLoaderPO ); ResourceLoader::add_resource_format_loader( resource_format_po ); + // Register text formats before to give them precedence on saving + resource_saver_text = memnew( ResourceFormatSaverText ); + ResourceSaver::add_resource_format_saver(resource_saver_text); + resource_loader_text = memnew( ResourceFormatLoaderText ); + ResourceLoader::add_resource_format_loader(resource_loader_text); resource_saver_binary = memnew( ResourceFormatSaverBinary ); ResourceSaver::add_resource_format_saver(resource_saver_binary); @@ -202,6 +211,11 @@ void unregister_core_types() { if (resource_loader_binary) memdelete(resource_loader_binary); + if (resource_saver_text) + memdelete(resource_saver_text); + if (resource_loader_text) + memdelete(resource_loader_text); + memdelete( resource_format_po ); diff --git a/core/resource.cpp b/core/resource.cpp index b80ec7012d..e8d4069779 100644 --- a/core/resource.cpp +++ b/core/resource.cpp @@ -95,10 +95,9 @@ bool ResourceImportMetadata::has_option(const String& p_key) const { return options.has(p_key); } + Variant ResourceImportMetadata::get_option(const String& p_key) const { - if (!options.has(p_key)) - print_line(p_key); ERR_FAIL_COND_V(!options.has(p_key),Variant()); return options[p_key]; @@ -487,8 +486,6 @@ void ResourceCache::dump(const char* p_file,bool p_short) { if (!p_short) { if (f) f->store_line(r->get_type()+": "+r->get_path()); - else - print_line(r->get_type()+": "+r->get_path()); } } @@ -496,8 +493,6 @@ void ResourceCache::dump(const char* p_file,bool p_short) { if (f) f->store_line(E->key()+" count: "+itos(E->get())); - else - print_line(E->key()+" count: "+itos(E->get())); } if (f) { f->close(); diff --git a/core/translation.cpp b/core/translation.cpp index ee0ef2ea09..01789747ea 100644 --- a/core/translation.cpp +++ b/core/translation.cpp @@ -54,6 +54,9 @@ static const char* locale_list[]={ "be_BY", // Belarusian (Belarus) "bg", // Bulgarian "bg_BG", // Bulgarian (Bulgaria) +"bn", // Bengali +"bn_BD", // Bengali (Bangladesh) +"bn_IN", // Bengali (India) "ca", // Catalan "ca_ES", // Catalan (Spain) "cs", // Czech @@ -178,6 +181,9 @@ static const char* locale_list[]={ "tr_TR", // Turkish (Turkey) "uk", // Ukrainian "uk_UA", // Ukrainian (Ukraine) +"ur", // Urdu +"ur_IN", // Urdu (India) +"ur_PK", // Urdu (Pakistan) "vi", // Vietnamese "vi_VN", // Vietnamese (Vietnam) "zh", // Chinese @@ -211,6 +217,9 @@ static const char* locale_names[]={ "Belarusian (Belarus)", "Bulgarian", "Bulgarian (Bulgaria)", +"Bengali", +"Bengali (Bangladesh)", +"Bengali (India)", "Catalan", "Catalan (Spain)", "Czech", @@ -335,6 +344,9 @@ static const char* locale_names[]={ "Turkish (Turkey)", "Ukrainian", "Ukrainian (Ukraine)", +"Urdu", +"Urdu (India)", +"Urdu (Pakistan)", "Vietnamese", "Vietnamese (Vietnam)", "Chinese", diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 8cb7c7b698..fd515d6dd3 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -357,7 +357,6 @@ Error OS_Unix::execute(const String& p_path, const List<String>& p_arguments,boo pid_t pid = fork(); ERR_FAIL_COND_V(pid<0,ERR_CANT_FORK); - //print("execute: %s\n",p_path.utf8().get_data()); if (pid==0) { @@ -394,8 +393,6 @@ Error OS_Unix::execute(const String& p_path, const List<String>& p_arguments,boo pid_t rpid = waitpid(pid,&status,0); if (r_exitcode) *r_exitcode=WEXITSTATUS(status); - - print("returned: %i, waiting for: %i\n",rpid,pid); } else { if (r_child_id) @@ -498,7 +495,6 @@ String OS_Unix::get_executable_path() const { char buf[256]; memset(buf,0,256); readlink("/proc/self/exe", buf, sizeof(buf)); - //print_line("Exec path is:"+String(buf)); String b; b.parse_utf8(buf); if (b=="") { diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp index 304ed6b100..68c3dc98d3 100644 --- a/modules/gdscript/gd_compiler.cpp +++ b/modules/gdscript/gd_compiler.cpp @@ -1436,6 +1436,7 @@ Error GDCompiler::_parse_class(GDScript *p_script, GDScript *p_owner, const GDPa p_script->member_functions.clear(); p_script->member_indices.clear(); p_script->member_info.clear(); + p_script->_signals.clear(); p_script->initializer=NULL; p_script->subclasses.clear(); diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index 28d67287d5..d6e084765d 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -39,7 +39,8 @@ void MenuButton::_unhandled_key_input(InputEvent p_event) { return; - int item = popup->activate_item_by_event(p_event); + if (popup->activate_item_by_event(p_event)) + accept_event(); } } diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index 8d02d0e4e5..5b83c3f8b8 100644 --- a/scene/gui/popup.cpp +++ b/scene/gui/popup.cpp @@ -125,8 +125,6 @@ void Popup::set_as_minsize() { } - print_line(String(c->get_type())+": "+minsize); - total_minsize.width = MAX( total_minsize.width, minsize.width ); total_minsize.height = MAX( total_minsize.height, minsize.height ); } @@ -168,8 +166,6 @@ void Popup::popup_centered_minsize(const Size2& p_minsize) { } - print_line(String(c->get_type())+": "+minsize); - total_minsize.width = MAX( total_minsize.width, minsize.width ); total_minsize.height = MAX( total_minsize.height, minsize.height ); } diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index c83ab88c73..d848b9e5a5 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -222,8 +222,6 @@ #include "scene/3d/collision_polygon.h" #endif -#include "scene/resources/scene_format_text.h" - static ResourceFormatLoaderImage *resource_loader_image=NULL; static ResourceFormatLoaderWAV *resource_loader_wav=NULL; @@ -235,9 +233,6 @@ static ResourceFormatLoaderWAV *resource_loader_wav=NULL; static ResourceFormatLoaderTheme *resource_loader_theme=NULL; static ResourceFormatLoaderShader *resource_loader_shader=NULL; -static ResourceFormatSaverText *resource_saver_text=NULL; -static ResourceFormatLoaderText *resource_loader_text=NULL; - static ResourceFormatLoaderDynamicFont *resource_loader_dynamic_font=NULL; //static SceneStringNames *string_names; @@ -635,13 +630,6 @@ void register_scene_types() { OS::get_singleton()->yield(); //may take time to init - - resource_saver_text = memnew( ResourceFormatSaverText ); - ResourceSaver::add_resource_format_saver(resource_saver_text); - - resource_loader_text = memnew( ResourceFormatLoaderText ); - ResourceLoader::add_resource_format_loader(resource_loader_text); - } void unregister_scene_types() { @@ -661,11 +649,5 @@ void unregister_scene_types() { memdelete( resource_loader_theme ); memdelete( resource_loader_shader ); - if (resource_saver_text) { - memdelete(resource_saver_text); - } - if (resource_loader_text) { - memdelete(resource_loader_text); - } SceneStringNames::free(); } diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 81f9927b92..92b22eb5d1 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -2154,7 +2154,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { String existing; if (extensions.size()) { String root_name(get_edited_scene()->get_name()); - existing=root_name+".tscn";//+extensions.front()->get().to_lower(); + existing=root_name+"."+extensions.front()->get().to_lower(); } file->set_current_path(existing); diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp index 1d8319d460..60642999f2 100644 --- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp @@ -147,8 +147,6 @@ void EditorImportTextureOptions::_changed() { void EditorImportTextureOptions::_bind_methods() { - print_line("bind toptions"); - ObjectTypeDB::bind_method("_changed",&EditorImportTextureOptions::_changed); ObjectTypeDB::bind_method("_changedp",&EditorImportTextureOptions::_changedp); diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index db500cdcdf..f9499904db 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -3404,7 +3404,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { p->add_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_set", TTR("Zoom Set..")), ZOOM_SET); p->add_separator(); p->add_shortcut(ED_SHORTCUT("canvas_item_editor/center_selection", TTR("Center Selection"), KEY_F), VIEW_CENTER_TO_SELECTION); - p->add_shortcut(ED_SHORTCUT("canvas_item_editor/frame_selection", TTR("Frame Selection"), KEY_MASK_CMD | KEY_F), VIEW_FRAME_TO_SELECTION); + p->add_shortcut(ED_SHORTCUT("canvas_item_editor/frame_selection", TTR("Frame Selection"), KEY_MASK_SHIFT | KEY_F), VIEW_FRAME_TO_SELECTION); anchor_menu = memnew( MenuButton ); anchor_menu->set_text(TTR("Anchor")); diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp index f174bc2f1b..cc11cbc562 100644 --- a/tools/editor/scene_tree_editor.cpp +++ b/tools/editor/scene_tree_editor.cpp @@ -260,13 +260,21 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item,int p_column,int p_id) } else if (p_id==BUTTON_SIGNALS) { - item->select(0); + editor_selection->clear(); + editor_selection->add_node(n); + + set_selected(n); + NodeDock::singleton->get_parent()->call("set_current_tab",NodeDock::singleton->get_index()); NodeDock::singleton->show_connections(); } else if (p_id==BUTTON_GROUPS) { - item->select(0); + editor_selection->clear(); + editor_selection->add_node(n); + + set_selected(n); + NodeDock::singleton->get_parent()->call("set_current_tab",NodeDock::singleton->get_index()); NodeDock::singleton->show_groups(); } diff --git a/tools/editor_fonts/LICENSE.DroidSans.txt b/tools/editor_fonts/LICENSE.DroidSans.txt new file mode 100644 index 0000000000..636f1e2975 --- /dev/null +++ b/tools/editor_fonts/LICENSE.DroidSans.txt @@ -0,0 +1,13 @@ +Copyright (C) 2008 The Android Open Source Project + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/tools/editor_fonts/LICENSE.SourceCodePro.txt b/tools/editor_fonts/LICENSE.SourceCodePro.txt new file mode 100644 index 0000000000..f430ee5dbe --- /dev/null +++ b/tools/editor_fonts/LICENSE.SourceCodePro.txt @@ -0,0 +1,94 @@ +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + |