From 94a64d557ed6d275a2e284acb8ea39e06fccdd09 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Thu, 27 May 2021 14:31:33 -0300 Subject: Add `auto_translate` toggle for automatic translation --- scene/gui/control.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scene/gui/control.h') 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); -- cgit v1.2.3