summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/file_dialog.cpp10
-rw-r--r--scene/gui/file_dialog.h2
-rw-r--r--scene/gui/graph_edit.cpp14
-rw-r--r--scene/gui/item_list.cpp12
-rw-r--r--scene/gui/item_list.h4
5 files changed, 21 insertions, 21 deletions
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 3da12c038a..fa29bedd62 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -136,7 +136,7 @@ void FileDialog::update_dir() {
}
// Deselect any item, to make "Select Current Folder" button text by default.
- deselect_items();
+ deselect_all();
}
void FileDialog::_dir_entered(String p_dir) {
@@ -172,7 +172,7 @@ void FileDialog::_post_popup() {
// For open dir mode, deselect all items on file dialog open.
if (mode == FILE_MODE_OPEN_DIR) {
- deselect_items();
+ deselect_all();
file_box->set_visible(false);
} else {
file_box->set_visible(true);
@@ -318,7 +318,7 @@ void FileDialog::_go_up() {
update_dir();
}
-void FileDialog::deselect_items() {
+void FileDialog::deselect_all() {
// Clear currently selected items in file manager.
tree->deselect_all();
@@ -808,7 +808,7 @@ void FileDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update_file_name"), &FileDialog::update_file_name);
ClassDB::bind_method(D_METHOD("_update_dir"), &FileDialog::update_dir);
ClassDB::bind_method(D_METHOD("_update_file_list"), &FileDialog::update_file_list);
- ClassDB::bind_method(D_METHOD("deselect_items"), &FileDialog::deselect_items);
+ ClassDB::bind_method(D_METHOD("deselect_all"), &FileDialog::deselect_all);
ClassDB::bind_method(D_METHOD("invalidate"), &FileDialog::invalidate);
@@ -932,7 +932,7 @@ FileDialog::FileDialog() {
tree->connect("multi_selected", callable_mp(this, &FileDialog::_tree_multi_selected), varray(), CONNECT_DEFERRED);
tree->connect("cell_selected", callable_mp(this, &FileDialog::_tree_selected), varray(), CONNECT_DEFERRED);
tree->connect("item_activated", callable_mp(this, &FileDialog::_tree_item_activated), varray());
- tree->connect("nothing_selected", callable_mp(this, &FileDialog::deselect_items));
+ tree->connect("nothing_selected", callable_mp(this, &FileDialog::deselect_all));
dir->connect("text_entered", callable_mp(this, &FileDialog::_dir_entered));
file->connect("text_entered", callable_mp(this, &FileDialog::_file_entered));
filter->connect("item_selected", callable_mp(this, &FileDialog::_filter_selected));
diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h
index 8003650668..3649a30756 100644
--- a/scene/gui/file_dialog.h
+++ b/scene/gui/file_dialog.h
@@ -170,7 +170,7 @@ public:
void invalidate();
- void deselect_items();
+ void deselect_all();
FileDialog();
~FileDialog();
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index c010616aed..ce68aeeeed 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -1081,13 +1081,13 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
if (!gn->is_selected() && box_selection_mode_additive) {
emit_signal("node_selected", gn);
} else if (gn->is_selected() && !box_selection_mode_additive) {
- emit_signal("node_unselected", gn);
+ emit_signal("node_deselected", gn);
}
gn->set_selected(box_selection_mode_additive);
} else {
bool select = (previus_selected.find(gn) != nullptr);
if (gn->is_selected() && !select) {
- emit_signal("node_unselected", gn);
+ emit_signal("node_deselected", gn);
} else if (!gn->is_selected() && select) {
emit_signal("node_selected", gn);
}
@@ -1112,7 +1112,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
bool select = (previus_selected.find(gn) != nullptr);
if (gn->is_selected() && !select) {
- emit_signal("node_unselected", gn);
+ emit_signal("node_deselected", gn);
} else if (!gn->is_selected() && select) {
emit_signal("node_selected", gn);
}
@@ -1141,7 +1141,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
Rect2 r = gn->get_rect();
r.size *= zoom;
if (r.has_point(b->get_position())) {
- emit_signal("node_unselected", gn);
+ emit_signal("node_deselected", gn);
gn->set_selected(false);
}
}
@@ -1204,7 +1204,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
o_gn->set_selected(true);
} else {
if (o_gn->is_selected()) {
- emit_signal("node_unselected", o_gn);
+ emit_signal("node_deselected", o_gn);
}
o_gn->set_selected(false);
}
@@ -1264,7 +1264,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
continue;
}
if (gn2->is_selected()) {
- emit_signal("node_unselected", gn2);
+ emit_signal("node_deselected", gn2);
}
gn2->set_selected(false);
}
@@ -1628,7 +1628,7 @@ void GraphEdit::_bind_methods() {
ADD_SIGNAL(MethodInfo("copy_nodes_request"));
ADD_SIGNAL(MethodInfo("paste_nodes_request"));
ADD_SIGNAL(MethodInfo("node_selected", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
- ADD_SIGNAL(MethodInfo("node_unselected", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
+ ADD_SIGNAL(MethodInfo("node_deselected", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
ADD_SIGNAL(MethodInfo("connection_to_empty", PropertyInfo(Variant::STRING_NAME, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::VECTOR2, "release_position")));
ADD_SIGNAL(MethodInfo("connection_from_empty", PropertyInfo(Variant::STRING_NAME, "to"), PropertyInfo(Variant::INT, "to_slot"), PropertyInfo(Variant::VECTOR2, "release_position")));
ADD_SIGNAL(MethodInfo("delete_nodes_request"));
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 221e74d35b..30610c63b5 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -333,7 +333,7 @@ void ItemList::select(int p_idx, bool p_single) {
update();
}
-void ItemList::unselect(int p_idx) {
+void ItemList::deselect(int p_idx) {
ERR_FAIL_INDEX(p_idx, items.size());
if (select_mode != SELECT_MULTI) {
@@ -345,7 +345,7 @@ void ItemList::unselect(int p_idx) {
update();
}
-void ItemList::unselect_all() {
+void ItemList::deselect_all() {
if (items.size() < 1) {
return;
}
@@ -573,7 +573,7 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) {
int i = closest;
if (select_mode == SELECT_MULTI && items[i].selected && mb->get_command()) {
- unselect(i);
+ deselect(i);
emit_signal("multi_selected", i, false);
} else if (select_mode == SELECT_MULTI && mb->get_shift() && current >= 0 && current < items.size() && current != i) {
@@ -759,7 +759,7 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) {
select(current, false);
emit_signal("multi_selected", current, true);
} else if (items[current].selected) {
- unselect(current);
+ deselect(current);
emit_signal("multi_selected", current, false);
}
}
@@ -1519,8 +1519,8 @@ void ItemList::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_item_tooltip", "idx"), &ItemList::get_item_tooltip);
ClassDB::bind_method(D_METHOD("select", "idx", "single"), &ItemList::select, DEFVAL(true));
- ClassDB::bind_method(D_METHOD("unselect", "idx"), &ItemList::unselect);
- ClassDB::bind_method(D_METHOD("unselect_all"), &ItemList::unselect_all);
+ ClassDB::bind_method(D_METHOD("deselect", "idx"), &ItemList::deselect);
+ ClassDB::bind_method(D_METHOD("deselect_all"), &ItemList::deselect_all);
ClassDB::bind_method(D_METHOD("is_selected", "idx"), &ItemList::is_selected);
ClassDB::bind_method(D_METHOD("get_selected_items"), &ItemList::get_selected_items);
diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h
index 9684ce0a32..281814e178 100644
--- a/scene/gui/item_list.h
+++ b/scene/gui/item_list.h
@@ -183,8 +183,8 @@ public:
Color get_item_custom_fg_color(int p_idx) const;
void select(int p_idx, bool p_single = true);
- void unselect(int p_idx);
- void unselect_all();
+ void deselect(int p_idx);
+ void deselect_all();
bool is_selected(int p_idx) const;
Vector<int> get_selected_items();
bool is_anything_selected();