mirror of
https://github.com/godotengine/godot.git
synced 2025-10-27 19:54:27 +00:00
-Ability to ask for documents/pictures/etc system dirs.
-Fixes to animationplayer -fixes to collada importer
This commit is contained in:
parent
9d5a2cb847
commit
e361e8539c
28 changed files with 419 additions and 107 deletions
|
|
@ -557,6 +557,58 @@ public class GodotIO {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public static final int SYSTEM_DIR_DESKTOP=0;
|
||||
public static final int SYSTEM_DIR_DCIM=1;
|
||||
public static final int SYSTEM_DIR_DOCUMENTS=2;
|
||||
public static final int SYSTEM_DIR_DOWNLOADS=3;
|
||||
public static final int SYSTEM_DIR_MOVIES=4;
|
||||
public static final int SYSTEM_DIR_MUSIC=5;
|
||||
public static final int SYSTEM_DIR_PICTURES=6;
|
||||
public static final int SYSTEM_DIR_RINGTONES=7;
|
||||
|
||||
|
||||
public String getSystemDir(int idx) {
|
||||
|
||||
String what="";
|
||||
switch(idx) {
|
||||
case SYSTEM_DIR_DESKTOP: {
|
||||
//what=Environment.DIRECTORY_DOCUMENTS;
|
||||
what=Environment.DIRECTORY_DOWNLOADS;
|
||||
} break;
|
||||
case SYSTEM_DIR_DCIM: {
|
||||
what=Environment.DIRECTORY_DCIM;
|
||||
|
||||
} break;
|
||||
case SYSTEM_DIR_DOCUMENTS: {
|
||||
what=Environment.DIRECTORY_DOWNLOADS;
|
||||
//what=Environment.DIRECTORY_DOCUMENTS;
|
||||
} break;
|
||||
case SYSTEM_DIR_DOWNLOADS: {
|
||||
what=Environment.DIRECTORY_DOWNLOADS;
|
||||
|
||||
} break;
|
||||
case SYSTEM_DIR_MOVIES: {
|
||||
what=Environment.DIRECTORY_MOVIES;
|
||||
|
||||
} break;
|
||||
case SYSTEM_DIR_MUSIC: {
|
||||
what=Environment.DIRECTORY_MUSIC;
|
||||
} break;
|
||||
case SYSTEM_DIR_PICTURES: {
|
||||
what=Environment.DIRECTORY_PICTURES;
|
||||
} break;
|
||||
case SYSTEM_DIR_RINGTONES: {
|
||||
what=Environment.DIRECTORY_RINGTONES;
|
||||
|
||||
} break;
|
||||
}
|
||||
|
||||
if (what.equals(""))
|
||||
return "";
|
||||
return Environment.getExternalStoragePublicDirectory(what).getAbsolutePath();
|
||||
}
|
||||
|
||||
protected static final String PREFS_FILE = "device_id.xml";
|
||||
protected static final String PREFS_DEVICE_ID = "device_id";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue