summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Nations <willnationsdev@gmail.com>2017-12-06 13:47:11 -0600
committerWill Nations <willnationsdev@gmail.com>2017-12-06 17:20:57 -0600
commitd1084df81a1efbd40c69dbb2ab1bd4a859cb1f2e (patch)
tree14604c16643a3b137d81b4dfe9df1b2b242dc34b
parenta8ae46e1431a25ced8565db39e44e068b8815c21 (diff)
[DOCS] Camera2D methods/constants
-rw-r--r--doc/classes/Camera2D.xml10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index 86c89bf4ca..c95691d07f 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -23,6 +23,7 @@
<return type="void">
</return>
<description>
+ Removes any [code]Camera2D[/code] from the ancestor [Viewport]'s internal currently-assigned camera.
</description>
</method>
<method name="force_update_scroll">
@@ -43,24 +44,28 @@
<return type="Vector2">
</return>
<description>
+ 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">
@@ -84,6 +89,7 @@
<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">
@@ -92,6 +98,7 @@
<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">
@@ -100,6 +107,7 @@
<argument index="0" name="ofs" type="float">
</argument>
<description>
+ The camera's vertical offset is set to [code]ofs[/code].
</description>
</method>
</methods>
@@ -170,8 +178,10 @@
</members>
<constants>
<constant name="ANCHOR_MODE_FIXED_TOP_LEFT" value="0" enum="AnchorMode">
+ The camera's position is fixed so that the top-left corner is always at the origin.
</constant>
<constant name="ANCHOR_MODE_DRAG_CENTER" value="1" enum="AnchorMode">
+ The camera's position takes into account vertical/horizontal offsets and the screen size.
</constant>
</constants>
</class>