From aa218714fb1b0d4db6df787b163b5435226aa6b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 10 Feb 2016 20:42:29 +0100 Subject: [PATCH] Sync classref with source Fixes a few broken references --- classes/class_@gdscript.rst | 18 ++++++++++++++++++ classes/class_audioserver.rst | 2 +- classes/class_camera.rst | 2 +- classes/class_collisionpolygon2d.rst | 4 ++-- classes/class_control.rst | 4 ++-- classes/class_ip.rst | 2 +- classes/class_mainloop.rst | 2 +- classes/class_meshinstance.rst | 4 ++-- classes/class_multimeshinstance.rst | 2 +- classes/class_node.rst | 14 +++++++------- classes/class_panel.rst | 2 +- classes/class_physicsbody2d.rst | 2 +- classes/class_portal.rst | 10 +++++----- classes/class_room.rst | 2 +- classes/class_stylebox.rst | 2 +- classes/class_videoplayer.rst | 6 +++--- 16 files changed, 48 insertions(+), 30 deletions(-) diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index b875b70c0..451972b77 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -142,6 +142,12 @@ Member Functions +--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`instance_from_id` **(** :ref:`int` instance_id **)** | +--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Resource` | :ref:`preload` **(** :ref:`String` path **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`yield` **(** :ref:`Object` object, :ref:`String` signal **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`assert` **(** :ref:`bool` condition **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- @@ -526,4 +532,16 @@ Print a stack track at code location, only works when running with debugger turn - :ref:`Object` **instance_from_id** **(** :ref:`int` instance_id **)** +.. _class_@GDScript_preload: + +- :ref:`Resource` **preload** **(** :ref:`String` path **)** + +.. _class_@GDScript_yield: + +- :ref:`Nil` **yield** **(** :ref:`Object` object, :ref:`String` signal **)** + +.. _class_@GDScript_assert: + +- :ref:`Nil` **assert** **(** :ref:`bool` condition **)** + diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index 59e7901bf..1878c7d1a 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -193,7 +193,7 @@ Trying to alter a SAMPLE_FORMAT_IMA_ADPCM sample is not supported. It will throw Set the sample data for a given sample as an array of bytes. The length must be equal to the sample length expected in bytes or an error will be produced. The byte length can be calculated as follows: -Get the sample length (:ref:`get_sample_length`). +Get the sample length (:ref:`sample_get_length`). If the sample format is SAMPLE_FORMAT_PCM16, multiply it by 2. diff --git a/classes/class_camera.rst b/classes/class_camera.rst index 8f032a083..1db4a2fd2 100644 --- a/classes/class_camera.rst +++ b/classes/class_camera.rst @@ -76,7 +76,7 @@ Numeric Constants Description ----------- -Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest :ref:`Viewport` node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the Camera will register in the global viewport. In other words, a Camera just provides *3D* display capabilities to a :ref:`Viewport`, and, without one, a :ref:`Scene` registered in that :ref:`Viewport` (or higher viewports) can't be displayed. +Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest :ref:`Viewport` node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the Camera will register in the global viewport. In other words, a Camera just provides *3D* display capabilities to a :ref:`Viewport`, and, without one, a scene registered in that :ref:`Viewport` (or higher viewports) can't be displayed. Member Function Description --------------------------- diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst index 42dfb92b9..23ee7d9d2 100644 --- a/classes/class_collisionpolygon2d.rst +++ b/classes/class_collisionpolygon2d.rst @@ -59,13 +59,13 @@ Return the list of points that define the polygon. - void **set_build_mode** **(** :ref:`int` build_mode **)** -Set whether the polygon is to be a :ref:`ConvexPolygon2D` (``build_mode==0``), or a :ref:`ConcavePolygon2D` (``build_mode==1``). +Set whether the polygon is to be a :ref:`ConvexPolygonShape2D` (``build_mode==0``), or a :ref:`ConcavePolygonShape2D` (``build_mode==1``). .. _class_CollisionPolygon2D_get_build_mode: - :ref:`int` **get_build_mode** **(** **)** const -Return whether the polygon is a :ref:`ConvexPolygon2D` (``build_mode==0``), or a :ref:`ConcavePolygon2D` (``build_mode==1``). +Return whether the polygon is a :ref:`ConvexPolygonShape2D` (``build_mode==0``), or a :ref:`ConcavePolygonShape2D` (``build_mode==1``). .. _class_CollisionPolygon2D_set_trigger: diff --git a/classes/class_control.rst b/classes/class_control.rst index 45c9b6cc6..326cd05c4 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -227,7 +227,7 @@ Controls are relative to the parent position and size by using anchors and margi Anchors work by defining which margin do they follow, and a value relative to it. Allowed anchoring modes are ANCHOR_BEGIN, where the margin is relative to the top or left margins of the parent (in pixels), ANCHOR_END for the right and bottom margins of the parent and ANCHOR_RATIO, which is a ratio from 0 to 1 in the parent range. -Input device events (:ref:`InputEvent`) are first sent to the root controls via the :ref:`Node._input`, which distribute it through the tree, then delivers them to the adequate one (under cursor or keyboard focus based) by calling :ref:`Node._input_event`. There is no need to enable input processing on controls to receive such events. To ensure that no one else will receive the event (not even :ref:`Node._unhandled_input`), the control can accept it by calling :ref:`accept_event`. +Input device events (:ref:`InputEvent`) are first sent to the root controls via the :ref:`Node._input`, which distribute it through the tree, then delivers them to the adequate one (under cursor or keyboard focus based) by calling :ref:`MainLoop._input_event`. There is no need to enable input processing on controls to receive such events. To ensure that no one else will receive the event (not even :ref:`Node._unhandled_input`), the control can accept it by calling :ref:`accept_event`. Only one control can hold the keyboard focus (receiving keyboard events), for that the control must define the focus mode with :ref:`set_focus_mode`. Focus is lost when another control gains it, or the current focus owner is hidden. @@ -416,7 +416,7 @@ Change all margins and anchors, so this Control always takes up the same area as - void **show_modal** **(** :ref:`bool` exclusive=false **)** -Display a Control as modal. Control must be a subwindow (see :ref:`set_as_subwindow`). Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus. +Display a Control as modal. Control must be a subwindow. Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus. .. _class_Control_set_focus_mode: diff --git a/classes/class_ip.rst b/classes/class_ip.rst index 903164f6a..98a56841e 100644 --- a/classes/class_ip.rst +++ b/classes/class_ip.rst @@ -44,7 +44,7 @@ Numeric Constants Description ----------- -IP contains some support functions for the IPv4 protocol. TCP/IP support is in different classes (see :ref:`TCP_Client`, :ref:`TCP_Server`). IP provides hostname resolution support, both blocking and threaded. +IP contains some support functions for the IPv4 protocol. TCP/IP support is in different classes (see :ref:`StreamPeerTCP` and :ref:`TCP_Server`). IP provides hostname resolution support, both blocking and threaded. Member Function Description --------------------------- diff --git a/classes/class_mainloop.rst b/classes/class_mainloop.rst index ac1805520..1f7dbb943 100644 --- a/classes/class_mainloop.rst +++ b/classes/class_mainloop.rst @@ -57,7 +57,7 @@ Numeric Constants Description ----------- -Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a :ref:`MainLoop` has to be provided to OS, else the application will exit. This happens automatically (and a :ref:`SceneMainLoop` is created), unless a main :ref:`Script` is supplied, which may or not create and return a :ref:`MainLoop`. +Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a :ref:`MainLoop` has to be provided to OS, else the application will exit. This happens automatically (and a :ref:`SceneTree` is created), unless a main :ref:`Script` is supplied, which may or not create and return a :ref:`MainLoop`. Member Function Description --------------------------- diff --git a/classes/class_meshinstance.rst b/classes/class_meshinstance.rst index 2cb0270a3..1e9838fed 100644 --- a/classes/class_meshinstance.rst +++ b/classes/class_meshinstance.rst @@ -10,7 +10,7 @@ MeshInstance Brief Description ----------------- -Node that instances meshes into a :ref:`Scenario`. +Node that instances meshes into a scenario. Member Functions ---------------- @@ -34,7 +34,7 @@ Member Functions Description ----------- -MeshInstance is a :ref:`Node` that takes a :ref:`Mesh` resource and adds it to the current :ref:`Scenario` by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single :ref:`Mesh` in many places. This allows to reuse geometry and save on resources. When a :ref:`Mesh` has to be instanced more than thousands of times at close proximity, consider using a :ref:`MultiMesh` in a :ref:`MultiMeshInstance` instead. +MeshInstance is a :ref:`Node` that takes a :ref:`Mesh` resource and adds it to the current scenario by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single :ref:`Mesh` in many places. This allows to reuse geometry and save on resources. When a :ref:`Mesh` has to be instanced more than thousands of times at close proximity, consider using a :ref:`MultiMesh` in a :ref:`MultiMeshInstance` instead. Member Function Description --------------------------- diff --git a/classes/class_multimeshinstance.rst b/classes/class_multimeshinstance.rst index 4648eb9e6..a4d3a2b2f 100644 --- a/classes/class_multimeshinstance.rst +++ b/classes/class_multimeshinstance.rst @@ -24,7 +24,7 @@ Member Functions Description ----------- -MultiMeshInstance is a :ref:`Node` that takes a :ref:`MultiMesh` resource and adds it to the current :ref:`Scenario` by creating an instance of it (yes, this is an instance of instances). +MultiMeshInstance is a :ref:`Node` that takes a :ref:`MultiMesh` resource and adds it to the current scenario by creating an instance of it (yes, this is an instance of instances). Member Function Description --------------------------- diff --git a/classes/class_node.rst b/classes/class_node.rst index 379643899..b295a8606 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -179,7 +179,7 @@ Nodes can be set as children of other nodes, resulting in a tree arrangement. An Scenes can be saved to disk, and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of the projects. -:ref:`SceneMainLoop` contains the "active" tree of nodes, and a node becomes active (receiving NOTIFICATION_ENTER_SCENE) when added to that tree. +:ref:`SceneTree` contains the "active" tree of nodes, and a node becomes active (receiving NOTIFICATION_ENTER_SCENE) when added to that tree. A node can contain any number of nodes as a children (but there is only one tree root) with the requirement that no two children with the same name can exist. @@ -292,7 +292,7 @@ Return a children node by it's index (see :ref:`get_child_count`). Examples. Assume your current node is Character and following tree: +Note: fetching absolute paths only works when the node is inside the scene tree (see :ref:`is_inside_tree`). Examples. Assume your current node is Character and following tree: @@ -362,7 +362,7 @@ Return *true* if "node" occurs later in the scene hierarchy than the current nod - :ref:`NodePath` **get_path** **(** **)** const -Return the absolute path of the current node. This only works if the current node is inside the scene tree (see :ref:`is_inside_scene`). +Return the absolute path of the current node. This only works if the current node is inside the scene tree (see :ref:`is_inside_tree`). .. _class_Node_get_path_to: @@ -374,7 +374,7 @@ Return the relative path from the current node to the specified node in "node" a - void **add_to_group** **(** :ref:`String` group, :ref:`bool` persistent=false **)** -Add a node to a group. Groups are helpers to name and organize group of nodes, like for example: "Enemies", "Collectables", etc. A :ref:`Node` can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see :ref:`is_inside_scene`). +Add a node to a group. Groups are helpers to name and organize group of nodes, like for example: "Enemies", "Collectables", etc. A :ref:`Node` can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see :ref:`is_inside_tree`). .. _class_Node_remove_from_group: @@ -412,7 +412,7 @@ Set the node owner. A node can have any other node as owner (as long as a valid - :ref:`Node` **get_owner** **(** **)** const -Get the node owner (see :ref:`set_node_owner`). +Get the node owner (see :ref:`set_owner`). .. _class_Node_remove_and_skip: @@ -454,7 +454,7 @@ Notify the current node and all its children recursively by calling notification - void **set_fixed_process** **(** :ref:`bool` enable **)** -Enables or disables node fixed framerate processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS at a fixed (usually 60 fps, check :ref:`OS` to change that) interval (and the :ref:`_fixed_process` callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling :ref:`get_fixed_process_time`. +Enables or disables node fixed framerate processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS at a fixed (usually 60 fps, check :ref:`OS` to change that) interval (and the :ref:`_fixed_process` callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling :ref:`get_fixed_process_delta_time`. .. _class_Node_get_fixed_process_delta_time: @@ -472,7 +472,7 @@ Return true if fixed processing is enabled (see :ref:`set_fixed_process` enable **)** -Enables or disables node processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the :ref:`_process` callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling :ref:`get_process_time`. +Enables or disables node processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the :ref:`_process` callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling :ref:`get_process_delta_time`. .. _class_Node_get_process_delta_time: diff --git a/classes/class_panel.rst b/classes/class_panel.rst index 00ef07091..d7b7e6ec7 100644 --- a/classes/class_panel.rst +++ b/classes/class_panel.rst @@ -15,5 +15,5 @@ Provides an opaque background for :ref:`Control` children. Description ----------- -Panel is a :ref:`Control` that displays an opaque background. It's commonly used as a parent and container for other types of :ref:`Control` nodes. :ref:`image`images/panel_example.png:ref:`/image` +Panel is a :ref:`Control` that displays an opaque background. It's commonly used as a parent and container for other types of :ref:`Control` nodes. diff --git a/classes/class_physicsbody2d.rst b/classes/class_physicsbody2d.rst index 99e435be8..f39d5d7be 100644 --- a/classes/class_physicsbody2d.rst +++ b/classes/class_physicsbody2d.rst @@ -123,7 +123,7 @@ Return the direction used for one-way collision detection. - void **set_one_way_collision_max_depth** **(** :ref:`float` depth **)** -Set how far a body can go through this one, when it allows one-way collisions (see :ref:`set_one_way_collision_detection`). +Set how far a body can go through this one, when it allows one-way collisions (see :ref:`set_one_way_collision_direction`). .. _class_PhysicsBody2D_get_one_way_collision_max_depth: diff --git a/classes/class_portal.rst b/classes/class_portal.rst index 0668d0695..a819e7a2a 100644 --- a/classes/class_portal.rst +++ b/classes/class_portal.rst @@ -40,7 +40,7 @@ Member Functions Description ----------- -Portals provide virtual openings to :ref:`RoomInstance` nodes, so cameras can look at them from the outside. Note that portals are a visibility optimization technique, and are in no way related to the game of the same name (as in, they are not used for teleportation). For more information on how rooms and portals work, see :ref:`RoomInstance`. Portals are represented as 2D convex polygon shapes (in the X,Y local plane), and are placed on the surface of the areas occupied by a :ref:`RoomInstance`, to indicate that the room can be accessed or looked-at through them. If two rooms are next to each other, and two similar portals in each of them share the same world position (and are parallel and opposed to each other), they will automatically "connect" and form "doors" (for example, the portals that connect a kitchen to a living room are placed in the door they share). Portals must always have a :ref:`RoomInstance` node as a parent, grandparent or far parent, or else they will not be active. +Portals provide virtual openings to :ref:`VisualInstance` nodes, so cameras can look at them from the outside. Note that portals are a visibility optimization technique, and are in no way related to the game of the same name (as in, they are not used for teleportation). For more information on how rooms and portals work, see :ref:`VisualInstance`. Portals are represented as 2D convex polygon shapes (in the X,Y local plane), and are placed on the surface of the areas occupied by a :ref:`VisualInstance`, to indicate that the room can be accessed or looked-at through them. If two rooms are next to each other, and two similar portals in each of them share the same world position (and are parallel and opposed to each other), they will automatically "connect" and form "doors" (for example, the portals that connect a kitchen to a living room are placed in the door they share). Portals must always have a :ref:`VisualInstance` node as a parent, grandparent or far parent, or else they will not be active. Member Function Description --------------------------- @@ -49,25 +49,25 @@ Member Function Description - void **set_shape** **(** :ref:`Vector2Array` points **)** -Set the portal shape. The shape is an array of :ref:`Point2` points, representing a convex polygon in the X,Y plane. +Set the portal shape. The shape is an array of :ref:`Vector2` points, representing a convex polygon in the X,Y plane. .. _class_Portal_get_shape: - :ref:`Vector2Array` **get_shape** **(** **)** const -Return the portal shape. The shape is an array of :ref:`Point2` points, representing a convex polygon in the X,Y plane. +Return the portal shape. The shape is an array of :ref:`Vector2` points, representing a convex polygon in the X,Y plane. .. _class_Portal_set_enabled: - void **set_enabled** **(** :ref:`bool` enable **)** -Enable the portal (it is enabled by default though), disabling it will cause the parent :ref:`RoomInstance` to not be visible any longer when looking through the portal. +Enable the portal (it is enabled by default though), disabling it will cause the parent :ref:`VisualInstance` to not be visible any longer when looking through the portal. .. _class_Portal_is_enabled: - :ref:`bool` **is_enabled** **(** **)** const -Return whether the portal is active. When disabled it causes the parent :ref:`RoomInstance` to not be visible any longer when looking through the portal. +Return whether the portal is active. When disabled it causes the parent :ref:`VisualInstance` to not be visible any longer when looking through the portal. .. _class_Portal_set_disable_distance: diff --git a/classes/class_room.rst b/classes/class_room.rst index 77fdd4370..19e3b9ac7 100644 --- a/classes/class_room.rst +++ b/classes/class_room.rst @@ -30,7 +30,7 @@ Member Functions Description ----------- -Room contains the data to define the bounds of a scene (using a BSP Tree). It is instanced by a :ref:`RoomInstance` node to create rooms. See that class documentation for more information about rooms. +Room contains the data to define the bounds of a scene (using a BSP Tree). It is instanced by a :ref:`VisualInstance` node to create rooms. See that class documentation for more information about rooms. Member Function Description --------------------------- diff --git a/classes/class_stylebox.rst b/classes/class_stylebox.rst index 832b9eff6..83268b560 100644 --- a/classes/class_stylebox.rst +++ b/classes/class_stylebox.rst @@ -81,7 +81,7 @@ Return the minimum size that this stylebox can be shrunk to. - :ref:`Vector2` **get_offset** **(** **)** const -Return the "offset" of a stylebox, this is a helper function, like writing Point2( style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP) ) +Return the "offset" of a stylebox, this is a helper function, like writing ``Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))``. .. _class_StyleBox_draw: diff --git a/classes/class_videoplayer.rst b/classes/class_videoplayer.rst index 93f81aa95..14c141432 100644 --- a/classes/class_videoplayer.rst +++ b/classes/class_videoplayer.rst @@ -58,7 +58,7 @@ Member Functions +--------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_buffering_msec` **(** **)** const | +--------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`Texture` | :ref:`get_video_texutre` **(** **)** | +| :ref:`Texture` | :ref:`get_video_texture` **(** **)** | +--------------------------------+----------------------------------------------------------------------------------------------------------+ Member Function Description @@ -148,8 +148,8 @@ Member Function Description - :ref:`int` **get_buffering_msec** **(** **)** const -.. _class_VideoPlayer_get_video_texutre: +.. _class_VideoPlayer_get_video_texture: -- :ref:`Texture` **get_video_texutre** **(** **)** +- :ref:`Texture` **get_video_texture** **(** **)**