summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/immediate_geometry.cpp8
-rw-r--r--scene/3d/immediate_geometry.h2
-rw-r--r--scene/gui/dialogs.cpp2
-rw-r--r--scene/gui/graph_edit.cpp20
-rw-r--r--scene/gui/graph_edit.h1
-rw-r--r--scene/gui/graph_node.cpp31
-rw-r--r--scene/gui/graph_node.h3
-rw-r--r--scene/gui/item_list.cpp18
-rw-r--r--scene/gui/item_list.h4
-rw-r--r--scene/gui/line_edit.cpp79
-rw-r--r--scene/gui/line_edit.h8
-rw-r--r--scene/gui/texture_progress.cpp1
-rw-r--r--scene/main/node.cpp10
-rw-r--r--scene/main/scene_main_loop.cpp8
-rw-r--r--scene/resources/default_theme/default_theme.cpp2
-rw-r--r--scene/resources/default_theme/graph_node_comment_focus.pngbin0 -> 482 bytes
-rw-r--r--scene/resources/default_theme/theme_data.h5
17 files changed, 149 insertions, 53 deletions
diff --git a/scene/3d/immediate_geometry.cpp b/scene/3d/immediate_geometry.cpp
index e83fa69b4f..c9319904bd 100644
--- a/scene/3d/immediate_geometry.cpp
+++ b/scene/3d/immediate_geometry.cpp
@@ -102,7 +102,7 @@ DVector<Face3> ImmediateGeometry::get_faces(uint32_t p_usage_flags) const {
-void ImmediateGeometry::add_sphere(int p_lats,int p_lons,float p_radius) {
+void ImmediateGeometry::add_sphere(int p_lats, int p_lons, float p_radius, bool p_add_uv) {
for(int i = 1; i <= p_lats; i++) {
double lat0 = Math_PI * (-0.5 + (double) (i - 1) / p_lats);
@@ -132,6 +132,10 @@ void ImmediateGeometry::add_sphere(int p_lats,int p_lons,float p_radius) {
};
#define ADD_POINT(m_idx)\
+ if (p_add_uv) {\
+ set_uv(Vector2(Math::atan2(v[m_idx].x,v[m_idx].z)/Math_PI * 0.5+0.5,v[m_idx].y*0.5+0.5));\
+ set_tangent(Plane(Vector3(-v[m_idx].z,v[m_idx].y,v[m_idx].x),1)); \
+ }\
set_normal(v[m_idx]);\
add_vertex(v[m_idx]*p_radius);
@@ -156,7 +160,7 @@ void ImmediateGeometry::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_uv","uv"),&ImmediateGeometry::set_uv);
ObjectTypeDB::bind_method(_MD("set_uv2","uv"),&ImmediateGeometry::set_uv2);
ObjectTypeDB::bind_method(_MD("add_vertex","pos"),&ImmediateGeometry::add_vertex);
- ObjectTypeDB::bind_method(_MD("add_sphere","lats","lons","radius"),&ImmediateGeometry::add_sphere);
+ ObjectTypeDB::bind_method(_MD("add_sphere","lats","lons","radius","add_uv"),&ImmediateGeometry::add_sphere,DEFVAL(true));
ObjectTypeDB::bind_method(_MD("end"),&ImmediateGeometry::end);
ObjectTypeDB::bind_method(_MD("clear"),&ImmediateGeometry::clear);
diff --git a/scene/3d/immediate_geometry.h b/scene/3d/immediate_geometry.h
index c1cc4f87d5..fc7f4de634 100644
--- a/scene/3d/immediate_geometry.h
+++ b/scene/3d/immediate_geometry.h
@@ -62,7 +62,7 @@ public:
void clear();
- void add_sphere(int p_lats,int p_lons,float p_radius);
+ void add_sphere(int p_lats,int p_lons,float p_radius,bool p_add_uv=true);
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index 4dbc106834..93e46da82b 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -399,8 +399,6 @@ AcceptDialog::AcceptDialog() {
add_child(label);
hbc = memnew( HBoxContainer );
- hbc->set_area_as_parent_rect(margin);
- hbc->set_anchor_and_margin(MARGIN_TOP,ANCHOR_END,button_margin);
add_child(hbc);
hbc->add_spacer();
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index 2307b33345..0de6add8cb 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -360,7 +360,8 @@ bool GraphEdit::_filter_input(const Point2& p_point) {
Ref<Texture> port =get_icon("port","GraphNode");
- float grab_r=port->get_width()*0.5;
+ float grab_r_extend = 2.0;
+ float grab_r=port->get_width()*0.5*grab_r_extend;
for(int i=get_child_count()-1;i>=0;i--) {
GraphNode *gn=get_child(i)->cast_to<GraphNode>();
@@ -379,8 +380,9 @@ bool GraphEdit::_filter_input(const Point2& p_point) {
for(int j=0;j<gn->get_connection_input_count();j++) {
Vector2 pos = gn->get_connection_input_pos(j)+gn->get_pos();
- if (pos.distance_to(p_point)<grab_r)
+ if (pos.distance_to(p_point)<grab_r) {
return true;
+ }
}
@@ -392,11 +394,13 @@ bool GraphEdit::_filter_input(const Point2& p_point) {
void GraphEdit::_top_layer_input(const InputEvent& p_ev) {
+
+ float grab_r_extend = 2.0;
if (p_ev.type==InputEvent::MOUSE_BUTTON && p_ev.mouse_button.button_index==BUTTON_LEFT && p_ev.mouse_button.pressed) {
Ref<Texture> port =get_icon("port","GraphNode");
Vector2 mpos(p_ev.mouse_button.x,p_ev.mouse_button.y);
- float grab_r=port->get_width()*0.5;
+ float grab_r=port->get_width()*0.5*grab_r_extend;
for(int i=get_child_count()-1;i>=0;i--) {
GraphNode *gn=get_child(i)->cast_to<GraphNode>();
@@ -425,6 +429,7 @@ void GraphEdit::_top_layer_input(const InputEvent& p_ev) {
connecting_color=to->cast_to<GraphNode>()->get_connection_input_color(E->get().to_port);
connecting_target=false;
connecting_to=pos;
+ just_disconected=true;
emit_signal("disconnection_request",E->get().from,E->get().from_port,E->get().to,E->get().to_port);
to = get_node(String(connecting_from)); //maybe it was erased
@@ -446,6 +451,7 @@ void GraphEdit::_top_layer_input(const InputEvent& p_ev) {
connecting_color=gn->get_connection_output_color(j);
connecting_target=false;
connecting_to=pos;
+ just_disconected=false;
return;
}
@@ -474,6 +480,7 @@ void GraphEdit::_top_layer_input(const InputEvent& p_ev) {
connecting_color=fr->cast_to<GraphNode>()->get_connection_output_color(E->get().from_port);
connecting_target=false;
connecting_to=pos;
+ just_disconected=true;
emit_signal("disconnection_request",E->get().from,E->get().from_port,E->get().to,E->get().to_port);
fr = get_node(String(connecting_from)); //maybe it was erased
@@ -496,6 +503,8 @@ void GraphEdit::_top_layer_input(const InputEvent& p_ev) {
connecting_color=gn->get_connection_input_color(j);
connecting_target=false;
connecting_to=pos;
+ just_disconected=true;
+
return;
}
@@ -512,7 +521,7 @@ void GraphEdit::_top_layer_input(const InputEvent& p_ev) {
Ref<Texture> port =get_icon("port","GraphNode");
Vector2 mpos(p_ev.mouse_button.x,p_ev.mouse_button.y);
- float grab_r=port->get_width()*0.5;
+ float grab_r=port->get_width()*0.5*grab_r_extend;
for(int i=get_child_count()-1;i>=0;i--) {
GraphNode *gn=get_child(i)->cast_to<GraphNode>();
@@ -568,7 +577,7 @@ void GraphEdit::_top_layer_input(const InputEvent& p_ev) {
}
emit_signal("connection_request",from,from_slot,to,to_slot);
- } else {
+ } else if (!just_disconected) {
String from = connecting_from;
int from_slot = connecting_index;
Vector2 ofs = Vector2(p_ev.mouse_button.x,p_ev.mouse_button.y);
@@ -1323,6 +1332,7 @@ GraphEdit::GraphEdit() {
zoom_hb->add_child(snap_amount);
setting_scroll_ofs=false;
+ just_disconected=false;
diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h
index ed6e4ef6ac..c5174f6699 100644
--- a/scene/gui/graph_edit.h
+++ b/scene/gui/graph_edit.h
@@ -92,6 +92,7 @@ private:
Vector2 connecting_to;
String connecting_target_to;
int connecting_target_index;
+ bool just_disconected;
bool dragging;
bool just_selected;
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index 5ece970936..da298a795a 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -183,12 +183,39 @@ void GraphNode::_resort() {
}
+bool GraphNode::has_point(const Point2& p_point) const {
+
+ if (comment) {
+ Ref<StyleBox> comment = get_stylebox("comment");
+ Ref<Texture> resizer =get_icon("resizer");
+
+ if (Rect2(get_size()-resizer->get_size(), resizer->get_size()).has_point(p_point)) {
+ return true;
+ }
+ if (Rect2(0,0,get_size().width,comment->get_margin(MARGIN_TOP)).has_point(p_point)) {
+ return true;
+ }
+
+ return false;
+
+ } else {
+ return Control::has_point(p_point);
+ }
+}
void GraphNode::_notification(int p_what) {
if (p_what==NOTIFICATION_DRAW) {
- Ref<StyleBox> sb=get_stylebox(comment? "comment": (selected ? "selectedframe" : "frame"));
+ Ref<StyleBox> sb;
+
+ if (comment) {
+ sb = get_stylebox( selected? "commentfocus" : "comment");
+
+ } else {
+
+ sb = get_stylebox( selected ? "selectedframe" : "frame");
+ }
sb=sb->duplicate();
sb->call("set_modulate",modulate);
@@ -601,6 +628,8 @@ void GraphNode::_input_event(const InputEvent& p_ev) {
ERR_EXPLAIN("GraphNode must be the child of a GraphEdit node.");
ERR_FAIL_COND(get_parent_control() == NULL);
+ print_line("INPUT EVENT BUTTON");
+
if(p_ev.mouse_button.pressed && p_ev.mouse_button.button_index==BUTTON_LEFT) {
Vector2 mpos = Vector2(p_ev.mouse_button.x,p_ev.mouse_button.y);
diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h
index 7357ab5a45..cbfd34f556 100644
--- a/scene/gui/graph_node.h
+++ b/scene/gui/graph_node.h
@@ -93,6 +93,9 @@ private:
Overlay overlay;
Color modulate;
+
+ bool has_point(const Point2& p_point) const;
+
protected:
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 105d919338..63902ef815 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -40,6 +40,7 @@ void ItemList::add_item(const String& p_item,const Ref<Texture>& p_texture,bool
item.selectable=p_selectable;
item.selected=false;
item.disabled=false;
+ item.tooltip_enabled=true;
item.custom_bg=Color(0,0,0,0);
items.push_back(item);
@@ -57,6 +58,7 @@ void ItemList::add_icon_item(const Ref<Texture>& p_item,bool p_selectable){
item.selectable=p_selectable;
item.selected=false;
item.disabled=false;
+ item.tooltip_enabled=true;
item.custom_bg=Color(0,0,0,0);
items.push_back(item);
@@ -82,6 +84,16 @@ String ItemList::get_item_text(int p_idx) const{
}
+void ItemList::set_item_tooltip_enabled(int p_idx, const bool p_enabled) {
+ ERR_FAIL_INDEX(p_idx,items.size());
+ items[p_idx].tooltip_enabled = p_enabled;
+}
+
+bool ItemList::is_item_tooltip_enabled(int p_idx) const {
+ ERR_FAIL_INDEX_V(p_idx,items.size(), false);
+ return items[p_idx].tooltip_enabled;
+}
+
void ItemList::set_item_tooltip(int p_idx,const String& p_tooltip){
ERR_FAIL_INDEX(p_idx,items.size());
@@ -1198,6 +1210,9 @@ String ItemList::get_tooltip(const Point2& p_pos) const {
int closest = get_item_at_pos(p_pos);
if (closest!=-1) {
+ if (!items[closest].tooltip_enabled) {
+ return "";
+ }
if (items[closest].tooltip!="") {
return items[closest].tooltip;
}
@@ -1294,6 +1309,9 @@ void ItemList::_bind_methods(){
ObjectTypeDB::bind_method(_MD("set_item_custom_bg_color","idx","custom_bg_color"),&ItemList::set_item_custom_bg_color);
ObjectTypeDB::bind_method(_MD("get_item_custom_bg_color","idx"),&ItemList::get_item_custom_bg_color);
+ ObjectTypeDB::bind_method(_MD("set_item_tooltip_enabled","idx","enable"),&ItemList::set_item_tooltip_enabled);
+ ObjectTypeDB::bind_method(_MD("is_item_tooltip_enabled","idx"),&ItemList::is_item_tooltip_enabled);
+
ObjectTypeDB::bind_method(_MD("set_item_tooltip","idx","tooltip"),&ItemList::set_item_tooltip);
ObjectTypeDB::bind_method(_MD("get_item_tooltip","idx"),&ItemList::get_item_tooltip);
diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h
index e1902d1c1f..91c74b5291 100644
--- a/scene/gui/item_list.h
+++ b/scene/gui/item_list.h
@@ -56,6 +56,7 @@ private:
bool selectable;
bool selected;
bool disabled;
+ bool tooltip_enabled;
Variant metadata;
String tooltip;
Color custom_bg;
@@ -135,6 +136,9 @@ public:
void set_item_tag_icon(int p_idx,const Ref<Texture>& p_tag_icon);
Ref<Texture> get_item_tag_icon(int p_idx) const;
+ void set_item_tooltip_enabled(int p_idx, const bool p_enabled);
+ bool is_item_tooltip_enabled(int p_idx) const;
+
void set_item_tooltip(int p_idx,const String& p_tooltip);
String get_item_tooltip(int p_idx) const;
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index fcea12fd6b..90a8af9238 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -193,8 +193,8 @@ void LineEdit::_input_event(InputEvent p_event) {
}
set_cursor_pos(0);
- emit_signal("text_changed",text);
- _change_notify("text");
+ _text_changed();
+
}
@@ -215,8 +215,7 @@ void LineEdit::_input_event(InputEvent p_event) {
selection_clear();
undo_text = text;
text = text.substr(0,cursor_pos);
- emit_signal("text_changed",text);
- _change_notify("text");
+ _text_changed();
}
} break;
@@ -475,9 +474,7 @@ void LineEdit::_input_event(InputEvent p_event) {
selection_delete();
CharType ucodestr[2]={(CharType)k.unicode,0};
append_at_cursor(ucodestr);
- emit_signal("text_changed",text);
- _change_notify("text");
-
+ _text_changed();
accept_event();
}
@@ -725,8 +722,7 @@ void LineEdit::paste_text() {
if(selection.enabled) selection_delete();
append_at_cursor(paste_buffer);
- emit_signal("text_changed",text);
- _change_notify("text");
+ _text_changed();
}
@@ -750,9 +746,7 @@ void LineEdit::undo() {
set_cursor_pos(old_cursor_pos);
}
- emit_signal("text_changed",text);
- _change_notify("text");
-
+ _text_changed();
}
void LineEdit::shift_selection_check_pre(bool p_shift) {
@@ -806,16 +800,6 @@ void LineEdit::set_cursor_at_pixel_pos(int p_x) {
pixel_ofs+=char_w;
if (pixel_ofs > p_x) { //found what we look for
-
-
- if ( (pixel_ofs-p_x) < (char_w >> 1 ) ) {
-
- ofs+=1;
- } else if ( (pixel_ofs-p_x) > (char_w >> 1 ) ) {
-
- ofs-=1;
- }
-
break;
}
@@ -891,8 +875,7 @@ void LineEdit::delete_char() {
// set_window_pos(cursor_pos-get_window_length());
}
- emit_signal("text_changed",text);
- _change_notify("text");
+ _text_changed();
}
void LineEdit::delete_text(int p_from_column, int p_to_column) {
@@ -924,8 +907,7 @@ void LineEdit::delete_text(int p_from_column, int p_to_column) {
window_pos=cursor_pos;
}
- emit_signal("text_changed",text);
- _change_notify("text");
+ _text_changed();
}
void LineEdit::set_text(String p_text) {
@@ -940,8 +922,7 @@ void LineEdit::set_text(String p_text) {
void LineEdit::clear() {
clear_internal();
- emit_signal("text_changed",text);
- _change_notify("text");
+ _text_changed();
}
String LineEdit::get_text() const {
@@ -1080,7 +1061,17 @@ Size2 LineEdit::get_minimum_size() const {
Size2 min=style->get_minimum_size();
min.height+=font->get_height();
- min.width+=get_constant("minimum_spaces")*font->get_char_size(' ').x;
+
+ //minimum size of text
+ int space_size = font->get_char_size(' ').x;
+ int mstext = get_constant("minimum_spaces")*space_size;
+
+ if (expand_to_text_length) {
+ mstext=MAX(mstext,font->get_string_size(text).x+space_size); //add a spce because some fonts are too exact
+ }
+
+ min.width+=mstext;
+
return min;
}
@@ -1236,6 +1227,29 @@ PopupMenu *LineEdit::get_menu() const {
}
#endif
+
+void LineEdit::set_expand_to_text_length(bool p_enabled) {
+
+ expand_to_text_length = p_enabled;
+ minimum_size_changed();
+}
+
+bool LineEdit::get_expand_to_text_length() const{
+
+ return expand_to_text_length;
+}
+
+
+void LineEdit::_text_changed() {
+
+ if (expand_to_text_length)
+ minimum_size_changed();
+
+ emit_signal("text_changed",text);
+ _change_notify("text");
+
+}
+
void LineEdit::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_toggle_draw_caret"),&LineEdit::_toggle_draw_caret);
@@ -1258,7 +1272,9 @@ void LineEdit::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_placeholder_alpha"),&LineEdit::get_placeholder_alpha);
ObjectTypeDB::bind_method(_MD("set_cursor_pos","pos"),&LineEdit::set_cursor_pos);
ObjectTypeDB::bind_method(_MD("get_cursor_pos"),&LineEdit::get_cursor_pos);
- ObjectTypeDB::bind_method(_MD("cursor_set_blink_enabled", "enable"),&LineEdit::cursor_set_blink_enabled);
+ ObjectTypeDB::bind_method(_MD("set_expand_to_text_length","enabled"),&LineEdit::set_expand_to_text_length);
+ ObjectTypeDB::bind_method(_MD("get_expand_to_text_length"),&LineEdit::get_expand_to_text_length);
+ ObjectTypeDB::bind_method(_MD("cursor_set_blink_enabled", "enabled"),&LineEdit::cursor_set_blink_enabled);
ObjectTypeDB::bind_method(_MD("cursor_get_blink_enabled"),&LineEdit::cursor_get_blink_enabled);
ObjectTypeDB::bind_method(_MD("cursor_set_blink_speed", "blink_speed"),&LineEdit::cursor_set_blink_speed);
ObjectTypeDB::bind_method(_MD("cursor_get_blink_speed"),&LineEdit::cursor_get_blink_speed);
@@ -1296,6 +1312,7 @@ void LineEdit::_bind_methods() {
ADD_PROPERTYNZ( PropertyInfo( Variant::INT, "max_length" ), _SCS("set_max_length"),_SCS("get_max_length") );
ADD_PROPERTYNO( PropertyInfo( Variant::BOOL, "editable" ), _SCS("set_editable"),_SCS("is_editable") );
ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "secret" ), _SCS("set_secret"),_SCS("is_secret") );
+ ADD_PROPERTYNO( PropertyInfo( Variant::BOOL, "expand_to_len" ), _SCS("set_expand_to_text_length"),_SCS("get_expand_to_text_length") );
ADD_PROPERTY( PropertyInfo( Variant::INT,"focus_mode", PROPERTY_HINT_ENUM, "None,Click,All" ), _SCS("set_focus_mode"), _SCS("get_focus_mode") );
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret/caret_blink"), _SCS("cursor_set_blink_enabled"), _SCS("cursor_get_blink_enabled"));;
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "caret/caret_blink_speed",PROPERTY_HINT_RANGE,"0.1,10,0.1"), _SCS("cursor_set_blink_speed"),_SCS("cursor_get_blink_speed") );
@@ -1337,7 +1354,7 @@ LineEdit::LineEdit() {
menu->add_separator();
menu->add_item(TTR("Undo"),MENU_UNDO,KEY_MASK_CMD|KEY_Z);
menu->connect("item_pressed",this,"menu_option");
-
+ expand_to_text_length=false;
}
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index 112e4ad55e..47d5706bbe 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -90,6 +90,11 @@ private:
} selection;
Timer *caret_blink_timer;
+
+
+ void _text_changed();
+ bool expand_to_text_length;
+
bool caret_blink_enabled;
bool draw_caret;
bool window_has_focus;
@@ -169,6 +174,9 @@ public:
virtual Size2 get_minimum_size() const;
+ void set_expand_to_text_length(bool p_len);
+ bool get_expand_to_text_length() const;
+
virtual bool is_text_field() const;
LineEdit();
~LineEdit();
diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp
index 923a35031c..2c576b6ba5 100644
--- a/scene/gui/texture_progress.cpp
+++ b/scene/gui/texture_progress.cpp
@@ -297,6 +297,7 @@ void TextureProgress::_bind_methods() {
TextureProgress::TextureProgress()
{
mode=FILL_LEFT_TO_RIGHT;
+ rad_init_angle=0;
rad_center_off=Point2();
rad_max_degrees=360;
}
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 086b69c1c5..1892240426 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2903,16 +2903,16 @@ void Node::_bind_methods() {
mi.name="rpc";
- ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"rpc",&Node::_rpc_bind,mi);
+ ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc",&Node::_rpc_bind,mi);
mi.name="rpc_unreliable";
- ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"rpc_unreliable",&Node::_rpc_unreliable_bind,mi);
+ ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc_unreliable",&Node::_rpc_unreliable_bind,mi);
- mi.arguments.push_front( PropertyInfo( Variant::INT, "peer_") );
+ mi.arguments.push_front( PropertyInfo( Variant::INT, "peer_id") );
mi.name="rpc_id";
- ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"rpc_id",&Node::_rpc_id_bind,mi);
+ ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc_id",&Node::_rpc_id_bind,mi);
mi.name="rpc_unreliable_id";
- ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"rpc_unreliable_id",&Node::_rpc_unreliable_id_bind,mi);
+ ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc_unreliable_id",&Node::_rpc_unreliable_id_bind,mi);
}
diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp
index 4c7b7c1399..e3472c074a 100644
--- a/scene/main/scene_main_loop.cpp
+++ b/scene/main/scene_main_loop.cpp
@@ -2200,13 +2200,9 @@ void SceneTree::_bind_methods() {
mi.arguments.push_back( PropertyInfo( Variant::INT, "flags"));
mi.arguments.push_back( PropertyInfo( Variant::STRING, "group"));
mi.arguments.push_back( PropertyInfo( Variant::STRING, "method"));
- Vector<Variant> defargs;
- for(int i=0;i<VARIANT_ARG_MAX;i++) {
- mi.arguments.push_back( PropertyInfo( Variant::NIL, "arg"+itos(i)));
- defargs.push_back(Variant());
- }
- ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"call_group",&SceneTree::_call_group,mi,defargs);
+
+ ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"call_group",&SceneTree::_call_group,mi);
ObjectTypeDB::bind_method(_MD("set_current_scene","child_node:Node"),&SceneTree::set_current_scene);
ObjectTypeDB::bind_method(_MD("get_current_scene:Node"),&SceneTree::get_current_scene);
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 8c1233b634..03f28bef08 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -628,6 +628,7 @@ void fill_default_theme(Ref<Theme>& t,const Ref<Font> & default_font,const Ref<F
Ref<StyleBoxTexture> graphsb = make_stylebox(graph_node_png,6,24,6,5,16,24,16,5);
Ref<StyleBoxTexture> graphsbcomment = make_stylebox(graph_node_comment_png,6,24,6,5,16,24,16,5);
+ Ref<StyleBoxTexture> graphsbcommentselected = make_stylebox(graph_node_comment_focus_png,6,24,6,5,16,24,16,5);
Ref<StyleBoxTexture> graphsbselected = make_stylebox(graph_node_selected_png,6,24,6,5,16,24,16,5);
Ref<StyleBoxTexture> graphsbdefault = make_stylebox(graph_node_default_png,4,4,4,4,6,4,4,4);
Ref<StyleBoxTexture> graphsbdeffocus = make_stylebox(graph_node_default_focus_png,4,4,4,4,6,4,4,4);
@@ -641,6 +642,7 @@ void fill_default_theme(Ref<Theme>& t,const Ref<Font> & default_font,const Ref<F
t->set_stylebox("defaultframe", "GraphNode", graphsbdefault );
t->set_stylebox("defaultfocus", "GraphNode", graphsbdeffocus );
t->set_stylebox("comment", "GraphNode", graphsbcomment );
+ t->set_stylebox("commentfocus", "GraphNode", graphsbcommentselected );
t->set_stylebox("breakpoint", "GraphNode", graph_bpoint );
t->set_stylebox("position", "GraphNode", graph_position );
t->set_constant("separation","GraphNode", 1 *scale);
diff --git a/scene/resources/default_theme/graph_node_comment_focus.png b/scene/resources/default_theme/graph_node_comment_focus.png
new file mode 100644
index 0000000000..a4b7b5a618
--- /dev/null
+++ b/scene/resources/default_theme/graph_node_comment_focus.png
Binary files differ
diff --git a/scene/resources/default_theme/theme_data.h b/scene/resources/default_theme/theme_data.h
index ea68901196..73c801483f 100644
--- a/scene/resources/default_theme/theme_data.h
+++ b/scene/resources/default_theme/theme_data.h
@@ -119,6 +119,11 @@ static const unsigned char graph_node_comment_png[]={
};
+static const unsigned char graph_node_comment_focus_png[]={
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x40,0x8,0x6,0x0,0x0,0x0,0x13,0x7d,0xf7,0x96,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x0,0x0,0x0,0x0,0x0,0xf9,0x43,0xbb,0x7f,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xe0,0x9,0x2,0xe,0x16,0x22,0xbe,0xef,0xc2,0xe1,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,0x4a,0x49,0x44,0x41,0x54,0x58,0xc3,0xed,0xd7,0xbf,0x4b,0xdb,0x41,0x1c,0xc6,0xf1,0xd7,0x37,0x51,0x4,0x3,0xa,0xa2,0x20,0xd2,0xe2,0xe2,0x64,0x41,0xdc,0xdc,0xac,0xe0,0x54,0xdc,0xb2,0xe6,0x2f,0x10,0x1a,0xf0,0x4f,0x11,0x22,0xf8,0x17,0x64,0xcd,0x26,0x9d,0x1c,0x74,0x73,0x13,0x21,0x4e,0x2e,0xa5,0xa5,0x14,0xac,0x82,0x82,0x62,0xd0,0x7c,0xd3,0xa1,0x77,0x18,0x35,0xfe,0x48,0xa4,0xdb,0x3d,0x70,0xdc,0xf2,0x79,0xde,0x77,0xf7,0x39,0x38,0xee,0xc9,0xdc,0x2b,0x43,0x1,0xc5,0x30,0x67,0x1e,0xaa,0x83,0x1c,0xed,0x30,0x77,0x74,0x15,0x15,0x30,0x8a,0x9,0x4c,0x61,0xc,0xc3,0x8f,0x0,0xb7,0xb8,0xc4,0x29,0xce,0x71,0x8d,0x3c,0xae,0x5a,0xc2,0x5c,0xa3,0x5a,0x59,0xc7,0x17,0x7c,0xd0,0x5b,0x3f,0xf1,0xad,0x5c,0xab,0x6f,0xe3,0x4,0x57,0x59,0x58,0x69,0xb6,0x51,0xad,0x6c,0x62,0xed,0x77,0xf3,0xf0,0x87,0x17,0x34,0xfd,0x69,0xf1,0x23,0x76,0xca,0xb5,0xfa,0x6,0xbe,0xc7,0x33,0x4f,0x61,0xe5,0x35,0x33,0x84,0x9a,0x95,0xe0,0x29,0xc6,0x66,0x95,0xc2,0x78,0xab,0x62,0x7d,0x16,0x1,0x45,0xfd,0xab,0x18,0x1,0x9d,0x78,0x25,0x83,0xa8,0xe0,0x9d,0x4a,0x80,0x4,0x48,0x80,0x7f,0x1a,0xea,0xf1,0xda,0xc,0xe,0x38,0xd8,0xdf,0x5b,0x7d,0x8b,0x69,0x69,0xf9,0xf3,0x6e,0xba,0x85,0x4,0x48,0x80,0x4,0x48,0x80,0x4,0x48,0x80,0x4,0xf8,0xaf,0x80,0xac,0x47,0x46,0xec,0x7b,0x7,0xf9,0x0,0xde,0x3c,0x2,0x72,0xdc,0xa0,0xd5,0x87,0xb9,0x15,0x3c,0x79,0x21,0x44,0xd9,0x33,0x34,0xbb,0x3f,0x4f,0xaf,0x7c,0xb0,0x9a,0xc1,0xd3,0x8e,0xc9,0x75,0x1c,0xb,0x8d,0x6a,0x65,0xb,0xf3,0x2f,0x34,0x37,0xc7,0x71,0xb9,0x56,0xff,0x8a,0x23,0x5c,0x64,0x5d,0x11,0x6e,0xc,0x33,0x98,0xc4,0xc8,0x33,0xe1,0xbb,0x85,0x3f,0xf8,0x15,0x72,0x74,0x3b,0x7b,0xd4,0xd0,0xa1,0x98,0x7,0x9f,0xd9,0x41,0x27,0x1c,0xf9,0x6e,0xc0,0xc6,0x3f,0xd5,0x5f,0x9d,0x54,0x4e,0x15,0xfd,0xeb,0xb4,0x4f,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+
static const unsigned char graph_node_default_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,0x3,0x0,0x0,0x0,0x28,0x2d,0xf,0x53,0x0,0x0,0x0,0x4,0x67,0x41,0x4d,0x41,0x0,0x0,0xb1,0x8f,0xb,0xfc,0x61,0x5,0x0,0x0,0x0,0x20,0x63,0x48,0x52,0x4d,0x0,0x0,0x7a,0x26,0x0,0x0,0x80,0x84,0x0,0x0,0xfa,0x0,0x0,0x0,0x80,0xe8,0x0,0x0,0x75,0x30,0x0,0x0,0xea,0x60,0x0,0x0,0x3a,0x98,0x0,0x0,0x17,0x70,0x9c,0xba,0x51,0x3c,0x0,0x0,0x0,0x39,0x50,0x4c,0x54,0x45,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x16,0x12,0x19,0xe,0xb,0x10,0xe,0xb,0x10,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x16,0x12,0x19,0x0,0x0,0x0,0x19,0x15,0x1c,0x24,0x1e,0x27,0x16,0x12,0x19,0xff,0xff,0xff,0x2b,0x4d,0xfd,0x66,0x0,0x0,0x0,0xf,0x74,0x52,0x4e,0x53,0x0,0x46,0x47,0x3f,0x2b,0x11,0x3,0xfd,0xd3,0xcd,0x2a,0x73,0x45,0xf8,0x3d,0x3f,0x57,0xda,0x84,0x0,0x0,0x0,0x1,0x62,0x4b,0x47,0x44,0x12,0x7b,0xbc,0x6c,0x0,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xe0,0x6,0x16,0x12,0x2b,0x4,0x4e,0x1d,0x2,0xaf,0x0,0x0,0x0,0x38,0x49,0x44,0x41,0x54,0x18,0xd3,0x63,0x60,0x64,0x2,0x2,0x46,0x8,0xc9,0xcc,0xc2,0xca,0xc6,0xc0,0x8f,0x4,0xd8,0x39,0x98,0x59,0x19,0x50,0x80,0x0,0x27,0x17,0xaa,0x0,0x83,0x20,0x37,0x9a,0x0,0x3f,0xd3,0xc0,0x8,0xf0,0xa0,0x9,0xf0,0xf2,0x61,0x3a,0x1d,0xc3,0x73,0xe8,0xde,0x7,0x0,0x89,0x4d,0x2,0xf2,0x16,0xd3,0x74,0x45,0x0,0x0,0x0,0x25,0x74,0x45,0x58,0x74,0x64,0x61,0x74,0x65,0x3a,0x63,0x72,0x65,0x61,0x74,0x65,0x0,0x32,0x30,0x31,0x36,0x2d,0x30,0x36,0x2d,0x32,0x32,0x54,0x32,0x30,0x3a,0x33,0x39,0x3a,0x32,0x36,0x2b,0x30,0x32,0x3a,0x30,0x30,0xc9,0xad,0xc8,0x52,0x0,0x0,0x0,0x25,0x74,0x45,0x58,0x74,0x64,0x61,0x74,0x65,0x3a,0x6d,0x6f,0x64,0x69,0x66,0x79,0x0,0x32,0x30,0x31,0x36,0x2d,0x30,0x36,0x2d,0x32,0x32,0x54,0x32,0x30,0x3a,0x33,0x39,0x3a,0x32,0x36,0x2b,0x30,0x32,0x3a,0x30,0x30,0xb8,0xf0,0x70,0xee,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};