summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/container.cpp8
-rw-r--r--scene/gui/control.cpp40
-rw-r--r--scene/gui/control.h4
-rw-r--r--scene/gui/graph_edit.cpp30
-rw-r--r--scene/gui/graph_edit.h2
-rw-r--r--scene/gui/graph_node.cpp51
-rw-r--r--scene/gui/graph_node.h19
-rw-r--r--scene/gui/tab_container.cpp3
-rw-r--r--scene/gui/text_edit.h4
-rw-r--r--scene/main/scene_main_loop.cpp53
-rw-r--r--scene/main/scene_main_loop.h20
-rw-r--r--scene/register_scene_types.cpp1
-rw-r--r--scene/resources/default_theme/default_theme.cpp5
-rw-r--r--scene/resources/default_theme/graph_node_breakpoint.pngbin0 -> 277 bytes
-rw-r--r--scene/resources/default_theme/graph_node_position.pngbin0 -> 278 bytes
-rw-r--r--scene/resources/default_theme/graph_node_selected.pngbin964 -> 920 bytes
-rw-r--r--scene/resources/default_theme/theme_data.h12
-rw-r--r--scene/resources/style_box.cpp21
-rw-r--r--scene/resources/style_box.h4
19 files changed, 264 insertions, 13 deletions
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp
index 920c6bf1e6..feaf516f42 100644
--- a/scene/gui/container.cpp
+++ b/scene/gui/container.cpp
@@ -41,6 +41,8 @@ void Container::_child_minsize_changed() {
void Container::add_child_notify(Node *p_child) {
+ Control::add_child_notify(p_child);
+
Control *control = p_child->cast_to<Control>();
if (!control)
return;
@@ -50,18 +52,24 @@ void Container::add_child_notify(Node *p_child) {
control->connect("visibility_changed",this,"_child_minsize_changed");
queue_sort();
+
}
void Container::move_child_notify(Node *p_child) {
+ Control::move_child_notify(p_child);
+
if (!p_child->cast_to<Control>())
return;
queue_sort();
+
+
}
void Container::remove_child_notify(Node *p_child) {
+ Control::remove_child_notify(p_child);
Control *control = p_child->cast_to<Control>();
if (!control)
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index c08e10b9ff..71ec508c81 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -422,6 +422,32 @@ void Control::_resize(const Size2& p_size) {
_size_changed();
}
+//moved theme configuration here, so controls can set up even if still not inside active scene
+
+void Control::add_child_notify(Node *p_child) {
+
+ Control *child_c=p_child->cast_to<Control>();
+ if (!child_c)
+ return;
+
+ if (child_c->data.theme.is_null() && data.theme_owner) {
+ child_c->data.theme_owner=data.theme_owner;
+ child_c->notification(NOTIFICATION_THEME_CHANGED);
+ }
+}
+
+void Control::remove_child_notify(Node *p_child) {
+
+ Control *child_c=p_child->cast_to<Control>();
+ if (!child_c)
+ return;
+
+ if (child_c->data.theme_owner && child_c->data.theme.is_null()) {
+ child_c->data.theme_owner=NULL;
+ //notification(NOTIFICATION_THEME_CHANGED);
+ }
+
+}
void Control::_notification(int p_notification) {
@@ -512,10 +538,10 @@ void Control::_notification(int p_notification) {
}
- if (data.theme.is_null() && data.parent && data.parent->data.theme_owner) {
- data.theme_owner=data.parent->data.theme_owner;
- notification(NOTIFICATION_THEME_CHANGED);
- }
+ //if (data.theme.is_null() && data.parent && data.parent->data.theme_owner) {
+ // data.theme_owner=data.parent->data.theme_owner;
+ // notification(NOTIFICATION_THEME_CHANGED);
+ //}
} break;
case NOTIFICATION_EXIT_CANVAS: {
@@ -547,10 +573,10 @@ void Control::_notification(int p_notification) {
data.parent=NULL;
data.parent_canvas_item=NULL;
- if (data.theme_owner && data.theme.is_null()) {
- data.theme_owner=NULL;
+ //if (data.theme_owner && data.theme.is_null()) {
+ // data.theme_owner=NULL;
//notification(NOTIFICATION_THEME_CHANGED);
- }
+ //}
} break;
case NOTIFICATION_MOVED_IN_PARENT: {
diff --git a/scene/gui/control.h b/scene/gui/control.h
index 1337cbc4b9..b9ac53067a 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -194,12 +194,16 @@ private:
void _font_changed();
+
friend class Viewport;
void _modal_stack_remove();
void _modal_set_prev_focus_owner(ObjectID p_prev);
protected:
+ virtual void add_child_notify(Node *p_child);
+ virtual void remove_child_notify(Node *p_child);
+
//virtual void _window_input_event(InputEvent p_event);
bool _set(const StringName& p_name, const Variant& p_value);
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index c488dd0d16..458e51b4fd 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -100,6 +100,15 @@ void GraphEdit::get_connection_list(List<Connection> *r_connections) const {
*r_connections=connections;
}
+void GraphEdit::set_scroll_ofs(const Vector2& p_ofs) {
+
+ setting_scroll_ofs=true;
+ h_scroll->set_val(p_ofs.x);
+ v_scroll->set_val(p_ofs.y);
+ _update_scroll();
+ setting_scroll_ofs=false;
+}
+
Vector2 GraphEdit::get_scroll_ofs() const{
return Vector2(h_scroll->get_val(),v_scroll->get_val());
@@ -113,6 +122,10 @@ void GraphEdit::_scroll_moved(double) {
//must redraw grid
update();
}
+
+ if (!setting_scroll_ofs) {//in godot, signals on change value are avoided as a convention
+ emit_signal("scroll_offset_changed",get_scroll_ofs());
+ }
}
void GraphEdit::_update_scroll_offset() {
@@ -196,6 +209,8 @@ void GraphEdit::_graph_node_moved(Node *p_gn) {
void GraphEdit::add_child_notify(Node *p_child) {
+ Control::add_child_notify(p_child);
+
top_layer->call_deferred("raise"); //top layer always on top!
GraphNode *gn = p_child->cast_to<GraphNode>();
if (gn) {
@@ -205,10 +220,14 @@ void GraphEdit::add_child_notify(Node *p_child) {
_graph_node_moved(gn);
gn->set_stop_mouse(false);
}
+
+
}
void GraphEdit::remove_child_notify(Node *p_child) {
+ Control::remove_child_notify(p_child);
+
top_layer->call_deferred("raise"); //top layer always on top!
GraphNode *gn = p_child->cast_to<GraphNode>();
if (gn) {
@@ -1036,6 +1055,7 @@ void GraphEdit::_bind_methods() {
ObjectTypeDB::bind_method(_MD("disconnect_node","from","from_port","to","to_port"),&GraphEdit::disconnect_node);
ObjectTypeDB::bind_method(_MD("get_connection_list"),&GraphEdit::_get_connection_list);
ObjectTypeDB::bind_method(_MD("get_scroll_ofs"),&GraphEdit::get_scroll_ofs);
+ ObjectTypeDB::bind_method(_MD("set_scroll_ofs","ofs"),&GraphEdit::set_scroll_ofs);
ObjectTypeDB::bind_method(_MD("set_zoom","p_zoom"),&GraphEdit::set_zoom);
ObjectTypeDB::bind_method(_MD("get_zoom"),&GraphEdit::get_zoom);
@@ -1073,6 +1093,7 @@ void GraphEdit::_bind_methods() {
ADD_SIGNAL(MethodInfo("delete_nodes_request"));
ADD_SIGNAL(MethodInfo("_begin_node_move"));
ADD_SIGNAL(MethodInfo("_end_node_move"));
+ ADD_SIGNAL(MethodInfo("scroll_offset_changed",PropertyInfo(Variant::VECTOR2,"ofs")));
}
@@ -1103,6 +1124,13 @@ GraphEdit::GraphEdit() {
box_selecting = false;
dragging = false;
+ //set large minmax so it can scroll even if not resized yet
+ h_scroll->set_min(-10000);
+ h_scroll->set_max(10000);
+
+ v_scroll->set_min(-10000);
+ v_scroll->set_max(10000);
+
h_scroll->connect("value_changed", this,"_scroll_moved");
v_scroll->connect("value_changed", this,"_scroll_moved");
@@ -1143,6 +1171,6 @@ GraphEdit::GraphEdit() {
snap_amount->connect("value_changed",this,"_snap_value_changed");
zoom_hb->add_child(snap_amount);
-
+ setting_scroll_ofs=false;
}
diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h
index ad20fbefce..6d35e1518f 100644
--- a/scene/gui/graph_edit.h
+++ b/scene/gui/graph_edit.h
@@ -107,6 +107,7 @@ private:
Rect2 box_selecting_rect;
List<GraphNode*> previus_selected;
+ bool setting_scroll_ofs;
bool right_disconnects;
bool updating;
List<Connection> connections;
@@ -188,6 +189,7 @@ public:
void add_valid_left_disconnect_type(int p_type);
void remove_valid_left_disconnect_type(int p_type);
+ void set_scroll_ofs(const Vector2& p_ofs);
Vector2 get_scroll_ofs() const;
void set_selected(Node* p_child);
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index 1efc9a1ceb..66d2725ad2 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -189,6 +189,8 @@ void GraphNode::_notification(int p_what) {
if (p_what==NOTIFICATION_DRAW) {
Ref<StyleBox> sb=get_stylebox(selected ? "selectedframe" : "frame");
+ sb=sb->duplicate();
+ sb->call("set_modulate",modulate);
Ref<Texture> port =get_icon("port");
Ref<Texture> close =get_icon("close");
int close_offset = get_constant("close_offset");
@@ -198,8 +200,25 @@ void GraphNode::_notification(int p_what) {
Point2i icofs = -port->get_size()*0.5;
int edgeofs=get_constant("port_offset");
icofs.y+=sb->get_margin(MARGIN_TOP);
+
+
+
draw_style_box(sb,Rect2(Point2(),get_size()));
+ switch(overlay) {
+ case OVERLAY_DISABLED: {
+
+ } break;
+ case OVERLAY_BREAKPOINT: {
+
+ draw_style_box(get_stylebox("breakpoint"),Rect2(Point2(),get_size()));
+ } break;
+ case OVERLAY_POSITION: {
+ draw_style_box(get_stylebox("position"),Rect2(Point2(),get_size()));
+
+ } break;
+ }
+
int w = get_size().width-sb->get_minimum_size().x;
if (show_close)
@@ -590,6 +609,26 @@ void GraphNode::_input_event(const InputEvent& p_ev) {
}
+void GraphNode::set_modulate(const Color &p_color) {
+
+ modulate=p_color;
+ update();
+}
+
+Color GraphNode::get_modulate() const{
+
+ return modulate;
+}
+void GraphNode::set_overlay(Overlay p_overlay) {
+
+ overlay=p_overlay;
+ update();
+}
+
+GraphNode::Overlay GraphNode::get_overlay() const{
+
+ return overlay;
+}
void GraphNode::_bind_methods() {
@@ -620,10 +659,15 @@ void GraphNode::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_connection_input_type","idx"),&GraphNode::get_connection_input_type);
ObjectTypeDB::bind_method(_MD("get_connection_input_color","idx"),&GraphNode::get_connection_input_color);
+ ObjectTypeDB::bind_method(_MD("set_modulate","color"),&GraphNode::set_modulate);
+ ObjectTypeDB::bind_method(_MD("get_modulate"),&GraphNode::get_modulate);
ObjectTypeDB::bind_method(_MD("set_show_close_button","show"),&GraphNode::set_show_close_button);
ObjectTypeDB::bind_method(_MD("is_close_button_visible"),&GraphNode::is_close_button_visible);
+ ObjectTypeDB::bind_method(_MD("set_overlay","overlay"),&GraphNode::set_overlay);
+ ObjectTypeDB::bind_method(_MD("get_overlay"),&GraphNode::get_overlay);
+
ADD_PROPERTY( PropertyInfo(Variant::STRING,"title"),_SCS("set_title"),_SCS("get_title"));
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"show_close"),_SCS("set_show_close_button"),_SCS("is_close_button_visible"));
@@ -631,10 +675,17 @@ void GraphNode::_bind_methods() {
ADD_SIGNAL(MethodInfo("dragged",PropertyInfo(Variant::VECTOR2,"from"),PropertyInfo(Variant::VECTOR2,"to")));
ADD_SIGNAL(MethodInfo("raise_request"));
ADD_SIGNAL(MethodInfo("close_request"));
+
+ BIND_CONSTANT( OVERLAY_DISABLED );
+ BIND_CONSTANT( OVERLAY_BREAKPOINT );
+ BIND_CONSTANT( OVERLAY_POSITION );
}
GraphNode::GraphNode() {
+
+ overlay=OVERLAY_DISABLED;
show_close=false;
connpos_dirty=true;
set_stop_mouse(false);
+ modulate=Color(1,1,1,1);
}
diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h
index f308f30b81..e87fb15b93 100644
--- a/scene/gui/graph_node.h
+++ b/scene/gui/graph_node.h
@@ -34,8 +34,14 @@
class GraphNode : public Container {
OBJ_TYPE(GraphNode,Container);
+public:
-
+ enum Overlay {
+ OVERLAY_DISABLED,
+ OVERLAY_BREAKPOINT,
+ OVERLAY_POSITION
+ };
+private:
struct Slot {
bool enable_left;
@@ -77,6 +83,10 @@ class GraphNode : public Container {
Vector2 drag_from;
bool selected;
+
+ Overlay overlay;
+
+ Color modulate;
protected:
@@ -128,10 +138,17 @@ public:
Color get_connection_output_color(int p_idx);
+ void set_modulate(const Color& p_color);
+ Color get_modulate() const;
+
+ void set_overlay(Overlay p_overlay);
+ Overlay get_overlay() const;
+
virtual Size2 get_minimum_size() const;
GraphNode();
};
+VARIANT_ENUM_CAST( GraphNode::Overlay )
#endif // GRAPH_NODE_H
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index 0e0339c488..8557500488 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -400,6 +400,7 @@ void TabContainer::_child_renamed_callback() {
void TabContainer::add_child_notify(Node *p_child) {
+ Control::add_child_notify(p_child);
Control *c = p_child->cast_to<Control>();
if (!c)
@@ -532,6 +533,8 @@ Control* TabContainer::get_current_tab_control() const {
void TabContainer::remove_child_notify(Node *p_child) {
+ Control::remove_child_notify(p_child);
+
int tc = get_tab_count();
if (current==tc-1) {
current--;
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index c3bdf7c856..f0301fc250 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -438,7 +438,7 @@ public:
bool is_highlight_all_occurrences_enabled() const;
bool is_selection_active() const;
int get_selection_from_line() const;
- int get_selection_from_column() const;
+ int get_selection_from_column() const;
int get_selection_to_line() const;
int get_selection_to_column() const;
String get_selection_text() const;
@@ -496,7 +496,7 @@ public:
String get_text_for_completion();
- virtual bool is_text_field() const;
+ virtual bool is_text_field() const;
TextEdit();
~TextEdit();
};
diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp
index a7ef7ca7c1..77156203b8 100644
--- a/scene/main/scene_main_loop.cpp
+++ b/scene/main/scene_main_loop.cpp
@@ -45,6 +45,30 @@
#include "scene/resources/material.h"
#include "scene/resources/mesh.h"
+
+void SceneTreeTimer::_bind_methods() {
+
+ ObjectTypeDB::bind_method(_MD("set_time_left","time"),&SceneTreeTimer::set_time_left);
+ ObjectTypeDB::bind_method(_MD("get_time_left"),&SceneTreeTimer::get_time_left);
+
+ ADD_SIGNAL(MethodInfo("timeout"));
+}
+
+
+void SceneTreeTimer::set_time_left(float p_time) {
+ time_left=p_time;
+}
+
+float SceneTreeTimer::get_time_left() const {
+ return time_left;
+}
+
+
+SceneTreeTimer::SceneTreeTimer() {
+ time_left=0;
+}
+
+
void SceneTree::tree_changed() {
tree_version++;
@@ -547,6 +571,23 @@ bool SceneTree::idle(float p_time){
_flush_delete_queue();
+ //go through timers
+
+ for (List<Ref<SceneTreeTimer> >::Element *E=timers.front();E;) {
+
+ List<Ref<SceneTreeTimer> >::Element *N = E->next();
+
+ float time_left = E->get()->get_time_left();
+ time_left-=p_time;
+ E->get()->set_time_left(time_left);
+
+ if (time_left<0) {
+ E->get()->emit_signal("timeout");
+ timers.erase(E);
+ }
+ E=N;
+ }
+
return _quit;
}
@@ -1604,6 +1645,16 @@ void SceneTree::drop_files(const Vector<String>& p_files,int p_from_screen) {
MainLoop::drop_files(p_files,p_from_screen);
}
+
+Ref<SceneTreeTimer> SceneTree::create_timer(float p_delay_sec) {
+
+ Ref<SceneTreeTimer> stt;
+ stt.instance();
+ stt->set_time_left(p_delay_sec);
+ timers.push_back(stt);
+ return stt;
+}
+
void SceneTree::_bind_methods() {
@@ -1634,6 +1685,8 @@ void SceneTree::_bind_methods() {
ObjectTypeDB::bind_method(_MD("is_paused"),&SceneTree::is_paused);
ObjectTypeDB::bind_method(_MD("set_input_as_handled"),&SceneTree::set_input_as_handled);
+ ObjectTypeDB::bind_method(_MD("create_timer:SceneTreeTimer","time_sec"),&SceneTree::create_timer);
+
ObjectTypeDB::bind_method(_MD("get_node_count"),&SceneTree::get_node_count);
ObjectTypeDB::bind_method(_MD("get_frame"),&SceneTree::get_frame);
diff --git a/scene/main/scene_main_loop.h b/scene/main/scene_main_loop.h
index 38d13c0447..6129a12446 100644
--- a/scene/main/scene_main_loop.h
+++ b/scene/main/scene_main_loop.h
@@ -47,6 +47,22 @@ class Viewport;
class Material;
class Mesh;
+
+
+class SceneTreeTimer : public Reference {
+ OBJ_TYPE(SceneTreeTimer,Reference);
+
+ float time_left;
+protected:
+ static void _bind_methods();
+public:
+
+ void set_time_left(float p_time);
+ float get_time_left() const;
+
+ SceneTreeTimer();
+};
+
class SceneTree : public MainLoop {
_THREAD_SAFE_CLASS_
@@ -155,6 +171,8 @@ private:
void _change_scene(Node* p_to);
//void _call_group(uint32_t p_call_flags,const StringName& p_group,const StringName& p_function,const Variant& p_arg1,const Variant& p_arg2);
+ List<Ref<SceneTreeTimer> > timers;
+
static SceneTree *singleton;
friend class Node;
@@ -339,6 +357,8 @@ public:
Error change_scene_to(const Ref<PackedScene>& p_scene);
Error reload_current_scene();
+ Ref<SceneTreeTimer> create_timer(float p_delay_sec);
+
//used by Main::start, don't use otherwise
void add_current_scene(Node * p_current);
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index bc0951e436..be2c12d63a 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -632,6 +632,7 @@ void register_scene_types() {
ObjectTypeDB::register_type<PackedScene>();
ObjectTypeDB::register_type<SceneTree>();
+ ObjectTypeDB::register_virtual_type<SceneTreeTimer>(); //sorry, you can't create it
OS::get_singleton()->yield(); //may take time to init
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 30c2262ac6..2033599307 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -630,12 +630,17 @@ void fill_default_theme(Ref<Theme>& t,const Ref<Font> & default_font,const Ref<F
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);
+ Ref<StyleBoxTexture> graph_bpoint = make_stylebox(graph_node_breakpoint_png,6,24,6,5,16,24,16,5);
+ Ref<StyleBoxTexture> graph_position = make_stylebox(graph_node_position_png,6,24,6,5,16,24,16,5);
+
//graphsb->set_expand_margin_size(MARGIN_LEFT,10);
//graphsb->set_expand_margin_size(MARGIN_RIGHT,10);
t->set_stylebox("frame","GraphNode", graphsb );
t->set_stylebox("selectedframe","GraphNode", graphsbselected );
t->set_stylebox("defaultframe", "GraphNode", graphsbdefault );
t->set_stylebox("defaultfocus", "GraphNode", graphsbdeffocus );
+ t->set_stylebox("breakpoint", "GraphNode", graph_bpoint );
+ t->set_stylebox("position", "GraphNode", graph_position );
t->set_constant("separation","GraphNode", 1 *scale);
t->set_icon("port","GraphNode", make_icon( graph_port_png ) );
t->set_icon("close","GraphNode", make_icon( graph_node_close_png ) );
diff --git a/scene/resources/default_theme/graph_node_breakpoint.png b/scene/resources/default_theme/graph_node_breakpoint.png
new file mode 100644
index 0000000000..0e36f31bd4
--- /dev/null
+++ b/scene/resources/default_theme/graph_node_breakpoint.png
Binary files differ
diff --git a/scene/resources/default_theme/graph_node_position.png b/scene/resources/default_theme/graph_node_position.png
new file mode 100644
index 0000000000..7ec15e2ff4
--- /dev/null
+++ b/scene/resources/default_theme/graph_node_position.png
Binary files differ
diff --git a/scene/resources/default_theme/graph_node_selected.png b/scene/resources/default_theme/graph_node_selected.png
index 051cc32f7c..33c4d06128 100644
--- a/scene/resources/default_theme/graph_node_selected.png
+++ b/scene/resources/default_theme/graph_node_selected.png
Binary files differ
diff --git a/scene/resources/default_theme/theme_data.h b/scene/resources/default_theme/theme_data.h
index 215818da49..2286973bf2 100644
--- a/scene/resources/default_theme/theme_data.h
+++ b/scene/resources/default_theme/theme_data.h
@@ -104,6 +104,11 @@ static const unsigned char graph_node_png[]={
};
+static const unsigned char graph_node_breakpoint_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,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,0x8,0x6,0xf,0x3b,0x1c,0xec,0x64,0x51,0x75,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,0x0,0x8f,0x49,0x44,0x41,0x54,0x58,0xc3,0xed,0xd7,0xbd,0x9,0xc0,0x20,0x10,0x5,0xe0,0x53,0x2c,0x5d,0x40,0x74,0x4,0xf7,0x9f,0xc4,0x11,0x22,0x2e,0x60,0x6f,0x9a,0x13,0x4e,0x21,0x41,0x50,0x48,0x91,0x77,0x95,0xf8,0xf3,0x79,0x62,0xf5,0x88,0x36,0x4b,0xf5,0x41,0x2d,0xf1,0x22,0x22,0xbf,0x78,0x2e,0x5b,0x97,0x2,0xc9,0xc3,0xc,0x2c,0x95,0xdc,0x6f,0x78,0xce,0x5b,0x97,0xd4,0x42,0x27,0xd9,0xba,0x14,0xac,0x4b,0xa1,0x96,0xd8,0x24,0x20,0x9f,0x41,0x1d,0x7b,0xba,0x59,0xb6,0xaf,0xa7,0x3d,0x7e,0x78,0xdb,0x54,0xbc,0x36,0x74,0xa7,0x77,0x7f,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7e,0x4,0xe4,0xb7,0xfc,0xc8,0x6b,0x59,0xce,0x99,0x39,0x95,0x71,0xb4,0x6b,0x4b,0x89,0xf5,0x44,0x72,0x3d,0x93,0x9d,0x3f,0xad,0x1b,0x54,0xed,0x49,0xd3,0x36,0x45,0x4f,0x1f,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+
static const unsigned char graph_node_close_png[]={
0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0xc,0x0,0x0,0x0,0xc,0x8,0x6,0x0,0x0,0x0,0x56,0x75,0x5c,0xe7,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x93,0x49,0x44,0x41,0x54,0x28,0x91,0x95,0x92,0x31,0xe,0xc2,0x30,0x10,0x4,0x17,0xaa,0x3d,0x7b,0xdb,0x58,0xa4,0xa7,0xe1,0x47,0xfe,0x2c,0x3c,0x82,0x48,0x44,0x22,0x6f,0xb1,0x4d,0x15,0xc9,0x20,0x1f,0x52,0xae,0xdd,0xd9,0x2b,0xe6,0xe,0x0,0x60,0x66,0x59,0x52,0x82,0x33,0x92,0x92,0x99,0x65,0xec,0x30,0xc9,0x4a,0x72,0x19,0x95,0x24,0x25,0x92,0xb,0xc9,0x6a,0x66,0x19,0x92,0x26,0x33,0x7b,0x92,0x6c,0x24,0xd7,0x10,0xc2,0xdc,0xc1,0x5f,0x59,0x8c,0xf1,0x32,0xc,0x42,0x8,0xb3,0xb,0x3b,0xdb,0xde,0x24,0x5f,0x2e,0xdc,0x97,0x3a,0xb0,0x91,0xdc,0x7e,0xe1,0xb3,0x67,0x66,0x9f,0xd6,0xda,0x69,0x58,0x90,0x34,0x95,0x52,0xee,0x0,0x6e,0x0,0x36,0x0,0x2b,0x80,0x6b,0xad,0xf5,0xd1,0x8b,0x70,0x6d,0xb8,0xf6,0xfe,0xd9,0x18,0x96,0xe,0x1f,0xe,0x38,0xf6,0x1a,0x1f,0x9f,0xec,0x40,0x47,0x56,0x51,0x84,0x77,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -119,8 +124,13 @@ static const unsigned char graph_node_default_focus_png[]={
};
+static const unsigned char graph_node_position_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,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,0x8,0x6,0xf,0x3b,0x3b,0x49,0x6e,0xe4,0x1e,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,0x0,0x90,0x49,0x44,0x41,0x54,0x58,0xc3,0xed,0xd7,0xbd,0x9,0xc0,0x20,0x10,0x5,0xe0,0x53,0x2c,0xdd,0x40,0x47,0x70,0x7,0x67,0x77,0x7,0x47,0x88,0x1b,0xd8,0x9b,0xe6,0x84,0x53,0x48,0x10,0x14,0x52,0xe4,0x5d,0x25,0xfe,0x7c,0x9e,0x58,0x3d,0xa2,0xcd,0x52,0x7d,0x50,0x63,0xb8,0x88,0xc8,0x2d,0x9e,0x2b,0x36,0x65,0x4f,0xf2,0x30,0x3,0x4b,0x25,0xf7,0x1b,0x9e,0x73,0x36,0x65,0xb5,0xd0,0x49,0xb1,0x29,0x7b,0x9b,0xb2,0xaf,0x31,0x34,0x9,0xc8,0x67,0x50,0xc7,0x9e,0x6e,0x96,0xed,0xeb,0x69,0x8f,0x1b,0xde,0x36,0x15,0xaf,0xd,0xdd,0xe9,0xdd,0x5f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x1f,0x1,0xe5,0x2d,0x3f,0xf2,0x5a,0x91,0x73,0x66,0x4e,0x65,0x1c,0xed,0xda,0x52,0x62,0x3d,0x91,0x5c,0xcf,0x64,0xe7,0x4f,0xeb,0x6,0x80,0xff,0x44,0x93,0xd4,0xd9,0xea,0x7e,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+
static const unsigned char graph_node_selected_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,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,0x7,0x1d,0x1,0x17,0x2a,0x15,0x39,0xc5,0x7,0x0,0x0,0x3,0x63,0x49,0x44,0x41,0x54,0x58,0xc3,0xed,0x97,0xcd,0x6f,0x1b,0x55,0x14,0xc5,0xcf,0x7d,0xf3,0xe5,0x19,0xbb,0xf1,0x47,0xe5,0xa4,0xd0,0x36,0x81,0x48,0x14,0x9,0xca,0x2a,0xa6,0x5d,0x50,0xb1,0x64,0x45,0xa5,0x2c,0xc8,0xaa,0xaa,0xc4,0x16,0xf6,0x48,0x48,0x48,0xed,0x22,0x1b,0xfe,0x2,0xd6,0xa8,0x55,0x57,0xd9,0x54,0xea,0xa,0x96,0x6c,0x23,0x96,0x20,0x91,0x45,0x20,0xa1,0x95,0x70,0x8d,0xfc,0x11,0x7b,0xc6,0xf6,0xbc,0x79,0xf7,0xb2,0xf0,0x38,0x19,0xdb,0xd1,0x18,0x89,0x1d,0xf2,0x93,0x6c,0xcf,0x78,0xe6,0xfe,0xce,0xb9,0xe7,0xbd,0x91,0xe6,0x91,0x88,0x10,0x0,0xf5,0xe2,0xc5,0xcf,0x5e,0xd2,0xee,0xf8,0xed,0xb3,0x96,0xc7,0xc2,0x4a,0xe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x2,0x11,0x81,0x49,0x4,0x89,0x31,0x56,0x34,0x8c,0x7c,0x16,0x56,0x4a,0x6b,0x4d,0x6,0x86,0x44,0x18,0x92,0xda,0x16,0x11,0x40,0x61,0x26,0x3,0x61,0x0,0x22,0x80,0x10,0x44,0x18,0x6,0x86,0xb4,0xd6,0x64,0x3b,0x8e,0x23,0x30,0x0,0x84,0x0,0x16,0x8,0x8,0x20,0x1,0xe8,0x42,0xfd,0x1c,0x3a,0xfd,0x15,0x2,0xcc,0xe4,0x7f,0x7b,0x3e,0x28,0x10,0x1,0x10,0x88,0xe0,0xd2,0x21,0x73,0x17,0xec,0xb9,0xab,0x10,0x4e,0x6f,0x20,0xb9,0x70,0x90,0x75,0x93,0x7,0x90,0x89,0x76,0xf6,0x64,0x52,0xcc,0x17,0x90,0x79,0x67,0x33,0x0,0xe6,0x4c,0xef,0x69,0x7a,0x24,0x69,0x2e,0x22,0xa0,0xe5,0x2d,0x64,0x25,0x28,0xe3,0x67,0xf2,0xcd,0xcb,0x1c,0x40,0x18,0xc2,0x73,0xf1,0x2f,0xa6,0x98,0x93,0x41,0xda,0x77,0x6a,0x1a,0xe9,0xf2,0x99,0x36,0x33,0x39,0xca,0x73,0x30,0x1,0x70,0x5a,0x98,0x51,0xa3,0x8b,0xde,0x39,0x1f,0xc0,0x93,0xfa,0x19,0xed,0xac,0x2a,0x2d,0x9f,0x46,0x9a,0xae,0x7,0x9a,0x2e,0x26,0x9a,0xe6,0x99,0x3e,0xf,0x79,0xe,0x78,0x52,0xb8,0xa0,0xc4,0x38,0x9f,0x91,0xf9,0x68,0x17,0x97,0xb2,0xcc,0x3f,0x8a,0xf9,0x63,0x31,0xc4,0x79,0x8d,0x4c,0x90,0x73,0x7,0x8b,0x80,0x6f,0xf6,0xbf,0xc2,0xaf,0x47,0xbf,0xe4,0x2a,0xbe,0x77,0xeb,0x7d,0xec,0x7e,0xfa,0xd9,0x22,0x40,0x98,0xb1,0xbd,0xf5,0xe,0x2c,0xe5,0x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20,0xea,0xc2,0x72,0xc7,0x22,0xc,0xc6,0x1b,0xb1,0x1b,0x99,0x42,0xb1,0x12,0x93,0x68,0x62,0x3,0x40,0x2a,0x19,0xcc,0x79,0xb1,0xaa,0x56,0x13,0x18,0xcc,0x8c,0x34,0x61,0x0,0xc0,0x24,0x9a,0xd8,0x8a,0x95,0x10,0x52,0x4a,0x4a,0x91,0x12,0x0,0x30,0x65,0xba,0xcc,0xc,0x88,0x5c,0x16,0x0,0x8,0x60,0x5,0x80,0x19,0xe0,0x2c,0x27,0x45,0x4a,0x52,0x4a,0xd2,0xd,0xc3,0x60,0xa4,0x79,0xa2,0x62,0x30,0x8,0x20,0xc6,0xf9,0xc,0x39,0x84,0x99,0x2b,0xbf,0x45,0x4d,0x65,0xa9,0x98,0x19,0x20,0x2,0xc0,0x28,0xf2,0xea,0xc1,0xb5,0x3f,0xf4,0xda,0xbf,0x60,0x95,0x27,0x10,0x97,0xdc,0x2b,0x75,0xd3,0x4,0xe0,0x4c,0xbb,0x7c,0x93,0x15,0xab,0x97,0x90,0x7a,0x67,0x15,0x80,0x52,0xa5,0xd9,0x73,0xf7,0x88,0x73,0x5f,0x98,0x41,0x8b,0x47,0x28,0x4b,0x50,0xa9,0x9f,0xec,0x5b,0x2d,0xea,0x0,0xac,0xc0,0xaa,0x66,0xff,0xbc,0x8b,0xd,0x1e,0xe4,0x73,0xe7,0x4d,0x23,0xdf,0x3e,0xc5,0x30,0xd9,0x55,0x53,0x7,0x19,0x40,0xe5,0x85,0x25,0x35,0x7a,0x39,0xbb,0x6a,0x6,0xa8,0xac,0xbe,0xa2,0x5d,0x56,0xa5,0xc5,0xcb,0x48,0xc5,0x7e,0xa0,0x62,0x33,0x51,0xe1,0x67,0xfe,0x3c,0x34,0x75,0xa0,0xb2,0xc2,0x39,0x25,0x85,0xf3,0x15,0xa9,0x5b,0x3b,0xbf,0x95,0xb9,0xfe,0x28,0x36,0xc7,0xbc,0x89,0x75,0x8d,0x92,0x91,0xb5,0x8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x74,0x7e,0xe9,0xb9,0x9d,0x3f,0x6e,0x7e,0x72,0xf3,0x8c,0x8a,0xd3,0xfb,0xbd,0x7b,0x3f,0xac,0x4,0x7f,0xf7,0x5b,0x52,0xcd,0x4c,0x66,0x75,0xe1,0xf2,0x12,0x9,0x65,0x8,0x2b,0x5e,0x7d,0x75,0x33,0xbc,0x75,0xeb,0xea,0x14,0xc0,0xf9,0xf1,0x4,0xcc,0x4c,0xc7,0xc7,0xc7,0xa2,0xd7,0xeb,0x35,0x8e,0x30,0x18,0xc,0x78,0x7f,0x7f,0x5f,0x11,0x65,0xc7,0xba,0x7f,0x0,0xff,0xc4,0xaa,0x19,0xfd,0xaf,0x1e,0xb7,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp
index 8580ffdc5a..59246dfabe 100644
--- a/scene/resources/style_box.cpp
+++ b/scene/resources/style_box.cpp
@@ -141,7 +141,7 @@ void StyleBoxTexture::draw(RID p_canvas_item,const Rect2& p_rect) const {
r.pos.y-=expand_margin[MARGIN_TOP];
r.size.x+=expand_margin[MARGIN_LEFT]+expand_margin[MARGIN_RIGHT];
r.size.y+=expand_margin[MARGIN_TOP]+expand_margin[MARGIN_BOTTOM];
- VisualServer::get_singleton()->canvas_item_add_style_box( p_canvas_item,r,region_rect,texture->get_rid(),Vector2(margin[MARGIN_LEFT],margin[MARGIN_TOP]),Vector2(margin[MARGIN_RIGHT],margin[MARGIN_BOTTOM]),draw_center);
+ VisualServer::get_singleton()->canvas_item_add_style_box( p_canvas_item,r,region_rect,texture->get_rid(),Vector2(margin[MARGIN_LEFT],margin[MARGIN_TOP]),Vector2(margin[MARGIN_RIGHT],margin[MARGIN_BOTTOM]),draw_center,modulate);
}
void StyleBoxTexture::set_draw_center(bool p_draw) {
@@ -193,6 +193,19 @@ Rect2 StyleBoxTexture::get_region_rect() const {
}
+void StyleBoxTexture::set_modulate(const Color& p_modulate) {
+ if (modulate==p_modulate)
+ return;
+ modulate=p_modulate;
+ emit_changed();
+}
+
+Color StyleBoxTexture::get_modulate() const {
+
+ return modulate;
+}
+
+
void StyleBoxTexture::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_texture","texture:Texture"),&StyleBoxTexture::set_texture);
@@ -210,6 +223,10 @@ void StyleBoxTexture::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_draw_center","enable"),&StyleBoxTexture::set_draw_center);
ObjectTypeDB::bind_method(_MD("get_draw_center"),&StyleBoxTexture::get_draw_center);
+ ObjectTypeDB::bind_method(_MD("set_modulate","color"),&StyleBoxTexture::set_modulate);
+ ObjectTypeDB::bind_method(_MD("get_modulate"),&StyleBoxTexture::get_modulate);
+
+
ADD_SIGNAL(MethodInfo("texture_changed"));
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture" ), _SCS("set_texture"),_SCS("get_texture") );
@@ -222,6 +239,7 @@ void StyleBoxTexture::_bind_methods() {
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "expand_margin/right", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_expand_margin_size"),_SCS("get_expand_margin_size"), MARGIN_RIGHT );
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "expand_margin/top", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_expand_margin_size"),_SCS("get_expand_margin_size"), MARGIN_TOP );
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "expand_margin/bottom", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_expand_margin_size"),_SCS("get_expand_margin_size"), MARGIN_BOTTOM );
+ ADD_PROPERTY( PropertyInfo( Variant::COLOR, "modulate/color" ), _SCS("set_modulate"),_SCS("get_modulate"));
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "draw_center" ) , _SCS("set_draw_center"),_SCS("get_draw_center"));
}
@@ -234,6 +252,7 @@ StyleBoxTexture::StyleBoxTexture() {
expand_margin[i]=0;
}
draw_center=true;
+ modulate=Color(1,1,1,1);
}
StyleBoxTexture::~StyleBoxTexture() {
diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h
index 98aaee754b..f667318e24 100644
--- a/scene/resources/style_box.h
+++ b/scene/resources/style_box.h
@@ -84,6 +84,7 @@ class StyleBoxTexture : public StyleBox {
Rect2 region_rect;
Ref<Texture> texture;
bool draw_center;
+ Color modulate;
protected:
@@ -109,6 +110,9 @@ public:
bool get_draw_center() const;
virtual Size2 get_center_size() const;
+ void set_modulate(const Color& p_modulate);
+ Color get_modulate() const;
+
virtual void draw(RID p_canvas_item,const Rect2& p_rect) const;