mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
classref: Sync with current 2.1 branch
This commit is contained in:
@@ -64,26 +64,19 @@ Member Function Description
|
||||
Add a custom property info to a property. The dictionary must contain: name::ref:`String<class_string>`(the name of the property) and type::ref:`int<class_int>`(see TYPE\_\* in :ref:`@Global Scope<class_@global scope>`), and optionally hint::ref:`int<class_int>`(see PROPERTY_HINT\_\* in :ref:`@Global Scope<class_@global scope>`), hint_string::ref:`String<class_string>`.
|
||||
|
||||
Example:
|
||||
|
||||
::
|
||||
|
||||
|
||||
editor_settings.set("category/property_name", 0)
|
||||
|
||||
|
||||
|
||||
var property_info = {
|
||||
|
||||
"name": "category/property_name",
|
||||
|
||||
"type": TYPE_INT,
|
||||
|
||||
"hint": PROPERTY_HINT_ENUM,
|
||||
|
||||
"hint_string": "one,two,three"
|
||||
|
||||
}
|
||||
|
||||
editor_settings.add_property_info(property_info)
|
||||
editor_settings.set("category/property_name", 0)
|
||||
|
||||
var property_info = {
|
||||
"name": "category/property_name",
|
||||
"type": TYPE_INT,
|
||||
"hint": PROPERTY_HINT_ENUM,
|
||||
"hint_string": "one,two,three"
|
||||
}
|
||||
|
||||
editor_settings.add_property_info(property_info)
|
||||
|
||||
.. _class_EditorSettings_erase:
|
||||
|
||||
|
||||
@@ -59,6 +59,8 @@ Member Functions
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_connection<class_HTTPClient_set_connection>` **(** :ref:`StreamPeer<class_streampeer>` connection **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_ip_type<class_HTTPClient_set_ip_type>` **(** :ref:`int<class_int>` ip_type **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_read_chunk_size<class_HTTPClient_set_read_chunk_size>` **(** :ref:`int<class_int>` bytes **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
@@ -293,6 +295,10 @@ If set to true, execution will block until all data is read from the response.
|
||||
|
||||
Set connection to use, for this client.
|
||||
|
||||
.. _class_HTTPClient_set_ip_type:
|
||||
|
||||
- void **set_ip_type** **(** :ref:`int<class_int>` ip_type **)**
|
||||
|
||||
.. _class_HTTPClient_set_read_chunk_size:
|
||||
|
||||
- void **set_read_chunk_size** **(** :ref:`int<class_int>` bytes **)**
|
||||
|
||||
@@ -41,6 +41,8 @@ Member Functions
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_download_file<class_HTTPRequest_set_download_file>` **(** :ref:`String<class_string>` path **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_ip_type<class_HTTPRequest_set_ip_type>` **(** :ref:`int<class_int>` ip_type **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_max_redirects<class_HTTPRequest_set_max_redirects>` **(** :ref:`int<class_int>` amount **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_use_threads<class_HTTPRequest_set_use_threads>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
@@ -147,6 +149,10 @@ Set the response body size limit.
|
||||
|
||||
Set the file to download into. Outputs the response body into the file.
|
||||
|
||||
.. _class_HTTPRequest_set_ip_type:
|
||||
|
||||
- void **set_ip_type** **(** :ref:`int<class_int>` ip_type **)**
|
||||
|
||||
.. _class_HTTPRequest_set_max_redirects:
|
||||
|
||||
- void **set_max_redirects** **(** :ref:`int<class_int>` amount **)**
|
||||
|
||||
@@ -20,19 +20,21 @@ IP Protocol support functions.
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`erase_resolve_item<class_IP_erase_resolve_item>` **(** :ref:`int<class_int>` id **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`get_local_addresses<class_IP_get_local_addresses>` **(** **)** const |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_resolve_item_address<class_IP_get_resolve_item_address>` **(** :ref:`int<class_int>` id **)** const |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_resolve_item_status<class_IP_get_resolve_item_status>` **(** :ref:`int<class_int>` id **)** const |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`resolve_hostname<class_IP_resolve_hostname>` **(** :ref:`String<class_string>` host **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`resolve_hostname_queue_item<class_IP_resolve_hostname_queue_item>` **(** :ref:`String<class_string>` host **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_cache<class_IP_clear_cache>` **(** :ref:`String<class_string>` arg0="" **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`erase_resolve_item<class_IP_erase_resolve_item>` **(** :ref:`int<class_int>` id **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`get_local_addresses<class_IP_get_local_addresses>` **(** **)** const |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_resolve_item_address<class_IP_get_resolve_item_address>` **(** :ref:`int<class_int>` id **)** const |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_resolve_item_status<class_IP_get_resolve_item_status>` **(** :ref:`int<class_int>` id **)** const |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`resolve_hostname<class_IP_resolve_hostname>` **(** :ref:`String<class_string>` host, :ref:`int<class_int>` ip_type=3 **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`resolve_hostname_queue_item<class_IP_resolve_hostname_queue_item>` **(** :ref:`String<class_string>` host, :ref:`int<class_int>` ip_type=3 **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
@@ -43,6 +45,10 @@ Numeric Constants
|
||||
- **RESOLVER_STATUS_ERROR** = **3**
|
||||
- **RESOLVER_MAX_QUERIES** = **32**
|
||||
- **RESOLVER_INVALID_ID** = **-1**
|
||||
- **TYPE_NONE** = **0**
|
||||
- **TYPE_IPV4** = **1**
|
||||
- **TYPE_IPV6** = **2**
|
||||
- **TYPE_ANY** = **3**
|
||||
|
||||
Description
|
||||
-----------
|
||||
@@ -52,6 +58,10 @@ IP contains some support functions for the IPv4 protocol. TCP/IP support is in d
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_IP_clear_cache:
|
||||
|
||||
- void **clear_cache** **(** :ref:`String<class_string>` arg0="" **)**
|
||||
|
||||
.. _class_IP_erase_resolve_item:
|
||||
|
||||
- void **erase_resolve_item** **(** :ref:`int<class_int>` id **)**
|
||||
@@ -76,14 +86,14 @@ Return the status of hostname queued for resolving, given it's queue ID. Returne
|
||||
|
||||
.. _class_IP_resolve_hostname:
|
||||
|
||||
- :ref:`String<class_string>` **resolve_hostname** **(** :ref:`String<class_string>` host **)**
|
||||
- :ref:`String<class_string>` **resolve_hostname** **(** :ref:`String<class_string>` host, :ref:`int<class_int>` ip_type=3 **)**
|
||||
|
||||
Resolve a given hostname, blocking. Resolved hostname is returned as an IP.
|
||||
Resolve a given hostname, blocking. Resolved hostname is returned as an IPv4 or IPv6 depending on "ip_type".
|
||||
|
||||
.. _class_IP_resolve_hostname_queue_item:
|
||||
|
||||
- :ref:`int<class_int>` **resolve_hostname_queue_item** **(** :ref:`String<class_string>` host **)**
|
||||
- :ref:`int<class_int>` **resolve_hostname_queue_item** **(** :ref:`String<class_string>` host, :ref:`int<class_int>` ip_type=3 **)**
|
||||
|
||||
Create a queue item for resolving a given hostname. The queue ID is returned, or RESOLVER_INVALID_ID on error.
|
||||
Create a queue item for resolving a given hostname to an IPv4 or IPv6 depending on "ip_type". The queue ID is returned, or RESOLVER_INVALID_ID on error.
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@ Member Functions
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`close<class_PacketPeerUDP_close>` **(** **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_packet_address<class_PacketPeerUDP_get_packet_address>` **(** **)** const |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_packet_ip<class_PacketPeerUDP_get_packet_ip>` **(** **)** const |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_packet_port<class_PacketPeerUDP_get_packet_port>` **(** **)** const |
|
||||
@@ -31,6 +29,8 @@ Member Functions
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Error | :ref:`listen<class_PacketPeerUDP_listen>` **(** :ref:`int<class_int>` port, :ref:`int<class_int>` recv_buf_size=65536 **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_ip_type<class_PacketPeerUDP_set_ip_type>` **(** :ref:`int<class_int>` ip_type **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`set_send_address<class_PacketPeerUDP_set_send_address>` **(** :ref:`String<class_string>` host, :ref:`int<class_int>` port **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Error | :ref:`wait<class_PacketPeerUDP_wait>` **(** **)** |
|
||||
@@ -50,12 +50,6 @@ Member Function Description
|
||||
|
||||
Close the UDP socket the :ref:`PacketPeerUDP<class_packetpeerudp>` is currently listening on.
|
||||
|
||||
.. _class_PacketPeerUDP_get_packet_address:
|
||||
|
||||
- :ref:`int<class_int>` **get_packet_address** **(** **)** const
|
||||
|
||||
Return the address of the remote peer(as a 32bit integer) that sent the last packet(that was received with :ref:`get_packet<class_PacketPeerUDP_get_packet>` or :ref:`get_var<class_PacketPeerUDP_get_var>`).
|
||||
|
||||
.. _class_PacketPeerUDP_get_packet_ip:
|
||||
|
||||
- :ref:`String<class_string>` **get_packet_ip** **(** **)** const
|
||||
@@ -78,13 +72,17 @@ Return whether this :ref:`PacketPeerUDP<class_packetpeerudp>` is listening.
|
||||
|
||||
- Error **listen** **(** :ref:`int<class_int>` port, :ref:`int<class_int>` recv_buf_size=65536 **)**
|
||||
|
||||
Make this :ref:`PacketPeerUDP<class_packetpeerudp>` listen on the "port" using a buffer size "recv_buf_size". Listens on all available adresses.
|
||||
Make this :ref:`PacketPeerUDP<class_packetpeerudp>` listen on the "port" with a buffer size "recv_buf_size". Listens on all available addresses.
|
||||
|
||||
.. _class_PacketPeerUDP_set_ip_type:
|
||||
|
||||
- void **set_ip_type** **(** :ref:`int<class_int>` ip_type **)**
|
||||
|
||||
.. _class_PacketPeerUDP_set_send_address:
|
||||
|
||||
- :ref:`int<class_int>` **set_send_address** **(** :ref:`String<class_string>` host, :ref:`int<class_int>` port **)**
|
||||
|
||||
Set the destination address and port for sending packets and variables, a hostname will be resolved if valid.
|
||||
Set the destination address and port for sending packets and variables, a hostname will be resolved using if valid.
|
||||
|
||||
.. _class_PacketPeerUDP_wait:
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ Member Functions
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_connected<class_StreamPeerTCP_is_connected>` **(** **)** const |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_ip_type<class_StreamPeerTCP_set_ip_type>` **(** :ref:`int<class_int>` ip_type **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
@@ -52,7 +54,7 @@ Member Function Description
|
||||
|
||||
- :ref:`int<class_int>` **connect** **(** :ref:`String<class_string>` host, :ref:`int<class_int>` port **)**
|
||||
|
||||
Connect to the specified IP:port pair. Returns :ref:`OK<class_ok>` on success or :ref:`FAILED<class_failed>` on failure.
|
||||
Connect to the specified host:port pair. A hostname will be resolved if valid. Returns :ref:`OK<class_ok>` on success or :ref:`FAILED<class_failed>` on failure.
|
||||
|
||||
.. _class_StreamPeerTCP_disconnect:
|
||||
|
||||
@@ -84,4 +86,8 @@ Return the status of the connection, one of STATUS\_\* enum.
|
||||
|
||||
Return whether this peer is connected. Returns true while connecting and connected.
|
||||
|
||||
.. _class_StreamPeerTCP_set_ip_type:
|
||||
|
||||
- void **set_ip_type** **(** :ref:`int<class_int>` ip_type **)**
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ Member Functions
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`listen<class_TCP_Server_listen>` **(** :ref:`int<class_int>` port, :ref:`StringArray<class_stringarray>` accepted_hosts=StringArray([]) **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_ip_type<class_TCP_Server_set_ip_type>` **(** :ref:`int<class_int>` ip_type **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`stop<class_TCP_Server_stop>` **(** **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`take_connection<class_TCP_Server_take_connection>` **(** **)** |
|
||||
@@ -46,7 +48,11 @@ Return true if a connection is available for taking.
|
||||
|
||||
- :ref:`int<class_int>` **listen** **(** :ref:`int<class_int>` port, :ref:`StringArray<class_stringarray>` accepted_hosts=StringArray([]) **)**
|
||||
|
||||
Listen on a port, alternatively give a white-list of accepted hosts.
|
||||
Listen on a port using protocol, alternatively give a white-list of accepted hosts.
|
||||
|
||||
.. _class_TCP_Server_set_ip_type:
|
||||
|
||||
- void **set_ip_type** **(** :ref:`int<class_int>` ip_type **)**
|
||||
|
||||
.. _class_TCP_Server_stop:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user