aboutsummaryrefslogtreecommitdiff
path: root/core/bind
diff options
context:
space:
mode:
Diffstat (limited to 'core/bind')
-rw-r--r--core/bind/core_bind.cpp15
-rw-r--r--core/bind/core_bind.h17
2 files changed, 32 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index f50330447..ef943b2f7 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -606,6 +606,12 @@ bool _OS::is_debug_build() const {
#endif
}
+
+String _OS::get_system_dir(SystemDir p_dir) const {
+
+ return OS::get_singleton()->get_system_dir(OS::SystemDir(p_dir));
+}
+
String _OS::get_custom_level() const {
return OS::get_singleton()->get_custom_level();
@@ -690,6 +696,7 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_dynamic_memory_usage"),&_OS::get_dynamic_memory_usage);
ObjectTypeDB::bind_method(_MD("get_data_dir"),&_OS::get_data_dir);
+ ObjectTypeDB::bind_method(_MD("get_system_dir","dir"),&_OS::get_system_dir);
ObjectTypeDB::bind_method(_MD("get_unique_ID"),&_OS::get_unique_ID);
ObjectTypeDB::bind_method(_MD("get_frames_per_second"),&_OS::get_frames_per_second);
@@ -728,6 +735,14 @@ void _OS::_bind_methods() {
BIND_CONSTANT( MONTH_NOVEMBER );
BIND_CONSTANT( MONTH_DECEMBER );
+ BIND_CONSTANT( SYSTEM_DIR_DESKTOP);
+ BIND_CONSTANT( SYSTEM_DIR_DCIM );
+ BIND_CONSTANT( SYSTEM_DIR_DOCUMENTS );
+ BIND_CONSTANT( SYSTEM_DIR_DOWNLOADS );
+ BIND_CONSTANT( SYSTEM_DIR_MOVIES );
+ BIND_CONSTANT( SYSTEM_DIR_MUSIC );
+ BIND_CONSTANT( SYSTEM_DIR_PICTURES );
+ BIND_CONSTANT( SYSTEM_DIR_RINGTONES );
}
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 101dc1ab9..a76b4aa81 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -201,6 +201,20 @@ public:
int get_processor_count() const;
+ enum SystemDir {
+ SYSTEM_DIR_DESKTOP,
+ SYSTEM_DIR_DCIM,
+ SYSTEM_DIR_DOCUMENTS,
+ SYSTEM_DIR_DOWNLOADS,
+ SYSTEM_DIR_MOVIES,
+ SYSTEM_DIR_MUSIC,
+ SYSTEM_DIR_PICTURES,
+ SYSTEM_DIR_RINGTONES,
+ };
+
+ String get_system_dir(SystemDir p_dir) const;
+
+
String get_data_dir() const;
void set_time_scale(float p_scale);
@@ -211,6 +225,9 @@ public:
_OS();
};
+VARIANT_ENUM_CAST(_OS::SystemDir);
+
+
class _Geometry : public Object {
OBJ_TYPE(_Geometry, Object);