summaryrefslogtreecommitdiff
path: root/doc/classes/Camera2D.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Camera2D.xml')
-rw-r--r--doc/classes/Camera2D.xml57
1 files changed, 9 insertions, 48 deletions
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index c95691d07f..72f6513e66 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -47,27 +47,6 @@
Returns the location of the [code]Camera2D[/code]'s screen-center, relative to the origin.
</description>
</method>
- <method name="get_custom_viewport" qualifiers="const">
- <return type="Node">
- </return>
- <description>
- Returns the [Viewport] used by the camera if it is not using the default viewport.
- </description>
- </method>
- <method name="get_h_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the horizontal offset of the camera.
- </description>
- </method>
- <method name="get_v_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the vertical offset of the camera.
- </description>
- </method>
<method name="make_current">
<return type="void">
</return>
@@ -83,33 +62,6 @@
This has no effect if smoothing is disabled.
</description>
</method>
- <method name="set_custom_viewport">
- <return type="void">
- </return>
- <argument index="0" name="viewport" type="Node">
- </argument>
- <description>
- Assigns a custom [Viewport] node to the [code]Camera2D[/code]. If [code]viewport[/code] is not a [Viewport], it re-assigns the default viewport instead.
- </description>
- </method>
- <method name="set_h_offset">
- <return type="void">
- </return>
- <argument index="0" name="ofs" type="float">
- </argument>
- <description>
- The camera's horizontal offset is set to [code]ofs[/code].
- </description>
- </method>
- <method name="set_v_offset">
- <return type="void">
- </return>
- <argument index="0" name="ofs" type="float">
- </argument>
- <description>
- The camera's vertical offset is set to [code]ofs[/code].
- </description>
- </method>
</methods>
<members>
<member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" enum="Camera2D.AnchorMode">
@@ -118,6 +70,9 @@
<member name="current" type="bool" setter="_set_current" getter="is_current">
If [code]true[/code] the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one.
</member>
+ <member name="custom_viewport" type="Node" setter="set_custom_viewport" getter="get_custom_viewport">
+ The custom [Viewport] node attached to the [code]Camera2D[/code]. If null or not a [Viewport], uses the default viewport instead.
+ </member>
<member name="drag_margin_bottom" type="float" setter="set_drag_margin" getter="get_drag_margin">
Bottom margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
</member>
@@ -163,6 +118,12 @@
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset">
The camera's offset, useful for looking around or camera shake animations.
</member>
+ <member name="offset_h" type="float" setter="set_h_offset" getter="get_h_offset">
+ The horizontal offset of the camera, relative to the drag margins. Default value: [code]0[/code]
+ </member>
+ <member name="offset_v" type="float" setter="set_v_offset" getter="get_v_offset">
+ The vertical offset of the camera, relative to the drag margins. Default value: [code]0[/code]
+ </member>
<member name="rotating" type="bool" setter="set_rotating" getter="is_rotating">
If [code]true[/code] the camera rotates with the target. Default value: [code]false[/code]
</member>