You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
@@ -1155,7 +1155,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
|
|||||||
}
|
}
|
||||||
gn->set_selected(box_selection_mode_additive);
|
gn->set_selected(box_selection_mode_additive);
|
||||||
} else {
|
} else {
|
||||||
bool select = (previus_selected.find(gn) != NULL);
|
bool select = (previous_selected.find(gn) != NULL);
|
||||||
if (gn->is_selected() && !select) {
|
if (gn->is_selected() && !select) {
|
||||||
emit_signal("node_unselected", gn);
|
emit_signal("node_unselected", gn);
|
||||||
} else if (!gn->is_selected() && select) {
|
} else if (!gn->is_selected() && select) {
|
||||||
@@ -1181,7 +1181,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
|
|||||||
if (!gn)
|
if (!gn)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
bool select = (previus_selected.find(gn) != NULL);
|
bool select = (previous_selected.find(gn) != NULL);
|
||||||
if (gn->is_selected() && !select) {
|
if (gn->is_selected() && !select) {
|
||||||
emit_signal("node_unselected", gn);
|
emit_signal("node_unselected", gn);
|
||||||
} else if (!gn->is_selected() && select) {
|
} else if (!gn->is_selected() && select) {
|
||||||
@@ -1302,29 +1302,29 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
|
|||||||
box_selecting_from = b->get_position();
|
box_selecting_from = b->get_position();
|
||||||
if (b->get_control()) {
|
if (b->get_control()) {
|
||||||
box_selection_mode_additive = true;
|
box_selection_mode_additive = true;
|
||||||
previus_selected.clear();
|
previous_selected.clear();
|
||||||
for (int i = get_child_count() - 1; i >= 0; i--) {
|
for (int i = get_child_count() - 1; i >= 0; i--) {
|
||||||
|
|
||||||
GraphNode *gn2 = Object::cast_to<GraphNode>(get_child(i));
|
GraphNode *gn2 = Object::cast_to<GraphNode>(get_child(i));
|
||||||
if (!gn2 || !gn2->is_selected())
|
if (!gn2 || !gn2->is_selected())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
previus_selected.push_back(gn2);
|
previous_selected.push_back(gn2);
|
||||||
}
|
}
|
||||||
} else if (b->get_shift()) {
|
} else if (b->get_shift()) {
|
||||||
box_selection_mode_additive = false;
|
box_selection_mode_additive = false;
|
||||||
previus_selected.clear();
|
previous_selected.clear();
|
||||||
for (int i = get_child_count() - 1; i >= 0; i--) {
|
for (int i = get_child_count() - 1; i >= 0; i--) {
|
||||||
|
|
||||||
GraphNode *gn2 = Object::cast_to<GraphNode>(get_child(i));
|
GraphNode *gn2 = Object::cast_to<GraphNode>(get_child(i));
|
||||||
if (!gn2 || !gn2->is_selected())
|
if (!gn2 || !gn2->is_selected())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
previus_selected.push_back(gn2);
|
previous_selected.push_back(gn2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
box_selection_mode_additive = true;
|
box_selection_mode_additive = true;
|
||||||
previus_selected.clear();
|
previous_selected.clear();
|
||||||
for (int i = get_child_count() - 1; i >= 0; i--) {
|
for (int i = get_child_count() - 1; i >= 0; i--) {
|
||||||
|
|
||||||
GraphNode *gn2 = Object::cast_to<GraphNode>(get_child(i));
|
GraphNode *gn2 = Object::cast_to<GraphNode>(get_child(i));
|
||||||
@@ -1342,7 +1342,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
|
|||||||
if (b->get_button_index() == BUTTON_LEFT && !b->is_pressed() && box_selecting) {
|
if (b->get_button_index() == BUTTON_LEFT && !b->is_pressed() && box_selecting) {
|
||||||
box_selecting = false;
|
box_selecting = false;
|
||||||
box_selecting_rect = Rect2();
|
box_selecting_rect = Rect2();
|
||||||
previus_selected.clear();
|
previous_selected.clear();
|
||||||
top_layer->update();
|
top_layer->update();
|
||||||
minimap->update();
|
minimap->update();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ private:
|
|||||||
Point2 box_selecting_from;
|
Point2 box_selecting_from;
|
||||||
Point2 box_selecting_to;
|
Point2 box_selecting_to;
|
||||||
Rect2 box_selecting_rect;
|
Rect2 box_selecting_rect;
|
||||||
List<GraphNode *> previus_selected;
|
List<GraphNode *> previous_selected;
|
||||||
|
|
||||||
bool setting_scroll_ofs;
|
bool setting_scroll_ofs;
|
||||||
bool right_disconnects;
|
bool right_disconnects;
|
||||||
|
|||||||
Reference in New Issue
Block a user