Add auto_translate toggle for automatic translation
This commit is contained in:
parent
bdcc8741e4
commit
94a64d557e
13 changed files with 92 additions and 23 deletions
|
|
@ -103,6 +103,8 @@ private:
|
|||
|
||||
LayoutDirection layout_dir = LAYOUT_DIRECTION_INHERITED;
|
||||
|
||||
bool auto_translate = true;
|
||||
|
||||
void _update_child_controls();
|
||||
|
||||
Size2i content_scale_size;
|
||||
|
|
@ -256,6 +258,10 @@ public:
|
|||
LayoutDirection get_layout_direction() const;
|
||||
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; };
|
||||
|
||||
Rect2i get_usable_parent_rect() const;
|
||||
|
||||
Ref<Texture2D> get_theme_icon(const StringName &p_name, const StringName &p_theme_type = StringName()) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue