summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/io/resource_format_binary.cpp18
-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.cpp14
-rw-r--r--core/translation.cpp12
-rw-r--r--scene/gui/menu_button.cpp3
-rw-r--r--scene/register_scene_types.cpp18
-rw-r--r--tools/editor/editor_node.cpp2
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--tools/editor_fonts/LICENSE.DroidSans.txt13
-rw-r--r--tools/editor_fonts/LICENSE.SourceCodePro.txt94
11 files changed, 139 insertions, 39 deletions
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/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/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/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/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_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.
+