Implement override of get_message and get_plural_message

This commit is contained in:
O01eg 2021-09-29 14:18:45 +03:00
parent e2e1a5099c
commit 9302b6547a
No known key found for this signature in database
GPG key ID: 1B9D1643A461AA2A
3 changed files with 36 additions and 0 deletions

View file

@ -32,6 +32,8 @@
#define TRANSLATION_H
#include "core/io/resource.h"
#include "core/object/gdvirtual.gen.inc"
#include "core/object/script_language.h"
class Translation : public Resource {
GDCLASS(Translation, Resource);
@ -48,6 +50,9 @@ class Translation : public Resource {
protected:
static void _bind_methods();
GDVIRTUAL2RC(StringName, _get_message, StringName, StringName);
GDVIRTUAL4RC(StringName, _get_plural_message, StringName, StringName, int, StringName);
public:
void set_locale(const String &p_locale);
_FORCE_INLINE_ String get_locale() const { return locale; }