From db3b05d2893dcaddeb3bcb10b845ff150eb50895 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 28 Jun 2017 17:00:18 -0300 Subject: Reworked translation system -Label and Button reload translation on the fly -Resources are loaded and reload depending on locale --- core/io/resource_format_binary.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'core/io/resource_format_binary.cpp') diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 0373176cd..b474c2e07 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -689,6 +689,7 @@ Error ResourceInteractiveLoaderBinary::poll() { f->close(); resource = res; + resource->set_as_translation_remapped(translation_remapped); error = ERR_FILE_EOF; } else { @@ -706,6 +707,11 @@ int ResourceInteractiveLoaderBinary::get_stage_count() const { return external_resources.size() + internal_resources.size(); } +void ResourceInteractiveLoaderBinary::set_translation_remapped(bool p_remapped) { + + translation_remapped = p_remapped; +} + static void save_ustring(FileAccess *f, const String &p_string) { CharString utf8 = p_string.utf8(); @@ -920,6 +926,7 @@ ResourceInteractiveLoaderBinary::ResourceInteractiveLoaderBinary() { endian_swap = false; use_real64 = false; error = OK; + translation_remapped = false; } ResourceInteractiveLoaderBinary::~ResourceInteractiveLoaderBinary() { -- cgit v1.2.3-70-g09d2