You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Improve UX of drive letters
Namely, move the drive dropdown to just the left of the path text box and don't include the former in the latter. This improves the UX on Windows. In the UNIX case, since its concept of drives is (ab)used to provide shortcuts to useful paths, its dropdown is kept at the original location.
This commit is contained in:
committed by
Pedro J. Estébanez
parent
3c7d92c590
commit
aee586553a
@@ -2344,10 +2344,10 @@ Error _Directory::change_dir(String p_dir) {
|
||||
ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory must be opened before use.");
|
||||
return d->change_dir(p_dir);
|
||||
}
|
||||
String _Directory::get_current_dir() {
|
||||
String _Directory::get_current_dir(bool p_include_drive) {
|
||||
|
||||
ERR_FAIL_COND_V_MSG(!d, "", "Directory must be opened before use.");
|
||||
return d->get_current_dir();
|
||||
return d->get_current_dir(p_include_drive);
|
||||
}
|
||||
Error _Directory::make_dir(String p_dir) {
|
||||
|
||||
@@ -2444,7 +2444,7 @@ void _Directory::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_drive", "idx"), &_Directory::get_drive);
|
||||
ClassDB::bind_method(D_METHOD("get_current_drive"), &_Directory::get_current_drive);
|
||||
ClassDB::bind_method(D_METHOD("change_dir", "todir"), &_Directory::change_dir);
|
||||
ClassDB::bind_method(D_METHOD("get_current_dir"), &_Directory::get_current_dir);
|
||||
ClassDB::bind_method(D_METHOD("get_current_dir", "include_drive"), &_Directory::get_current_dir, DEFVAL(true));
|
||||
ClassDB::bind_method(D_METHOD("make_dir", "path"), &_Directory::make_dir);
|
||||
ClassDB::bind_method(D_METHOD("make_dir_recursive", "path"), &_Directory::make_dir_recursive);
|
||||
ClassDB::bind_method(D_METHOD("file_exists", "path"), &_Directory::file_exists);
|
||||
|
||||
Reference in New Issue
Block a user