mirror of
https://github.com/godotengine/godot.git
synced 2025-11-02 06:31:13 +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:
parent
3c7d92c590
commit
aee586553a
17 changed files with 71 additions and 21 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue