diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/collision_polygon_2d.cpp | 2 | ||||
-rw-r--r-- | scene/2d/navigation2d.cpp | 12 | ||||
-rw-r--r-- | scene/2d/path_2d.cpp | 2 | ||||
-rw-r--r-- | scene/2d/screen_button.cpp | 4 | ||||
-rw-r--r-- | scene/3d/spatial_stream_player.cpp | 2 | ||||
-rw-r--r-- | scene/audio/stream_player.cpp | 2 | ||||
-rw-r--r-- | scene/gui/control.cpp | 11 | ||||
-rw-r--r-- | scene/gui/control.h | 2 | ||||
-rw-r--r-- | scene/gui/file_dialog.cpp | 41 | ||||
-rw-r--r-- | scene/gui/file_dialog.h | 2 | ||||
-rw-r--r-- | scene/gui/line_edit.cpp | 61 | ||||
-rw-r--r-- | scene/gui/range.cpp | 22 | ||||
-rw-r--r-- | scene/gui/range.h | 4 | ||||
-rw-r--r-- | scene/gui/tabs.cpp | 86 | ||||
-rw-r--r-- | scene/gui/tabs.h | 6 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 84 | ||||
-rw-r--r-- | scene/main/scene_main_loop.cpp | 4 | ||||
-rw-r--r-- | scene/main/viewport.cpp | 4 | ||||
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 1 | ||||
-rw-r--r-- | scene/resources/default_theme/tab_close.png | bin | 0 -> 398 bytes | |||
-rw-r--r-- | scene/resources/default_theme/theme_data.h | 5 | ||||
-rw-r--r-- | scene/resources/scene_format_text.cpp | 8 | ||||
-rw-r--r-- | scene/resources/shader_graph.cpp | 5 |
23 files changed, 310 insertions, 60 deletions
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp index 386c7b9dd0..2a40a6207d 100644 --- a/scene/2d/collision_polygon_2d.cpp +++ b/scene/2d/collision_polygon_2d.cpp @@ -197,7 +197,7 @@ void CollisionPolygon2D::_notification(int p_what) { Vector2 n = polygon[(i+1)%polygon.size()]; draw_line(p,n,Color(0.9,0.2,0.0,0.8),3); } -//#define DEBUG_DECOMPOSE +#define DEBUG_DECOMPOSE #if defined(TOOLS_ENABLED) && defined (DEBUG_DECOMPOSE) Vector< Vector<Vector2> > decomp = _decompose_in_convex(); diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation2d.cpp index e2a4de5fac..c7542407cb 100644 --- a/scene/2d/navigation2d.cpp +++ b/scene/2d/navigation2d.cpp @@ -508,7 +508,7 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2& p_start, const Vect points+=", "; points+=_get_vertex(p->edges[i].point); } - print_line("poly "+itos(idx++)+" - "+points); + //print_line("poly "+itos(idx++)+" - "+points); p = p->edges[prev].C; if (p==begin_poly) break; @@ -557,6 +557,7 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2& p_start, const Vect bool skip=false; + /* print_line("-----\nAPEX: "+(apex_point-end_point)); print_line("LEFT:"); print_line("\tPortal: "+(portal_left-end_point)); @@ -570,6 +571,7 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2& p_start, const Vect print_line("\tRight Tangent: "+rtos(CLOCK_TANGENT(apex_point,portal_right,right))); print_line("\tRight Distance: "+rtos(portal_right.distance_squared_to(apex_point))); print_line("\tRight Test: "+rtos(CLOCK_TANGENT(apex_point,right,portal_left))); + */ if (CLOCK_TANGENT(apex_point,portal_left,left) >= 0){ @@ -577,7 +579,7 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2& p_start, const Vect if (portal_left.distance_squared_to(apex_point)<CMP_EPSILON || CLOCK_TANGENT(apex_point,left,portal_right) > 0) { left_poly=p; portal_left=left; - print_line("***ADVANCE LEFT"); + //print_line("***ADVANCE LEFT"); } else { //_clip_path(path,apex_poly,portal_right,right_poly); @@ -592,7 +594,7 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2& p_start, const Vect path.push_back(apex_point); skip=true; //print_line("addpoint left"); - print_line("***CLIP LEFT"); + //print_line("***CLIP LEFT"); } } @@ -601,7 +603,7 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2& p_start, const Vect if (portal_right.distance_squared_to(apex_point)<CMP_EPSILON || CLOCK_TANGENT(apex_point,right,portal_left) < 0) { right_poly=p; portal_right=right; - print_line("***ADVANCE RIGHT"); + //print_line("***ADVANCE RIGHT"); } else { //_clip_path(path,apex_poly,portal_left,left_poly); @@ -615,7 +617,7 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2& p_start, const Vect if (path[path.size()-1].distance_to(apex_point)>CMP_EPSILON) path.push_back(apex_point); //print_line("addpoint right"); - print_line("***CLIP RIGHT"); + //print_line("***CLIP RIGHT"); } } diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index f135864098..bd7415aa04 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -74,6 +74,8 @@ void Path2D::set_curve(const Ref<Curve2D>& p_curve) { curve->connect("changed",this,"_curve_changed"); } + _curve_changed(); + } Ref<Curve2D> Path2D::get_curve() const{ diff --git a/scene/2d/screen_button.cpp b/scene/2d/screen_button.cpp index d7f9b191fe..fac94f19dc 100644 --- a/scene/2d/screen_button.cpp +++ b/scene/2d/screen_button.cpp @@ -102,6 +102,10 @@ void TouchScreenButton::_notification(int p_what) { action_id=-1; } } break; + case NOTIFICATION_EXIT_TREE: { + if (is_pressed()) + Input::get_singleton()->action_release(action); + } break; } } diff --git a/scene/3d/spatial_stream_player.cpp b/scene/3d/spatial_stream_player.cpp index 048c9e78ac..dfef0faf4b 100644 --- a/scene/3d/spatial_stream_player.cpp +++ b/scene/3d/spatial_stream_player.cpp @@ -60,7 +60,7 @@ void SpatialStreamPlayer::sp_set_mix_rate(int p_rate){ bool SpatialStreamPlayer::sp_mix(int32_t *p_buffer,int p_frames) { - if (resampler.is_ready()) { + if (resampler.is_ready() && !paused) { return resampler.mix(p_buffer,p_frames); } diff --git a/scene/audio/stream_player.cpp b/scene/audio/stream_player.cpp index 0180ed4a1d..f7cfc31b03 100644 --- a/scene/audio/stream_player.cpp +++ b/scene/audio/stream_player.cpp @@ -58,7 +58,7 @@ void StreamPlayer::sp_set_mix_rate(int p_rate){ bool StreamPlayer::sp_mix(int32_t *p_buffer,int p_frames) { - if (resampler.is_ready()) { + if (resampler.is_ready() && !paused) { return resampler.mix(p_buffer,p_frames); } diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 23a7ae00da..5a8ecfeffe 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -862,6 +862,13 @@ bool Control::window_has_modal_stack() const { return data.window->window->modal_stack.size(); } +bool Control::is_window_modal_on_top() const { + + if (window_has_modal_stack()) + return data.window->window->modal_stack.back()->get()==this; + return false; +} + void Control::_window_cancel_tooltip() { window->tooltip=NULL; @@ -916,7 +923,7 @@ void Control::_window_show_tooltip() { void Control::_window_call_input(Control *p_control,const InputEvent& p_input) { - _block(); +// _block(); while(p_control) { @@ -934,7 +941,7 @@ void Control::_window_call_input(Control *p_control,const InputEvent& p_input) { p_control=p_control->data.parent; } - _unblock(); + //_unblock(); } diff --git a/scene/gui/control.h b/scene/gui/control.h index 280e88e85d..0ead632aab 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -270,6 +270,8 @@ public: void set_custom_minimum_size(const Size2& p_custom); Size2 get_custom_minimum_size() const; + bool is_window_modal_on_top() const; + bool is_window() const; Control *get_window() const; Control *get_parent_control() const; diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index 955a02d0f9..5b57395e58 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -56,7 +56,42 @@ void FileDialog::_notification(int p_what) { //RID ci = get_canvas_item(); //get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size())); - } + } + + if (p_what==NOTIFICATION_POPUP_HIDE) { + + set_process_unhandled_input(false); + } +} + +void FileDialog::_unhandled_input(const InputEvent& p_event) { + + if (p_event.type==InputEvent::KEY && is_window_modal_on_top()) { + + const InputEventKey &k=p_event.key; + + if (k.pressed) { + + bool handled=true; + + switch (k.scancode) { + + case KEY_H: { + + if (k.mod.command) { + set_show_hidden_files(!show_hidden_files); + } else { + handled=false; + } + + } break; + default: { handled=false; } + } + + if (handled) + accept_event(); + } + } } void FileDialog::set_enable_multiple_selection(bool p_enable) { @@ -114,6 +149,8 @@ void FileDialog::_post_popup() { else tree->grab_focus(); + set_process_unhandled_input(true); + } void FileDialog::_action_pressed() { @@ -628,6 +665,8 @@ bool FileDialog::default_show_hidden_files=false; void FileDialog::_bind_methods() { + ObjectTypeDB::bind_method(_MD("_unhandled_input"),&FileDialog::_unhandled_input); + ObjectTypeDB::bind_method(_MD("_tree_selected"),&FileDialog::_tree_selected); ObjectTypeDB::bind_method(_MD("_tree_db_selected"),&FileDialog::_tree_dc_selected); ObjectTypeDB::bind_method(_MD("_dir_entered"),&FileDialog::_dir_entered); diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h index 491655e4ce..b71a157fa7 100644 --- a/scene/gui/file_dialog.h +++ b/scene/gui/file_dialog.h @@ -117,6 +117,8 @@ private: void _update_drives(); + void _unhandled_input(const InputEvent& p_event); + virtual void _post_popup(); protected: diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index db463c133b..49ea077a30 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -245,12 +245,26 @@ void LineEdit::_input_event(InputEvent p_event) { delete_char(); } } break; + case KEY_KP_4: { + if (k.unicode != 0) { + handled = false; + break; + } + // numlock disabled. fallthrough to key_left + } case KEY_LEFT: { shift_selection_check_pre(k.mod.shift); set_cursor_pos(get_cursor_pos()-1); shift_selection_check_post(k.mod.shift); } break; + case KEY_KP_6: { + if (k.unicode != 0) { + handled = false; + break; + } + // numlock disabled. fallthrough to key_right + } case KEY_RIGHT: { shift_selection_check_pre(k.mod.shift); @@ -271,12 +285,26 @@ void LineEdit::_input_event(InputEvent p_event) { } } break; + case KEY_KP_7: { + if (k.unicode != 0) { + handled = false; + break; + } + // numlock disabled. fallthrough to key_home + } case KEY_HOME: { shift_selection_check_pre(k.mod.shift); set_cursor_pos(0); shift_selection_check_post(k.mod.shift); } break; + case KEY_KP_1: { + if (k.unicode != 0) { + handled = false; + break; + } + // numlock disabled. fallthrough to key_end + } case KEY_END: { shift_selection_check_pre(k.mod.shift); @@ -287,26 +315,27 @@ void LineEdit::_input_event(InputEvent p_event) { default: { - if (k.unicode>=32 && k.scancode!=KEY_DELETE) { - - if (editable) { - selection_delete(); - CharType ucodestr[2]={(CharType)k.unicode,0}; - append_at_cursor(ucodestr); - emit_signal("text_changed",text); - _change_notify("text"); - } - - } else { - handled=false; - } + handled=false; } break; } - if (handled) + if (handled) { accept_event(); - else - return; + } else { + if (k.unicode>=32 && k.scancode!=KEY_DELETE) { + + if (editable) { + selection_delete(); + CharType ucodestr[2]={(CharType)k.unicode,0}; + append_at_cursor(ucodestr); + emit_signal("text_changed",text); + _change_notify("text"); + } + + } else { + return; + } + } selection.old_shift=k.mod.shift; diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index 25b7952da1..ffcdf98519 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -48,20 +48,20 @@ void Range::Shared::emit_value_changed() { } } -void Range::_changed_notify() { +void Range::_changed_notify(const char *p_what) { emit_signal("changed",shared->val); update(); - _change_notify(); + _change_notify(p_what); } -void Range::Shared::emit_changed() { +void Range::Shared::emit_changed(const char *p_what) { for (Set<Range*>::Element *E=owners.front();E;E=E->next()) { Range *r=E->get(); if (!r->is_inside_tree()) continue; - r->_changed_notify(); + r->_changed_notify(p_what); } } @@ -77,7 +77,11 @@ void Range::set_val(double p_val) { if (p_val<shared->min) p_val=shared->min; - + + //avoid to set -0 + if (p_val == 0) + p_val = 0; + if (shared->val==p_val) return; @@ -90,20 +94,20 @@ void Range::set_min(double p_min) { shared->min=p_min; set_val(shared->val); - shared->emit_changed(); + shared->emit_changed("range/min"); } void Range::set_max(double p_max) { shared->max=p_max; set_val(shared->val); - shared->emit_changed(); + shared->emit_changed("range/max"); } void Range::set_step(double p_step) { shared->step=p_step; - shared->emit_changed(); + shared->emit_changed("range/step"); } void Range::set_page(double p_page) { @@ -111,7 +115,7 @@ void Range::set_page(double p_page) { shared->page=p_page; set_val(shared->val); - shared->emit_changed(); + shared->emit_changed("range/page"); } double Range::get_val() const { diff --git a/scene/gui/range.h b/scene/gui/range.h index 2967c2790c..d96ecdfb0b 100644 --- a/scene/gui/range.h +++ b/scene/gui/range.h @@ -44,7 +44,7 @@ class Range : public Control { bool exp_unit_value; Set<Range*> owners; void emit_value_changed(); - void emit_changed(); + void emit_changed(const char *p_what=""); }; Shared *shared; @@ -55,7 +55,7 @@ class Range : public Control { void _share(Node *p_range); void _value_changed_notify(); - void _changed_notify(); + void _changed_notify(const char *p_what=""); protected: diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp index 6a677e7de0..bb64a57212 100644 --- a/scene/gui/tabs.cpp +++ b/scene/gui/tabs.cpp @@ -266,6 +266,7 @@ void Tabs::_notification(int p_what) { int label_valign_fg = get_constant("label_valign_fg"); int label_valign_bg = get_constant("label_valign_bg"); + int w=0; int mw = 0; @@ -277,12 +278,16 @@ void Tabs::_notification(int p_what) { for(int i=0;i<tabs.size();i++) { + Ref<Texture> tex = tabs[i].icon; if (tex.is_valid()) { if (tabs[i].text!="") mw+=get_constant("hseparation"); } + + tabs[i].ofs_cache=mw; + mw+=font->get_string_size(tabs[i].text).width; if (current==i) mw+=tab_fg->get_minimum_size().width; @@ -303,6 +308,9 @@ void Tabs::_notification(int p_what) { bms.width+=get_constant("hseparation"); mw+=bms.width; } + + + } } @@ -708,7 +716,7 @@ void Tabs::add_tab(const String& p_str,const Ref<Texture>& p_icon) { t.text=p_str; t.icon=p_icon; - t.close_button = get_icon("Close","EditorIcons"); + t.close_button = get_icon("close"); tabs.push_back(t); @@ -758,6 +766,79 @@ Tabs::TabAlign Tabs::get_tab_align() const { } +void Tabs::ensure_tab_visible(int p_idx) { + + if (!is_inside_tree()) + return; + + ERR_FAIL_INDEX(p_idx,tabs.size()); + + if (p_idx<offset) { + offset=p_idx; + update(); + return; + } + + Ref<StyleBox> tab_bg = get_stylebox("tab_bg"); + Ref<StyleBox> tab_fg = get_stylebox("tab_fg"); + Ref<Font> font = get_font("font"); + + Ref<Texture> incr = get_icon("increment"); + Ref<Texture> decr = get_icon("decrement"); + + int limit=get_size().width-incr->get_width()-decr->get_width(); + + + + int x=0; + for(int i=0;i<tabs.size();i++) { + + if (i<offset) + continue; + + Ref<Texture> tex = tabs[i].icon; + if (tex.is_valid()) { + if (tabs[i].text!="") + x+=get_constant("hseparation"); + + } + + tabs[i].x_cache=x; + + x+=font->get_string_size(tabs[i].text).width; + if (current==i) + x+=tab_fg->get_minimum_size().width; + else + x+=tab_bg->get_minimum_size().width; + + if (tabs[i].right_button.is_valid()) { + Ref<Texture> rb=tabs[i].right_button; + Size2 bms = rb->get_size();//+get_stylebox("button")->get_minimum_size(); + bms.width+=get_constant("hseparation"); + + x+=bms.width; + } + + if (tabs[i].close_button.is_valid()) { + Ref<Texture> cb=tabs[i].close_button; + Size2 bms = cb->get_size();//+get_stylebox("button")->get_minimum_size(); + bms.width+=get_constant("hseparation"); + x+=bms.width; + } + + tabs[i].x_size_cache=x-tabs[i].x_cache; + + + + } + + while(offset<tabs.size() && ( (tabs[p_idx].x_cache + tabs[p_idx].x_size_cache) - tabs[offset].x_cache) < limit) { + offset++; + } + + update(); +} + void Tabs::_bind_methods() { ObjectTypeDB::bind_method(_MD("_input_event"),&Tabs::_input_event); @@ -772,6 +853,7 @@ void Tabs::_bind_methods() { ObjectTypeDB::bind_method(_MD("add_tab","title","icon:Texture"),&Tabs::add_tab); ObjectTypeDB::bind_method(_MD("set_tab_align","align"),&Tabs::set_tab_align); ObjectTypeDB::bind_method(_MD("get_tab_align"),&Tabs::get_tab_align); + ObjectTypeDB::bind_method(_MD("ensure_tab_visible","idx"),&Tabs::ensure_tab_visible); ADD_SIGNAL(MethodInfo("tab_changed",PropertyInfo(Variant::INT,"tab"))); ADD_SIGNAL(MethodInfo("right_button_pressed",PropertyInfo(Variant::INT,"tab"))); @@ -804,4 +886,6 @@ Tabs::Tabs() { cb_displaypolicy = SHOW_NEVER; // Default : no close button offset=0; max_drawn_tab=0; + + } diff --git a/scene/gui/tabs.h b/scene/gui/tabs.h index efcb291a52..82035291ec 100644 --- a/scene/gui/tabs.h +++ b/scene/gui/tabs.h @@ -59,10 +59,14 @@ private: Ref<Texture> icon; int ofs_cache; int size_cache; + int x_cache; + int x_size_cache; + Ref<Texture> right_button; Rect2 rb_rect; Ref<Texture> close_button; Rect2 cb_rect; + }; @@ -119,6 +123,8 @@ public: void clear_tabs(); + void ensure_tab_visible(int p_idx); + Size2 get_minimum_size() const; Tabs(); diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 70da7e39a4..7f7c8c023c 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -839,7 +839,7 @@ void TextEdit::_notification(int p_what) { } - if (cursor.column==str.length() && cursor.line==line) { + if (cursor.column==str.length() && cursor.line==line && (char_ofs+char_margin)>=xmargin_beg) { cursor_pos=Point2i( char_ofs+char_margin, ofs_y ); VisualServer::get_singleton()->canvas_item_add_rect(ci,Rect2(cursor_pos, Size2i(1,get_row_height())),cache.font_color); @@ -1740,6 +1740,13 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { } } break; + case KEY_KP_4: { + if (k.unicode != 0) { + scancode_handled = false; + break; + } + // numlock disabled. fallthrough to key_left + } case KEY_LEFT: { if (k.mod.shift) @@ -1786,6 +1793,13 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { _post_shift_selection(); } break; + case KEY_KP_6: { + if (k.unicode != 0) { + scancode_handled = false; + break; + } + // numlock disabled. fallthrough to key_right + } case KEY_RIGHT: { if (k.mod.shift) @@ -1829,6 +1843,13 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { _post_shift_selection(); } break; + case KEY_KP_8: { + if (k.unicode != 0) { + scancode_handled = false; + break; + } + // numlock disabled. fallthrough to key_up + } case KEY_UP: { if (k.mod.shift) @@ -1849,6 +1870,13 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { _cancel_code_hint(); } break; + case KEY_KP_2: { + if (k.unicode != 0) { + scancode_handled = false; + break; + } + // numlock disabled. fallthrough to key_down + } case KEY_DOWN: { if (k.mod.shift) @@ -1937,6 +1965,13 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { update(); } break; + case KEY_KP_7: { + if (k.unicode != 0) { + scancode_handled = false; + break; + } + // numlock disabled. fallthrough to key_home + } #ifdef APPLE_STYLE_KEYS case KEY_HOME: { @@ -1950,18 +1985,6 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { _post_shift_selection(); } break; - case KEY_END: { - - if (k.mod.shift) - _pre_shift_selection(); - - cursor_set_line(text.size()-1); - - if (k.mod.shift) - _post_shift_selection(); - - } break; - #else case KEY_HOME: { @@ -1992,6 +2015,27 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { completion_hint=""; } break; +#endif + case KEY_KP_1: { + if (k.unicode != 0) { + scancode_handled = false; + break; + } + // numlock disabled. fallthrough to key_end + } +#ifdef APPLE_STYLE_KEYS + case KEY_END: { + + if (k.mod.shift) + _pre_shift_selection(); + + cursor_set_line(text.size()-1); + + if (k.mod.shift) + _post_shift_selection(); + + } break; +#else case KEY_END: { if (k.mod.shift) @@ -2009,6 +2053,13 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { } break; #endif + case KEY_KP_9: { + if (k.unicode != 0) { + scancode_handled = false; + break; + } + // numlock disabled. fallthrough to key_pageup + } case KEY_PAGEUP: { if (k.mod.shift) @@ -2024,6 +2075,13 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { } break; + case KEY_KP_3: { + if (k.unicode != 0) { + scancode_handled = false; + break; + } + // numlock disabled. fallthrough to key_pageup + } case KEY_PAGEDOWN: { if (k.mod.shift) diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp index f8585b93cf..a18eb1249f 100644 --- a/scene/main/scene_main_loop.cpp +++ b/scene/main/scene_main_loop.cpp @@ -621,7 +621,11 @@ void SceneTree::set_editor_hint(bool p_enabled) { } bool SceneTree::is_node_being_edited(const Node* p_node) const { +#ifdef TOOLS_ENABLED return editor_hint && edited_scene_root && edited_scene_root->is_a_parent_of(p_node); +#else + return false; +#endif } bool SceneTree::is_editor_hint() const { diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 6d18a53c9f..330f855006 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -577,7 +577,7 @@ void Viewport::_notification(int p_what) { PhysicsDirectSpaceState *space = PhysicsServer::get_singleton()->space_get_direct_state(find_world()->get_space()); if (space) { - bool col = space->intersect_ray(from,from+dir*10000,result,Set<RID>(),0xFFFFFFFF,0xFFFFFFFF); + bool col = space->intersect_ray(from,from+dir*10000,result,Set<RID>(),0xFFFFFFFF,0xFFFFFFFF,true); ObjectID new_collider=0; if (col) { @@ -617,7 +617,7 @@ void Viewport::_notification(int p_what) { PhysicsDirectSpaceState *space = PhysicsServer::get_singleton()->space_get_direct_state(find_world()->get_space()); if (space) { - bool col = space->intersect_ray(from,from+dir*10000,result,Set<RID>(),0xFFFFFFFF,0xFFFFFFFF); + bool col = space->intersect_ray(from,from+dir*10000,result,Set<RID>(),0xFFFFFFFF,0xFFFFFFFF,true); ObjectID new_collider=0; if (col) { if (result.collider) { diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 6076292bfb..f0b3519b4a 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -717,6 +717,7 @@ void make_default_theme() { t->set_icon("increment_hilite","Tabs",make_icon( scroll_button_right_hl_png)); t->set_icon("decrement","Tabs",make_icon( scroll_button_left_png)); t->set_icon("decrement_hilite","Tabs",make_icon( scroll_button_left_hl_png)); + t->set_icon("close","Tabs",make_icon( tab_close_png)); t->set_font("font","Tabs", default_font ); diff --git a/scene/resources/default_theme/tab_close.png b/scene/resources/default_theme/tab_close.png Binary files differnew file mode 100644 index 0000000000..10e56d5bb8 --- /dev/null +++ b/scene/resources/default_theme/tab_close.png diff --git a/scene/resources/default_theme/theme_data.h b/scene/resources/default_theme/theme_data.h index c1fac47724..e0b5736d99 100644 --- a/scene/resources/default_theme/theme_data.h +++ b/scene/resources/default_theme/theme_data.h @@ -399,6 +399,11 @@ static const unsigned char tab_behind_png[]={ }; +static const unsigned char tab_close_png[]={ +0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x12,0x0,0x0,0xb,0x12,0x1,0xd2,0xdd,0x7e,0xfc,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x1b,0x49,0x44,0x41,0x54,0x38,0x8d,0xcd,0x52,0xbb,0x4e,0xc4,0x40,0xc,0x9c,0x73,0xd2,0x50,0x38,0xd1,0x8a,0x82,0x36,0x3d,0x8,0xc4,0x43,0x88,0x13,0x12,0x20,0xf8,0x67,0x8a,0xfb,0x1,0xe,0x89,0x13,0x3d,0x47,0xb1,0x7f,0xb0,0x85,0x53,0x41,0xce,0xa6,0xd9,0x45,0xbe,0x24,0x1f,0x70,0x96,0x56,0x96,0xed,0x9d,0x91,0x3d,0x36,0x70,0x50,0x96,0x52,0xaa,0xbd,0x1f,0xd5,0xaa,0xb9,0x1a,0x79,0xb0,0x99,0x9d,0xc4,0x18,0x4d,0x55,0x2f,0xfd,0xc7,0x94,0x12,0xa9,0xea,0x53,0x8c,0xd1,0xcc,0xac,0xf1,0xb5,0x85,0x67,0x8b,0x31,0x1a,0x0,0x5,0x40,0xcc,0x7c,0x4b,0x44,0x9f,0x0,0x54,0x55,0x5f,0x44,0x64,0x5,0x60,0x7,0xa0,0xea,0xba,0x6e,0x31,0x21,0x48,0x29,0xd5,0xaa,0x7a,0x25,0x22,0xef,0x25,0xc7,0xcc,0x4b,0x33,0xb,0x7d,0xdf,0xbf,0xba,0xdc,0x29,0x11,0x7d,0x85,0x10,0x86,0x49,0x7,0x99,0xe4,0x5a,0x44,0xd6,0x73,0x1a,0x65,0xf0,0x77,0x8,0xe1,0x67,0xa2,0x1,0x0,0x84,0x10,0x6,0x22,0xda,0x30,0xf3,0x7d,0x4e,0x59,0x7e,0x60,0xe6,0xb,0x22,0xda,0x7a,0xf0,0x84,0x20,0x9b,0x9a,0x59,0xeb,0xe2,0xd2,0x65,0x53,0xc8,0x30,0x53,0x2c,0x23,0x54,0xaa,0xfa,0x9c,0x5,0x9b,0x1b,0xe1,0x8e,0x88,0x36,0x65,0xfe,0xbd,0xe,0x32,0xf8,0xd1,0x83,0x99,0xf9,0x9c,0x99,0x1f,0x4a,0x2c,0x22,0xeb,0xf1,0x8a,0xe7,0xd6,0xb8,0x3,0x50,0x65,0xc1,0xb6,0x0,0x4c,0x55,0x6f,0x44,0xe4,0xd,0xc0,0x0,0xa0,0xf6,0x6b,0xdc,0x3b,0xa4,0xa6,0x69,0x8e,0x33,0xf8,0x2c,0xab,0xfd,0x9b,0x85,0xfd,0x60,0xe6,0x25,0x80,0xaa,0x6d,0xdb,0xa3,0xb9,0x4b,0xfd,0x27,0xf1,0x7e,0xac,0x8f,0xf7,0x87,0x63,0x7f,0xc3,0xca,0xa9,0x49,0x35,0x25,0x97,0x14,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82 +}; + + static const unsigned char tab_container_bg_png[]={ 0x89,0x50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,0x80,0x9d,0x98,0x26,0x53,0x0,0xa0,0x4,0x0,0x60,0xcb,0x63,0x62,0xe3,0x0,0x50,0x2d,0x0,0x60,0x27,0x7f,0xe6,0xd3,0x0,0x80,0x9d,0xf8,0x99,0x7b,0x1,0x0,0x5b,0x94,0x21,0x15,0x1,0xa0,0x91,0x0,0x20,0x13,0x65,0x88,0x44,0x0,0x68,0x3b,0x0,0xac,0xcf,0x56,0x8a,0x45,0x0,0x58,0x30,0x0,0x14,0x66,0x4b,0xc4,0x39,0x0,0xd8,0x2d,0x0,0x30,0x49,0x57,0x66,0x48,0x0,0xb0,0xb7,0x0,0xc0,0xce,0x10,0xb,0xb2,0x0,0x8,0xc,0x0,0x30,0x51,0x88,0x85,0x29,0x0,0x4,0x7b,0x0,0x60,0xc8,0x23,0x23,0x78,0x0,0x84,0x99,0x0,0x14,0x46,0xf2,0x57,0x3c,0xf1,0x2b,0xae,0x10,0xe7,0x2a,0x0,0x0,0x78,0x99,0xb2,0x3c,0xb9,0x24,0x39,0x45,0x81,0x5b,0x8,0x2d,0x71,0x7,0x57,0x57,0x2e,0x1e,0x28,0xce,0x49,0x17,0x2b,0x14,0x36,0x61,0x2,0x61,0x9a,0x40,0x2e,0xc2,0x79,0x99,0x19,0x32,0x81,0x34,0xf,0xe0,0xf3,0xcc,0x0,0x0,0xa0,0x91,0x15,0x11,0xe0,0x83,0xf3,0xfd,0x78,0xce,0xe,0xae,0xce,0xce,0x36,0x8e,0xb6,0xe,0x5f,0x2d,0xea,0xbf,0x6,0xff,0x22,0x62,0x62,0xe3,0xfe,0xe5,0xcf,0xab,0x70,0x40,0x0,0x0,0xe1,0x74,0x7e,0xd1,0xfe,0x2c,0x2f,0xb3,0x1a,0x80,0x3b,0x6,0x80,0x6d,0xfe,0xa2,0x25,0xee,0x4,0x68,0x5e,0xb,0xa0,0x75,0xf7,0x8b,0x66,0xb2,0xf,0x40,0xb5,0x0,0xa0,0xe9,0xda,0x57,0xf3,0x70,0xf8,0x7e,0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e,0x2e,0xc2,0x55,0xb8,0xe,0x3d,0x70,0xf,0xfa,0x61,0x8,0x9e,0xc1,0x28,0xbc,0x81,0x9,0x4,0x41,0xc8,0x8,0x13,0x61,0x21,0xda,0x88,0x1,0x62,0x8a,0x58,0x23,0x8e,0x8,0x17,0x99,0x85,0xf8,0x21,0xc1,0x48,0x4,0x12,0x8b,0x24,0x20,0xc9,0x88,0x14,0x51,0x22,0x4b,0x91,0x35,0x48,0x31,0x52,0x8a,0x54,0x20,0x55,0x48,0x1d,0xf2,0x3d,0x72,0x2,0x39,0x87,0x5c,0x46,0xba,0x91,0x3b,0xc8,0x0,0x32,0x82,0xfc,0x86,0xbc,0x47,0x31,0x94,0x81,0xb2,0x51,0x3d,0xd4,0xc,0xb5,0x43,0xb9,0xa8,0x37,0x1a,0x84,0x46,0xa2,0xb,0xd0,0x64,0x74,0x31,0x9a,0x8f,0x16,0xa0,0x9b,0xd0,0x72,0xb4,0x1a,0x3d,0x8c,0x36,0xa1,0xe7,0xd0,0xab,0x68,0xf,0xda,0x8f,0x3e,0x43,0xc7,0x30,0xc0,0xe8,0x18,0x7,0x33,0xc4,0x6c,0x30,0x2e,0xc6,0xc3,0x42,0xb1,0x38,0x2c,0x9,0x93,0x63,0xcb,0xb1,0x22,0xac,0xc,0xab,0xc6,0x1a,0xb0,0x56,0xac,0x3,0xbb,0x89,0xf5,0x63,0xcf,0xb1,0x77,0x4,0x12,0x81,0x45,0xc0,0x9,0x36,0x4,0x77,0x42,0x20,0x61,0x1e,0x41,0x48,0x58,0x4c,0x58,0x4e,0xd8,0x48,0xa8,0x20,0x1c,0x24,0x34,0x11,0xda,0x9,0x37,0x9,0x3,0x84,0x51,0xc2,0x27,0x22,0x93,0xa8,0x4b,0xb4,0x26,0xba,0x11,0xf9,0xc4,0x18,0x62,0x32,0x31,0x87,0x58,0x48,0x2c,0x23,0xd6,0x12,0x8f,0x13,0x2f,0x10,0x7b,0x88,0x43,0xc4,0x37,0x24,0x12,0x89,0x43,0x32,0x27,0xb9,0x90,0x2,0x49,0xb1,0xa4,0x54,0xd2,0x12,0xd2,0x46,0xd2,0x6e,0x52,0x23,0xe9,0x2c,0xa9,0x9b,0x34,0x48,0x1a,0x23,0x93,0xc9,0xda,0x64,0x6b,0xb2,0x7,0x39,0x94,0x2c,0x20,0x2b,0xc8,0x85,0xe4,0x9d,0xe4,0xc3,0xe4,0x33,0xe4,0x1b,0xe4,0x21,0xf2,0x5b,0xa,0x9d,0x62,0x40,0x71,0xa4,0xf8,0x53,0xe2,0x28,0x52,0xca,0x6a,0x4a,0x19,0xe5,0x10,0xe5,0x34,0xe5,0x6,0x65,0x98,0x32,0x41,0x55,0xa3,0x9a,0x52,0xdd,0xa8,0xa1,0x54,0x11,0x35,0x8f,0x5a,0x42,0xad,0xa1,0xb6,0x52,0xaf,0x51,0x87,0xa8,0x13,0x34,0x75,0x9a,0x39,0xcd,0x83,0x16,0x49,0x4b,0xa5,0xad,0xa2,0x95,0xd3,0x1a,0x68,0x17,0x68,0xf7,0x69,0xaf,0xe8,0x74,0xba,0x11,0xdd,0x95,0x1e,0x4e,0x97,0xd0,0x57,0xd2,0xcb,0xe9,0x47,0xe8,0x97,0xe8,0x3,0xf4,0x77,0xc,0xd,0x86,0x15,0x83,0xc7,0x88,0x67,0x28,0x19,0x9b,0x18,0x7,0x18,0x67,0x19,0x77,0x18,0xaf,0x98,0x4c,0xa6,0x19,0xd3,0x8b,0x19,0xc7,0x54,0x30,0x37,0x31,0xeb,0x98,0xe7,0x99,0xf,0x99,0x6f,0x55,0x58,0x2a,0xb6,0x2a,0x7c,0x15,0x91,0xca,0xa,0x95,0x4a,0x95,0x26,0x95,0x1b,0x2a,0x2f,0x54,0xa9,0xaa,0xa6,0xaa,0xde,0xaa,0xb,0x55,0xf3,0x55,0xcb,0x54,0x8f,0xa9,0x5e,0x53,0x7d,0xae,0x46,0x55,0x33,0x53,0xe3,0xa9,0x9,0xd4,0x96,0xab,0x55,0xaa,0x9d,0x50,0xeb,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0x49,0x44,0x41,0x54,0x38,0xcb,0xa5,0x93,0x41,0x4a,0x3,0x51,0xc,0x86,0xbf,0x37,0xef,0xd1,0x11,0x5d,0x74,0x40,0xc1,0x5a,0xea,0x45,0xc4,0xa5,0x27,0xf0,0x34,0x73,0x84,0xe2,0x61,0x3c,0x81,0xee,0xc4,0x8b,0x8,0x76,0xd3,0xea,0x14,0x5a,0xe8,0x74,0xde,0x4b,0x5c,0x4c,0x46,0x2a,0xd4,0x3a,0xc5,0x40,0x20,0x8b,0xe4,0x4f,0xfe,0xf0,0xff,0xe,0x8,0xc0,0x0,0xc8,0x81,0x13,0xab,0x3d,0x90,0xf1,0x33,0x4,0x48,0xc0,0x16,0xd8,0x0,0x35,0xb0,0xed,0x86,0xcf,0x80,0x2,0x18,0x5a,0x9d,0x3,0xce,0x12,0x40,0x2d,0x6b,0x60,0xd,0x2c,0x81,0xa,0xdb,0x9e,0x3,0xc5,0xed,0xcd,0xdd,0xfd,0xf8,0xea,0xba,0x8c,0x29,0x16,0xaa,0xec,0xd,0xe7,0x20,0xf8,0x50,0xbd,0xcf,0xde,0xa6,0x2f,0xaf,0x4f,0x8f,0x40,0xc,0x76,0xf6,0x70,0x3c,0x9a,0x94,0xd5,0xe7,0xa2,0x88,0x31,0xa2,0xec,0x47,0x70,0x38,0x42,0x8,0xc5,0x78,0x34,0x29,0x81,0x67,0x60,0xf5,0x4d,0xa1,0x89,0x4d,0xd1,0xc4,0xe6,0xd7,0xe1,0x96,0x87,0xd2,0xc4,0x86,0x26,0x36,0x85,0x51,0x1d,0x4,0x7b,0x58,0x2e,0x22,0x88,0xa,0x7f,0x85,0xa2,0x88,0x8,0x46,0xdd,0x7,0xfb,0xb6,0x53,0x51,0x54,0x94,0x3e,0x61,0x7d,0xe,0xc8,0x42,0x47,0x2f,0x69,0xea,0x75,0x1,0x40,0xd2,0xd4,0x1,0x10,0x76,0x51,0x55,0x8f,0xba,0x80,0x5d,0x0,0x55,0x3d,0x2,0xa0,0xed,0xd3,0xe,0x40,0x5a,0xd0,0x84,0xf6,0xa4,0x20,0x2d,0x5,0x5,0x24,0x98,0x3c,0x6b,0x84,0xde,0x4f,0xa4,0xdd,0x53,0x3,0x29,0x33,0x6d,0xaf,0x71,0x59,0x95,0x79,0x8f,0xa8,0x1e,0xcc,0xcc,0x7b,0x70,0x59,0x65,0x92,0xde,0x6,0x33,0xc6,0x72,0xbe,0x98,0x4d,0x2f,0xce,0x2f,0xcb,0x24,0xa9,0xe0,0x80,0x96,0x7d,0x16,0x3e,0xe6,0x8b,0xd9,0x83,0xf9,0x61,0xe3,0x80,0xd3,0x7f,0x98,0x69,0x1d,0x8c,0x2,0x40,0x4,0x56,0xc7,0xda,0xf9,0xb,0x57,0x2d,0xbb,0xf5,0x2d,0xe4,0x89,0x1b,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82 }; diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/scene_format_text.cpp index aef11433dc..ca85ca957a 100644 --- a/scene/resources/scene_format_text.cpp +++ b/scene/resources/scene_format_text.cpp @@ -473,8 +473,8 @@ Error ResourceInteractiveLoaderText::poll() { } Vector<int> bind_ints; - for(int i=9;i<binds.size();i++) { - bind_ints.push_back( packed_scene->get_state()->add_value( bind_ints[i] ) ); + for(int i=0;i<binds.size();i++) { + bind_ints.push_back( packed_scene->get_state()->add_value( binds[i] ) ); } packed_scene->get_state()->add_connection( @@ -1366,10 +1366,10 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path,const RES& p_re Array binds=state->get_connection_binds(i); f->store_string(connstr); - if (binds.size()) { + if (binds.size()) { String vars; VariantWriter::write_to_string(binds,vars,_write_resources,this); - f->store_string("binds= "+vars); + f->store_string(" binds= "+vars); } diff --git a/scene/resources/shader_graph.cpp b/scene/resources/shader_graph.cpp index e485379182..eabc84c41e 100644 --- a/scene/resources/shader_graph.cpp +++ b/scene/resources/shader_graph.cpp @@ -1533,7 +1533,7 @@ const ShaderGraph::NodeSlotInfo ShaderGraph::node_slot_info[]= { {NODE_CURVE_MAP,{SLOT_TYPE_SCALAR,SLOT_MAX},{SLOT_TYPE_SCALAR,SLOT_MAX}}, // vec3 interpolation (with optional curve) {NODE_SCALAR_INPUT,{SLOT_MAX},{SLOT_TYPE_SCALAR,SLOT_MAX}}, // scalar uniform (assignable in material) {NODE_VEC_INPUT,{SLOT_MAX},{SLOT_TYPE_VEC,SLOT_MAX}}, // vec3 uniform (assignable in material) - {NODE_RGB_INPUT,{SLOT_MAX},{SLOT_TYPE_VEC,SLOT_MAX}}, // color uniform (assignable in material) + {NODE_RGB_INPUT,{SLOT_MAX},{SLOT_TYPE_VEC,SLOT_TYPE_SCALAR,SLOT_MAX}}, // color uniform (assignable in material) {NODE_XFORM_INPUT,{SLOT_MAX},{SLOT_TYPE_XFORM,SLOT_MAX}}, // mat4 uniform (assignable in material) {NODE_TEXTURE_INPUT,{SLOT_TYPE_VEC,SLOT_MAX},{SLOT_TYPE_VEC,SLOT_TYPE_SCALAR,SLOT_MAX}}, // texture input (assignable in material) {NODE_CUBEMAP_INPUT,{SLOT_TYPE_VEC,SLOT_MAX},{SLOT_TYPE_VEC,SLOT_TYPE_SCALAR,SLOT_MAX}}, // cubemap input (assignable in material) @@ -2576,8 +2576,9 @@ void ShaderGraph::_add_node_code(ShaderType p_type,Node *p_node,const Vector<Str String name = p_node->param1; Color dv= p_node->param2; - code +="uniform color "+name+"=vec4("+rtos(dv.r)+","+rtos(dv.g)+","+rtos(dv.g)+","+rtos(dv.a)+");\n"; + code +="uniform color "+name+"=vec4("+rtos(dv.r)+","+rtos(dv.g)+","+rtos(dv.b)+","+rtos(dv.a)+");\n"; code += OUTNAME(p_node->id,0)+"="+name+".rgb;\n"; + code += OUTNAME(p_node->id,1)+"="+name+".a;\n"; }break; case NODE_XFORM_INPUT: { |