Reworked translation system
-Label and Button reload translation on the fly -Resources are loaded and reload depending on locale
This commit is contained in:
@ -35,6 +35,7 @@
|
||||
#include "ref_ptr.h"
|
||||
#include "reference.h"
|
||||
#include "safe_refcount.h"
|
||||
#include "self_list.h"
|
||||
|
||||
/**
|
||||
@author Juan Linietsky <reduzio@gmail.com>
|
||||
@ -74,6 +75,8 @@ class Resource : public Reference {
|
||||
friend class SceneState;
|
||||
Node *local_scene;
|
||||
|
||||
SelfList<Resource> remapped_list;
|
||||
|
||||
protected:
|
||||
void emit_changed();
|
||||
|
||||
@ -127,6 +130,9 @@ public:
|
||||
|
||||
#endif
|
||||
|
||||
void set_as_translation_remapped(bool p_remapped);
|
||||
bool is_translation_remapped() const;
|
||||
|
||||
virtual RID get_rid() const; // some resources may offer conversion to RID
|
||||
|
||||
Resource();
|
||||
@ -137,6 +143,7 @@ typedef Ref<Resource> RES;
|
||||
|
||||
class ResourceCache {
|
||||
friend class Resource;
|
||||
friend class ResourceLoader; //need the lock
|
||||
static RWLock *lock;
|
||||
static HashMap<String, Resource *> resources;
|
||||
friend void unregister_core_types();
|
||||
|
||||
Reference in New Issue
Block a user