summaryrefslogtreecommitdiff
path: root/scene/gui/graph_node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/graph_node.cpp')
-rw-r--r--scene/gui/graph_node.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index 6463ee5ad5..5b2f8812d5 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -210,6 +210,7 @@ void GraphNode::_notification(int p_what) {
int close_offset = get_constant("close_offset");
int close_h_offset = get_constant("close_h_offset");
Color close_color = get_color("close_color");
+ Color resizer_color = get_color("resizer_color");
Ref<Font> title_font = get_font("title_font");
int title_offset = get_constant("title_offset");
int title_h_offset = get_constant("title_h_offset");
@@ -274,7 +275,7 @@ void GraphNode::_notification(int p_what) {
}
if (resizable) {
- draw_texture(resizer, get_size() - resizer->get_size());
+ draw_texture(resizer, get_size() - resizer->get_size(), resizer_color);
}
} break;
@@ -592,13 +593,14 @@ void GraphNode::_gui_input(const Ref<InputEvent> &p_ev) {
Ref<InputEventMouseButton> mb = p_ev;
if (mb.is_valid()) {
- ERR_EXPLAIN("GraphNode must be the child of a GraphEdit node.");
- ERR_FAIL_COND(get_parent_control() == NULL);
+ ERR_FAIL_COND_MSG(get_parent_control() == NULL, "GraphNode must be the child of a GraphEdit node.");
if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
Vector2 mpos = Vector2(mb->get_position().x, mb->get_position().y);
if (close_rect.size != Size2() && close_rect.has_point(mpos)) {
+ //send focus to parent
+ get_parent_control()->grab_focus();
emit_signal("close_request");
accept_event();
return;
@@ -615,9 +617,7 @@ void GraphNode::_gui_input(const Ref<InputEvent> &p_ev) {
return;
}
- //send focus to parent
emit_signal("raise_request");
- get_parent_control()->grab_focus();
}
if (!mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {