Make auto translation inheritable

This commit is contained in:
Michael Alexsander 2024-01-23 18:29:45 -03:00
parent 6f805dee2a
commit 7b42c24550
No known key found for this signature in database
GPG key ID: A9C91EE110F4EABA
51 changed files with 284 additions and 136 deletions

View file

@ -34,7 +34,6 @@
#include "scene/main/viewport.h"
#include "scene/resources/theme.h"
class Control;
class Font;
class Shortcut;
class StyleBox;
@ -138,8 +137,6 @@ private:
LayoutDirection layout_dir = LAYOUT_DIRECTION_INHERITED;
bool auto_translate = true;
void _update_child_controls();
void _update_embedded_window();
@ -389,15 +386,18 @@ public:
void grab_focus();
bool has_focus() const;
Rect2i get_usable_parent_rect() const;
// Internationalization.
void set_layout_direction(LayoutDirection p_direction);
LayoutDirection get_layout_direction() const;
bool is_layout_rtl() const;
#ifndef DISABLE_DEPRECATED
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;
#endif
// Theming.