diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-08-01 22:10:38 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-08-01 22:10:38 -0300 |
commit | 678948068bbde7f12a9c5f28a467b6cf4d127851 (patch) | |
tree | 75572f3a5cc6089a6ca3046e9307d0a7c0b72c51 /core/translation.cpp | |
parent | 9ff6d55822647c87eef392147ea15641d0922d47 (diff) |
Small Issues & Maintenance
-=-=-=-=-=-=-=-=-=-=-=-=-=
-Begin work on Navigation Meshes (simple pathfinding for now, will improve soon)
-More doc on theme overriding
-Upgraded OpenSSL to version without bugs
-Misc bugfixes
Diffstat (limited to 'core/translation.cpp')
-rw-r--r-- | core/translation.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/translation.cpp b/core/translation.cpp index 045771f7c7..81f2c36075 100644 --- a/core/translation.cpp +++ b/core/translation.cpp @@ -470,6 +470,11 @@ void Translation::get_message_list(List<StringName> *r_messages) const { } +int Translation::get_message_count() const { + + return translation_map.size(); +}; + void Translation::_bind_methods() { @@ -479,6 +484,7 @@ void Translation::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_message","src_message"),&Translation::get_message); ObjectTypeDB::bind_method(_MD("erase_message","src_message"),&Translation::erase_message); ObjectTypeDB::bind_method(_MD("get_message_list"),&Translation::_get_message_list); + ObjectTypeDB::bind_method(_MD("get_message_count"),&Translation::get_message_count); ObjectTypeDB::bind_method(_MD("_set_messages"),&Translation::_set_messages); ObjectTypeDB::bind_method(_MD("_get_messages"),&Translation::_get_messages); @@ -519,6 +525,11 @@ void TranslationServer::remove_translation(const Ref<Translation> &p_translation translations.erase(p_translation); } +void TranslationServer::clear() { + + translations.clear(); +}; + StringName TranslationServer::translate(const StringName& p_message) const { //translate using locale @@ -609,6 +620,9 @@ void TranslationServer::_bind_methods() { ObjectTypeDB::bind_method(_MD("add_translation"),&TranslationServer::add_translation); ObjectTypeDB::bind_method(_MD("remove_translation"),&TranslationServer::remove_translation); + + ObjectTypeDB::bind_method(_MD("clear"),&TranslationServer::clear); + } void TranslationServer::load_translations() { |