Merge pull request #48814 from Calinou/viewport-use-nonzero-default-size

Use a non-zero default size for SubViewports
This commit is contained in:
Rémi Verschelde 2021-05-19 10:12:42 +02:00 committed by GitHub
commit d0aaf4a1fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -25,7 +25,7 @@
<member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="SubViewport.UpdateMode" default="2">
The update mode when the sub-viewport is used as a render target.
</member>
<member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i( 0, 0 )">
<member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i( 512, 512 )">
The width and height of the sub-viewport.
</member>
<member name="size_2d_override" type="Vector2i" setter="set_size_2d_override" getter="get_size_2d_override" default="Vector2i( 0, 0 )">

View file

@ -231,7 +231,7 @@ private:
Transform2D global_canvas_transform;
Transform2D stretch_transform;
Size2i size;
Size2i size = Size2i(512, 512);
Size2i size_2d_override;
bool size_allocated = false;
bool use_xr = false;