Merge pull request #37505 from YeldhamDev/viewcont_rename
Rename ViewportContainer to SubViewportContainer
This commit is contained in:
commit
59d44ee872
13 changed files with 74 additions and 73 deletions
25
doc/classes/SubViewportContainer.xml
Normal file
25
doc/classes/SubViewportContainer.xml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="SubViewportContainer" inherits="Container" version="4.0">
|
||||
<brief_description>
|
||||
Control for holding [SubViewport]s.
|
||||
</brief_description>
|
||||
<description>
|
||||
A [Container] node that holds a [SubViewport], automatically setting its size.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled" default="false">
|
||||
If [code]true[/code], the sub-viewport will be scaled to the control's size.
|
||||
</member>
|
||||
<member name="stretch_shrink" type="int" setter="set_stretch_shrink" getter="get_stretch_shrink" default="1">
|
||||
Divides the sub-viewport's effective resolution by this value while preserving its scale. This can be used to speed up rendering.
|
||||
For example, a 1280×720 sub-viewport with [member stretch_shrink] set to [code]2[/code] will be rendered at 640×360 while occupying the same size in the container.
|
||||
[b]Note:[/b] [member stretch] must be [code]true[/code] for this property to work.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
<description>
|
||||
A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera3D 3D nodes will render on it too.
|
||||
Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports.
|
||||
If a viewport is a child of a [ViewportContainer], it will automatically take up its size, otherwise it must be set manually.
|
||||
If a viewport is a child of a [SubViewportContainer], it will automatically take up its size, otherwise it must be set manually.
|
||||
Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it.
|
||||
Also, viewports can be assigned to different screens in case the devices have multiple screens.
|
||||
Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="ViewportContainer" inherits="Container" version="4.0">
|
||||
<brief_description>
|
||||
Control for holding [Viewport]s.
|
||||
</brief_description>
|
||||
<description>
|
||||
A [Container] node that holds a [Viewport], automatically setting its size.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled" default="false">
|
||||
If [code]true[/code], the viewport will be scaled to the control's size.
|
||||
</member>
|
||||
<member name="stretch_shrink" type="int" setter="set_stretch_shrink" getter="get_stretch_shrink" default="1">
|
||||
Divides the viewport's effective resolution by this value while preserving its scale. This can be used to speed up rendering.
|
||||
For example, a 1280×720 viewport with [member stretch_shrink] set to [code]2[/code] will be rendered at 640×360 while occupying the same size in the container.
|
||||
[b]Note:[/b] [member stretch] must be [code]true[/code] for this property to work.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
||||
Loading…
Add table
Add a link
Reference in a new issue