summaryrefslogtreecommitdiff
path: root/scene/main/viewport.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/viewport.h')
-rw-r--r--scene/main/viewport.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index e081013fde..7546838568 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -471,7 +471,7 @@ private:
uint64_t event_count = 0;
protected:
- void _set_size(const Size2i &p_size, const Size2i &p_size_2d_override, const Rect2i &p_to_screen_rect, const Transform2D &p_stretch_transform, bool p_allocated);
+ void _set_size(const Size2i &p_size, const Size2i &p_size_2d_override, const Rect2i &p_to_screen_rect, bool p_allocated);
Size2i _get_size() const;
Size2i _get_size_2d_override() const;
@@ -649,6 +649,8 @@ public:
void set_canvas_cull_mask_bit(uint32_t p_layer, bool p_enable);
bool get_canvas_cull_mask_bit(uint32_t p_layer) const;
+ virtual bool is_size_2d_override_stretch_enabled() const { return true; }
+
virtual Transform2D get_screen_transform() const;
virtual Transform2D get_popup_base_transform() const { return Transform2D(); }
@@ -754,21 +756,23 @@ private:
ClearMode clear_mode = CLEAR_MODE_ALWAYS;
bool size_2d_override_stretch = false;
+ void _internal_set_size(const Size2i &p_size, bool p_force = false);
+
protected:
static void _bind_methods();
virtual DisplayServer::WindowID get_window_id() const override;
- Transform2D _stretch_transform();
void _notification(int p_what);
public:
void set_size(const Size2i &p_size);
Size2i get_size() const;
+ void set_size_force(const Size2i &p_size);
void set_size_2d_override(const Size2i &p_size);
Size2i get_size_2d_override() const;
void set_size_2d_override_stretch(bool p_enable);
- bool is_size_2d_override_stretch_enabled() const;
+ bool is_size_2d_override_stretch_enabled() const override;
void set_update_mode(UpdateMode p_mode);
UpdateMode get_update_mode() const;