summaryrefslogtreecommitdiff
path: root/scene/gui/control.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-07-30 13:23:20 +0200
committerGitHub <noreply@github.com>2021-07-30 13:23:20 +0200
commit714fa370b76ea56ff75be5b54b5d82771e1688c3 (patch)
tree64f3f049d83bcc4a935f70a365728e527f202fb1 /scene/gui/control.h
parent7ab3e8aa20a075b1090314bfae057e0d6307e325 (diff)
parent94a64d557ed6d275a2e284acb8ea39e06fccdd09 (diff)
Merge pull request #49149 from YeldhamDev/auto_translate_toggle
Add `auto_translate` toggle for automatic translation
Diffstat (limited to 'scene/gui/control.h')
-rw-r--r--scene/gui/control.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/gui/control.h b/scene/gui/control.h
index 3779f9b308..8d669c7a6d 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -182,6 +182,8 @@ private:
bool is_rtl_dirty = true;
bool is_rtl = false;
+ bool auto_translate = true;
+
real_t rotation = 0.0;
Vector2 scale = Vector2(1, 1);
Vector2 pivot_offset;
@@ -351,6 +353,10 @@ public:
LayoutDirection get_layout_direction() const;
virtual bool is_layout_rtl() const;
+ void set_auto_translate(bool p_enable);
+ bool is_auto_translating() const;
+ _FORCE_INLINE_ String atr(const String p_string) const { return is_auto_translating() ? tr(p_string) : p_string; };
+
/* POSITIONING */
void set_anchors_preset(LayoutPreset p_preset, bool p_keep_offsets = true);