Prohibit inconsistent size state for SubViewport

Prohibit size changes of SubViewports with parent SubViewportContainers that have stretch mode enabled.
This commit is contained in:
Markus Sauermann
2022-10-04 21:53:18 +02:00
parent 0056acf46f
commit decbda68d7
5 changed files with 25 additions and 3 deletions

View File

@ -26,6 +26,7 @@
</member>
<member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(512, 512)">
The width and height of the sub-viewport. Must be set to a value greater than or equal to 2 pixels on both dimensions. Otherwise, nothing will be displayed.
[b]Note:[/b] If the parent node is a [SubViewportContainer] and its [member SubViewportContainer.stretch] is [code]true[/code], the viewport size cannot be changed manually.
</member>
<member name="size_2d_override" type="Vector2i" setter="set_size_2d_override" getter="get_size_2d_override" default="Vector2i(0, 0)">
The 2D size override of the sub-viewport. If either the width or height is [code]0[/code], the override is disabled.