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:
Pedro J. Estébanez 2020-02-10 09:19:29 +01:00 committed by Pedro J. Estébanez
parent 3c7d92c590
commit aee586553a
17 changed files with 71 additions and 21 deletions

View file

@ -189,7 +189,7 @@ Error DirAccessWindows::make_dir(String p_dir) {
return ERR_CANT_CREATE;
}
String DirAccessWindows::get_current_dir() {
String DirAccessWindows::get_current_dir(bool p_include_drive) {
String base = _get_root_path();
if (base != "") {
@ -203,7 +203,11 @@ String DirAccessWindows::get_current_dir() {
} else {
}
return current_dir;
if (p_include_drive) {
return current_dir;
} else {
return current_dir.right(current_dir.find(":") + 1);
}
}
bool DirAccessWindows::file_exists(String p_file) {