summaryrefslogtreecommitdiffstats
path: root/core/core_bind.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2021-05-28 20:24:40 +0200
committerkobewi <kobewi4e@gmail.com>2021-05-31 12:16:26 +0200
commitbd50006aae6e9a84489b40f4f56c50ef79953137 (patch)
tree04cc03bb5bec520784c551e90e722233d9157a31 /core/core_bind.cpp
parent364ea7f280a3f074795e542b16b1d0ec76cf6ce2 (diff)
downloadredot-engine-bd50006aae6e9a84489b40f4f56c50ef79953137.tar.gz
Tweak arguments of list_dir_begin()
Diffstat (limited to 'core/core_bind.cpp')
-rw-r--r--core/core_bind.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp
index b8c448dc82..05265c41ad 100644
--- a/core/core_bind.cpp
+++ b/core/core_bind.cpp
@@ -1616,11 +1616,11 @@ bool _Directory::is_open() const {
return d && dir_open;
}
-Error _Directory::list_dir_begin(bool p_skip_navigational, bool p_skip_hidden) {
+Error _Directory::list_dir_begin(bool p_show_navigational, bool p_show_hidden) {
ERR_FAIL_COND_V_MSG(!is_open(), ERR_UNCONFIGURED, "Directory must be opened before use.");
- _list_skip_navigational = p_skip_navigational;
- _list_skip_hidden = p_skip_hidden;
+ _list_skip_navigational = !p_show_navigational;
+ _list_skip_hidden = !p_show_hidden;
return d->list_dir_begin();
}
@@ -1758,7 +1758,7 @@ Error _Directory::remove(String p_name) {
void _Directory::_bind_methods() {
ClassDB::bind_method(D_METHOD("open", "path"), &_Directory::open);
- ClassDB::bind_method(D_METHOD("list_dir_begin", "skip_navigational", "skip_hidden"), &_Directory::list_dir_begin, DEFVAL(false), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("list_dir_begin", "show_navigational", "show_hidden"), &_Directory::list_dir_begin, DEFVAL(false), DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_next"), &_Directory::get_next);
ClassDB::bind_method(D_METHOD("current_is_dir"), &_Directory::current_is_dir);
ClassDB::bind_method(D_METHOD("list_dir_end"), &_Directory::list_dir_end);