diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/bind/core_bind.cpp | 7 | ||||
-rw-r--r-- | core/bind/core_bind.h | 2 | ||||
-rw-r--r-- | core/engine.cpp | 4 | ||||
-rw-r--r-- | core/global_config.cpp | 2 | ||||
-rw-r--r-- | core/math/a_star.cpp | 7 | ||||
-rw-r--r-- | core/math/a_star.h | 1 | ||||
-rw-r--r-- | core/os/os.h | 2 |
7 files changed, 24 insertions, 1 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 095f058ed9..e863078a48 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -300,6 +300,11 @@ bool _OS::get_borderless_window() const { return OS::get_singleton()->get_borderless_window(); } +void _OS::set_ime_position(const Point2 &p_pos) { + + return OS::get_singleton()->set_ime_position(p_pos); +} + void _OS::set_use_file_access_save_and_swap(bool p_enable) { FileAccess::set_backup_save(p_enable); @@ -993,6 +998,8 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("set_borderless_window", "borderless"), &_OS::set_borderless_window); ClassDB::bind_method(D_METHOD("get_borderless_window"), &_OS::get_borderless_window); + ClassDB::bind_method(D_METHOD("set_ime_position"), &_OS::set_ime_position); + ClassDB::bind_method(D_METHOD("set_screen_orientation", "orientation"), &_OS::set_screen_orientation); ClassDB::bind_method(D_METHOD("get_screen_orientation"), &_OS::get_screen_orientation); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 87d84c0732..f72f665d9e 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -158,6 +158,8 @@ public: virtual void set_borderless_window(bool p_borderless); virtual bool get_borderless_window() const; + virtual void set_ime_position(const Point2 &p_pos); + Error native_video_play(String p_path, float p_volume, String p_audio_track, String p_subtitle_track); bool native_video_is_playing(); void native_video_pause(); diff --git a/core/engine.cpp b/core/engine.cpp index 5301c4e519..42850325b4 100644 --- a/core/engine.cpp +++ b/core/engine.cpp @@ -30,6 +30,7 @@ #include "engine.h" #include "version.h" +#include "version_hash.gen.h" void Engine::set_iterations_per_second(int p_ips) { @@ -87,6 +88,9 @@ Dictionary Engine::get_version_info() const { dict["revision"] = _MKSTR(VERSION_REVISION); dict["year"] = VERSION_YEAR; + String hash = String(VERSION_HASH); + dict["hash"] = hash.length() == 0 ? String("unknown") : hash; + String stringver = String(dict["major"]) + "." + String(dict["minor"]); if ((int)dict["patch"] != 0) stringver += "." + String(dict["patch"]); diff --git a/core/global_config.cpp b/core/global_config.cpp index ba0a7f3e31..caae73ee2e 100644 --- a/core/global_config.cpp +++ b/core/global_config.cpp @@ -835,7 +835,7 @@ void GlobalConfig::_bind_methods() { ClassDB::bind_method(D_METHOD("get_singleton", "name"), &GlobalConfig::get_singleton_object); ClassDB::bind_method(D_METHOD("load_resource_pack", "pack"), &GlobalConfig::_load_resource_pack); ClassDB::bind_method(D_METHOD("property_can_revert", "name"), &GlobalConfig::property_can_revert); - ClassDB::bind_method(D_METHOD("property_get_revert", "name"), &GlobalConfig::property_get_revert); + ClassDB::bind_method(D_METHOD("property_get_revert:Variant", "name"), &GlobalConfig::property_get_revert); ClassDB::bind_method(D_METHOD("save_custom", "file"), &GlobalConfig::_save_custom_bnd); } diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp index 838fec22f0..04e4383f03 100644 --- a/core/math/a_star.cpp +++ b/core/math/a_star.cpp @@ -123,6 +123,12 @@ void AStar::disconnect_points(int p_id, int p_with_id) { a->neighbours.erase(b); b->neighbours.erase(a); } + +bool AStar::has_point(int p_id) const { + + return points.has(p_id); +} + bool AStar::are_points_connected(int p_id, int p_with_id) const { Segment s(p_id, p_with_id); @@ -400,6 +406,7 @@ void AStar::_bind_methods() { ClassDB::bind_method(D_METHOD("get_point_pos", "id"), &AStar::get_point_pos); ClassDB::bind_method(D_METHOD("get_point_weight_scale", "id"), &AStar::get_point_weight_scale); ClassDB::bind_method(D_METHOD("remove_point", "id"), &AStar::remove_point); + ClassDB::bind_method(D_METHOD("has_point", "id"), &AStar::has_point); ClassDB::bind_method(D_METHOD("connect_points", "id", "to_id", "bidirectional"), &AStar::connect_points, DEFVAL(true)); ClassDB::bind_method(D_METHOD("disconnect_points", "id", "to_id"), &AStar::disconnect_points); diff --git a/core/math/a_star.h b/core/math/a_star.h index 34a5358344..ebf1407c17 100644 --- a/core/math/a_star.h +++ b/core/math/a_star.h @@ -104,6 +104,7 @@ public: Vector3 get_point_pos(int p_id) const; real_t get_point_weight_scale(int p_id) const; void remove_point(int p_id); + bool has_point(int p_id) const; void connect_points(int p_id, int p_with_id, bool bidirectional = true); void disconnect_points(int p_id, int p_with_id); diff --git a/core/os/os.h b/core/os/os.h index 11fe8b44e3..cafd1f4e14 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -179,6 +179,8 @@ public: virtual void set_borderless_window(int p_borderless) {} virtual bool get_borderless_window() { return 0; } + virtual void set_ime_position(const Point2 &p_pos) {} + virtual Error open_dynamic_library(const String p_path, void *&p_library_handle) { return ERR_UNAVAILABLE; }; virtual Error close_dynamic_library(void *p_library_handle) { return ERR_UNAVAILABLE; }; virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle) { return ERR_UNAVAILABLE; }; |