diff options
19 files changed, 159 insertions, 44 deletions
diff --git a/modules/opus/SCsub b/modules/opus/SCsub index 491380c826..4d3053c7ec 100644 --- a/modules/opus/SCsub +++ b/modules/opus/SCsub @@ -201,6 +201,7 @@ if (env['builtin_opus'] != 'no'): thirdparty_include_paths = [ "", "celt", + "opus", "silk", "silk/fixed", "silk/float", diff --git a/modules/opus/audio_stream_opus.h b/modules/opus/audio_stream_opus.h index 4da66fe167..abf0b5c150 100644 --- a/modules/opus/audio_stream_opus.h +++ b/modules/opus/audio_stream_opus.h @@ -36,7 +36,7 @@ #include "os/file_access.h" #include "scene/resources/audio_stream.h" -#include <opusfile.h> +#include <opus/opusfile.h> class AudioStreamPlaybackOpus : public AudioStreamPlayback { diff --git a/modules/webm/SCsub b/modules/webm/SCsub index e417fc0cbf..889f5e83aa 100644 --- a/modules/webm/SCsub +++ b/modules/webm/SCsub @@ -24,7 +24,7 @@ if (env['builtin_libogg'] != 'no'): if (env['builtin_libvorbis'] != 'no'): env_webm.Append(CPPPATH=["#thirdparty/libvorbis"]) if (env['builtin_opus'] != 'no'): - env_webm.Append(CPPPATH=["#thirdparty"]) + env_webm.Append(CPPPATH=["#thirdparty/opus"]) if (env['builtin_libvpx'] != 'no'): Export('env_webm') diff --git a/platform/server/detect.py b/platform/server/detect.py index b367e1f2c3..4d86ffd376 100644 --- a/platform/server/detect.py +++ b/platform/server/detect.py @@ -66,6 +66,51 @@ def configure(env): env.Append(CCFLAGS=['-g2', '-Wall', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED']) + + # Shared libraries, when requested + + if (env['builtin_openssl'] == 'no'): + env.ParseConfig('pkg-config openssl --cflags --libs') + + if (env['builtin_libwebp'] == 'no'): + env.ParseConfig('pkg-config libwebp --cflags --libs') + + if (env['builtin_freetype'] == 'no'): + env['builtin_libpng'] = 'no' # Freetype links against libpng + env.ParseConfig('pkg-config freetype2 --cflags --libs') + + if (env['builtin_libpng'] == 'no'): + env.ParseConfig('pkg-config libpng --cflags --libs') + + if (env['builtin_enet'] == 'no'): + env.ParseConfig('pkg-config libenet --cflags --libs') + + if (env['builtin_squish'] == 'no' and env["tools"] == "yes"): + env.ParseConfig('pkg-config libsquish --cflags --libs') + + # Sound and video libraries + # Keep the order as it triggers chained dependencies (ogg needed by others, etc.) + + if (env['builtin_libtheora'] == 'no'): + env['builtin_libogg'] = 'no' # Needed to link against system libtheora + env['builtin_libvorbis'] = 'no' # Needed to link against system libtheora + env.ParseConfig('pkg-config theora theoradec --cflags --libs') + + if (env['builtin_libvpx'] == 'no'): + env.ParseConfig('pkg-config vpx --cflags --libs') + + if (env['builtin_libvorbis'] == 'no'): + env['builtin_libogg'] = 'no' # Needed to link against system libvorbis + env.ParseConfig('pkg-config vorbis vorbisfile --cflags --libs') + + if (env['builtin_opus'] == 'no'): + env['builtin_libogg'] = 'no' # Needed to link against system opus + env.ParseConfig('pkg-config opus opusfile --cflags --libs') + + if (env['builtin_libogg'] == 'no'): + env.ParseConfig('pkg-config ogg --cflags --libs') + + env.Append(CPPFLAGS=['-DSERVER_ENABLED', '-DUNIX_ENABLED']) env.Append(LIBS=['pthread', 'z']) # TODO detect linux/BSD! diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index ec89b7b690..3b15776c55 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -85,7 +85,7 @@ void Label::_notification(int p_what) { Ref<Font> font = get_font("font"); Color font_color = get_color("font_color"); Color font_color_shadow = get_color("font_color_shadow"); - bool use_outlinde = get_constant("shadow_as_outline"); + bool use_outline = get_constant("shadow_as_outline"); Point2 shadow_ofs(get_constant("shadow_offset_x"),get_constant("shadow_offset_y")); int line_spacing = get_constant("line_spacing"); @@ -247,7 +247,7 @@ void Label::_notification(int p_what) { } float move=font->draw_char(ci, Point2( x_ofs_shadow, y_ofs )+shadow_ofs, c, n,font_color_shadow ); - if (use_outlinde) { + if (use_outline) { font->draw_char(ci, Point2( x_ofs_shadow, y_ofs )+Vector2(-shadow_ofs.x,shadow_ofs.y), c, n,font_color_shadow ); font->draw_char(ci, Point2( x_ofs_shadow, y_ofs )+Vector2(shadow_ofs.x,-shadow_ofs.y), c, n,font_color_shadow ); font->draw_char(ci, Point2( x_ofs_shadow, y_ofs )+Vector2(-shadow_ofs.x,-shadow_ofs.y), c, n,font_color_shadow ); diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index ca9c666c01..912371142f 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -2363,19 +2363,11 @@ void Tree::_input_event(InputEvent p_event) { Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE); warp_mouse(range_drag_capture_pos); } else { - - if (delayed_text_editor) { - uint64_t diff = OS::get_singleton()->get_ticks_msec() - first_selection_time; - if (diff >= 400 && diff <= 800) - edit_selected(); - // fast double click - else if (diff < 400) { - emit_signal("item_double_clicked"); - } - - first_selection_time = OS::get_singleton()->get_ticks_msec(); - } else { + Rect2 rect = get_selected()->get_meta("__focus_rect"); + if (rect.has_point(Point2(p_event.mouse_button.x,p_event.mouse_button.y))) { edit_selected(); + } else { + emit_signal("item_double_clicked"); } } pressing_for_editor=false; @@ -2921,8 +2913,6 @@ void Tree::item_selected(int p_column,TreeItem *p_item) { p_item->cells[p_column].selected=true; //emit_signal("multi_selected",p_item,p_column,true); - NO this is for TreeItem::select - if (delayed_text_editor) - first_selection_time = OS::get_singleton()->get_ticks_msec(); } else { @@ -3572,15 +3562,6 @@ bool Tree::get_allow_rmb_select() const{ } -void Tree::set_delayed_text_editor(bool enabled) { - delayed_text_editor = enabled; -} - -bool Tree::is_delayed_text_editor_enabled() const { - return delayed_text_editor; -} - - void Tree::_bind_methods() { ObjectTypeDB::bind_method(_MD("_range_click_timeout"),&Tree::_range_click_timeout); @@ -3634,10 +3615,6 @@ void Tree::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_allow_rmb_select","allow"),&Tree::set_allow_rmb_select); ObjectTypeDB::bind_method(_MD("get_allow_rmb_select"),&Tree::get_allow_rmb_select); - ObjectTypeDB::bind_method(_MD("set_delayed_text_editor","enable"),&Tree::set_delayed_text_editor); - ObjectTypeDB::bind_method(_MD("is_delayed_text_editor_enabled"),&Tree::is_delayed_text_editor_enabled); - - ObjectTypeDB::bind_method(_MD("set_single_select_cell_editing_only_when_already_selected","enable"),&Tree::set_single_select_cell_editing_only_when_already_selected); ObjectTypeDB::bind_method(_MD("get_single_select_cell_editing_only_when_already_selected"),&Tree::get_single_select_cell_editing_only_when_already_selected); @@ -3751,9 +3728,6 @@ Tree::Tree() { force_select_on_already_selected=false; allow_rmb_select=false; - - first_selection_time = 0; - delayed_text_editor = false; } diff --git a/scene/gui/tree.h b/scene/gui/tree.h index 6c2f1dae40..1936f926c8 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -439,9 +439,6 @@ friend class TreeItem; float last_drag_time; float time_since_motion;*/ - bool delayed_text_editor; - uint64_t first_selection_time; - float drag_speed; float drag_from; float drag_accum; @@ -537,9 +534,6 @@ public: void set_value_evaluator(ValueEvaluator *p_evaluator); - void set_delayed_text_editor(bool enabled); - bool is_delayed_text_editor_enabled() const; - Tree(); ~Tree(); diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 6e33dcb4c9..f4fb48682c 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2485,6 +2485,12 @@ void Node::replace_by(Node* p_node,bool p_keep_data) { rd.name=E->get().name; rd.value=get(rd.name); } + + List<GroupInfo> groups; + get_groups(&groups); + + for(List<GroupInfo>::Element *E=groups.front();E;E=E->next()) + p_node->add_to_group(E->get().name, E->get().persistent); } _replace_connections_target(p_node); diff --git a/thirdparty/README.md b/thirdparty/README.md index 6423c63cf9..3adbbea59b 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -158,7 +158,7 @@ Files extracted from upstream source: - all .c and .h files in src/ (both opus and opusfile), except `opus_demo.c` -- all .h files in include/ (both opus and opusfile) +- all .h files in include/ (both opus and opusfile) as opus/ - COPYING diff --git a/thirdparty/opus/opus.h b/thirdparty/opus/opus/opus.h index b0bdf6f2df..b0bdf6f2df 100644 --- a/thirdparty/opus/opus.h +++ b/thirdparty/opus/opus/opus.h diff --git a/thirdparty/opus/opus_custom.h b/thirdparty/opus/opus/opus_custom.h index 41f36bf2fb..41f36bf2fb 100644 --- a/thirdparty/opus/opus_custom.h +++ b/thirdparty/opus/opus/opus_custom.h diff --git a/thirdparty/opus/opus_defines.h b/thirdparty/opus/opus/opus_defines.h index 647ed5d6f2..647ed5d6f2 100644 --- a/thirdparty/opus/opus_defines.h +++ b/thirdparty/opus/opus/opus_defines.h diff --git a/thirdparty/opus/opus_multistream.h b/thirdparty/opus/opus/opus_multistream.h index 47e03900bd..47e03900bd 100644 --- a/thirdparty/opus/opus_multistream.h +++ b/thirdparty/opus/opus/opus_multistream.h diff --git a/thirdparty/opus/opus_types.h b/thirdparty/opus/opus/opus_types.h index b28e03aea2..b28e03aea2 100644 --- a/thirdparty/opus/opus_types.h +++ b/thirdparty/opus/opus/opus_types.h diff --git a/thirdparty/opus/opusfile.h b/thirdparty/opus/opus/opusfile.h index 3604115c31..3604115c31 100644 --- a/thirdparty/opus/opusfile.h +++ b/thirdparty/opus/opus/opusfile.h diff --git a/tools/editor/icons/2x/icon_script_create.png b/tools/editor/icons/2x/icon_script_create.png Binary files differnew file mode 100644 index 0000000000..67f80e8760 --- /dev/null +++ b/tools/editor/icons/2x/icon_script_create.png diff --git a/tools/editor/icons/icon_script_create.png b/tools/editor/icons/icon_script_create.png Binary files differnew file mode 100644 index 0000000000..f5d8b0cfd6 --- /dev/null +++ b/tools/editor/icons/icon_script_create.png diff --git a/tools/editor/icons/source/icon_script_create.svg b/tools/editor/icons/source/icon_script_create.svg new file mode 100644 index 0000000000..c3f69c4601 --- /dev/null +++ b/tools/editor/icons/source/icon_script_create.svg @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="16" + height="16" + viewBox="0 0 16 16" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + inkscape:export-filename="/home/godotengine/godot/tools/editor/icons/con_script_create.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_script_create.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="29.966667" + inkscape:cx="5.495872" + inkscape:cy="2.1206692" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="true" + units="px" + inkscape:snap-bbox="true" + inkscape:bbox-paths="true" + inkscape:bbox-nodes="true" + inkscape:snap-bbox-edge-midpoints="true" + inkscape:snap-bbox-midpoints="true" + inkscape:snap-object-midpoints="true" + inkscape:snap-center="true" + inkscape:window-width="1920" + inkscape:window-height="1119" + inkscape:window-x="0" + inkscape:window-y="26" + inkscape:window-maximized="1" + showguides="false"> + <inkscape:grid + type="xygrid" + id="grid3336" + empspacing="4" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-1036.3622)"> + <path + style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + d="M 6 1 L 6 2 A 1 1 0 0 0 5 3 L 5 13 L 4 13 L 4 11 L 2 11 L 2 13 A 1 1 0 0 0 2.5 13.865234 A 1 1 0 0 0 3 14 L 3 15 L 10 15 L 10 14 L 7 14 L 7 10 L 10 10 L 10 7 L 12 7 L 12 5 L 15 5 L 15 3 A 2 2 0 0 0 13 1 L 6 1 z M 11 8 L 11 11 L 8 11 L 8 13 L 11 13 L 11 14.730469 A 2 2 0 0 0 12 13 L 12 8 L 11 8 z " + transform="translate(0,1036.3622)" + id="rect4255" /> + <path + style="opacity:1;fill:#b4b4b4;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + d="M 6 1 C 4.8954305 1 4 1.8954305 4 3 L 4 10 L 2 10 L 1 10 L 1 11 L 1 13 C 1 14.104569 1.8954305 15 3 15 C 4.1045695 15 5 14.104569 5 13 L 5 3 C 5 2.4477153 5.4477153 2 6 2 C 6.5522847 2 7 2.4477153 7 3 L 7 4 L 7 5 L 7 6 L 8 6 L 12 6 L 12 5 L 8 5 L 8 4 L 8 3 C 8 1.8954305 7.1045695 1 6 1 z M 2 11 L 4 11 L 4 13 C 4 13.552285 3.5522847 14 3 14 C 2.4477153 14 2 13.552285 2 13 L 2 11 z " + transform="translate(0,1036.3622)" + id="path4265" /> + <circle + cy="1048.3622" + cx="3" + id="ellipse4234" + style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + ry="1.0000174" + rx="1" /> + <path + style="fill:#e0e0e0;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1" + d="m 13,1049.3622 3,0 0,-2 -3,0 0,-3 -2,0 0,3 -3,0 0,2 3,0 0,3 2,0 z" + id="path8069" + inkscape:connector-curvature="0" /> + </g> +</svg> diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp index b4d32eb5c2..e7d8776f1f 100644 --- a/tools/editor/scene_tree_dock.cpp +++ b/tools/editor/scene_tree_dock.cpp @@ -722,7 +722,7 @@ void SceneTreeDock::_notification(int p_what) { } button_add->set_icon(get_icon("Add","EditorIcons")); button_instance->set_icon(get_icon("Instance","EditorIcons")); - button_create_script->set_icon(get_icon("Script","EditorIcons")); + button_create_script->set_icon(get_icon("ScriptCreate","EditorIcons")); button_load_script->set_icon(get_icon("Script", "EditorIcons")); button_clear_script->set_icon(get_icon("Remove", "EditorIcons")); @@ -1848,7 +1848,7 @@ void SceneTreeDock::_tree_rmb(const Vector2& p_menu_pos) { //menu->add_icon_item(get_icon("Groups","EditorIcons"),TTR("Edit Groups"),TOOL_GROUP); //menu->add_icon_item(get_icon("Connect","EditorIcons"),TTR("Edit Connections"),TOOL_CONNECT); menu->add_separator(); - menu->add_icon_shortcut(get_icon("Script", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/add_script"), TOOL_CREATE_SCRIPT); + menu->add_icon_shortcut(get_icon("ScriptCreate", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/add_script"), TOOL_CREATE_SCRIPT); menu->add_icon_shortcut(get_icon("Script", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/load_script"), TOOL_LOAD_SCRIPT); menu->add_icon_shortcut(get_icon("Remove", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/clear_script"), TOOL_CLEAR_SCRIPT); menu->add_separator(); @@ -2038,7 +2038,6 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelec scene_tree->connect("nodes_dragged",this,"_nodes_drag_begin"); scene_tree->get_scene_tree()->connect("item_double_clicked", this, "_focus_node"); - scene_tree->get_scene_tree()->set_delayed_text_editor(true); scene_tree->set_undo_redo(&editor_data->get_undo_redo()); scene_tree->set_editor_selection(editor_selection); |