summaryrefslogtreecommitdiff
path: root/scene/main/window.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/window.h')
-rw-r--r--scene/main/window.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/scene/main/window.h b/scene/main/window.h
index e92b5e22ed..4f31d9cd1f 100644
--- a/scene/main/window.h
+++ b/scene/main/window.h
@@ -32,10 +32,12 @@
#define WINDOW_H
#include "scene/main/viewport.h"
-#include "scene/resources/theme.h"
-#include "servers/display_server.h"
class Control;
+class Font;
+class StyleBox;
+class Theme;
+
class Window : public Viewport {
GDCLASS(Window, Viewport)
public:
@@ -103,6 +105,8 @@ private:
LayoutDirection layout_dir = LAYOUT_DIRECTION_INHERITED;
+ bool auto_translate = true;
+
void _update_child_controls();
Size2i content_scale_size;
@@ -256,6 +260,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;