mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 18:29:11 +00:00
Add classes ref generated by makerst.py
This commit is contained in:
@@ -0,0 +1,530 @@
|
||||
.. _class_@GDScript:
|
||||
|
||||
@GDScript
|
||||
=========
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Built-in GDScript functions.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`sin<class_@GDScript_sin>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`cos<class_@GDScript_cos>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`tan<class_@GDScript_tan>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`sinh<class_@GDScript_sinh>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`cosh<class_@GDScript_cosh>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`tanh<class_@GDScript_tanh>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`asin<class_@GDScript_asin>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`acos<class_@GDScript_acos>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`atan<class_@GDScript_atan>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`atan2<class_@GDScript_atan2>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`sqrt<class_@GDScript_sqrt>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`fmod<class_@GDScript_fmod>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`fposmod<class_@GDScript_fposmod>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`floor<class_@GDScript_floor>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`ceil<class_@GDScript_ceil>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`round<class_@GDScript_round>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`abs<class_@GDScript_abs>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`sign<class_@GDScript_sign>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`pow<class_@GDScript_pow>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`log<class_@GDScript_log>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`exp<class_@GDScript_exp>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`isnan<class_@GDScript_isnan>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`isinf<class_@GDScript_isinf>` **(** :ref:`float<class_float>` s **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`ease<class_@GDScript_ease>` **(** :ref:`float<class_float>` s, :ref:`float<class_float>` curve **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`decimals<class_@GDScript_decimals>` **(** :ref:`float<class_float>` step **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`stepify<class_@GDScript_stepify>` **(** :ref:`float<class_float>` s, :ref:`float<class_float>` step **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`lerp<class_@GDScript_lerp>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` weight **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`dectime<class_@GDScript_dectime>` **(** :ref:`float<class_float>` value, :ref:`float<class_float>` amount, :ref:`float<class_float>` step **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Nil<class_nil>` | :ref:`randomize<class_@GDScript_randomize>` **(** **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`randi<class_@GDScript_randi>` **(** **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`randf<class_@GDScript_randf>` **(** **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`rand_range<class_@GDScript_rand_range>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Nil<class_nil>` | :ref:`seed<class_@GDScript_seed>` **(** :ref:`float<class_float>` seed **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`rand_seed<class_@GDScript_rand_seed>` **(** :ref:`float<class_float>` seed **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`deg2rad<class_@GDScript_deg2rad>` **(** :ref:`float<class_float>` deg **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`rad2deg<class_@GDScript_rad2deg>` **(** :ref:`float<class_float>` rad **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`linear2db<class_@GDScript_linear2db>` **(** :ref:`float<class_float>` nrg **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`db2linear<class_@GDScript_db2linear>` **(** :ref:`float<class_float>` db **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`max<class_@GDScript_max>` **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`min<class_@GDScript_min>` **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`clamp<class_@GDScript_clamp>` **(** :ref:`float<class_float>` val, :ref:`float<class_float>` min, :ref:`float<class_float>` max **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`nearest_po2<class_@GDScript_nearest_po2>` **(** :ref:`int<class_int>` val **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`WeakRef<class_weakref>` | :ref:`weakref<class_@GDScript_weakref>` **(** :ref:`Object<class_object>` obj **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`FuncRef<class_funcref>` | :ref:`funcref<class_@GDScript_funcref>` **(** :ref:`Object<class_object>` instance, :ref:`String<class_string>` funcname **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`convert<class_@GDScript_convert>` **(** Variant what, :ref:`int<class_int>` type **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`typeof<class_@GDScript_typeof>` **(** Variant what **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`str<class_@GDScript_str>` **(** Variant what, Variant ... **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Nil<class_nil>` | :ref:`print<class_@GDScript_print>` **(** Variant what, Variant ... **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Nil<class_nil>` | :ref:`printt<class_@GDScript_printt>` **(** Variant what, Variant ... **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Nil<class_nil>` | :ref:`prints<class_@GDScript_prints>` **(** Variant what, Variant ... **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Nil<class_nil>` | :ref:`printerr<class_@GDScript_printerr>` **(** Variant what, Variant ... **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Nil<class_nil>` | :ref:`printraw<class_@GDScript_printraw>` **(** Variant what, Variant ... **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`var2str<class_@GDScript_var2str>` **(** Variant var **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Variant | :ref:`str2var<class_@GDScript_str2var>` **(** :ref:`String<class_string>` string **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RawArray<class_rawarray>` | :ref:`var2bytes<class_@GDScript_var2bytes>` **(** Variant var **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Variant | :ref:`bytes2var<class_@GDScript_bytes2var>` **(** :ref:`RawArray<class_rawarray>` bytes **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`range<class_@GDScript_range>` **(** Variant ... **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Resource<class_resource>` | :ref:`load<class_@GDScript_load>` **(** :ref:`String<class_string>` path **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Dictionary<class_dictionary>` | :ref:`inst2dict<class_@GDScript_inst2dict>` **(** :ref:`Object<class_object>` inst **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`dict2inst<class_@GDScript_dict2inst>` **(** :ref:`Dictionary<class_dictionary>` dict **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`hash<class_@GDScript_hash>` **(** Variant var:Variant **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`Color8<class_@GDScript_Color8>` **(** :ref:`int<class_int>` r8, :ref:`int<class_int>` g8, :ref:`int<class_int>` b8, :ref:`int<class_int>` a8 **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Nil<class_nil>` | :ref:`print_stack<class_@GDScript_print_stack>` **(** **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`instance_from_id<class_@GDScript_instance_from_id>` **(** :ref:`int<class_int>` instance_id **)** |
|
||||
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **PI** = **3.141593** --- Constant that represents how many times the diameter of a circumference fits around it's perimeter.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
This contains the list of built-in gdscript functions. Mostly math functions and other utilities. Everything else is expanded by objects.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_@GDScript_sin:
|
||||
|
||||
- :ref:`float<class_float>` **sin** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Standard sine function.
|
||||
|
||||
.. _class_@GDScript_cos:
|
||||
|
||||
- :ref:`float<class_float>` **cos** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Standard cosine function.
|
||||
|
||||
.. _class_@GDScript_tan:
|
||||
|
||||
- :ref:`float<class_float>` **tan** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Standard tangent function.
|
||||
|
||||
.. _class_@GDScript_sinh:
|
||||
|
||||
- :ref:`float<class_float>` **sinh** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Hyperbolic sine.
|
||||
|
||||
.. _class_@GDScript_cosh:
|
||||
|
||||
- :ref:`float<class_float>` **cosh** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Hyperbolic cosine.
|
||||
|
||||
.. _class_@GDScript_tanh:
|
||||
|
||||
- :ref:`float<class_float>` **tanh** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Hyperbolic tangent.
|
||||
|
||||
.. _class_@GDScript_asin:
|
||||
|
||||
- :ref:`float<class_float>` **asin** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Arc-sine.
|
||||
|
||||
.. _class_@GDScript_acos:
|
||||
|
||||
- :ref:`float<class_float>` **acos** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Arc-cosine.
|
||||
|
||||
.. _class_@GDScript_atan:
|
||||
|
||||
- :ref:`float<class_float>` **atan** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Arc-tangent.
|
||||
|
||||
.. _class_@GDScript_atan2:
|
||||
|
||||
- :ref:`float<class_float>` **atan2** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
|
||||
|
||||
Arc-tangent that takes a 2D vector as argument, retuns the full -pi to +pi range.
|
||||
|
||||
.. _class_@GDScript_sqrt:
|
||||
|
||||
- :ref:`float<class_float>` **sqrt** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Square root.
|
||||
|
||||
.. _class_@GDScript_fmod:
|
||||
|
||||
- :ref:`float<class_float>` **fmod** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
|
||||
|
||||
Module (remainder of x/y).
|
||||
|
||||
.. _class_@GDScript_fposmod:
|
||||
|
||||
- :ref:`float<class_float>` **fposmod** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
|
||||
|
||||
Module (remainder of x/y) that wraps equally in positive and negative.
|
||||
|
||||
.. _class_@GDScript_floor:
|
||||
|
||||
- :ref:`float<class_float>` **floor** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Floor (rounds down to nearest integer).
|
||||
|
||||
.. _class_@GDScript_ceil:
|
||||
|
||||
- :ref:`float<class_float>` **ceil** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Ceiling (rounds up to nearest integer).
|
||||
|
||||
.. _class_@GDScript_round:
|
||||
|
||||
- :ref:`float<class_float>` **round** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Round to nearest integer.
|
||||
|
||||
.. _class_@GDScript_abs:
|
||||
|
||||
- :ref:`float<class_float>` **abs** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Remove sign (works for integer and float).
|
||||
|
||||
.. _class_@GDScript_sign:
|
||||
|
||||
- :ref:`float<class_float>` **sign** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Return sign (-1 or +1).
|
||||
|
||||
.. _class_@GDScript_pow:
|
||||
|
||||
- :ref:`float<class_float>` **pow** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
|
||||
|
||||
Power function, x elevate to y.
|
||||
|
||||
.. _class_@GDScript_log:
|
||||
|
||||
- :ref:`float<class_float>` **log** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Natural logarithm.
|
||||
|
||||
.. _class_@GDScript_exp:
|
||||
|
||||
- :ref:`float<class_float>` **exp** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Exponential logarithm.
|
||||
|
||||
.. _class_@GDScript_isnan:
|
||||
|
||||
- :ref:`float<class_float>` **isnan** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Return true if the float is not a number.
|
||||
|
||||
.. _class_@GDScript_isinf:
|
||||
|
||||
- :ref:`float<class_float>` **isinf** **(** :ref:`float<class_float>` s **)**
|
||||
|
||||
Return true if the float is infinite.
|
||||
|
||||
.. _class_@GDScript_ease:
|
||||
|
||||
- :ref:`float<class_float>` **ease** **(** :ref:`float<class_float>` s, :ref:`float<class_float>` curve **)**
|
||||
|
||||
Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in.
|
||||
|
||||
.. _class_@GDScript_decimals:
|
||||
|
||||
- :ref:`float<class_float>` **decimals** **(** :ref:`float<class_float>` step **)**
|
||||
|
||||
Return the amount of decimals in the floating point value.
|
||||
|
||||
.. _class_@GDScript_stepify:
|
||||
|
||||
- :ref:`float<class_float>` **stepify** **(** :ref:`float<class_float>` s, :ref:`float<class_float>` step **)**
|
||||
|
||||
Snap float value to a given step.
|
||||
|
||||
.. _class_@GDScript_lerp:
|
||||
|
||||
- :ref:`float<class_float>` **lerp** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` weight **)**
|
||||
|
||||
Linear interpolates between two values by a normalized value.
|
||||
|
||||
.. _class_@GDScript_dectime:
|
||||
|
||||
- :ref:`float<class_float>` **dectime** **(** :ref:`float<class_float>` value, :ref:`float<class_float>` amount, :ref:`float<class_float>` step **)**
|
||||
|
||||
Decreases time by a specified amount.
|
||||
|
||||
.. _class_@GDScript_randomize:
|
||||
|
||||
- :ref:`Nil<class_nil>` **randomize** **(** **)**
|
||||
|
||||
Reset the seed of the random number generator with a new, different one.
|
||||
|
||||
.. _class_@GDScript_randi:
|
||||
|
||||
- :ref:`int<class_int>` **randi** **(** **)**
|
||||
|
||||
Random 32 bits value (integer). To obtain a value from 0 to N, you can use remainder, like (for random from 0 to 19): randi() % 20.
|
||||
|
||||
.. _class_@GDScript_randf:
|
||||
|
||||
- :ref:`float<class_float>` **randf** **(** **)**
|
||||
|
||||
Random value (0 to 1 float).
|
||||
|
||||
.. _class_@GDScript_rand_range:
|
||||
|
||||
- :ref:`float<class_float>` **rand_range** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to **)**
|
||||
|
||||
Random range, any floating point value between 'from' and 'to'
|
||||
|
||||
.. _class_@GDScript_seed:
|
||||
|
||||
- :ref:`Nil<class_nil>` **seed** **(** :ref:`float<class_float>` seed **)**
|
||||
|
||||
.. _class_@GDScript_rand_seed:
|
||||
|
||||
- :ref:`Array<class_array>` **rand_seed** **(** :ref:`float<class_float>` seed **)**
|
||||
|
||||
Random from seed, pass a seed and an array with both number and new seed is returned.
|
||||
|
||||
.. _class_@GDScript_deg2rad:
|
||||
|
||||
- :ref:`float<class_float>` **deg2rad** **(** :ref:`float<class_float>` deg **)**
|
||||
|
||||
Convert from degrees to radians.
|
||||
|
||||
.. _class_@GDScript_rad2deg:
|
||||
|
||||
- :ref:`float<class_float>` **rad2deg** **(** :ref:`float<class_float>` rad **)**
|
||||
|
||||
Convert from radias to degrees.
|
||||
|
||||
.. _class_@GDScript_linear2db:
|
||||
|
||||
- :ref:`float<class_float>` **linear2db** **(** :ref:`float<class_float>` nrg **)**
|
||||
|
||||
Convert from linear energy to decibels (audio).
|
||||
|
||||
.. _class_@GDScript_db2linear:
|
||||
|
||||
- :ref:`float<class_float>` **db2linear** **(** :ref:`float<class_float>` db **)**
|
||||
|
||||
Convert from decibels to linear energy (audio).
|
||||
|
||||
.. _class_@GDScript_max:
|
||||
|
||||
- :ref:`float<class_float>` **max** **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)**
|
||||
|
||||
Return the maximum of two values.
|
||||
|
||||
.. _class_@GDScript_min:
|
||||
|
||||
- :ref:`float<class_float>` **min** **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)**
|
||||
|
||||
Return the minimum of two values.
|
||||
|
||||
.. _class_@GDScript_clamp:
|
||||
|
||||
- :ref:`float<class_float>` **clamp** **(** :ref:`float<class_float>` val, :ref:`float<class_float>` min, :ref:`float<class_float>` max **)**
|
||||
|
||||
Clamp both values to a range.
|
||||
|
||||
.. _class_@GDScript_nearest_po2:
|
||||
|
||||
- :ref:`int<class_int>` **nearest_po2** **(** :ref:`int<class_int>` val **)**
|
||||
|
||||
Return the nearest larger power of 2 for an integer.
|
||||
|
||||
.. _class_@GDScript_weakref:
|
||||
|
||||
- :ref:`WeakRef<class_weakref>` **weakref** **(** :ref:`Object<class_object>` obj **)**
|
||||
|
||||
Return a weak reference to an object.
|
||||
|
||||
.. _class_@GDScript_funcref:
|
||||
|
||||
- :ref:`FuncRef<class_funcref>` **funcref** **(** :ref:`Object<class_object>` instance, :ref:`String<class_string>` funcname **)**
|
||||
|
||||
Returns a reference to the specified function
|
||||
|
||||
.. _class_@GDScript_convert:
|
||||
|
||||
- :ref:`Object<class_object>` **convert** **(** Variant what, :ref:`int<class_int>` type **)**
|
||||
|
||||
Convert from a type to another in the best way possible. The "type" parameter uses the enum TYPE_* in :ref:`@Global Scope<class_@global scope>`.
|
||||
|
||||
.. _class_@GDScript_typeof:
|
||||
|
||||
- :ref:`int<class_int>` **typeof** **(** Variant what **)**
|
||||
|
||||
Returns the internal type of the given Variant object, using the TYPE_* enum in :ref:`@Global Scope<class_@global scope>`.
|
||||
|
||||
.. _class_@GDScript_str:
|
||||
|
||||
- :ref:`String<class_string>` **str** **(** Variant what, Variant ... **)**
|
||||
|
||||
Convert one or more arguments to strings in the best way possible.
|
||||
|
||||
.. _class_@GDScript_print:
|
||||
|
||||
- :ref:`Nil<class_nil>` **print** **(** Variant what, Variant ... **)**
|
||||
|
||||
Print one or more arguments to strings in the best way possible to a console line.
|
||||
|
||||
.. _class_@GDScript_printt:
|
||||
|
||||
- :ref:`Nil<class_nil>` **printt** **(** Variant what, Variant ... **)**
|
||||
|
||||
Print one or more arguments to the console with a tab between each argument.
|
||||
|
||||
.. _class_@GDScript_prints:
|
||||
|
||||
- :ref:`Nil<class_nil>` **prints** **(** Variant what, Variant ... **)**
|
||||
|
||||
.. _class_@GDScript_printerr:
|
||||
|
||||
- :ref:`Nil<class_nil>` **printerr** **(** Variant what, Variant ... **)**
|
||||
|
||||
Print one or more arguments to strings in the best way possible to standard error line.
|
||||
|
||||
.. _class_@GDScript_printraw:
|
||||
|
||||
- :ref:`Nil<class_nil>` **printraw** **(** Variant what, Variant ... **)**
|
||||
|
||||
Print one or more arguments to strings in the best way possible to console. No newline is added at the end.
|
||||
|
||||
.. _class_@GDScript_var2str:
|
||||
|
||||
- :ref:`String<class_string>` **var2str** **(** Variant var **)**
|
||||
|
||||
Converts the value of a variable to a String.
|
||||
|
||||
.. _class_@GDScript_str2var:
|
||||
|
||||
- Variant **str2var** **(** :ref:`String<class_string>` string **)**
|
||||
|
||||
.. _class_@GDScript_var2bytes:
|
||||
|
||||
- :ref:`RawArray<class_rawarray>` **var2bytes** **(** Variant var **)**
|
||||
|
||||
.. _class_@GDScript_bytes2var:
|
||||
|
||||
- Variant **bytes2var** **(** :ref:`RawArray<class_rawarray>` bytes **)**
|
||||
|
||||
.. _class_@GDScript_range:
|
||||
|
||||
- :ref:`Array<class_array>` **range** **(** Variant ... **)**
|
||||
|
||||
Return an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial,final-1,increment).
|
||||
|
||||
.. _class_@GDScript_load:
|
||||
|
||||
- :ref:`Resource<class_resource>` **load** **(** :ref:`String<class_string>` path **)**
|
||||
|
||||
Load a resource from the filesystem, pass a valid path as argument.
|
||||
|
||||
.. _class_@GDScript_inst2dict:
|
||||
|
||||
- :ref:`Dictionary<class_dictionary>` **inst2dict** **(** :ref:`Object<class_object>` inst **)**
|
||||
|
||||
Convert a script class instance to a dictionary (useful for serializing).
|
||||
|
||||
.. _class_@GDScript_dict2inst:
|
||||
|
||||
- :ref:`Object<class_object>` **dict2inst** **(** :ref:`Dictionary<class_dictionary>` dict **)**
|
||||
|
||||
Convert a previously converted instances to dictionary back into an instance. Useful for deserializing.
|
||||
|
||||
.. _class_@GDScript_hash:
|
||||
|
||||
- :ref:`int<class_int>` **hash** **(** Variant var:Variant **)**
|
||||
|
||||
Hashes the variable passed and returns an integer.
|
||||
|
||||
.. _class_@GDScript_Color8:
|
||||
|
||||
- :ref:`Color<class_color>` **Color8** **(** :ref:`int<class_int>` r8, :ref:`int<class_int>` g8, :ref:`int<class_int>` b8, :ref:`int<class_int>` a8 **)**
|
||||
|
||||
.. _class_@GDScript_print_stack:
|
||||
|
||||
- :ref:`Nil<class_nil>` **print_stack** **(** **)**
|
||||
|
||||
Print a stack track at code location, only works when running with debugger turned on.
|
||||
|
||||
.. _class_@GDScript_instance_from_id:
|
||||
|
||||
- :ref:`Object<class_object>` **instance_from_id** **(** :ref:`int<class_int>` instance_id **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,496 @@
|
||||
.. _class_@Global Scope:
|
||||
|
||||
@Global Scope
|
||||
=============
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Global scope constants and variables.
|
||||
|
||||
Member Variables
|
||||
----------------
|
||||
|
||||
- :ref:`Performance<class_performance>` **Performance**
|
||||
- :ref:`Globals<class_globals>` **Globals**
|
||||
- :ref:`IP<class_ip>` **IP**
|
||||
- :ref:`Geometry<class_geometry>` **Geometry**
|
||||
- :ref:`ResourceLoader<class_resourceloader>` **ResourceLoader**
|
||||
- :ref:`ResourceSaver<class_resourcesaver>` **ResourceSaver**
|
||||
- :ref:`PathRemap<class_pathremap>` **PathRemap**
|
||||
- :ref:`OS<class_os>` **OS**
|
||||
- :ref:`Reference<class_reference>` **Marshalls**
|
||||
- :ref:`TranslationServer<class_translationserver>` **TranslationServer**
|
||||
- :ref:`TranslationServer<class_translationserver>` **TS**
|
||||
- :ref:`Input<class_input>` **Input**
|
||||
- :ref:`InputMap<class_inputmap>` **InputMap**
|
||||
- :ref:`VisualServer<class_visualserver>` **VisualServer**
|
||||
- :ref:`VisualServer<class_visualserver>` **VS**
|
||||
- :ref:`AudioServer<class_audioserver>` **AudioServer**
|
||||
- :ref:`AudioServer<class_audioserver>` **AS**
|
||||
- :ref:`PhysicsServer<class_physicsserver>` **PhysicsServer**
|
||||
- :ref:`PhysicsServer<class_physicsserver>` **PS**
|
||||
- :ref:`Physics2DServer<class_physics2dserver>` **Physics2DServer**
|
||||
- :ref:`Physics2DServer<class_physics2dserver>` **PS2D**
|
||||
- :ref:`SpatialSoundServer<class_spatialsoundserver>` **SpatialSoundServer**
|
||||
- :ref:`SpatialSoundServer<class_spatialsoundserver>` **SS**
|
||||
- :ref:`SpatialSound2DServer<class_spatialsound2dserver>` **SpatialSound2DServer**
|
||||
- :ref:`SpatialSound2DServer<class_spatialsound2dserver>` **SS2D**
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **MARGIN_LEFT** = **0** --- Left margin, used usually for :ref:`Control<class_control>` or :ref:`StyleBox<class_stylebox>` derived classes.
|
||||
- **MARGIN_TOP** = **1** --- Top margin, used usually for :ref:`Control<class_control>` or :ref:`StyleBox<class_stylebox>` derived classes.
|
||||
- **MARGIN_RIGHT** = **2** --- Right margin, used usually for :ref:`Control<class_control>` or :ref:`StyleBox<class_stylebox>` derived classes.
|
||||
- **MARGIN_BOTTOM** = **3** --- Bottom margin, used usually for :ref:`Control<class_control>` or :ref:`StyleBox<class_stylebox>` derived classes.
|
||||
- **VERTICAL** = **1** --- General vertical alignment, used usually for :ref:`Separator<class_separator>`, :ref:`ScrollBar<class_scrollbar>`, :ref:`Slider<class_slider>`, etc.
|
||||
- **HORIZONTAL** = **0** --- General horizontal alignment, used usually for :ref:`Separator<class_separator>`, :ref:`ScrollBar<class_scrollbar>`, :ref:`Slider<class_slider>`, etc.
|
||||
- **HALIGN_LEFT** = **0** --- Horizontal left alignment, usually for text-derived classes.
|
||||
- **HALIGN_CENTER** = **1** --- Horizontal center alignment, usually for text-derived classes.
|
||||
- **HALIGN_RIGHT** = **2** --- Horizontal right alignment, usually for text-derived classes.
|
||||
- **VALIGN_TOP** = **0** --- Vertical top alignment, usually for text-derived classes.
|
||||
- **VALIGN_CENTER** = **1** --- Vertical center alignment, usually for text-derived classes.
|
||||
- **VALIGN_BOTTOM** = **2** --- Vertical bottom alignment, usually for text-derived classes.
|
||||
- **SPKEY** = **16777216** --- Scancodes with this bit applied are non printable.
|
||||
- **KEY_ESCAPE** = **16777217** --- Escape Key
|
||||
- **KEY_TAB** = **16777218** --- Tab Key
|
||||
- **KEY_BACKTAB** = **16777219** --- Shift-Tab key
|
||||
- **KEY_BACKSPACE** = **16777220**
|
||||
- **KEY_RETURN** = **16777221**
|
||||
- **KEY_ENTER** = **16777222**
|
||||
- **KEY_INSERT** = **16777223**
|
||||
- **KEY_DELETE** = **16777224**
|
||||
- **KEY_PAUSE** = **16777225**
|
||||
- **KEY_PRINT** = **16777226**
|
||||
- **KEY_SYSREQ** = **16777227**
|
||||
- **KEY_CLEAR** = **16777228**
|
||||
- **KEY_HOME** = **16777229**
|
||||
- **KEY_END** = **16777230**
|
||||
- **KEY_LEFT** = **16777231**
|
||||
- **KEY_UP** = **16777232**
|
||||
- **KEY_RIGHT** = **16777233**
|
||||
- **KEY_DOWN** = **16777234**
|
||||
- **KEY_PAGEUP** = **16777235**
|
||||
- **KEY_PAGEDOWN** = **16777236**
|
||||
- **KEY_SHIFT** = **16777237**
|
||||
- **KEY_CONTROL** = **16777238**
|
||||
- **KEY_META** = **16777239**
|
||||
- **KEY_ALT** = **16777240**
|
||||
- **KEY_CAPSLOCK** = **16777241**
|
||||
- **KEY_NUMLOCK** = **16777242**
|
||||
- **KEY_SCROLLLOCK** = **16777243**
|
||||
- **KEY_F1** = **16777244**
|
||||
- **KEY_F2** = **16777245**
|
||||
- **KEY_F3** = **16777246**
|
||||
- **KEY_F4** = **16777247**
|
||||
- **KEY_F5** = **16777248**
|
||||
- **KEY_F6** = **16777249**
|
||||
- **KEY_F7** = **16777250**
|
||||
- **KEY_F8** = **16777251**
|
||||
- **KEY_F9** = **16777252**
|
||||
- **KEY_F10** = **16777253**
|
||||
- **KEY_F11** = **16777254**
|
||||
- **KEY_F12** = **16777255**
|
||||
- **KEY_F13** = **16777256**
|
||||
- **KEY_F14** = **16777257**
|
||||
- **KEY_F15** = **16777258**
|
||||
- **KEY_F16** = **16777259**
|
||||
- **KEY_KP_ENTER** = **16777344**
|
||||
- **KEY_KP_MULTIPLY** = **16777345**
|
||||
- **KEY_KP_DIVIDE** = **16777346**
|
||||
- **KEY_KP_SUBSTRACT** = **16777347**
|
||||
- **KEY_KP_PERIOD** = **16777348**
|
||||
- **KEY_KP_ADD** = **16777349**
|
||||
- **KEY_KP_0** = **16777350**
|
||||
- **KEY_KP_1** = **16777351**
|
||||
- **KEY_KP_2** = **16777352**
|
||||
- **KEY_KP_3** = **16777353**
|
||||
- **KEY_KP_4** = **16777354**
|
||||
- **KEY_KP_5** = **16777355**
|
||||
- **KEY_KP_6** = **16777356**
|
||||
- **KEY_KP_7** = **16777357**
|
||||
- **KEY_KP_8** = **16777358**
|
||||
- **KEY_KP_9** = **16777359**
|
||||
- **KEY_SUPER_L** = **16777260**
|
||||
- **KEY_SUPER_R** = **16777261**
|
||||
- **KEY_MENU** = **16777262**
|
||||
- **KEY_HYPER_L** = **16777263**
|
||||
- **KEY_HYPER_R** = **16777264**
|
||||
- **KEY_HELP** = **16777265**
|
||||
- **KEY_DIRECTION_L** = **16777266**
|
||||
- **KEY_DIRECTION_R** = **16777267**
|
||||
- **KEY_BACK** = **16777280**
|
||||
- **KEY_FORWARD** = **16777281**
|
||||
- **KEY_STOP** = **16777282**
|
||||
- **KEY_REFRESH** = **16777283**
|
||||
- **KEY_VOLUMEDOWN** = **16777284**
|
||||
- **KEY_VOLUMEMUTE** = **16777285**
|
||||
- **KEY_VOLUMEUP** = **16777286**
|
||||
- **KEY_BASSBOOST** = **16777287**
|
||||
- **KEY_BASSUP** = **16777288**
|
||||
- **KEY_BASSDOWN** = **16777289**
|
||||
- **KEY_TREBLEUP** = **16777290**
|
||||
- **KEY_TREBLEDOWN** = **16777291**
|
||||
- **KEY_MEDIAPLAY** = **16777292**
|
||||
- **KEY_MEDIASTOP** = **16777293**
|
||||
- **KEY_MEDIAPREVIOUS** = **16777294**
|
||||
- **KEY_MEDIANEXT** = **16777295**
|
||||
- **KEY_MEDIARECORD** = **16777296**
|
||||
- **KEY_HOMEPAGE** = **16777297**
|
||||
- **KEY_FAVORITES** = **16777298**
|
||||
- **KEY_SEARCH** = **16777299**
|
||||
- **KEY_STANDBY** = **16777300**
|
||||
- **KEY_OPENURL** = **16777301**
|
||||
- **KEY_LAUNCHMAIL** = **16777302**
|
||||
- **KEY_LAUNCHMEDIA** = **16777303**
|
||||
- **KEY_LAUNCH0** = **16777304**
|
||||
- **KEY_LAUNCH1** = **16777305**
|
||||
- **KEY_LAUNCH2** = **16777306**
|
||||
- **KEY_LAUNCH3** = **16777307**
|
||||
- **KEY_LAUNCH4** = **16777308**
|
||||
- **KEY_LAUNCH5** = **16777309**
|
||||
- **KEY_LAUNCH6** = **16777310**
|
||||
- **KEY_LAUNCH7** = **16777311**
|
||||
- **KEY_LAUNCH8** = **16777312**
|
||||
- **KEY_LAUNCH9** = **16777313**
|
||||
- **KEY_LAUNCHA** = **16777314**
|
||||
- **KEY_LAUNCHB** = **16777315**
|
||||
- **KEY_LAUNCHC** = **16777316**
|
||||
- **KEY_LAUNCHD** = **16777317**
|
||||
- **KEY_LAUNCHE** = **16777318**
|
||||
- **KEY_LAUNCHF** = **16777319**
|
||||
- **KEY_UNKNOWN** = **33554431**
|
||||
- **KEY_SPACE** = **32**
|
||||
- **KEY_EXCLAM** = **33**
|
||||
- **KEY_QUOTEDBL** = **34**
|
||||
- **KEY_NUMBERSIGN** = **35**
|
||||
- **KEY_DOLLAR** = **36**
|
||||
- **KEY_PERCENT** = **37**
|
||||
- **KEY_AMPERSAND** = **38**
|
||||
- **KEY_APOSTROPHE** = **39**
|
||||
- **KEY_PARENLEFT** = **40**
|
||||
- **KEY_PARENRIGHT** = **41**
|
||||
- **KEY_ASTERISK** = **42**
|
||||
- **KEY_PLUS** = **43**
|
||||
- **KEY_COMMA** = **44**
|
||||
- **KEY_MINUS** = **45**
|
||||
- **KEY_PERIOD** = **46**
|
||||
- **KEY_SLASH** = **47**
|
||||
- **KEY_0** = **48**
|
||||
- **KEY_1** = **49**
|
||||
- **KEY_2** = **50**
|
||||
- **KEY_3** = **51**
|
||||
- **KEY_4** = **52**
|
||||
- **KEY_5** = **53**
|
||||
- **KEY_6** = **54**
|
||||
- **KEY_7** = **55**
|
||||
- **KEY_8** = **56**
|
||||
- **KEY_9** = **57**
|
||||
- **KEY_COLON** = **58**
|
||||
- **KEY_SEMICOLON** = **59**
|
||||
- **KEY_LESS** = **60**
|
||||
- **KEY_EQUAL** = **61**
|
||||
- **KEY_GREATER** = **62**
|
||||
- **KEY_QUESTION** = **63**
|
||||
- **KEY_AT** = **64**
|
||||
- **KEY_A** = **65**
|
||||
- **KEY_B** = **66**
|
||||
- **KEY_C** = **67**
|
||||
- **KEY_D** = **68**
|
||||
- **KEY_E** = **69**
|
||||
- **KEY_F** = **70**
|
||||
- **KEY_G** = **71**
|
||||
- **KEY_H** = **72**
|
||||
- **KEY_I** = **73**
|
||||
- **KEY_J** = **74**
|
||||
- **KEY_K** = **75**
|
||||
- **KEY_L** = **76**
|
||||
- **KEY_M** = **77**
|
||||
- **KEY_N** = **78**
|
||||
- **KEY_O** = **79**
|
||||
- **KEY_P** = **80**
|
||||
- **KEY_Q** = **81**
|
||||
- **KEY_R** = **82**
|
||||
- **KEY_S** = **83**
|
||||
- **KEY_T** = **84**
|
||||
- **KEY_U** = **85**
|
||||
- **KEY_V** = **86**
|
||||
- **KEY_W** = **87**
|
||||
- **KEY_X** = **88**
|
||||
- **KEY_Y** = **89**
|
||||
- **KEY_Z** = **90**
|
||||
- **KEY_BRACKETLEFT** = **91**
|
||||
- **KEY_BACKSLASH** = **92**
|
||||
- **KEY_BRACKETRIGHT** = **93**
|
||||
- **KEY_ASCIICIRCUM** = **94**
|
||||
- **KEY_UNDERSCORE** = **95**
|
||||
- **KEY_QUOTELEFT** = **96**
|
||||
- **KEY_BRACELEFT** = **123**
|
||||
- **KEY_BAR** = **124**
|
||||
- **KEY_BRACERIGHT** = **125**
|
||||
- **KEY_ASCIITILDE** = **126**
|
||||
- **KEY_NOBREAKSPACE** = **160**
|
||||
- **KEY_EXCLAMDOWN** = **161**
|
||||
- **KEY_CENT** = **162**
|
||||
- **KEY_STERLING** = **163**
|
||||
- **KEY_CURRENCY** = **164**
|
||||
- **KEY_YEN** = **165**
|
||||
- **KEY_BROKENBAR** = **166**
|
||||
- **KEY_SECTION** = **167**
|
||||
- **KEY_DIAERESIS** = **168**
|
||||
- **KEY_COPYRIGHT** = **169**
|
||||
- **KEY_ORDFEMININE** = **170**
|
||||
- **KEY_GUILLEMOTLEFT** = **171**
|
||||
- **KEY_NOTSIGN** = **172**
|
||||
- **KEY_HYPHEN** = **173**
|
||||
- **KEY_REGISTERED** = **174**
|
||||
- **KEY_MACRON** = **175**
|
||||
- **KEY_DEGREE** = **176**
|
||||
- **KEY_PLUSMINUS** = **177**
|
||||
- **KEY_TWOSUPERIOR** = **178**
|
||||
- **KEY_THREESUPERIOR** = **179**
|
||||
- **KEY_ACUTE** = **180**
|
||||
- **KEY_MU** = **181**
|
||||
- **KEY_PARAGRAPH** = **182**
|
||||
- **KEY_PERIODCENTERED** = **183**
|
||||
- **KEY_CEDILLA** = **184**
|
||||
- **KEY_ONESUPERIOR** = **185**
|
||||
- **KEY_MASCULINE** = **186**
|
||||
- **KEY_GUILLEMOTRIGHT** = **187**
|
||||
- **KEY_ONEQUARTER** = **188**
|
||||
- **KEY_ONEHALF** = **189**
|
||||
- **KEY_THREEQUARTERS** = **190**
|
||||
- **KEY_QUESTIONDOWN** = **191**
|
||||
- **KEY_AGRAVE** = **192**
|
||||
- **KEY_AACUTE** = **193**
|
||||
- **KEY_ACIRCUMFLEX** = **194**
|
||||
- **KEY_ATILDE** = **195**
|
||||
- **KEY_ADIAERESIS** = **196**
|
||||
- **KEY_ARING** = **197**
|
||||
- **KEY_AE** = **198**
|
||||
- **KEY_CCEDILLA** = **199**
|
||||
- **KEY_EGRAVE** = **200**
|
||||
- **KEY_EACUTE** = **201**
|
||||
- **KEY_ECIRCUMFLEX** = **202**
|
||||
- **KEY_EDIAERESIS** = **203**
|
||||
- **KEY_IGRAVE** = **204**
|
||||
- **KEY_IACUTE** = **205**
|
||||
- **KEY_ICIRCUMFLEX** = **206**
|
||||
- **KEY_IDIAERESIS** = **207**
|
||||
- **KEY_ETH** = **208**
|
||||
- **KEY_NTILDE** = **209**
|
||||
- **KEY_OGRAVE** = **210**
|
||||
- **KEY_OACUTE** = **211**
|
||||
- **KEY_OCIRCUMFLEX** = **212**
|
||||
- **KEY_OTILDE** = **213**
|
||||
- **KEY_ODIAERESIS** = **214**
|
||||
- **KEY_MULTIPLY** = **215**
|
||||
- **KEY_OOBLIQUE** = **216**
|
||||
- **KEY_UGRAVE** = **217**
|
||||
- **KEY_UACUTE** = **218**
|
||||
- **KEY_UCIRCUMFLEX** = **219**
|
||||
- **KEY_UDIAERESIS** = **220**
|
||||
- **KEY_YACUTE** = **221**
|
||||
- **KEY_THORN** = **222**
|
||||
- **KEY_SSHARP** = **223**
|
||||
- **KEY_DIVISION** = **247**
|
||||
- **KEY_YDIAERESIS** = **255**
|
||||
- **KEY_CODE_MASK** = **33554431**
|
||||
- **KEY_MODIFIER_MASK** = **-16777216**
|
||||
- **KEY_MASK_SHIFT** = **33554432**
|
||||
- **KEY_MASK_ALT** = **67108864**
|
||||
- **KEY_MASK_META** = **134217728**
|
||||
- **KEY_MASK_CTRL** = **268435456**
|
||||
- **KEY_MASK_CMD** = **268435456**
|
||||
- **KEY_MASK_KPAD** = **536870912**
|
||||
- **KEY_MASK_GROUP_SWITCH** = **1073741824**
|
||||
- **BUTTON_LEFT** = **1**
|
||||
- **BUTTON_RIGHT** = **2**
|
||||
- **BUTTON_MIDDLE** = **3**
|
||||
- **BUTTON_WHEEL_UP** = **4**
|
||||
- **BUTTON_WHEEL_DOWN** = **5**
|
||||
- **BUTTON_WHEEL_LEFT** = **6**
|
||||
- **BUTTON_WHEEL_RIGHT** = **7**
|
||||
- **BUTTON_MASK_LEFT** = **1**
|
||||
- **BUTTON_MASK_RIGHT** = **2**
|
||||
- **BUTTON_MASK_MIDDLE** = **4**
|
||||
- **JOY_BUTTON_0** = **0** --- Joystick Button 0
|
||||
- **JOY_BUTTON_1** = **1** --- Joystick Button 1
|
||||
- **JOY_BUTTON_2** = **2** --- Joystick Button 2
|
||||
- **JOY_BUTTON_3** = **3** --- Joystick Button 3
|
||||
- **JOY_BUTTON_4** = **4** --- Joystick Button 4
|
||||
- **JOY_BUTTON_5** = **5** --- Joystick Button 5
|
||||
- **JOY_BUTTON_6** = **6** --- Joystick Button 6
|
||||
- **JOY_BUTTON_7** = **7** --- Joystick Button 7
|
||||
- **JOY_BUTTON_8** = **8** --- Joystick Button 8
|
||||
- **JOY_BUTTON_9** = **9** --- Joystick Button 9
|
||||
- **JOY_BUTTON_10** = **10** --- Joystick Button 10
|
||||
- **JOY_BUTTON_11** = **11** --- Joystick Button 11
|
||||
- **JOY_BUTTON_12** = **12** --- Joystick Button 12
|
||||
- **JOY_BUTTON_13** = **13** --- Joystick Button 13
|
||||
- **JOY_BUTTON_14** = **14** --- Joystick Button 14
|
||||
- **JOY_BUTTON_15** = **15** --- Joystick Button 15
|
||||
- **JOY_BUTTON_MAX** = **16** --- Joystick Button 16
|
||||
- **JOY_SNES_A** = **1**
|
||||
- **JOY_SNES_B** = **0**
|
||||
- **JOY_SNES_X** = **3**
|
||||
- **JOY_SNES_Y** = **2**
|
||||
- **JOY_SONY_CIRCLE** = **1**
|
||||
- **JOY_SONY_X** = **0**
|
||||
- **JOY_SONY_SQUARE** = **2**
|
||||
- **JOY_SONY_TRIANGLE** = **3**
|
||||
- **JOY_SEGA_B** = **1**
|
||||
- **JOY_SEGA_A** = **0**
|
||||
- **JOY_SEGA_X** = **2**
|
||||
- **JOY_SEGA_Y** = **3**
|
||||
- **JOY_XBOX_B** = **1**
|
||||
- **JOY_XBOX_A** = **0**
|
||||
- **JOY_XBOX_X** = **2**
|
||||
- **JOY_XBOX_Y** = **3**
|
||||
- **JOY_DS_A** = **1**
|
||||
- **JOY_DS_B** = **0**
|
||||
- **JOY_DS_X** = **3**
|
||||
- **JOY_DS_Y** = **2**
|
||||
- **JOY_SELECT** = **10**
|
||||
- **JOY_START** = **11**
|
||||
- **JOY_DPAD_UP** = **12**
|
||||
- **JOY_DPAD_DOWN** = **13**
|
||||
- **JOY_DPAD_LEFT** = **14**
|
||||
- **JOY_DPAD_RIGHT** = **15**
|
||||
- **JOY_L** = **4**
|
||||
- **JOY_L2** = **6**
|
||||
- **JOY_L3** = **8**
|
||||
- **JOY_R** = **5**
|
||||
- **JOY_R2** = **7**
|
||||
- **JOY_R3** = **9**
|
||||
- **JOY_AXIS_0** = **0**
|
||||
- **JOY_AXIS_1** = **1**
|
||||
- **JOY_AXIS_2** = **2**
|
||||
- **JOY_AXIS_3** = **3**
|
||||
- **JOY_AXIS_4** = **4**
|
||||
- **JOY_AXIS_5** = **5**
|
||||
- **JOY_AXIS_6** = **6**
|
||||
- **JOY_AXIS_7** = **7**
|
||||
- **JOY_AXIS_MAX** = **8**
|
||||
- **JOY_ANALOG_0_X** = **0**
|
||||
- **JOY_ANALOG_0_Y** = **1**
|
||||
- **JOY_ANALOG_1_X** = **2**
|
||||
- **JOY_ANALOG_1_Y** = **3**
|
||||
- **JOY_ANALOG_2_X** = **4**
|
||||
- **JOY_ANALOG_2_Y** = **5**
|
||||
- **JOY_ANALOG_L2** = **6**
|
||||
- **JOY_ANALOG_R2** = **7**
|
||||
- **OK** = **0** --- Functions that return :ref:`Error<class_error>` return OK when everything went ok. Most functions don't return error anyway and/or just print errors to stdout.
|
||||
- **FAILED** = **1** --- Generic fail return error.
|
||||
- **ERR_UNAVAILABLE** = **2**
|
||||
- **ERR_UNCONFIGURED** = **3**
|
||||
- **ERR_UNAUTHORIZED** = **4**
|
||||
- **ERR_PARAMETER_RANGE_ERROR** = **5**
|
||||
- **ERR_OUT_OF_MEMORY** = **6**
|
||||
- **ERR_FILE_NOT_FOUND** = **7**
|
||||
- **ERR_FILE_BAD_DRIVE** = **8**
|
||||
- **ERR_FILE_BAD_PATH** = **9**
|
||||
- **ERR_FILE_NO_PERMISSION** = **10**
|
||||
- **ERR_FILE_ALREADY_IN_USE** = **11**
|
||||
- **ERR_FILE_CANT_OPEN** = **12**
|
||||
- **ERR_FILE_CANT_WRITE** = **13**
|
||||
- **ERR_FILE_CANT_READ** = **14**
|
||||
- **ERR_FILE_UNRECOGNIZED** = **15**
|
||||
- **ERR_FILE_CORRUPT** = **16**
|
||||
- **ERR_FILE_MISSING_DEPENDENCIES** = **17**
|
||||
- **ERR_FILE_EOF** = **18**
|
||||
- **ERR_CANT_OPEN** = **19**
|
||||
- **ERR_CANT_CREATE** = **20**
|
||||
- **ERROR_QUERY_FAILED** = **21**
|
||||
- **ERR_ALREADY_IN_USE** = **22**
|
||||
- **ERR_LOCKED** = **23**
|
||||
- **ERR_TIMEOUT** = **24**
|
||||
- **ERR_CANT_AQUIRE_RESOURCE** = **28**
|
||||
- **ERR_INVALID_DATA** = **30**
|
||||
- **ERR_INVALID_PARAMETER** = **31**
|
||||
- **ERR_ALREADY_EXISTS** = **32**
|
||||
- **ERR_DOES_NOT_EXIST** = **33**
|
||||
- **ERR_DATABASE_CANT_READ** = **34**
|
||||
- **ERR_DATABASE_CANT_WRITE** = **35**
|
||||
- **ERR_COMPILATION_FAILED** = **36**
|
||||
- **ERR_METHOD_NOT_FOUND** = **37**
|
||||
- **ERR_LINK_FAILED** = **38**
|
||||
- **ERR_SCRIPT_FAILED** = **39**
|
||||
- **ERR_CYCLIC_LINK** = **40**
|
||||
- **ERR_BUSY** = **44**
|
||||
- **ERR_HELP** = **46**
|
||||
- **ERR_BUG** = **47**
|
||||
- **ERR_WTF** = **49**
|
||||
- **PROPERTY_HINT_NONE** = **0** --- No hint for edited property.
|
||||
- **PROPERTY_HINT_RANGE** = **1** --- Hints that the string is a range, defined as "min,max" or "min,max,step". This is valid for integers and floats.
|
||||
- **PROPERTY_HINT_EXP_RANGE** = **2** --- Hints that the string is an exponential range, defined as "min,max" or "min,max,step". This is valid for integers and floats.
|
||||
- **PROPERTY_HINT_ENUM** = **3** --- Property hint for an enumerated value, like "Hello,Something,Else". This is valid for integer, float and string properties.
|
||||
- **PROPERTY_HINT_EXP_EASING** = **4**
|
||||
- **PROPERTY_HINT_LENGTH** = **5**
|
||||
- **PROPERTY_HINT_KEY_ACCEL** = **7**
|
||||
- **PROPERTY_HINT_FLAGS** = **8** --- Property hint for a bitmask description, for bits 0,1,2,3 and 5 the hint would be like "Bit0,Bit1,Bit2,Bit3,,Bit5". Valid only for integers.
|
||||
- **PROPERTY_HINT_ALL_FLAGS** = **9** --- Property hint for a bitmask description that covers all 32 bits. Valid only for integers.
|
||||
- **PROPERTY_HINT_FILE** = **10** --- String property is a file (so pop up a file dialog when edited). Hint string can be a set of wildcards like "*.doc".
|
||||
- **PROPERTY_HINT_DIR** = **11** --- String property is a directory (so pop up a file dialog when edited).
|
||||
- **PROPERTY_HINT_GLOBAL_FILE** = **12**
|
||||
- **PROPERTY_HINT_GLOBAL_DIR** = **13**
|
||||
- **PROPERTY_HINT_RESOURCE_TYPE** = **14** --- String property is a resource, so open the resource popup menu when edited.
|
||||
- **PROPERTY_HINT_MULTILINE_TEXT** = **15**
|
||||
- **PROPERTY_HINT_COLOR_NO_ALPHA** = **16**
|
||||
- **PROPERTY_HINT_IMAGE_COMPRESS_LOSSY** = **17**
|
||||
- **PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS** = **18**
|
||||
- **PROPERTY_USAGE_STORAGE** = **1** --- Property will be used as storage (default).
|
||||
- **PROPERTY_USAGE_STORAGE** = **1** --- Property will be used as storage (default).
|
||||
- **PROPERTY_USAGE_EDITOR** = **2** --- Property will be visible in editor (default).
|
||||
- **PROPERTY_USAGE_NETWORK** = **4**
|
||||
- **PROPERTY_USAGE_DEFAULT** = **7** --- Default usage (storage and editor).
|
||||
- **METHOD_FLAG_NORMAL** = **1**
|
||||
- **METHOD_FLAG_EDITOR** = **2**
|
||||
- **METHOD_FLAG_NOSCRIPT** = **4**
|
||||
- **METHOD_FLAG_CONST** = **8**
|
||||
- **METHOD_FLAG_REVERSE** = **16**
|
||||
- **METHOD_FLAG_VIRTUAL** = **32**
|
||||
- **METHOD_FLAG_FROM_SCRIPT** = **64**
|
||||
- **METHOD_FLAGS_DEFAULT** = **1**
|
||||
- **TYPE_NIL** = **0** --- Variable is of type nil (only applied for null).
|
||||
- **TYPE_BOOL** = **1** --- Variable is of type bool.
|
||||
- **TYPE_INT** = **2** --- Variable is of type integer.
|
||||
- **TYPE_REAL** = **3** --- Variable is of type float/real.
|
||||
- **TYPE_STRING** = **4** --- Variable is of type :ref:`String<class_string>`.
|
||||
- **TYPE_VECTOR2** = **5** --- Variable is of type :ref:`Vector2<class_vector2>`.
|
||||
- **TYPE_RECT2** = **6** --- Variable is of type :ref:`Rect2<class_rect2>`.
|
||||
- **TYPE_VECTOR3** = **7** --- Variable is of type :ref:`Vector3<class_vector3>`.
|
||||
- **TYPE_MATRIX32** = **8** --- Variable is of type :ref:`Matrix32<class_matrix32>`.
|
||||
- **TYPE_PLANE** = **9** --- Variable is of type :ref:`Plane<class_plane>`.
|
||||
- **TYPE_QUAT** = **10** --- Variable is of type :ref:`Quat<class_quat>`.
|
||||
- **TYPE_AABB** = **11** --- Variable is of type :ref:`AABB<class_aabb>`.
|
||||
- **TYPE_MATRIX3** = **12** --- Variable is fo type :ref:`Matrix3<class_matrix3>`.
|
||||
- **TYPE_TRANSFORM** = **13** --- Variable is fo type :ref:`Transform<class_transform>`.
|
||||
- **TYPE_COLOR** = **14** --- Variable is fo type :ref:`Color<class_color>`.
|
||||
- **TYPE_IMAGE** = **15** --- Variable is fo type :ref:`Image<class_image>`.
|
||||
- **TYPE_NODE_PATH** = **16** --- Variable is fo type :ref:`NodePath<class_nodepath>`.
|
||||
- **TYPE_RID** = **17** --- Variable is fo type :ref:`RID<class_rid>`.
|
||||
- **TYPE_OBJECT** = **18** --- Variable is fo type :ref:`Object<class_object>`.
|
||||
- **TYPE_INPUT_EVENT** = **19** --- Variable is fo type :ref:`InputEvent<class_inputevent>`.
|
||||
- **TYPE_DICTIONARY** = **20** --- Variable is fo type :ref:`Dictionary<class_dictionary>`.
|
||||
- **TYPE_ARRAY** = **21** --- Variable is fo type :ref:`Array<class_array>`.
|
||||
- **TYPE_RAW_ARRAY** = **22**
|
||||
- **TYPE_INT_ARRAY** = **23**
|
||||
- **TYPE_REAL_ARRAY** = **24**
|
||||
- **TYPE_STRING_ARRAY** = **25**
|
||||
- **TYPE_VECTOR2_ARRAY** = **26**
|
||||
- **TYPE_VECTOR3_ARRAY** = **27**
|
||||
- **TYPE_COLOR_ARRAY** = **28**
|
||||
- **TYPE_MAX** = **29**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc. It's not much.
|
||||
|
||||
Singletons are also documented here, since they can be accessed from anywhere.
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
.. _class_AABB:
|
||||
|
||||
AABB
|
||||
====
|
||||
|
||||
Category: Built-In Types
|
||||
------------------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Axis-Aligned Bounding Box.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`encloses<class_AABB_encloses>` **(** :ref:`AABB<class_aabb>` with **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AABB<class_aabb>` | :ref:`expand<class_AABB_expand>` **(** :ref:`Vector3<class_vector3>` to_point **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_area<class_AABB_get_area>` **(** **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_endpoint<class_AABB_get_endpoint>` **(** :ref:`int<class_int>` idx **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_longest_axis<class_AABB_get_longest_axis>` **(** **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_longest_axis_index<class_AABB_get_longest_axis_index>` **(** **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_longest_axis_size<class_AABB_get_longest_axis_size>` **(** **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_shortest_axis<class_AABB_get_shortest_axis>` **(** **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_shortest_axis_index<class_AABB_get_shortest_axis_index>` **(** **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_shortest_axis_size<class_AABB_get_shortest_axis_size>` **(** **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_support<class_AABB_get_support>` **(** :ref:`Vector3<class_vector3>` dir **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AABB<class_aabb>` | :ref:`grow<class_AABB_grow>` **(** :ref:`float<class_float>` by **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_no_area<class_AABB_has_no_area>` **(** **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_no_surface<class_AABB_has_no_surface>` **(** **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_point<class_AABB_has_point>` **(** :ref:`Vector3<class_vector3>` point **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AABB<class_aabb>` | :ref:`intersection<class_AABB_intersection>` **(** :ref:`AABB<class_aabb>` with **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`intersects<class_AABB_intersects>` **(** :ref:`AABB<class_aabb>` with **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`intersects_plane<class_AABB_intersects_plane>` **(** :ref:`Plane<class_plane>` plane **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`intersects_segment<class_AABB_intersects_segment>` **(** :ref:`Vector3<class_vector3>` from, :ref:`Vector3<class_vector3>` to **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AABB<class_aabb>` | :ref:`merge<class_AABB_merge>` **(** :ref:`AABB<class_aabb>` with **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AABB<class_aabb>` | :ref:`AABB<class_AABB_AABB>` **(** :ref:`Vector3<class_vector3>` pos, :ref:`Vector3<class_vector3>` size **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Variables
|
||||
----------------
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **pos**
|
||||
- :ref:`Vector3<class_vector3>` **size**
|
||||
- :ref:`Vector3<class_vector3>` **end**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
AABB provides an 3D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for simple (fast) overlap tests.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_AABB_encloses:
|
||||
|
||||
- :ref:`bool<class_bool>` **encloses** **(** :ref:`AABB<class_aabb>` with **)**
|
||||
|
||||
Return true if this :ref:`AABB<class_aabb>` completely encloses another one.
|
||||
|
||||
.. _class_AABB_expand:
|
||||
|
||||
- :ref:`AABB<class_aabb>` **expand** **(** :ref:`Vector3<class_vector3>` to_point **)**
|
||||
|
||||
Return this :ref:`AABB<class_aabb>` expanded to include a given point.
|
||||
|
||||
.. _class_AABB_get_area:
|
||||
|
||||
- :ref:`float<class_float>` **get_area** **(** **)**
|
||||
|
||||
Get the area of the :ref:`AABB<class_aabb>`.
|
||||
|
||||
.. _class_AABB_get_endpoint:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **get_endpoint** **(** :ref:`int<class_int>` idx **)**
|
||||
|
||||
Get the position of the 8 endpoints of the :ref:`AABB<class_aabb>` in space.
|
||||
|
||||
.. _class_AABB_get_longest_axis:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **get_longest_axis** **(** **)**
|
||||
|
||||
Return the normalized longest axis of the :ref:`AABB<class_aabb>`.
|
||||
|
||||
.. _class_AABB_get_longest_axis_index:
|
||||
|
||||
- :ref:`int<class_int>` **get_longest_axis_index** **(** **)**
|
||||
|
||||
Return the index of the longest axis of the :ref:`AABB<class_aabb>` (according to :ref:`Vector3<class_vector3>`::AXIS* enum).
|
||||
|
||||
.. _class_AABB_get_longest_axis_size:
|
||||
|
||||
- :ref:`float<class_float>` **get_longest_axis_size** **(** **)**
|
||||
|
||||
Return the scalar length of the longest axis of the :ref:`AABB<class_aabb>`.
|
||||
|
||||
.. _class_AABB_get_shortest_axis:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **get_shortest_axis** **(** **)**
|
||||
|
||||
Return the normalized shortest axis of the :ref:`AABB<class_aabb>`.
|
||||
|
||||
.. _class_AABB_get_shortest_axis_index:
|
||||
|
||||
- :ref:`int<class_int>` **get_shortest_axis_index** **(** **)**
|
||||
|
||||
Return the index of the shortest axis of the :ref:`AABB<class_aabb>` (according to :ref:`Vector3<class_vector3>`::AXIS* enum).
|
||||
|
||||
.. _class_AABB_get_shortest_axis_size:
|
||||
|
||||
- :ref:`float<class_float>` **get_shortest_axis_size** **(** **)**
|
||||
|
||||
Return the scalar length of the shortest axis of the :ref:`AABB<class_aabb>`.
|
||||
|
||||
.. _class_AABB_get_support:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **get_support** **(** :ref:`Vector3<class_vector3>` dir **)**
|
||||
|
||||
Return the support point in a given direction. This is useful for collision detection algorithms.
|
||||
|
||||
.. _class_AABB_grow:
|
||||
|
||||
- :ref:`AABB<class_aabb>` **grow** **(** :ref:`float<class_float>` by **)**
|
||||
|
||||
Return a copy of the :ref:`AABB<class_aabb>` grown a given amount of units towards all the sides.
|
||||
|
||||
.. _class_AABB_has_no_area:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_no_area** **(** **)**
|
||||
|
||||
Return true if the :ref:`AABB<class_aabb>` is flat or empty.
|
||||
|
||||
.. _class_AABB_has_no_surface:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_no_surface** **(** **)**
|
||||
|
||||
Return true if the :ref:`AABB<class_aabb>` is empty.
|
||||
|
||||
.. _class_AABB_has_point:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_point** **(** :ref:`Vector3<class_vector3>` point **)**
|
||||
|
||||
Return true if the :ref:`AABB<class_aabb>` contains a point.
|
||||
|
||||
.. _class_AABB_intersection:
|
||||
|
||||
- :ref:`AABB<class_aabb>` **intersection** **(** :ref:`AABB<class_aabb>` with **)**
|
||||
|
||||
Return the intersection between two :ref:`AABB<class_aabb>`s. An empty AABB (size 0,0,0) is returned on failure.
|
||||
|
||||
.. _class_AABB_intersects:
|
||||
|
||||
- :ref:`bool<class_bool>` **intersects** **(** :ref:`AABB<class_aabb>` with **)**
|
||||
|
||||
Return true if the :ref:`AABB<class_aabb>` overlaps with another.
|
||||
|
||||
.. _class_AABB_intersects_plane:
|
||||
|
||||
- :ref:`bool<class_bool>` **intersects_plane** **(** :ref:`Plane<class_plane>` plane **)**
|
||||
|
||||
Return true if the :ref:`AABB<class_aabb>` is at both sides of a plane.
|
||||
|
||||
.. _class_AABB_intersects_segment:
|
||||
|
||||
- :ref:`bool<class_bool>` **intersects_segment** **(** :ref:`Vector3<class_vector3>` from, :ref:`Vector3<class_vector3>` to **)**
|
||||
|
||||
.. _class_AABB_merge:
|
||||
|
||||
- :ref:`AABB<class_aabb>` **merge** **(** :ref:`AABB<class_aabb>` with **)**
|
||||
|
||||
Combine this :ref:`AABB<class_aabb>` with another, a larger one is returned that contains both.
|
||||
|
||||
.. _class_AABB_AABB:
|
||||
|
||||
- :ref:`AABB<class_aabb>` **AABB** **(** :ref:`Vector3<class_vector3>` pos, :ref:`Vector3<class_vector3>` size **)**
|
||||
|
||||
Optional constructor, accepts position and size.
|
||||
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
.. _class_AcceptDialog:
|
||||
|
||||
AcceptDialog
|
||||
============
|
||||
|
||||
Inherits: :ref:`WindowDialog<class_windowdialog>`
|
||||
-------------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Base dialog for user notification.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`get_ok<class_AcceptDialog_get_ok>` **(** **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`get_label<class_AcceptDialog_get_label>` **(** **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_hide_on_ok<class_AcceptDialog_set_hide_on_ok>` **(** :ref:`bool<class_bool>` enabled **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_hide_on_ok<class_AcceptDialog_get_hide_on_ok>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Button<class_button>` | :ref:`add_button<class_AcceptDialog_add_button>` **(** :ref:`String<class_string>` text, :ref:`bool<class_bool>` right=false, :ref:`String<class_string>` action="" **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Button<class_button>` | :ref:`add_cancel<class_AcceptDialog_add_cancel>` **(** :ref:`String<class_string>` name **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`LineEdit<class_lineedit>` | :ref:`register_text_enter<class_AcceptDialog_register_text_enter>` **(** :ref:`Object<class_object>` line_edit **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_text<class_AcceptDialog_set_text>` **(** :ref:`String<class_string>` text **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_text<class_AcceptDialog_get_text>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **confirmed** **(** **)**
|
||||
- **custom_action** **(** :ref:`String<class_string>` action **)**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_AcceptDialog_get_ok:
|
||||
|
||||
- :ref:`Object<class_object>` **get_ok** **(** **)**
|
||||
|
||||
Return the OK Button.
|
||||
|
||||
.. _class_AcceptDialog_get_label:
|
||||
|
||||
- :ref:`Object<class_object>` **get_label** **(** **)**
|
||||
|
||||
Return the label used for built-in text.
|
||||
|
||||
.. _class_AcceptDialog_set_hide_on_ok:
|
||||
|
||||
- void **set_hide_on_ok** **(** :ref:`bool<class_bool>` enabled **)**
|
||||
|
||||
Set whether the dialog is hidden when accepted (default true).
|
||||
|
||||
.. _class_AcceptDialog_get_hide_on_ok:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_hide_on_ok** **(** **)** const
|
||||
|
||||
Return true if the dialog will be hidden when accepted (default true).
|
||||
|
||||
.. _class_AcceptDialog_add_button:
|
||||
|
||||
- :ref:`Button<class_button>` **add_button** **(** :ref:`String<class_string>` text, :ref:`bool<class_bool>` right=false, :ref:`String<class_string>` action="" **)**
|
||||
|
||||
.. _class_AcceptDialog_add_cancel:
|
||||
|
||||
- :ref:`Button<class_button>` **add_cancel** **(** :ref:`String<class_string>` name **)**
|
||||
|
||||
.. _class_AcceptDialog_register_text_enter:
|
||||
|
||||
- :ref:`LineEdit<class_lineedit>` **register_text_enter** **(** :ref:`Object<class_object>` line_edit **)**
|
||||
|
||||
Register a :ref:`LineEdit<class_lineedit>` in the dialog. When the enter key is pressed, the dialog will be accepted.
|
||||
|
||||
.. _class_AcceptDialog_set_text:
|
||||
|
||||
- void **set_text** **(** :ref:`String<class_string>` text **)**
|
||||
|
||||
Set the built-in label text.
|
||||
|
||||
.. _class_AcceptDialog_get_text:
|
||||
|
||||
- :ref:`String<class_string>` **get_text** **(** **)** const
|
||||
|
||||
Return the built-in label text.
|
||||
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
.. _class_AnimatedSprite:
|
||||
|
||||
AnimatedSprite
|
||||
==============
|
||||
|
||||
Inherits: :ref:`Node2D<class_node2d>`
|
||||
-------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Sprite node that can use multiple textures for animation.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_sprite_frames<class_AnimatedSprite_set_sprite_frames>` **(** :ref:`SpriteFrames<class_spriteframes>` sprite_frames **)** |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`SpriteFrames<class_spriteframes>` | :ref:`get_sprite_frames<class_AnimatedSprite_get_sprite_frames>` **(** **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_centered<class_AnimatedSprite_set_centered>` **(** :ref:`bool<class_bool>` centered **)** |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_centered<class_AnimatedSprite_is_centered>` **(** **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_offset<class_AnimatedSprite_set_offset>` **(** :ref:`Vector2<class_vector2>` offset **)** |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_offset<class_AnimatedSprite_get_offset>` **(** **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_flip_h<class_AnimatedSprite_set_flip_h>` **(** :ref:`bool<class_bool>` flip_h **)** |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_flipped_h<class_AnimatedSprite_is_flipped_h>` **(** **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_flip_v<class_AnimatedSprite_set_flip_v>` **(** :ref:`bool<class_bool>` flip_v **)** |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_flipped_v<class_AnimatedSprite_is_flipped_v>` **(** **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_frame<class_AnimatedSprite_set_frame>` **(** :ref:`int<class_int>` frame **)** |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_frame<class_AnimatedSprite_get_frame>` **(** **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_modulate<class_AnimatedSprite_set_modulate>` **(** :ref:`Color<class_color>` modulate **)** |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`get_modulate<class_AnimatedSprite_get_modulate>` **(** **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **frame_changed** **(** **)**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Sprite node that can use multiple textures for animation.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_AnimatedSprite_set_sprite_frames:
|
||||
|
||||
- void **set_sprite_frames** **(** :ref:`SpriteFrames<class_spriteframes>` sprite_frames **)**
|
||||
|
||||
Set the :ref:`SpriteFrames<class_spriteframes>` resource, which contains all frames.
|
||||
|
||||
.. _class_AnimatedSprite_get_sprite_frames:
|
||||
|
||||
- :ref:`SpriteFrames<class_spriteframes>` **get_sprite_frames** **(** **)** const
|
||||
|
||||
Get the :ref:`SpriteFrames<class_spriteframes>` resource, which contains all frames.
|
||||
|
||||
.. _class_AnimatedSprite_set_centered:
|
||||
|
||||
- void **set_centered** **(** :ref:`bool<class_bool>` centered **)**
|
||||
|
||||
When turned on, offset at (0,0) is the center of the sprite, when off, the top-left corner is.
|
||||
|
||||
.. _class_AnimatedSprite_is_centered:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_centered** **(** **)** const
|
||||
|
||||
Return true when centered. See :ref:`set_centered<class_set_centered>`.
|
||||
|
||||
.. _class_AnimatedSprite_set_offset:
|
||||
|
||||
- void **set_offset** **(** :ref:`Vector2<class_vector2>` offset **)**
|
||||
|
||||
Set the offset of the sprite in the node origin. Position varies depending on whether it is centered or not.
|
||||
|
||||
.. _class_AnimatedSprite_get_offset:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_offset** **(** **)** const
|
||||
|
||||
Return the offset of the sprite in the node origin.
|
||||
|
||||
.. _class_AnimatedSprite_set_flip_h:
|
||||
|
||||
- void **set_flip_h** **(** :ref:`bool<class_bool>` flip_h **)**
|
||||
|
||||
If true, sprite is flipped horizontally.
|
||||
|
||||
.. _class_AnimatedSprite_is_flipped_h:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_flipped_h** **(** **)** const
|
||||
|
||||
Return true if sprite is flipped horizontally.
|
||||
|
||||
.. _class_AnimatedSprite_set_flip_v:
|
||||
|
||||
- void **set_flip_v** **(** :ref:`bool<class_bool>` flip_v **)**
|
||||
|
||||
If true, sprite is flipped vertically.
|
||||
|
||||
.. _class_AnimatedSprite_is_flipped_v:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_flipped_v** **(** **)** const
|
||||
|
||||
Return true if sprite is flipped vertically.
|
||||
|
||||
.. _class_AnimatedSprite_set_frame:
|
||||
|
||||
- void **set_frame** **(** :ref:`int<class_int>` frame **)**
|
||||
|
||||
Set the visible sprite frame index (from the list of frames inside the :ref:`SpriteFrames<class_spriteframes>` resource).
|
||||
|
||||
.. _class_AnimatedSprite_get_frame:
|
||||
|
||||
- :ref:`int<class_int>` **get_frame** **(** **)** const
|
||||
|
||||
Return the visible frame index.
|
||||
|
||||
.. _class_AnimatedSprite_set_modulate:
|
||||
|
||||
- void **set_modulate** **(** :ref:`Color<class_color>` modulate **)**
|
||||
|
||||
Change the color modulation (multiplication) for this sprite.
|
||||
|
||||
.. _class_AnimatedSprite_get_modulate:
|
||||
|
||||
- :ref:`Color<class_color>` **get_modulate** **(** **)** const
|
||||
|
||||
Return the color modulation for this sprite.
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
.. _class_AnimatedSprite3D:
|
||||
|
||||
AnimatedSprite3D
|
||||
================
|
||||
|
||||
Inherits: :ref:`SpriteBase3D<class_spritebase3d>`
|
||||
-------------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_sprite_frames<class_AnimatedSprite3D_set_sprite_frames>` **(** :ref:`SpriteFrames<class_spriteframes>` sprite_frames **)** |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Texture<class_texture>` | :ref:`get_sprite_frames<class_AnimatedSprite3D_get_sprite_frames>` **(** **)** const |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_frame<class_AnimatedSprite3D_set_frame>` **(** :ref:`int<class_int>` frame **)** |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_frame<class_AnimatedSprite3D_get_frame>` **(** **)** const |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **frame_changed** **(** **)**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_AnimatedSprite3D_set_sprite_frames:
|
||||
|
||||
- void **set_sprite_frames** **(** :ref:`SpriteFrames<class_spriteframes>` sprite_frames **)**
|
||||
|
||||
.. _class_AnimatedSprite3D_get_sprite_frames:
|
||||
|
||||
- :ref:`Texture<class_texture>` **get_sprite_frames** **(** **)** const
|
||||
|
||||
.. _class_AnimatedSprite3D_set_frame:
|
||||
|
||||
- void **set_frame** **(** :ref:`int<class_int>` frame **)**
|
||||
|
||||
.. _class_AnimatedSprite3D_get_frame:
|
||||
|
||||
- :ref:`int<class_int>` **get_frame** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,324 @@
|
||||
.. _class_Animation:
|
||||
|
||||
Animation
|
||||
=========
|
||||
|
||||
Inherits: :ref:`Resource<class_resource>`
|
||||
-----------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Contains data used to animate everything in the engine.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`add_track<class_Animation_add_track>` **(** :ref:`int<class_int>` type, :ref:`int<class_int>` at_pos=-1 **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_track<class_Animation_remove_track>` **(** :ref:`int<class_int>` idx **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_track_count<class_Animation_get_track_count>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`track_get_type<class_Animation_track_get_type>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`NodePath<class_nodepath>` | :ref:`track_get_path<class_Animation_track_get_path>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`track_set_path<class_Animation_track_set_path>` **(** :ref:`int<class_int>` idx, :ref:`NodePath<class_nodepath>` path **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`find_track<class_Animation_find_track>` **(** :ref:`NodePath<class_nodepath>` path **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`track_move_up<class_Animation_track_move_up>` **(** :ref:`int<class_int>` idx **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`track_move_down<class_Animation_track_move_down>` **(** :ref:`int<class_int>` idx **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`transform_track_insert_key<class_Animation_transform_track_insert_key>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time, :ref:`Vector3<class_vector3>` loc, :ref:`Quat<class_quat>` rot, :ref:`Vector3<class_vector3>` scale **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`track_insert_key<class_Animation_track_insert_key>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time, var key, :ref:`float<class_float>` transition=1 **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`track_remove_key<class_Animation_track_remove_key>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`track_remove_key_at_pos<class_Animation_track_remove_key_at_pos>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` pos **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`track_set_key_value<class_Animation_track_set_key_value>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key, var value **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`track_set_key_transition<class_Animation_track_set_key_transition>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` transition **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`track_get_key_transition<class_Animation_track_get_key_transition>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`track_get_key_count<class_Animation_track_get_key_count>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`track_get_key_value<class_Animation_track_get_key_value>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`track_get_key_time<class_Animation_track_get_key_time>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`track_find_key<class_Animation_track_find_key>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time, :ref:`bool<class_bool>` exact=false **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`track_set_interpolation_type<class_Animation_track_set_interpolation_type>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` interpolation **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`track_get_interpolation_type<class_Animation_track_get_interpolation_type>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`transform_track_interpolate<class_Animation_transform_track_interpolate>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time_sec **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`value_track_set_continuous<class_Animation_value_track_set_continuous>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` continuous **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`value_track_is_continuous<class_Animation_value_track_is_continuous>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`IntArray<class_intarray>` | :ref:`value_track_get_key_indices<class_Animation_value_track_get_key_indices>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`IntArray<class_intarray>` | :ref:`method_track_get_key_indices<class_Animation_method_track_get_key_indices>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`method_track_get_name<class_Animation_method_track_get_name>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`method_track_get_params<class_Animation_method_track_get_params>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_length<class_Animation_set_length>` **(** :ref:`float<class_float>` time_sec **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_length<class_Animation_get_length>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_loop<class_Animation_set_loop>` **(** :ref:`bool<class_bool>` enabled **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_loop<class_Animation_has_loop>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_step<class_Animation_set_step>` **(** :ref:`float<class_float>` size_sec **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_step<class_Animation_get_step>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear<class_Animation_clear>` **(** **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **TYPE_VALUE** = **0** --- Value tracks set values in node properties, but only those which can be Interpolated.
|
||||
- **TYPE_TRANSFORM** = **1** --- Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are Interpolated.
|
||||
- **TYPE_METHOD** = **2** --- Method tracks call functions with given arguments per key.
|
||||
- **INTERPOLATION_NEAREST** = **0** --- No interpolation (nearest value).
|
||||
- **INTERPOLATION_LINEAR** = **1** --- Linear interpolation.
|
||||
- **INTERPOLATION_CUBIC** = **2** --- Cubic interpolation.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track.
|
||||
|
||||
Animations are just data containers, and must be added to odes such as an :ref:`AnimationPlayer<class_animationplayer>` or :ref:`AnimationTreePlayer<class_animationtreeplayer>` to be played back.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Animation_add_track:
|
||||
|
||||
- :ref:`int<class_int>` **add_track** **(** :ref:`int<class_int>` type, :ref:`int<class_int>` at_pos=-1 **)**
|
||||
|
||||
Add a track to the Animation. The track type must be specified as any of the values in te TYPE_* enumeration.
|
||||
|
||||
.. _class_Animation_remove_track:
|
||||
|
||||
- void **remove_track** **(** :ref:`int<class_int>` idx **)**
|
||||
|
||||
Remove a track by specifying the track index.
|
||||
|
||||
.. _class_Animation_get_track_count:
|
||||
|
||||
- :ref:`int<class_int>` **get_track_count** **(** **)** const
|
||||
|
||||
Return the amount of tracks in the animation.
|
||||
|
||||
.. _class_Animation_track_get_type:
|
||||
|
||||
- :ref:`int<class_int>` **track_get_type** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Get the type of a track.
|
||||
|
||||
.. _class_Animation_track_get_path:
|
||||
|
||||
- :ref:`NodePath<class_nodepath>` **track_get_path** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Get the path of a track. for more information on the path format, see :ref:`track_set_path<Animation_track_set_path>`
|
||||
|
||||
.. _class_Animation_track_set_path:
|
||||
|
||||
- void **track_set_path** **(** :ref:`int<class_int>` idx, :ref:`NodePath<class_nodepath>` path **)**
|
||||
|
||||
Set the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":". Example: "character/skeleton:ankle" or "character/mesh:transform/local"
|
||||
|
||||
.. _class_Animation_find_track:
|
||||
|
||||
- :ref:`int<class_int>` **find_track** **(** :ref:`NodePath<class_nodepath>` path **)** const
|
||||
|
||||
.. _class_Animation_track_move_up:
|
||||
|
||||
- void **track_move_up** **(** :ref:`int<class_int>` idx **)**
|
||||
|
||||
Move a track up.
|
||||
|
||||
.. _class_Animation_track_move_down:
|
||||
|
||||
- void **track_move_down** **(** :ref:`int<class_int>` idx **)**
|
||||
|
||||
Nove a track down.
|
||||
|
||||
.. _class_Animation_transform_track_insert_key:
|
||||
|
||||
- :ref:`int<class_int>` **transform_track_insert_key** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time, :ref:`Vector3<class_vector3>` loc, :ref:`Quat<class_quat>` rot, :ref:`Vector3<class_vector3>` scale **)**
|
||||
|
||||
Insert a transform key for a transform track.
|
||||
|
||||
.. _class_Animation_track_insert_key:
|
||||
|
||||
- void **track_insert_key** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time, var key, :ref:`float<class_float>` transition=1 **)**
|
||||
|
||||
Insert a generic key in a given track.
|
||||
|
||||
.. _class_Animation_track_remove_key:
|
||||
|
||||
- void **track_remove_key** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)**
|
||||
|
||||
Remove a key by index in a given track.
|
||||
|
||||
.. _class_Animation_track_remove_key_at_pos:
|
||||
|
||||
- void **track_remove_key_at_pos** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` pos **)**
|
||||
|
||||
Remove a key by position (seconds) in a given track.
|
||||
|
||||
.. _class_Animation_track_set_key_value:
|
||||
|
||||
- void **track_set_key_value** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key, var value **)**
|
||||
|
||||
Set the value of an existing key.
|
||||
|
||||
.. _class_Animation_track_set_key_transition:
|
||||
|
||||
- void **track_set_key_transition** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` transition **)**
|
||||
|
||||
Set the transition curve (easing) for a specific key (see built-in math function "ease").
|
||||
|
||||
.. _class_Animation_track_get_key_transition:
|
||||
|
||||
- :ref:`float<class_float>` **track_get_key_transition** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const
|
||||
|
||||
Return the transition curve (easing) for a specific key (see built-in math function "ease").
|
||||
|
||||
.. _class_Animation_track_get_key_count:
|
||||
|
||||
- :ref:`int<class_int>` **track_get_key_count** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Return the amount of keys in a given track.
|
||||
|
||||
.. _class_Animation_track_get_key_value:
|
||||
|
||||
- void **track_get_key_value** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const
|
||||
|
||||
Return the value of a given key in a given track.
|
||||
|
||||
.. _class_Animation_track_get_key_time:
|
||||
|
||||
- :ref:`float<class_float>` **track_get_key_time** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const
|
||||
|
||||
Return the time at which the key is located.
|
||||
|
||||
.. _class_Animation_track_find_key:
|
||||
|
||||
- :ref:`int<class_int>` **track_find_key** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time, :ref:`bool<class_bool>` exact=false **)** const
|
||||
|
||||
Find the key index by time in a given track. Optionally, only find it if the exact time is given.
|
||||
|
||||
.. _class_Animation_track_set_interpolation_type:
|
||||
|
||||
- void **track_set_interpolation_type** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` interpolation **)**
|
||||
|
||||
Set the interpolation type of a given track, from the INTERPOLATION_* enum.
|
||||
|
||||
.. _class_Animation_track_get_interpolation_type:
|
||||
|
||||
- :ref:`int<class_int>` **track_get_interpolation_type** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Return the interpolation type of a given track, from the INTERPOLATION_* enum.
|
||||
|
||||
.. _class_Animation_transform_track_interpolate:
|
||||
|
||||
- :ref:`Array<class_array>` **transform_track_interpolate** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time_sec **)** const
|
||||
|
||||
Return the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position (:ref:`Vector3<class_vector3>`), rotation (:ref:`Quat<class_quat>`) and scale (:ref:`Vector3<class_vector3>`).
|
||||
|
||||
.. _class_Animation_value_track_set_continuous:
|
||||
|
||||
- void **value_track_set_continuous** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` continuous **)**
|
||||
|
||||
Enable or disable interpolation for a whole track. By default tracks are interpolated.
|
||||
|
||||
.. _class_Animation_value_track_is_continuous:
|
||||
|
||||
- :ref:`bool<class_bool>` **value_track_is_continuous** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Return wether interpolation is enabled or disabled for a whole track. By default tracks are interpolated.
|
||||
|
||||
.. _class_Animation_value_track_get_key_indices:
|
||||
|
||||
- :ref:`IntArray<class_intarray>` **value_track_get_key_indices** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** const
|
||||
|
||||
Return all the key indices of a value track, given a position and delta time.
|
||||
|
||||
.. _class_Animation_method_track_get_key_indices:
|
||||
|
||||
- :ref:`IntArray<class_intarray>` **method_track_get_key_indices** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** const
|
||||
|
||||
Return all the key indices of a method track, given a position and delta time.
|
||||
|
||||
.. _class_Animation_method_track_get_name:
|
||||
|
||||
- :ref:`String<class_string>` **method_track_get_name** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const
|
||||
|
||||
Return the method name of a method track.
|
||||
|
||||
.. _class_Animation_method_track_get_params:
|
||||
|
||||
- :ref:`Array<class_array>` **method_track_get_params** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const
|
||||
|
||||
Return the arguments values to be called on a method track for a given key in a given track.
|
||||
|
||||
.. _class_Animation_set_length:
|
||||
|
||||
- void **set_length** **(** :ref:`float<class_float>` time_sec **)**
|
||||
|
||||
Set the total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.
|
||||
|
||||
.. _class_Animation_get_length:
|
||||
|
||||
- :ref:`float<class_float>` **get_length** **(** **)** const
|
||||
|
||||
Return the total length of the animation (in seconds).
|
||||
|
||||
.. _class_Animation_set_loop:
|
||||
|
||||
- void **set_loop** **(** :ref:`bool<class_bool>` enabled **)**
|
||||
|
||||
Set a flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
|
||||
|
||||
.. _class_Animation_has_loop:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_loop** **(** **)** const
|
||||
|
||||
Return wether the animation has the loop flag set.
|
||||
|
||||
.. _class_Animation_set_step:
|
||||
|
||||
- void **set_step** **(** :ref:`float<class_float>` size_sec **)**
|
||||
|
||||
.. _class_Animation_get_step:
|
||||
|
||||
- :ref:`float<class_float>` **get_step** **(** **)** const
|
||||
|
||||
.. _class_Animation_clear:
|
||||
|
||||
- void **clear** **(** **)**
|
||||
|
||||
Clear the animation (clear all tracks and reset all).
|
||||
|
||||
|
||||
@@ -0,0 +1,326 @@
|
||||
.. _class_AnimationPlayer:
|
||||
|
||||
AnimationPlayer
|
||||
===============
|
||||
|
||||
Inherits: :ref:`Node<class_node>`
|
||||
---------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Container and player of :ref:`Animation<class_animation>` resources.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`add_animation<class_AnimationPlayer_add_animation>` **(** :ref:`String<class_string>` name, :ref:`Animation<class_animation>` animation **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_animation<class_AnimationPlayer_remove_animation>` **(** :ref:`String<class_string>` name **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`rename_animation<class_AnimationPlayer_rename_animation>` **(** :ref:`String<class_string>` name, :ref:`String<class_string>` newname **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_animation<class_AnimationPlayer_has_animation>` **(** :ref:`String<class_string>` name **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Animation<class_animation>` | :ref:`get_animation<class_AnimationPlayer_get_animation>` **(** :ref:`String<class_string>` name **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StringArray<class_stringarray>` | :ref:`get_animation_list<class_AnimationPlayer_get_animation_list>` **(** **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_blend_time<class_AnimationPlayer_set_blend_time>` **(** :ref:`String<class_string>` anim_from, :ref:`String<class_string>` anim_to, :ref:`float<class_float>` sec **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_blend_time<class_AnimationPlayer_get_blend_time>` **(** :ref:`String<class_string>` anim_from, :ref:`String<class_string>` anim_to **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_default_blend_time<class_AnimationPlayer_set_default_blend_time>` **(** :ref:`float<class_float>` sec **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_default_blend_time<class_AnimationPlayer_get_default_blend_time>` **(** **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`play<class_AnimationPlayer_play>` **(** :ref:`String<class_string>` name="", :ref:`float<class_float>` custom_blend=-1, :ref:`float<class_float>` custom_speed=1, :ref:`bool<class_bool>` from_end=false **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`play_backwards<class_AnimationPlayer_play_backwards>` **(** :ref:`String<class_string>` name="", :ref:`float<class_float>` custom_blend=-1 **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`stop<class_AnimationPlayer_stop>` **(** :ref:`bool<class_bool>` reset=true **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`stop_all<class_AnimationPlayer_stop_all>` **(** **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_playing<class_AnimationPlayer_is_playing>` **(** **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_current_animation<class_AnimationPlayer_set_current_animation>` **(** :ref:`String<class_string>` anim **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_current_animation<class_AnimationPlayer_get_current_animation>` **(** **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`queue<class_AnimationPlayer_queue>` **(** :ref:`String<class_string>` name **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_queue<class_AnimationPlayer_clear_queue>` **(** **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_active<class_AnimationPlayer_set_active>` **(** :ref:`bool<class_bool>` active **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_active<class_AnimationPlayer_is_active>` **(** **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_speed<class_AnimationPlayer_set_speed>` **(** :ref:`float<class_float>` speed **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_speed<class_AnimationPlayer_get_speed>` **(** **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_autoplay<class_AnimationPlayer_set_autoplay>` **(** :ref:`String<class_string>` name **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_autoplay<class_AnimationPlayer_get_autoplay>` **(** **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_root<class_AnimationPlayer_set_root>` **(** :ref:`NodePath<class_nodepath>` path **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`NodePath<class_nodepath>` | :ref:`get_root<class_AnimationPlayer_get_root>` **(** **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`seek<class_AnimationPlayer_seek>` **(** :ref:`float<class_float>` pos_sec, :ref:`bool<class_bool>` update=false **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_pos<class_AnimationPlayer_get_pos>` **(** **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`find_animation<class_AnimationPlayer_find_animation>` **(** :ref:`Animation<class_animation>` animation **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_caches<class_AnimationPlayer_clear_caches>` **(** **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_animation_process_mode<class_AnimationPlayer_set_animation_process_mode>` **(** :ref:`int<class_int>` mode **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_animation_process_mode<class_AnimationPlayer_get_animation_process_mode>` **(** **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_current_animation_pos<class_AnimationPlayer_get_current_animation_pos>` **(** **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_current_animation_length<class_AnimationPlayer_get_current_animation_length>` **(** **)** const |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`advance<class_AnimationPlayer_advance>` **(** :ref:`float<class_float>` delta **)** |
|
||||
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **animation_changed** **(** :ref:`String<class_string>` old_name, :ref:`String<class_string>` new_name **)**
|
||||
- **finished** **(** **)**
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **ANIMATION_PROCESS_FIXED** = **0** --- Process animation on fixed process. This is specially useful when animating kinematic bodies.
|
||||
- **ANIMATION_PROCESS_IDLE** = **1** --- Process animation on idle process.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
An animation player is used for general purpose playback of :ref:`Animation<class_animation>` resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in diferent channels.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_AnimationPlayer_add_animation:
|
||||
|
||||
- :ref:`int<class_int>` **add_animation** **(** :ref:`String<class_string>` name, :ref:`Animation<class_animation>` animation **)**
|
||||
|
||||
Add an animation resource to the player, which will be later referenced by the "name" argument.
|
||||
|
||||
.. _class_AnimationPlayer_remove_animation:
|
||||
|
||||
- void **remove_animation** **(** :ref:`String<class_string>` name **)**
|
||||
|
||||
Remove an animation from the player (by supplying the same name used to add it).
|
||||
|
||||
.. _class_AnimationPlayer_rename_animation:
|
||||
|
||||
- void **rename_animation** **(** :ref:`String<class_string>` name, :ref:`String<class_string>` newname **)**
|
||||
|
||||
Rename an existing animation.
|
||||
|
||||
.. _class_AnimationPlayer_has_animation:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_animation** **(** :ref:`String<class_string>` name **)** const
|
||||
|
||||
Request wether an :ref:`Animation<class_animation>` name exist within the player.
|
||||
|
||||
.. _class_AnimationPlayer_get_animation:
|
||||
|
||||
- :ref:`Animation<class_animation>` **get_animation** **(** :ref:`String<class_string>` name **)** const
|
||||
|
||||
Get an :ref:`Animation<class_animation>` resource by requesting a name.
|
||||
|
||||
.. _class_AnimationPlayer_get_animation_list:
|
||||
|
||||
- :ref:`StringArray<class_stringarray>` **get_animation_list** **(** **)** const
|
||||
|
||||
Get the list of names of the animations stored in the player.
|
||||
|
||||
.. _class_AnimationPlayer_set_blend_time:
|
||||
|
||||
- void **set_blend_time** **(** :ref:`String<class_string>` anim_from, :ref:`String<class_string>` anim_to, :ref:`float<class_float>` sec **)**
|
||||
|
||||
Specify a blend time (in seconds) between two animations, referemced by their names.
|
||||
|
||||
.. _class_AnimationPlayer_get_blend_time:
|
||||
|
||||
- :ref:`float<class_float>` **get_blend_time** **(** :ref:`String<class_string>` anim_from, :ref:`String<class_string>` anim_to **)** const
|
||||
|
||||
Get the blend time between two animations, referemced by their names.
|
||||
|
||||
.. _class_AnimationPlayer_set_default_blend_time:
|
||||
|
||||
- void **set_default_blend_time** **(** :ref:`float<class_float>` sec **)**
|
||||
|
||||
Set the default blend time between animations.
|
||||
|
||||
.. _class_AnimationPlayer_get_default_blend_time:
|
||||
|
||||
- :ref:`float<class_float>` **get_default_blend_time** **(** **)** const
|
||||
|
||||
Return the default blend time between animations.
|
||||
|
||||
.. _class_AnimationPlayer_play:
|
||||
|
||||
- void **play** **(** :ref:`String<class_string>` name="", :ref:`float<class_float>` custom_blend=-1, :ref:`float<class_float>` custom_speed=1, :ref:`bool<class_bool>` from_end=false **)**
|
||||
|
||||
Play a given animation by the animation name. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards.
|
||||
|
||||
.. _class_AnimationPlayer_play_backwards:
|
||||
|
||||
- void **play_backwards** **(** :ref:`String<class_string>` name="", :ref:`float<class_float>` custom_blend=-1 **)**
|
||||
|
||||
.. _class_AnimationPlayer_stop:
|
||||
|
||||
- void **stop** **(** :ref:`bool<class_bool>` reset=true **)**
|
||||
|
||||
.. _class_AnimationPlayer_stop_all:
|
||||
|
||||
- void **stop_all** **(** **)**
|
||||
|
||||
Stop playback of animations (deprecated).
|
||||
|
||||
.. _class_AnimationPlayer_is_playing:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_playing** **(** **)** const
|
||||
|
||||
Return wether an animation is playing.
|
||||
|
||||
.. _class_AnimationPlayer_set_current_animation:
|
||||
|
||||
- void **set_current_animation** **(** :ref:`String<class_string>` anim **)**
|
||||
|
||||
Set the current animation (even if no playback occurs). Using set_current_animation() and set_active() are similar to calling play().
|
||||
|
||||
.. _class_AnimationPlayer_get_current_animation:
|
||||
|
||||
- :ref:`String<class_string>` **get_current_animation** **(** **)** const
|
||||
|
||||
Return the name of the animation being played.
|
||||
|
||||
.. _class_AnimationPlayer_queue:
|
||||
|
||||
- void **queue** **(** :ref:`String<class_string>` name **)**
|
||||
|
||||
Queue an animation for playback once the current one is done.
|
||||
|
||||
.. _class_AnimationPlayer_clear_queue:
|
||||
|
||||
- void **clear_queue** **(** **)**
|
||||
|
||||
If animations are queued to play, clear them.
|
||||
|
||||
.. _class_AnimationPlayer_set_active:
|
||||
|
||||
- void **set_active** **(** :ref:`bool<class_bool>` active **)**
|
||||
|
||||
Set the player as active (playing). If false, it
|
||||
|
||||
will do nothing.
|
||||
|
||||
.. _class_AnimationPlayer_is_active:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_active** **(** **)** const
|
||||
|
||||
Return true if the player is active.
|
||||
|
||||
.. _class_AnimationPlayer_set_speed:
|
||||
|
||||
- void **set_speed** **(** :ref:`float<class_float>` speed **)**
|
||||
|
||||
Set a speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is *1* (no scaling).
|
||||
|
||||
.. _class_AnimationPlayer_get_speed:
|
||||
|
||||
- :ref:`float<class_float>` **get_speed** **(** **)** const
|
||||
|
||||
Get the speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is *1* (no scaling).
|
||||
|
||||
.. _class_AnimationPlayer_set_autoplay:
|
||||
|
||||
- void **set_autoplay** **(** :ref:`String<class_string>` name **)**
|
||||
|
||||
Set the name of the animation that will be automatically played when the scene is loaded.
|
||||
|
||||
.. _class_AnimationPlayer_get_autoplay:
|
||||
|
||||
- :ref:`String<class_string>` **get_autoplay** **(** **)** const
|
||||
|
||||
Return the name of the animation that will be automatically played when the scene is loaded.
|
||||
|
||||
.. _class_AnimationPlayer_set_root:
|
||||
|
||||
- void **set_root** **(** :ref:`NodePath<class_nodepath>` path **)**
|
||||
|
||||
AnimationPlayer resolves animation track paths from this node (which is relative to itself), by default root is "..", but it can be changed.
|
||||
|
||||
.. _class_AnimationPlayer_get_root:
|
||||
|
||||
- :ref:`NodePath<class_nodepath>` **get_root** **(** **)** const
|
||||
|
||||
Return path to root node (see :ref:`set_root<class_set_root>`).
|
||||
|
||||
.. _class_AnimationPlayer_seek:
|
||||
|
||||
- void **seek** **(** :ref:`float<class_float>` pos_sec, :ref:`bool<class_bool>` update=false **)**
|
||||
|
||||
Seek the animation to a given position in time (in seconds). If 'update' is true, the animation will be updated too, otherwise it will be updated at process time.
|
||||
|
||||
.. _class_AnimationPlayer_get_pos:
|
||||
|
||||
- :ref:`float<class_float>` **get_pos** **(** **)** const
|
||||
|
||||
Return the playback position (in seconds) in an animation channel (or channel 0 if none is provided).
|
||||
|
||||
.. _class_AnimationPlayer_find_animation:
|
||||
|
||||
- :ref:`String<class_string>` **find_animation** **(** :ref:`Animation<class_animation>` animation **)** const
|
||||
|
||||
Find an animation name by resource.
|
||||
|
||||
.. _class_AnimationPlayer_clear_caches:
|
||||
|
||||
- void **clear_caches** **(** **)**
|
||||
|
||||
The animation player creates caches for faster access to the nodes it will animate. However, if a specific node is removed, it may not notice it, so clear_caches will force the player to search for the nodes again.
|
||||
|
||||
.. _class_AnimationPlayer_set_animation_process_mode:
|
||||
|
||||
- void **set_animation_process_mode** **(** :ref:`int<class_int>` mode **)**
|
||||
|
||||
Set the mode in which the animation player processes. By default, it processes on idle time (framerate dependent), but using fixed time works well for animating static collision bodies in 2D and 3D. See enum ANIMATION_PROCESS_*.
|
||||
|
||||
.. _class_AnimationPlayer_get_animation_process_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_animation_process_mode** **(** **)** const
|
||||
|
||||
Return the mode in which the animation player processes. See :ref:`set_animation_process_mode<AnimationPlayer_set_animation_process_mode>`.
|
||||
|
||||
.. _class_AnimationPlayer_get_current_animation_pos:
|
||||
|
||||
- :ref:`float<class_float>` **get_current_animation_pos** **(** **)** const
|
||||
|
||||
Get the position (in seconds) of the currently being played animation.
|
||||
|
||||
.. _class_AnimationPlayer_get_current_animation_length:
|
||||
|
||||
- :ref:`float<class_float>` **get_current_animation_length** **(** **)** const
|
||||
|
||||
Get the length (in seconds) of the currently being played animation.
|
||||
|
||||
.. _class_AnimationPlayer_advance:
|
||||
|
||||
- void **advance** **(** :ref:`float<class_float>` delta **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,436 @@
|
||||
.. _class_AnimationTreePlayer:
|
||||
|
||||
AnimationTreePlayer
|
||||
===================
|
||||
|
||||
Inherits: :ref:`Node<class_node>`
|
||||
---------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Animation Player that uses a node graph for the blending.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_node<class_AnimationTreePlayer_add_node>` **(** :ref:`int<class_int>` type, :ref:`String<class_string>` id **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`node_exists<class_AnimationTreePlayer_node_exists>` **(** :ref:`String<class_string>` node **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`node_rename<class_AnimationTreePlayer_node_rename>` **(** :ref:`String<class_string>` node, :ref:`String<class_string>` new_name **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`node_get_type<class_AnimationTreePlayer_node_get_type>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`node_get_input_count<class_AnimationTreePlayer_node_get_input_count>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`node_get_input_source<class_AnimationTreePlayer_node_get_input_source>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` idx **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`animation_node_set_animation<class_AnimationTreePlayer_animation_node_set_animation>` **(** :ref:`String<class_string>` id, :ref:`Animation<class_animation>` animation **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Animation<class_animation>` | :ref:`animation_node_get_animation<class_AnimationTreePlayer_animation_node_get_animation>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`animation_node_set_master_animation<class_AnimationTreePlayer_animation_node_set_master_animation>` **(** :ref:`String<class_string>` id, :ref:`String<class_string>` source **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`animation_node_get_master_animation<class_AnimationTreePlayer_animation_node_get_master_animation>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`oneshot_node_set_fadein_time<class_AnimationTreePlayer_oneshot_node_set_fadein_time>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` time_sec **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`oneshot_node_get_fadein_time<class_AnimationTreePlayer_oneshot_node_get_fadein_time>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`oneshot_node_set_fadeout_time<class_AnimationTreePlayer_oneshot_node_set_fadeout_time>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` time_sec **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`oneshot_node_get_fadeout_time<class_AnimationTreePlayer_oneshot_node_get_fadeout_time>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`oneshot_node_set_autorestart<class_AnimationTreePlayer_oneshot_node_set_autorestart>` **(** :ref:`String<class_string>` id, :ref:`bool<class_bool>` enable **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`oneshot_node_set_autorestart_delay<class_AnimationTreePlayer_oneshot_node_set_autorestart_delay>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` delay_sec **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`oneshot_node_set_autorestart_random_delay<class_AnimationTreePlayer_oneshot_node_set_autorestart_random_delay>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` rand_sec **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`oneshot_node_has_autorestart<class_AnimationTreePlayer_oneshot_node_has_autorestart>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`oneshot_node_get_autorestart_delay<class_AnimationTreePlayer_oneshot_node_get_autorestart_delay>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`oneshot_node_get_autorestart_random_delay<class_AnimationTreePlayer_oneshot_node_get_autorestart_random_delay>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`oneshot_node_start<class_AnimationTreePlayer_oneshot_node_start>` **(** :ref:`String<class_string>` id **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`oneshot_node_stop<class_AnimationTreePlayer_oneshot_node_stop>` **(** :ref:`String<class_string>` id **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`oneshot_node_is_active<class_AnimationTreePlayer_oneshot_node_is_active>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`oneshot_node_set_filter_path<class_AnimationTreePlayer_oneshot_node_set_filter_path>` **(** :ref:`String<class_string>` id, :ref:`NodePath<class_nodepath>` path, :ref:`bool<class_bool>` enable **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`mix_node_set_amount<class_AnimationTreePlayer_mix_node_set_amount>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` ratio **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`mix_node_get_amount<class_AnimationTreePlayer_mix_node_get_amount>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`blend2_node_set_amount<class_AnimationTreePlayer_blend2_node_set_amount>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` blend **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`blend2_node_get_amount<class_AnimationTreePlayer_blend2_node_get_amount>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`blend2_node_set_filter_path<class_AnimationTreePlayer_blend2_node_set_filter_path>` **(** :ref:`String<class_string>` id, :ref:`NodePath<class_nodepath>` path, :ref:`bool<class_bool>` enable **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`blend3_node_set_amount<class_AnimationTreePlayer_blend3_node_set_amount>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` blend **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`blend3_node_get_amount<class_AnimationTreePlayer_blend3_node_get_amount>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`blend4_node_set_amount<class_AnimationTreePlayer_blend4_node_set_amount>` **(** :ref:`String<class_string>` id, :ref:`Vector2<class_vector2>` blend **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`blend4_node_get_amount<class_AnimationTreePlayer_blend4_node_get_amount>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`timescale_node_set_scale<class_AnimationTreePlayer_timescale_node_set_scale>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` scale **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`timescale_node_get_scale<class_AnimationTreePlayer_timescale_node_get_scale>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`timeseek_node_seek<class_AnimationTreePlayer_timeseek_node_seek>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` pos_sec **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`transition_node_set_input_count<class_AnimationTreePlayer_transition_node_set_input_count>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` count **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`transition_node_get_input_count<class_AnimationTreePlayer_transition_node_get_input_count>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`transition_node_delete_input<class_AnimationTreePlayer_transition_node_delete_input>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`transition_node_set_input_auto_advance<class_AnimationTreePlayer_transition_node_set_input_auto_advance>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx, :ref:`bool<class_bool>` enable **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`transition_node_has_input_auto_advance<class_AnimationTreePlayer_transition_node_has_input_auto_advance>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`transition_node_set_xfade_time<class_AnimationTreePlayer_transition_node_set_xfade_time>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` time_sec **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`transition_node_get_xfade_time<class_AnimationTreePlayer_transition_node_get_xfade_time>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`transition_node_set_current<class_AnimationTreePlayer_transition_node_set_current>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`transition_node_get_current<class_AnimationTreePlayer_transition_node_get_current>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`node_set_pos<class_AnimationTreePlayer_node_set_pos>` **(** :ref:`String<class_string>` id, :ref:`Vector2<class_vector2>` screen_pos **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`node_get_pos<class_AnimationTreePlayer_node_get_pos>` **(** :ref:`String<class_string>` id **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_node<class_AnimationTreePlayer_remove_node>` **(** :ref:`String<class_string>` id **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`connect<class_AnimationTreePlayer_connect>` **(** :ref:`String<class_string>` id, :ref:`String<class_string>` dst_id, :ref:`int<class_int>` dst_input_idx **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_connected<class_AnimationTreePlayer_is_connected>` **(** :ref:`String<class_string>` id, :ref:`String<class_string>` dst_id, :ref:`int<class_int>` dst_input_idx **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`disconnect<class_AnimationTreePlayer_disconnect>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` dst_input_idx **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_active<class_AnimationTreePlayer_set_active>` **(** :ref:`bool<class_bool>` enabled **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_active<class_AnimationTreePlayer_is_active>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_base_path<class_AnimationTreePlayer_set_base_path>` **(** :ref:`NodePath<class_nodepath>` path **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`NodePath<class_nodepath>` | :ref:`get_base_path<class_AnimationTreePlayer_get_base_path>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_master_player<class_AnimationTreePlayer_set_master_player>` **(** :ref:`NodePath<class_nodepath>` nodepath **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`NodePath<class_nodepath>` | :ref:`get_master_player<class_AnimationTreePlayer_get_master_player>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StringArray<class_stringarray>` | :ref:`get_node_list<class_AnimationTreePlayer_get_node_list>` **(** **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_animation_process_mode<class_AnimationTreePlayer_set_animation_process_mode>` **(** :ref:`int<class_int>` mode **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_animation_process_mode<class_AnimationTreePlayer_get_animation_process_mode>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`advance<class_AnimationTreePlayer_advance>` **(** :ref:`float<class_float>` delta **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`reset<class_AnimationTreePlayer_reset>` **(** **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`recompute_caches<class_AnimationTreePlayer_recompute_caches>` **(** **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **NODE_OUTPUT** = **0**
|
||||
- **NODE_ANIMATION** = **1**
|
||||
- **NODE_ONESHOT** = **2**
|
||||
- **NODE_MIX** = **3**
|
||||
- **NODE_BLEND2** = **4**
|
||||
- **NODE_BLEND3** = **5**
|
||||
- **NODE_BLEND4** = **6**
|
||||
- **NODE_TIMESCALE** = **7**
|
||||
- **NODE_TIMESEEK** = **8**
|
||||
- **NODE_TRANSITION** = **9**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Animation Player that uses a node graph for the blending. This kind of player is very useful when animating character or other skeleton based rigs, because it can combine several animations to form a desired pose.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_AnimationTreePlayer_add_node:
|
||||
|
||||
- void **add_node** **(** :ref:`int<class_int>` type, :ref:`String<class_string>` id **)**
|
||||
|
||||
Add a node of a given type in the graph with given id.
|
||||
|
||||
.. _class_AnimationTreePlayer_node_exists:
|
||||
|
||||
- :ref:`bool<class_bool>` **node_exists** **(** :ref:`String<class_string>` node **)** const
|
||||
|
||||
Check if a node exists (by name).
|
||||
|
||||
.. _class_AnimationTreePlayer_node_rename:
|
||||
|
||||
- :ref:`int<class_int>` **node_rename** **(** :ref:`String<class_string>` node, :ref:`String<class_string>` new_name **)**
|
||||
|
||||
Rename a node in the graph.
|
||||
|
||||
.. _class_AnimationTreePlayer_node_get_type:
|
||||
|
||||
- :ref:`int<class_int>` **node_get_type** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
Get the node type, will return from NODE_* enum.
|
||||
|
||||
.. _class_AnimationTreePlayer_node_get_input_count:
|
||||
|
||||
- :ref:`int<class_int>` **node_get_input_count** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
Return the input count for a given node. Different types of nodes have different amount of inputs.
|
||||
|
||||
.. _class_AnimationTreePlayer_node_get_input_source:
|
||||
|
||||
- :ref:`String<class_string>` **node_get_input_source** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Return the input source for a given node input.
|
||||
|
||||
.. _class_AnimationTreePlayer_animation_node_set_animation:
|
||||
|
||||
- void **animation_node_set_animation** **(** :ref:`String<class_string>` id, :ref:`Animation<class_animation>` animation **)**
|
||||
|
||||
Set the animation for an animation node.
|
||||
|
||||
.. _class_AnimationTreePlayer_animation_node_get_animation:
|
||||
|
||||
- :ref:`Animation<class_animation>` **animation_node_get_animation** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_animation_node_set_master_animation:
|
||||
|
||||
- void **animation_node_set_master_animation** **(** :ref:`String<class_string>` id, :ref:`String<class_string>` source **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_animation_node_get_master_animation:
|
||||
|
||||
- :ref:`String<class_string>` **animation_node_get_master_animation** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_oneshot_node_set_fadein_time:
|
||||
|
||||
- void **oneshot_node_set_fadein_time** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` time_sec **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_oneshot_node_get_fadein_time:
|
||||
|
||||
- :ref:`float<class_float>` **oneshot_node_get_fadein_time** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_oneshot_node_set_fadeout_time:
|
||||
|
||||
- void **oneshot_node_set_fadeout_time** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` time_sec **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_oneshot_node_get_fadeout_time:
|
||||
|
||||
- :ref:`float<class_float>` **oneshot_node_get_fadeout_time** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_oneshot_node_set_autorestart:
|
||||
|
||||
- void **oneshot_node_set_autorestart** **(** :ref:`String<class_string>` id, :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_oneshot_node_set_autorestart_delay:
|
||||
|
||||
- void **oneshot_node_set_autorestart_delay** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` delay_sec **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_oneshot_node_set_autorestart_random_delay:
|
||||
|
||||
- void **oneshot_node_set_autorestart_random_delay** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` rand_sec **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_oneshot_node_has_autorestart:
|
||||
|
||||
- :ref:`bool<class_bool>` **oneshot_node_has_autorestart** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_oneshot_node_get_autorestart_delay:
|
||||
|
||||
- :ref:`float<class_float>` **oneshot_node_get_autorestart_delay** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_oneshot_node_get_autorestart_random_delay:
|
||||
|
||||
- :ref:`float<class_float>` **oneshot_node_get_autorestart_random_delay** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_oneshot_node_start:
|
||||
|
||||
- void **oneshot_node_start** **(** :ref:`String<class_string>` id **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_oneshot_node_stop:
|
||||
|
||||
- void **oneshot_node_stop** **(** :ref:`String<class_string>` id **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_oneshot_node_is_active:
|
||||
|
||||
- :ref:`bool<class_bool>` **oneshot_node_is_active** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_oneshot_node_set_filter_path:
|
||||
|
||||
- void **oneshot_node_set_filter_path** **(** :ref:`String<class_string>` id, :ref:`NodePath<class_nodepath>` path, :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_mix_node_set_amount:
|
||||
|
||||
- void **mix_node_set_amount** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` ratio **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_mix_node_get_amount:
|
||||
|
||||
- :ref:`float<class_float>` **mix_node_get_amount** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_blend2_node_set_amount:
|
||||
|
||||
- void **blend2_node_set_amount** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` blend **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_blend2_node_get_amount:
|
||||
|
||||
- :ref:`float<class_float>` **blend2_node_get_amount** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_blend2_node_set_filter_path:
|
||||
|
||||
- void **blend2_node_set_filter_path** **(** :ref:`String<class_string>` id, :ref:`NodePath<class_nodepath>` path, :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_blend3_node_set_amount:
|
||||
|
||||
- void **blend3_node_set_amount** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` blend **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_blend3_node_get_amount:
|
||||
|
||||
- :ref:`float<class_float>` **blend3_node_get_amount** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_blend4_node_set_amount:
|
||||
|
||||
- void **blend4_node_set_amount** **(** :ref:`String<class_string>` id, :ref:`Vector2<class_vector2>` blend **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_blend4_node_get_amount:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **blend4_node_get_amount** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_timescale_node_set_scale:
|
||||
|
||||
- void **timescale_node_set_scale** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` scale **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_timescale_node_get_scale:
|
||||
|
||||
- :ref:`float<class_float>` **timescale_node_get_scale** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_timeseek_node_seek:
|
||||
|
||||
- void **timeseek_node_seek** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` pos_sec **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_transition_node_set_input_count:
|
||||
|
||||
- void **transition_node_set_input_count** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` count **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_transition_node_get_input_count:
|
||||
|
||||
- :ref:`int<class_int>` **transition_node_get_input_count** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_transition_node_delete_input:
|
||||
|
||||
- void **transition_node_delete_input** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_transition_node_set_input_auto_advance:
|
||||
|
||||
- void **transition_node_set_input_auto_advance** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx, :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_transition_node_has_input_auto_advance:
|
||||
|
||||
- :ref:`bool<class_bool>` **transition_node_has_input_auto_advance** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_transition_node_set_xfade_time:
|
||||
|
||||
- void **transition_node_set_xfade_time** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` time_sec **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_transition_node_get_xfade_time:
|
||||
|
||||
- :ref:`float<class_float>` **transition_node_get_xfade_time** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_transition_node_set_current:
|
||||
|
||||
- void **transition_node_set_current** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_transition_node_get_current:
|
||||
|
||||
- :ref:`int<class_int>` **transition_node_get_current** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_node_set_pos:
|
||||
|
||||
- void **node_set_pos** **(** :ref:`String<class_string>` id, :ref:`Vector2<class_vector2>` screen_pos **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_node_get_pos:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **node_get_pos** **(** :ref:`String<class_string>` id **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_remove_node:
|
||||
|
||||
- void **remove_node** **(** :ref:`String<class_string>` id **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_connect:
|
||||
|
||||
- :ref:`int<class_int>` **connect** **(** :ref:`String<class_string>` id, :ref:`String<class_string>` dst_id, :ref:`int<class_int>` dst_input_idx **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_is_connected:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_connected** **(** :ref:`String<class_string>` id, :ref:`String<class_string>` dst_id, :ref:`int<class_int>` dst_input_idx **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_disconnect:
|
||||
|
||||
- void **disconnect** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` dst_input_idx **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_set_active:
|
||||
|
||||
- void **set_active** **(** :ref:`bool<class_bool>` enabled **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_is_active:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_active** **(** **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_set_base_path:
|
||||
|
||||
- void **set_base_path** **(** :ref:`NodePath<class_nodepath>` path **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_get_base_path:
|
||||
|
||||
- :ref:`NodePath<class_nodepath>` **get_base_path** **(** **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_set_master_player:
|
||||
|
||||
- void **set_master_player** **(** :ref:`NodePath<class_nodepath>` nodepath **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_get_master_player:
|
||||
|
||||
- :ref:`NodePath<class_nodepath>` **get_master_player** **(** **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_get_node_list:
|
||||
|
||||
- :ref:`StringArray<class_stringarray>` **get_node_list** **(** **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_set_animation_process_mode:
|
||||
|
||||
- void **set_animation_process_mode** **(** :ref:`int<class_int>` mode **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_get_animation_process_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_animation_process_mode** **(** **)** const
|
||||
|
||||
.. _class_AnimationTreePlayer_advance:
|
||||
|
||||
- void **advance** **(** :ref:`float<class_float>` delta **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_reset:
|
||||
|
||||
- void **reset** **(** **)**
|
||||
|
||||
.. _class_AnimationTreePlayer_recompute_caches:
|
||||
|
||||
- void **recompute_caches** **(** **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
.. _class_Area:
|
||||
|
||||
Area
|
||||
====
|
||||
|
||||
Inherits: :ref:`CollisionObject<class_collisionobject>`
|
||||
-------------------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_space_override_mode<class_Area_set_space_override_mode>` **(** :ref:`int<class_int>` enable **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_space_override_mode<class_Area_get_space_override_mode>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_gravity_is_point<class_Area_set_gravity_is_point>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_gravity_a_point<class_Area_is_gravity_a_point>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_gravity_distance_scale<class_Area_set_gravity_distance_scale>` **(** :ref:`float<class_float>` distance_scale **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_gravity_distance_scale<class_Area_get_gravity_distance_scale>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_gravity_vector<class_Area_set_gravity_vector>` **(** :ref:`Vector3<class_vector3>` vector **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_gravity_vector<class_Area_get_gravity_vector>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_gravity<class_Area_set_gravity>` **(** :ref:`float<class_float>` gravity **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_gravity<class_Area_get_gravity>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_angular_damp<class_Area_set_angular_damp>` **(** :ref:`float<class_float>` angular_damp **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_angular_damp<class_Area_get_angular_damp>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_linear_damp<class_Area_set_linear_damp>` **(** :ref:`float<class_float>` linear_damp **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_linear_damp<class_Area_get_linear_damp>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_priority<class_Area_set_priority>` **(** :ref:`float<class_float>` priority **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_priority<class_Area_get_priority>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_monitorable<class_Area_set_monitorable>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_monitorable<class_Area_is_monitorable>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_enable_monitoring<class_Area_set_enable_monitoring>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_monitoring_enabled<class_Area_is_monitoring_enabled>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`get_overlapping_bodies<class_Area_get_overlapping_bodies>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`get_overlapping_areas<class_Area_get_overlapping_areas>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PhysicsBody<class_physicsbody>` | :ref:`overlaps_body<class_Area_overlaps_body>` **(** :ref:`Object<class_object>` body **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Area<class_area>` | :ref:`overlaps_area<class_Area_overlaps_area>` **(** :ref:`Object<class_object>` area **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **body_enter** **(** :ref:`Object<class_object>` body **)**
|
||||
- **body_enter_shape** **(** :ref:`int<class_int>` body_id, :ref:`Object<class_object>` body, :ref:`int<class_int>` body_shape, :ref:`int<class_int>` area_shape **)**
|
||||
- **area_enter** **(** :ref:`Object<class_object>` area **)**
|
||||
- **area_enter_shape** **(** :ref:`int<class_int>` area_id, :ref:`Object<class_object>` area, :ref:`int<class_int>` area_shape, :ref:`int<class_int>` area_shape **)**
|
||||
- **body_exit** **(** :ref:`Object<class_object>` body **)**
|
||||
- **body_exit_shape** **(** :ref:`int<class_int>` body_id, :ref:`Object<class_object>` body, :ref:`int<class_int>` body_shape, :ref:`int<class_int>` area_shape **)**
|
||||
- **area_exit** **(** :ref:`Object<class_object>` area **)**
|
||||
- **area_exit_shape** **(** :ref:`int<class_int>` area_id, :ref:`Object<class_object>` area, :ref:`int<class_int>` area_shape, :ref:`int<class_int>` area_shape **)**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Area_set_space_override_mode:
|
||||
|
||||
- void **set_space_override_mode** **(** :ref:`int<class_int>` enable **)**
|
||||
|
||||
Set the space override mode. This mode controls how an area affects gravity and damp.
|
||||
|
||||
AREA_SPACE_OVERRIDE_DISABLED: This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
|
||||
|
||||
AREA_SPACE_OVERRIDE_COMBINE: This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
|
||||
|
||||
AREA_SPACE_OVERRIDE_COMBINE_REPLACE: This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
|
||||
|
||||
AREA_SPACE_OVERRIDE_REPLACE: This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
|
||||
|
||||
AREA_SPACE_OVERRIDE_REPLACE_COMBINE: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
|
||||
|
||||
.. _class_Area_get_space_override_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_space_override_mode** **(** **)** const
|
||||
|
||||
.. _class_Area_set_gravity_is_point:
|
||||
|
||||
- void **set_gravity_is_point** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
.. _class_Area_is_gravity_a_point:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_gravity_a_point** **(** **)** const
|
||||
|
||||
.. _class_Area_set_gravity_distance_scale:
|
||||
|
||||
- void **set_gravity_distance_scale** **(** :ref:`float<class_float>` distance_scale **)**
|
||||
|
||||
.. _class_Area_get_gravity_distance_scale:
|
||||
|
||||
- :ref:`float<class_float>` **get_gravity_distance_scale** **(** **)** const
|
||||
|
||||
.. _class_Area_set_gravity_vector:
|
||||
|
||||
- void **set_gravity_vector** **(** :ref:`Vector3<class_vector3>` vector **)**
|
||||
|
||||
.. _class_Area_get_gravity_vector:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **get_gravity_vector** **(** **)** const
|
||||
|
||||
.. _class_Area_set_gravity:
|
||||
|
||||
- void **set_gravity** **(** :ref:`float<class_float>` gravity **)**
|
||||
|
||||
.. _class_Area_get_gravity:
|
||||
|
||||
- :ref:`float<class_float>` **get_gravity** **(** **)** const
|
||||
|
||||
.. _class_Area_set_angular_damp:
|
||||
|
||||
- void **set_angular_damp** **(** :ref:`float<class_float>` angular_damp **)**
|
||||
|
||||
.. _class_Area_get_angular_damp:
|
||||
|
||||
- :ref:`float<class_float>` **get_angular_damp** **(** **)** const
|
||||
|
||||
.. _class_Area_set_linear_damp:
|
||||
|
||||
- void **set_linear_damp** **(** :ref:`float<class_float>` linear_damp **)**
|
||||
|
||||
.. _class_Area_get_linear_damp:
|
||||
|
||||
- :ref:`float<class_float>` **get_linear_damp** **(** **)** const
|
||||
|
||||
.. _class_Area_set_priority:
|
||||
|
||||
- void **set_priority** **(** :ref:`float<class_float>` priority **)**
|
||||
|
||||
.. _class_Area_get_priority:
|
||||
|
||||
- :ref:`float<class_float>` **get_priority** **(** **)** const
|
||||
|
||||
.. _class_Area_set_monitorable:
|
||||
|
||||
- void **set_monitorable** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
.. _class_Area_is_monitorable:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_monitorable** **(** **)** const
|
||||
|
||||
.. _class_Area_set_enable_monitoring:
|
||||
|
||||
- void **set_enable_monitoring** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
.. _class_Area_is_monitoring_enabled:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_monitoring_enabled** **(** **)** const
|
||||
|
||||
.. _class_Area_get_overlapping_bodies:
|
||||
|
||||
- :ref:`Array<class_array>` **get_overlapping_bodies** **(** **)** const
|
||||
|
||||
.. _class_Area_get_overlapping_areas:
|
||||
|
||||
- :ref:`Array<class_array>` **get_overlapping_areas** **(** **)** const
|
||||
|
||||
.. _class_Area_overlaps_body:
|
||||
|
||||
- :ref:`PhysicsBody<class_physicsbody>` **overlaps_body** **(** :ref:`Object<class_object>` body **)** const
|
||||
|
||||
.. _class_Area_overlaps_area:
|
||||
|
||||
- :ref:`Area<class_area>` **overlaps_area** **(** :ref:`Object<class_object>` area **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,322 @@
|
||||
.. _class_Area2D:
|
||||
|
||||
Area2D
|
||||
======
|
||||
|
||||
Inherits: :ref:`CollisionObject2D<class_collisionobject2d>`
|
||||
-----------------------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
General purpose area detection and influence for 2D physics.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_space_override_mode<class_Area2D_set_space_override_mode>` **(** :ref:`int<class_int>` enable **)** |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_space_override_mode<class_Area2D_get_space_override_mode>` **(** **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_gravity_is_point<class_Area2D_set_gravity_is_point>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_gravity_a_point<class_Area2D_is_gravity_a_point>` **(** **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_gravity_distance_scale<class_Area2D_set_gravity_distance_scale>` **(** :ref:`float<class_float>` distance_scale **)** |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_gravity_distance_scale<class_Area2D_get_gravity_distance_scale>` **(** **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_gravity_vector<class_Area2D_set_gravity_vector>` **(** :ref:`Vector2<class_vector2>` vector **)** |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_gravity_vector<class_Area2D_get_gravity_vector>` **(** **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_gravity<class_Area2D_set_gravity>` **(** :ref:`float<class_float>` gravity **)** |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_gravity<class_Area2D_get_gravity>` **(** **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_linear_damp<class_Area2D_set_linear_damp>` **(** :ref:`float<class_float>` linear_damp **)** |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_linear_damp<class_Area2D_get_linear_damp>` **(** **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_angular_damp<class_Area2D_set_angular_damp>` **(** :ref:`float<class_float>` angular_damp **)** |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_angular_damp<class_Area2D_get_angular_damp>` **(** **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_priority<class_Area2D_set_priority>` **(** :ref:`float<class_float>` priority **)** |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_priority<class_Area2D_get_priority>` **(** **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_collision_mask<class_Area2D_set_collision_mask>` **(** :ref:`int<class_int>` collision_mask **)** |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_collision_mask<class_Area2D_get_collision_mask>` **(** **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_layer_mask<class_Area2D_set_layer_mask>` **(** :ref:`int<class_int>` layer_mask **)** |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_layer_mask<class_Area2D_get_layer_mask>` **(** **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_collision_mask_bit<class_Area2D_set_collision_mask_bit>` **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)** |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_collision_mask_bit<class_Area2D_get_collision_mask_bit>` **(** :ref:`int<class_int>` bit **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_layer_mask_bit<class_Area2D_set_layer_mask_bit>` **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)** |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_layer_mask_bit<class_Area2D_get_layer_mask_bit>` **(** :ref:`int<class_int>` bit **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_enable_monitoring<class_Area2D_set_enable_monitoring>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_monitoring_enabled<class_Area2D_is_monitoring_enabled>` **(** **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_monitorable<class_Area2D_set_monitorable>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_monitorable<class_Area2D_is_monitorable>` **(** **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`get_overlapping_bodies<class_Area2D_get_overlapping_bodies>` **(** **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`get_overlapping_areas<class_Area2D_get_overlapping_areas>` **(** **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PhysicsBody2D<class_physicsbody2d>` | :ref:`overlaps_body<class_Area2D_overlaps_body>` **(** :ref:`Object<class_object>` body **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Area2D<class_area2d>` | :ref:`overlaps_area<class_Area2D_overlaps_area>` **(** :ref:`Object<class_object>` area **)** const |
|
||||
+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **body_enter** **(** :ref:`Object<class_object>` body **)**
|
||||
- **body_enter_shape** **(** :ref:`int<class_int>` body_id, :ref:`Object<class_object>` body, :ref:`int<class_int>` body_shape, :ref:`int<class_int>` area_shape **)**
|
||||
- **area_enter** **(** :ref:`Object<class_object>` area **)**
|
||||
- **area_enter_shape** **(** :ref:`int<class_int>` area_id, :ref:`Object<class_object>` area, :ref:`int<class_int>` area_shape, :ref:`int<class_int>` area_shape **)**
|
||||
- **body_exit** **(** :ref:`Object<class_object>` body **)**
|
||||
- **body_exit_shape** **(** :ref:`int<class_int>` body_id, :ref:`Object<class_object>` body, :ref:`int<class_int>` body_shape, :ref:`int<class_int>` area_shape **)**
|
||||
- **area_exit** **(** :ref:`Object<class_object>` area **)**
|
||||
- **area_exit_shape** **(** :ref:`int<class_int>` area_id, :ref:`Object<class_object>` area, :ref:`int<class_int>` area_shape, :ref:`int<class_int>` area_shape **)**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
General purpose area detection for 2D physics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). For this, use any space override different from AREA_SPACE_OVERRIDE_DISABLE and point gravity at the center of mass.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Area2D_set_space_override_mode:
|
||||
|
||||
- void **set_space_override_mode** **(** :ref:`int<class_int>` enable **)**
|
||||
|
||||
Set the space override mode. This mode controls how an area affects gravity and damp.
|
||||
|
||||
AREA_SPACE_OVERRIDE_DISABLED: This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
|
||||
|
||||
AREA_SPACE_OVERRIDE_COMBINE: This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
|
||||
|
||||
AREA_SPACE_OVERRIDE_COMBINE_REPLACE: This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
|
||||
|
||||
AREA_SPACE_OVERRIDE_REPLACE: This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
|
||||
|
||||
AREA_SPACE_OVERRIDE_REPLACE_COMBINE: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
|
||||
|
||||
.. _class_Area2D_get_space_override_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_space_override_mode** **(** **)** const
|
||||
|
||||
Return the space override mode.
|
||||
|
||||
.. _class_Area2D_set_gravity_is_point:
|
||||
|
||||
- void **set_gravity_is_point** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
When overriding space parameters, this method sets whether this area has a center of gravity. To set/get the location of the center of gravity, use :ref:`set_gravity_vector<Area2D_set_gravity_vector>`/:ref:`get_gravity_vector<Area2D_get_gravity_vector>`.
|
||||
|
||||
.. _class_Area2D_is_gravity_a_point:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_gravity_a_point** **(** **)** const
|
||||
|
||||
Return whether gravity is a point. A point gravity will attract objects towards it, as opposed to a gravity vector, which moves them in a given direction.
|
||||
|
||||
.. _class_Area2D_set_gravity_distance_scale:
|
||||
|
||||
- void **set_gravity_distance_scale** **(** :ref:`float<class_float>` distance_scale **)**
|
||||
|
||||
Set the falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance.
|
||||
|
||||
.. _class_Area2D_get_gravity_distance_scale:
|
||||
|
||||
- :ref:`float<class_float>` **get_gravity_distance_scale** **(** **)** const
|
||||
|
||||
Return the falloff factor for point gravity.
|
||||
|
||||
.. _class_Area2D_set_gravity_vector:
|
||||
|
||||
- void **set_gravity_vector** **(** :ref:`Vector2<class_vector2>` vector **)**
|
||||
|
||||
Set the gravity vector. This vector does not have to be normalized.
|
||||
|
||||
If gravity is a point (see :ref:`is_gravity_a_point<Area2D_is_gravity_a_point>`), this will be the attraction center.
|
||||
|
||||
.. _class_Area2D_get_gravity_vector:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_gravity_vector** **(** **)** const
|
||||
|
||||
Return the gravity vector. If gravity is a point (see :ref:`is_gravity_a_point<Area2D_is_gravity_a_point>`), this will be the attraction center.
|
||||
|
||||
.. _class_Area2D_set_gravity:
|
||||
|
||||
- void **set_gravity** **(** :ref:`float<class_float>` gravity **)**
|
||||
|
||||
Set the gravity intensity. This is useful to alter the force of gravity without altering its direction.
|
||||
|
||||
This value multiplies the gravity vector, whether it is the given vector (:ref:`set_gravity_vector<Area2D_set_gravity_vector>`), or a calculated one (when using a center of gravity).
|
||||
|
||||
.. _class_Area2D_get_gravity:
|
||||
|
||||
- :ref:`float<class_float>` **get_gravity** **(** **)** const
|
||||
|
||||
Return the gravity intensity.
|
||||
|
||||
.. _class_Area2D_set_linear_damp:
|
||||
|
||||
- void **set_linear_damp** **(** :ref:`float<class_float>` linear_damp **)**
|
||||
|
||||
Set the rate at which objects stop moving in this area, if there are not any other forces moving it. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
|
||||
|
||||
In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
|
||||
|
||||
.. _class_Area2D_get_linear_damp:
|
||||
|
||||
- :ref:`float<class_float>` **get_linear_damp** **(** **)** const
|
||||
|
||||
Return the linear damp rate.
|
||||
|
||||
.. _class_Area2D_set_angular_damp:
|
||||
|
||||
- void **set_angular_damp** **(** :ref:`float<class_float>` angular_damp **)**
|
||||
|
||||
Set the rate at which objects stop spinning in this area, if there are not any other forces making it spin. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
|
||||
|
||||
In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
|
||||
|
||||
.. _class_Area2D_get_angular_damp:
|
||||
|
||||
- :ref:`float<class_float>` **get_angular_damp** **(** **)** const
|
||||
|
||||
Return the angular damp rate.
|
||||
|
||||
.. _class_Area2D_set_priority:
|
||||
|
||||
- void **set_priority** **(** :ref:`float<class_float>` priority **)**
|
||||
|
||||
Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have an space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent.
|
||||
|
||||
Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important.
|
||||
|
||||
.. _class_Area2D_get_priority:
|
||||
|
||||
- :ref:`float<class_float>` **get_priority** **(** **)** const
|
||||
|
||||
Return the processing order of this area.
|
||||
|
||||
.. _class_Area2D_set_collision_mask:
|
||||
|
||||
- void **set_collision_mask** **(** :ref:`int<class_int>` collision_mask **)**
|
||||
|
||||
Set the physics layers this area can scan for collisions.
|
||||
|
||||
.. _class_Area2D_get_collision_mask:
|
||||
|
||||
- :ref:`int<class_int>` **get_collision_mask** **(** **)** const
|
||||
|
||||
Return the physics layers this area can scan for collisions.
|
||||
|
||||
.. _class_Area2D_set_layer_mask:
|
||||
|
||||
- void **set_layer_mask** **(** :ref:`int<class_int>` layer_mask **)**
|
||||
|
||||
Set the physics layers this area is in.
|
||||
|
||||
Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using :ref:`set_collision_mask<Area2D_set_collision_mask>`.
|
||||
|
||||
A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
|
||||
|
||||
.. _class_Area2D_get_layer_mask:
|
||||
|
||||
- :ref:`int<class_int>` **get_layer_mask** **(** **)** const
|
||||
|
||||
Return the physics layer this area is in.
|
||||
|
||||
.. _class_Area2D_set_collision_mask_bit:
|
||||
|
||||
- void **set_collision_mask_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
|
||||
|
||||
Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
|
||||
|
||||
.. _class_Area2D_get_collision_mask_bit:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_collision_mask_bit** **(** :ref:`int<class_int>` bit **)** const
|
||||
|
||||
Return an individual bit on the collision mask.
|
||||
|
||||
.. _class_Area2D_set_layer_mask_bit:
|
||||
|
||||
- void **set_layer_mask_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
|
||||
|
||||
Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier.
|
||||
|
||||
.. _class_Area2D_get_layer_mask_bit:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_layer_mask_bit** **(** :ref:`int<class_int>` bit **)** const
|
||||
|
||||
Return an individual bit on the layer mask.
|
||||
|
||||
.. _class_Area2D_set_enable_monitoring:
|
||||
|
||||
- void **set_enable_monitoring** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
Set whether this area can detect bodies/areas entering/exiting it.
|
||||
|
||||
.. _class_Area2D_is_monitoring_enabled:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_monitoring_enabled** **(** **)** const
|
||||
|
||||
Return whether this area detects bodies/areas entering/exiting it.
|
||||
|
||||
.. _class_Area2D_set_monitorable:
|
||||
|
||||
- void **set_monitorable** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
Set whether this area can be detected by other, monitoring, areas. Only areas need to be marked as monitorable. Bodies are always so.
|
||||
|
||||
.. _class_Area2D_is_monitorable:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_monitorable** **(** **)** const
|
||||
|
||||
Set whether this area can be detected by other, monitoring, areas.
|
||||
|
||||
.. _class_Area2D_get_overlapping_bodies:
|
||||
|
||||
- :ref:`Array<class_array>` **get_overlapping_bodies** **(** **)** const
|
||||
|
||||
Return a list of the bodies (:ref:`PhysicsBody2D<class_physicsbody2d>`) that are totally or partially inside this area.
|
||||
|
||||
.. _class_Area2D_get_overlapping_areas:
|
||||
|
||||
- :ref:`Array<class_array>` **get_overlapping_areas** **(** **)** const
|
||||
|
||||
Return a list of the areas that are totally or partially inside this area.
|
||||
|
||||
.. _class_Area2D_overlaps_body:
|
||||
|
||||
- :ref:`PhysicsBody2D<class_physicsbody2d>` **overlaps_body** **(** :ref:`Object<class_object>` body **)** const
|
||||
|
||||
Return whether the body passed is totally or partially inside this area.
|
||||
|
||||
.. _class_Area2D_overlaps_area:
|
||||
|
||||
- :ref:`Area2D<class_area2d>` **overlaps_area** **(** :ref:`Object<class_object>` area **)** const
|
||||
|
||||
Return whether the area passed is totally or partially inside this area.
|
||||
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
.. _class_Array:
|
||||
|
||||
Array
|
||||
=====
|
||||
|
||||
Category: Built-In Types
|
||||
------------------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Generic array datatype.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`append<class_Array_append>` **(** var value **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear<class_Array_clear>` **(** **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`empty<class_Array_empty>` **(** **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`erase<class_Array_erase>` **(** var value **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`find<class_Array_find>` **(** var value **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`hash<class_Array_hash>` **(** **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`insert<class_Array_insert>` **(** :ref:`int<class_int>` pos, var value **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`invert<class_Array_invert>` **(** **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_shared<class_Array_is_shared>` **(** **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`pop_back<class_Array_pop_back>` **(** **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`pop_front<class_Array_pop_front>` **(** **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`push_back<class_Array_push_back>` **(** var value **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`push_front<class_Array_push_front>` **(** var value **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove<class_Array_remove>` **(** :ref:`int<class_int>` pos **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`resize<class_Array_resize>` **(** :ref:`int<class_int>` pos **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`size<class_Array_size>` **(** **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`sort<class_Array_sort>` **(** **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`sort_custom<class_Array_sort_custom>` **(** :ref:`Object<class_object>` obj, :ref:`String<class_string>` func **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`Array<class_Array_Array>` **(** :ref:`RawArray<class_rawarray>` from **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`Array<class_Array_Array>` **(** :ref:`IntArray<class_intarray>` from **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`Array<class_Array_Array>` **(** :ref:`RealArray<class_realarray>` from **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`Array<class_Array_Array>` **(** :ref:`StringArray<class_stringarray>` from **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`Array<class_Array_Array>` **(** :ref:`Vector2Array<class_vector2array>` from **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`Array<class_Array_Array>` **(** :ref:`Vector3Array<class_vector3array>` from **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`Array<class_Array_Array>` **(** :ref:`ColorArray<class_colorarray>` from **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Generic array, contains several elements of any type, accessible by numerical index starting at 0. Arrays are always passed by reference.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Array_append:
|
||||
|
||||
- void **append** **(** var value **)**
|
||||
|
||||
Append an element at the end of the array (alias of :ref:`push_back<Array_push_back>`).
|
||||
|
||||
.. _class_Array_clear:
|
||||
|
||||
- void **clear** **(** **)**
|
||||
|
||||
Clear the array (resize to 0).
|
||||
|
||||
.. _class_Array_empty:
|
||||
|
||||
- :ref:`bool<class_bool>` **empty** **(** **)**
|
||||
|
||||
Return true if the array is empty (size==0).
|
||||
|
||||
.. _class_Array_erase:
|
||||
|
||||
- void **erase** **(** var value **)**
|
||||
|
||||
Remove the first occurence of a value from the array.
|
||||
|
||||
.. _class_Array_find:
|
||||
|
||||
- :ref:`int<class_int>` **find** **(** var value **)**
|
||||
|
||||
Searches the array for a value and returns its index or -1 if not found.
|
||||
|
||||
.. _class_Array_hash:
|
||||
|
||||
- :ref:`int<class_int>` **hash** **(** **)**
|
||||
|
||||
Return a hashed integer value representing the array contents.
|
||||
|
||||
.. _class_Array_insert:
|
||||
|
||||
- void **insert** **(** :ref:`int<class_int>` pos, var value **)**
|
||||
|
||||
Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
|
||||
|
||||
.. _class_Array_invert:
|
||||
|
||||
- void **invert** **(** **)**
|
||||
|
||||
Reverse the order of the elements in the array (so first element will now be the last).
|
||||
|
||||
.. _class_Array_is_shared:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_shared** **(** **)**
|
||||
|
||||
Get whether this is a shared array instance.
|
||||
|
||||
.. _class_Array_pop_back:
|
||||
|
||||
- void **pop_back** **(** **)**
|
||||
|
||||
.. _class_Array_pop_front:
|
||||
|
||||
- void **pop_front** **(** **)**
|
||||
|
||||
.. _class_Array_push_back:
|
||||
|
||||
- void **push_back** **(** var value **)**
|
||||
|
||||
Append an element at the end of the array.
|
||||
|
||||
.. _class_Array_push_front:
|
||||
|
||||
- void **push_front** **(** var value **)**
|
||||
|
||||
.. _class_Array_remove:
|
||||
|
||||
- void **remove** **(** :ref:`int<class_int>` pos **)**
|
||||
|
||||
Remove an element from the array by index.
|
||||
|
||||
.. _class_Array_resize:
|
||||
|
||||
- void **resize** **(** :ref:`int<class_int>` pos **)**
|
||||
|
||||
Resize the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null.
|
||||
|
||||
.. _class_Array_size:
|
||||
|
||||
- :ref:`int<class_int>` **size** **(** **)**
|
||||
|
||||
Return the amount of elements in the array.
|
||||
|
||||
.. _class_Array_sort:
|
||||
|
||||
- void **sort** **(** **)**
|
||||
|
||||
Sort the array using natural order.
|
||||
|
||||
.. _class_Array_sort_custom:
|
||||
|
||||
- void **sort_custom** **(** :ref:`Object<class_object>` obj, :ref:`String<class_string>` func **)**
|
||||
|
||||
Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise.
|
||||
|
||||
.. _class_Array_Array:
|
||||
|
||||
- :ref:`Array<class_array>` **Array** **(** :ref:`RawArray<class_rawarray>` from **)**
|
||||
|
||||
Construct an array from a :ref:`RawArray<class_rawarray>`.
|
||||
|
||||
.. _class_Array_Array:
|
||||
|
||||
- :ref:`Array<class_array>` **Array** **(** :ref:`IntArray<class_intarray>` from **)**
|
||||
|
||||
Construct an array from a :ref:`RawArray<class_rawarray>`.
|
||||
|
||||
.. _class_Array_Array:
|
||||
|
||||
- :ref:`Array<class_array>` **Array** **(** :ref:`RealArray<class_realarray>` from **)**
|
||||
|
||||
Construct an array from a :ref:`RawArray<class_rawarray>`.
|
||||
|
||||
.. _class_Array_Array:
|
||||
|
||||
- :ref:`Array<class_array>` **Array** **(** :ref:`StringArray<class_stringarray>` from **)**
|
||||
|
||||
Construct an array from a :ref:`RawArray<class_rawarray>`.
|
||||
|
||||
.. _class_Array_Array:
|
||||
|
||||
- :ref:`Array<class_array>` **Array** **(** :ref:`Vector2Array<class_vector2array>` from **)**
|
||||
|
||||
Construct an array from a :ref:`RawArray<class_rawarray>`.
|
||||
|
||||
.. _class_Array_Array:
|
||||
|
||||
- :ref:`Array<class_array>` **Array** **(** :ref:`Vector3Array<class_vector3array>` from **)**
|
||||
|
||||
Construct an array from a :ref:`RawArray<class_rawarray>`.
|
||||
|
||||
.. _class_Array_Array:
|
||||
|
||||
- :ref:`Array<class_array>` **Array** **(** :ref:`ColorArray<class_colorarray>` from **)**
|
||||
|
||||
Construct an array from a :ref:`RawArray<class_rawarray>`.
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
.. _class_AtlasTexture:
|
||||
|
||||
AtlasTexture
|
||||
============
|
||||
|
||||
Inherits: :ref:`Texture<class_texture>`
|
||||
---------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_atlas<class_AtlasTexture_set_atlas>` **(** :ref:`Texture<class_texture>` atlas **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Texture<class_texture>` | :ref:`get_atlas<class_AtlasTexture_get_atlas>` **(** **)** const |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_region<class_AtlasTexture_set_region>` **(** :ref:`Rect2<class_rect2>` region **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Rect2<class_rect2>` | :ref:`get_region<class_AtlasTexture_get_region>` **(** **)** const |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_margin<class_AtlasTexture_set_margin>` **(** :ref:`Rect2<class_rect2>` margin **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Rect2<class_rect2>` | :ref:`get_margin<class_AtlasTexture_get_margin>` **(** **)** const |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_AtlasTexture_set_atlas:
|
||||
|
||||
- void **set_atlas** **(** :ref:`Texture<class_texture>` atlas **)**
|
||||
|
||||
.. _class_AtlasTexture_get_atlas:
|
||||
|
||||
- :ref:`Texture<class_texture>` **get_atlas** **(** **)** const
|
||||
|
||||
.. _class_AtlasTexture_set_region:
|
||||
|
||||
- void **set_region** **(** :ref:`Rect2<class_rect2>` region **)**
|
||||
|
||||
.. _class_AtlasTexture_get_region:
|
||||
|
||||
- :ref:`Rect2<class_rect2>` **get_region** **(** **)** const
|
||||
|
||||
.. _class_AtlasTexture_set_margin:
|
||||
|
||||
- void **set_margin** **(** :ref:`Rect2<class_rect2>` margin **)**
|
||||
|
||||
.. _class_AtlasTexture_get_margin:
|
||||
|
||||
- :ref:`Rect2<class_rect2>` **get_margin** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,432 @@
|
||||
.. _class_AudioServer:
|
||||
|
||||
AudioServer
|
||||
===========
|
||||
|
||||
Inherits: :ref:`Object<class_object>`
|
||||
-------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Server interface for low level audio access.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_rid>` | :ref:`sample_create<class_AudioServer_sample_create>` **(** :ref:`int<class_int>` format, :ref:`bool<class_bool>` stereo, :ref:`int<class_int>` length **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`sample_set_description<class_AudioServer_sample_set_description>` **(** :ref:`RID<class_rid>` sample, :ref:`String<class_string>` description **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`sample_get_description<class_AudioServer_sample_get_description>` **(** :ref:`RID<class_rid>` sample **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`sample_get_format<class_AudioServer_sample_get_format>` **(** :ref:`RID<class_rid>` sample **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`sample_is_stereo<class_AudioServer_sample_is_stereo>` **(** :ref:`RID<class_rid>` sample **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`sample_get_length<class_AudioServer_sample_get_length>` **(** :ref:`RID<class_rid>` sample **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`sample_set_signed_data<class_AudioServer_sample_set_signed_data>` **(** :ref:`RID<class_rid>` sample, :ref:`RealArray<class_realarray>` data **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`sample_set_data<class_AudioServer_sample_set_data>` **(** :ref:`RID<class_rid>` sample, :ref:`RawArray<class_rawarray>` data **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RawArray<class_rawarray>` | :ref:`sample_get_data<class_AudioServer_sample_get_data>` **(** :ref:`RID<class_rid>` sample **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`sample_set_mix_rate<class_AudioServer_sample_set_mix_rate>` **(** :ref:`RID<class_rid>` sample, :ref:`int<class_int>` mix_rate **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`sample_get_mix_rate<class_AudioServer_sample_get_mix_rate>` **(** :ref:`RID<class_rid>` sample **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`sample_set_loop_format<class_AudioServer_sample_set_loop_format>` **(** :ref:`RID<class_rid>` sample, :ref:`int<class_int>` loop_format **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`sample_get_loop_format<class_AudioServer_sample_get_loop_format>` **(** :ref:`RID<class_rid>` sample **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`sample_set_loop_begin<class_AudioServer_sample_set_loop_begin>` **(** :ref:`RID<class_rid>` sample, :ref:`int<class_int>` pos **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`sample_get_loop_begin<class_AudioServer_sample_get_loop_begin>` **(** :ref:`RID<class_rid>` sample **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`sample_set_loop_end<class_AudioServer_sample_set_loop_end>` **(** :ref:`RID<class_rid>` sample, :ref:`int<class_int>` pos **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`sample_get_loop_end<class_AudioServer_sample_get_loop_end>` **(** :ref:`RID<class_rid>` sample **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_rid>` | :ref:`voice_create<class_AudioServer_voice_create>` **(** **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`voice_play<class_AudioServer_voice_play>` **(** :ref:`RID<class_rid>` voice, :ref:`RID<class_rid>` sample **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`voice_set_volume<class_AudioServer_voice_set_volume>` **(** :ref:`RID<class_rid>` voice, :ref:`float<class_float>` volume **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`voice_set_pan<class_AudioServer_voice_set_pan>` **(** :ref:`RID<class_rid>` voice, :ref:`float<class_float>` pan, :ref:`float<class_float>` depth=0, :ref:`float<class_float>` height=0 **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`voice_set_filter<class_AudioServer_voice_set_filter>` **(** :ref:`RID<class_rid>` voice, :ref:`int<class_int>` type, :ref:`float<class_float>` cutoff, :ref:`float<class_float>` resonance, :ref:`float<class_float>` gain=0 **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`voice_set_chorus<class_AudioServer_voice_set_chorus>` **(** :ref:`RID<class_rid>` voice, :ref:`float<class_float>` chorus **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`voice_set_reverb<class_AudioServer_voice_set_reverb>` **(** :ref:`RID<class_rid>` voice, :ref:`int<class_int>` room, :ref:`float<class_float>` reverb **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`voice_set_mix_rate<class_AudioServer_voice_set_mix_rate>` **(** :ref:`RID<class_rid>` voice, :ref:`int<class_int>` rate **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`voice_set_positional<class_AudioServer_voice_set_positional>` **(** :ref:`RID<class_rid>` voice, :ref:`bool<class_bool>` enabled **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`voice_get_volume<class_AudioServer_voice_get_volume>` **(** :ref:`RID<class_rid>` voice **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`voice_get_pan<class_AudioServer_voice_get_pan>` **(** :ref:`RID<class_rid>` voice **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`voice_get_pan_height<class_AudioServer_voice_get_pan_height>` **(** :ref:`RID<class_rid>` voice **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`voice_get_pan_depth<class_AudioServer_voice_get_pan_depth>` **(** :ref:`RID<class_rid>` voice **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`voice_get_filter_type<class_AudioServer_voice_get_filter_type>` **(** :ref:`RID<class_rid>` voice **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`voice_get_filter_cutoff<class_AudioServer_voice_get_filter_cutoff>` **(** :ref:`RID<class_rid>` voice **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`voice_get_filter_resonance<class_AudioServer_voice_get_filter_resonance>` **(** :ref:`RID<class_rid>` voice **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`voice_get_chorus<class_AudioServer_voice_get_chorus>` **(** :ref:`RID<class_rid>` voice **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`voice_get_reverb_type<class_AudioServer_voice_get_reverb_type>` **(** :ref:`RID<class_rid>` voice **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`voice_get_reverb<class_AudioServer_voice_get_reverb>` **(** :ref:`RID<class_rid>` voice **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`voice_get_mix_rate<class_AudioServer_voice_get_mix_rate>` **(** :ref:`RID<class_rid>` voice **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`voice_is_positional<class_AudioServer_voice_is_positional>` **(** :ref:`RID<class_rid>` voice **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`voice_stop<class_AudioServer_voice_stop>` **(** :ref:`RID<class_rid>` voice **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`free_rid<class_AudioServer_free_rid>` **(** :ref:`RID<class_rid>` rid **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_stream_global_volume_scale<class_AudioServer_set_stream_global_volume_scale>` **(** :ref:`float<class_float>` scale **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_stream_global_volume_scale<class_AudioServer_get_stream_global_volume_scale>` **(** **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_fx_global_volume_scale<class_AudioServer_set_fx_global_volume_scale>` **(** :ref:`float<class_float>` scale **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_fx_global_volume_scale<class_AudioServer_get_fx_global_volume_scale>` **(** **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_event_voice_global_volume_scale<class_AudioServer_set_event_voice_global_volume_scale>` **(** :ref:`float<class_float>` scale **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_event_voice_global_volume_scale<class_AudioServer_get_event_voice_global_volume_scale>` **(** **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **SAMPLE_FORMAT_PCM8** = **0** --- Sample format is 8 bits, signed.
|
||||
- **SAMPLE_FORMAT_PCM16** = **1** --- Sample format is 16 bits, little-endian, signed.
|
||||
- **SAMPLE_FORMAT_IMA_ADPCM** = **2** --- Sample format is IMA-ADPCM compressed.
|
||||
- **SAMPLE_LOOP_NONE** = **0** --- Sample does not loop.
|
||||
- **SAMPLE_LOOP_FORWARD** = **1** --- Sample loops in forward mode.
|
||||
- **SAMPLE_LOOP_PING_PONG** = **2** --- Sample loops in a bidirectional way.
|
||||
- **FILTER_NONE** = **0** --- Filter is disabled.
|
||||
- **FILTER_LOWPASS** = **1** --- Filter is a resonant lowpass.
|
||||
- **FILTER_BANDPASS** = **2** --- Filter is a resonant bandpass.
|
||||
- **FILTER_HIPASS** = **3** --- Filter is a resonant highpass.
|
||||
- **FILTER_NOTCH** = **4** --- Filter is a notch (band reject).
|
||||
- **FILTER_BANDLIMIT** = **6** --- Filter is a bandlimit (resonance used as highpass).
|
||||
- **REVERB_SMALL** = **0** --- Small reverb room (closet, bathroom, etc).
|
||||
- **REVERB_MEDIUM** = **1** --- Medium reverb room (living room)
|
||||
- **REVERB_LARGE** = **2** --- Large reverb room (warehouse).
|
||||
- **REVERB_HALL** = **3** --- Large reverb room with long decay.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
AudioServer is a low level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_AudioServer_sample_create:
|
||||
|
||||
- :ref:`RID<class_rid>` **sample_create** **(** :ref:`int<class_int>` format, :ref:`bool<class_bool>` stereo, :ref:`int<class_int>` length **)**
|
||||
|
||||
Create an audio sample, return a :ref:`RID<class_rid>` referencing it. The sample will be created with a given format (from the SAMPLE_FORMAT_* enum), a total length (in samples, not bytes), in either stereo or mono.
|
||||
|
||||
Even if a stereo sample consists of a left sample and a right sample, it still counts as one sample for length purposes.
|
||||
|
||||
.. _class_AudioServer_sample_set_description:
|
||||
|
||||
- void **sample_set_description** **(** :ref:`RID<class_rid>` sample, :ref:`String<class_string>` description **)**
|
||||
|
||||
Set the description of an audio sample. Mainly used for organization.
|
||||
|
||||
.. _class_AudioServer_sample_get_description:
|
||||
|
||||
- :ref:`String<class_string>` **sample_get_description** **(** :ref:`RID<class_rid>` sample **)** const
|
||||
|
||||
Return the description of an audio sample. Mainly used for organization.
|
||||
|
||||
.. _class_AudioServer_sample_get_format:
|
||||
|
||||
- :ref:`int<class_int>` **sample_get_format** **(** :ref:`RID<class_rid>` sample **)** const
|
||||
|
||||
Return the format of the audio sample, in the form of the SAMPLE_FORMAT_* enum.
|
||||
|
||||
.. _class_AudioServer_sample_is_stereo:
|
||||
|
||||
- :ref:`bool<class_bool>` **sample_is_stereo** **(** :ref:`RID<class_rid>` sample **)** const
|
||||
|
||||
Return whether the sample is stereo (2 channels).
|
||||
|
||||
.. _class_AudioServer_sample_get_length:
|
||||
|
||||
- :ref:`int<class_int>` **sample_get_length** **(** :ref:`RID<class_rid>` sample **)** const
|
||||
|
||||
Return the length in samples (not bytes) of the audio sample. Even if a stereo sample consists of a left sample and a right sample, it still counts as one sample for length purposes.
|
||||
|
||||
.. _class_AudioServer_sample_set_signed_data:
|
||||
|
||||
- void **sample_set_signed_data** **(** :ref:`RID<class_rid>` sample, :ref:`RealArray<class_realarray>` data **)**
|
||||
|
||||
Set the sample data for a given sample as an array of floats. The length must be equal to the sample lenght or an error will be produced.
|
||||
|
||||
For this method, a stereo sample is made from two samples. Thus, in case of a stereo sample, the array length must be twice the length returned by :ref:`sample_get_length<AudioServer_sample_get_length>`.
|
||||
|
||||
Trying to alter a SAMPLE_FORMAT_IMA_ADPCM sample is not supported. It will throw an error to the console, but will not alter the sample data.
|
||||
|
||||
.. _class_AudioServer_sample_set_data:
|
||||
|
||||
- void **sample_set_data** **(** :ref:`RID<class_rid>` sample, :ref:`RawArray<class_rawarray>` data **)**
|
||||
|
||||
Set the sample data for a given sample as an array of bytes. The length must be equal to the sample lenght 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<AudioServer_get_sample_length>`).
|
||||
|
||||
If the sample format is SAMPLE_FORMAT_PCM16, multiply it by 2.
|
||||
|
||||
If the sample format is SAMPLE_FORMAT_IMA_ADPCM, divide it by 2 (rounding any fraction up), then add 4.
|
||||
|
||||
If the sample is stereo (:ref:`sample_is_stereo<AudioServer_sample_is_stereo>`), multiply it by 2.
|
||||
|
||||
.. _class_AudioServer_sample_get_data:
|
||||
|
||||
- :ref:`RawArray<class_rawarray>` **sample_get_data** **(** :ref:`RID<class_rid>` sample **)** const
|
||||
|
||||
Return the sample data as an array of bytes. The length will be the expected length in bytes.
|
||||
|
||||
.. _class_AudioServer_sample_set_mix_rate:
|
||||
|
||||
- void **sample_set_mix_rate** **(** :ref:`RID<class_rid>` sample, :ref:`int<class_int>` mix_rate **)**
|
||||
|
||||
Change the default mix rate of a given sample.
|
||||
|
||||
.. _class_AudioServer_sample_get_mix_rate:
|
||||
|
||||
- :ref:`int<class_int>` **sample_get_mix_rate** **(** :ref:`RID<class_rid>` sample **)** const
|
||||
|
||||
Return the mix rate of the given sample.
|
||||
|
||||
.. _class_AudioServer_sample_set_loop_format:
|
||||
|
||||
- void **sample_set_loop_format** **(** :ref:`RID<class_rid>` sample, :ref:`int<class_int>` loop_format **)**
|
||||
|
||||
Set the loop format for a sample from the SAMPLE_LOOP_* enum. As a warning, Ping Pong loops may not be available on some hardware-mixing platforms.
|
||||
|
||||
.. _class_AudioServer_sample_get_loop_format:
|
||||
|
||||
- :ref:`int<class_int>` **sample_get_loop_format** **(** :ref:`RID<class_rid>` sample **)** const
|
||||
|
||||
Return the loop format for a sample, as a value from the SAMPLE_LOOP_* enum.
|
||||
|
||||
.. _class_AudioServer_sample_set_loop_begin:
|
||||
|
||||
- void **sample_set_loop_begin** **(** :ref:`RID<class_rid>` sample, :ref:`int<class_int>` pos **)**
|
||||
|
||||
Set the initial loop point of a sample. Only has effect if sample loop is enabled. See :ref:`sample_set_loop_format<AudioServer_sample_set_loop_format>`.
|
||||
|
||||
.. _class_AudioServer_sample_get_loop_begin:
|
||||
|
||||
- :ref:`int<class_int>` **sample_get_loop_begin** **(** :ref:`RID<class_rid>` sample **)** const
|
||||
|
||||
Return the initial loop point of a sample. Only has effect if sample loop is enabled. See :ref:`sample_set_loop_format<AudioServer_sample_set_loop_format>`.
|
||||
|
||||
.. _class_AudioServer_sample_set_loop_end:
|
||||
|
||||
- void **sample_set_loop_end** **(** :ref:`RID<class_rid>` sample, :ref:`int<class_int>` pos **)**
|
||||
|
||||
Set the final loop point of a sample. Only has effect if sample loop is enabled. See :ref:`sample_set_loop_format<AudioServer_sample_set_loop_format>`.
|
||||
|
||||
.. _class_AudioServer_sample_get_loop_end:
|
||||
|
||||
- :ref:`int<class_int>` **sample_get_loop_end** **(** :ref:`RID<class_rid>` sample **)** const
|
||||
|
||||
Return the final loop point of a sample. Only has effect if sample loop is enabled. See :ref:`sample_set_loop_format<AudioServer_sample_set_loop_format>`.
|
||||
|
||||
.. _class_AudioServer_voice_create:
|
||||
|
||||
- :ref:`RID<class_rid>` **voice_create** **(** **)**
|
||||
|
||||
Allocate a voice for playback. Voices are persistent. A voice can play a single sample at the same time. See :ref:`sample_create<AudioServer_sample_create>`.
|
||||
|
||||
.. _class_AudioServer_voice_play:
|
||||
|
||||
- void **voice_play** **(** :ref:`RID<class_rid>` voice, :ref:`RID<class_rid>` sample **)**
|
||||
|
||||
Start playback of a given voice using a given sample. If the voice was already playing it will be restarted.
|
||||
|
||||
.. _class_AudioServer_voice_set_volume:
|
||||
|
||||
- void **voice_set_volume** **(** :ref:`RID<class_rid>` voice, :ref:`float<class_float>` volume **)**
|
||||
|
||||
Change the volume of a currently playing voice. Volume is expressed as linear gain where 0.0 is mute and 1.0 is default.
|
||||
|
||||
.. _class_AudioServer_voice_set_pan:
|
||||
|
||||
- void **voice_set_pan** **(** :ref:`RID<class_rid>` voice, :ref:`float<class_float>` pan, :ref:`float<class_float>` depth=0, :ref:`float<class_float>` height=0 **)**
|
||||
|
||||
Change the pan of a currently playing voice and, optionally, the depth and height for a positional/3D sound. Panning values are expressed within the -1 to +1 range.
|
||||
|
||||
.. _class_AudioServer_voice_set_filter:
|
||||
|
||||
- void **voice_set_filter** **(** :ref:`RID<class_rid>` voice, :ref:`int<class_int>` type, :ref:`float<class_float>` cutoff, :ref:`float<class_float>` resonance, :ref:`float<class_float>` gain=0 **)**
|
||||
|
||||
Set a resonant filter post processing for the voice. Filter type is a value from the FILTER_* enum.
|
||||
|
||||
.. _class_AudioServer_voice_set_chorus:
|
||||
|
||||
- void **voice_set_chorus** **(** :ref:`RID<class_rid>` voice, :ref:`float<class_float>` chorus **)**
|
||||
|
||||
Set chorus send post processing for the voice (from 0 to 1).
|
||||
|
||||
.. _class_AudioServer_voice_set_reverb:
|
||||
|
||||
- void **voice_set_reverb** **(** :ref:`RID<class_rid>` voice, :ref:`int<class_int>` room, :ref:`float<class_float>` reverb **)**
|
||||
|
||||
Set the reverb send post processing for the voice (from 0 to 1) and the reverb type, from the REVERB_* enum.
|
||||
|
||||
.. _class_AudioServer_voice_set_mix_rate:
|
||||
|
||||
- void **voice_set_mix_rate** **(** :ref:`RID<class_rid>` voice, :ref:`int<class_int>` rate **)**
|
||||
|
||||
Set a different playback mix rate for the given voice.
|
||||
|
||||
.. _class_AudioServer_voice_set_positional:
|
||||
|
||||
- void **voice_set_positional** **(** :ref:`RID<class_rid>` voice, :ref:`bool<class_bool>` enabled **)**
|
||||
|
||||
Set wether a given voice is positional. This is only interpreted as a hint and used for backends that may support binaural encoding.
|
||||
|
||||
.. _class_AudioServer_voice_get_volume:
|
||||
|
||||
- :ref:`float<class_float>` **voice_get_volume** **(** :ref:`RID<class_rid>` voice **)** const
|
||||
|
||||
Return the current volume for a given voice.
|
||||
|
||||
.. _class_AudioServer_voice_get_pan:
|
||||
|
||||
- :ref:`float<class_float>` **voice_get_pan** **(** :ref:`RID<class_rid>` voice **)** const
|
||||
|
||||
Return the current pan for a given voice (-1 to +1 range).
|
||||
|
||||
.. _class_AudioServer_voice_get_pan_height:
|
||||
|
||||
- :ref:`float<class_float>` **voice_get_pan_height** **(** :ref:`RID<class_rid>` voice **)** const
|
||||
|
||||
Return the current pan height for a given voice (-1 to +1 range).
|
||||
|
||||
.. _class_AudioServer_voice_get_pan_depth:
|
||||
|
||||
- :ref:`float<class_float>` **voice_get_pan_depth** **(** :ref:`RID<class_rid>` voice **)** const
|
||||
|
||||
Return the current pan depth for a given voice (-1 to +1 range).
|
||||
|
||||
.. _class_AudioServer_voice_get_filter_type:
|
||||
|
||||
- :ref:`int<class_int>` **voice_get_filter_type** **(** :ref:`RID<class_rid>` voice **)** const
|
||||
|
||||
Return the current selected filter type for a given voice, from the FILTER_* enum.
|
||||
|
||||
.. _class_AudioServer_voice_get_filter_cutoff:
|
||||
|
||||
- :ref:`float<class_float>` **voice_get_filter_cutoff** **(** :ref:`RID<class_rid>` voice **)** const
|
||||
|
||||
Return the current filter cutoff (in hz) for a given voice.
|
||||
|
||||
.. _class_AudioServer_voice_get_filter_resonance:
|
||||
|
||||
- :ref:`float<class_float>` **voice_get_filter_resonance** **(** :ref:`RID<class_rid>` voice **)** const
|
||||
|
||||
Return the current filter resonance for a given voice.
|
||||
|
||||
.. _class_AudioServer_voice_get_chorus:
|
||||
|
||||
- :ref:`float<class_float>` **voice_get_chorus** **(** :ref:`RID<class_rid>` voice **)** const
|
||||
|
||||
Return the current chorus send for a given voice (0 to 1).
|
||||
|
||||
.. _class_AudioServer_voice_get_reverb_type:
|
||||
|
||||
- :ref:`int<class_int>` **voice_get_reverb_type** **(** :ref:`RID<class_rid>` voice **)** const
|
||||
|
||||
Return the current reverb type for a given voice from the REVERB_* enum.
|
||||
|
||||
.. _class_AudioServer_voice_get_reverb:
|
||||
|
||||
- :ref:`float<class_float>` **voice_get_reverb** **(** :ref:`RID<class_rid>` voice **)** const
|
||||
|
||||
Return the current reverb send for a given voice (0 to 1).
|
||||
|
||||
.. _class_AudioServer_voice_get_mix_rate:
|
||||
|
||||
- :ref:`int<class_int>` **voice_get_mix_rate** **(** :ref:`RID<class_rid>` voice **)** const
|
||||
|
||||
Return the current mix rate for a given voice.
|
||||
|
||||
.. _class_AudioServer_voice_is_positional:
|
||||
|
||||
- :ref:`bool<class_bool>` **voice_is_positional** **(** :ref:`RID<class_rid>` voice **)** const
|
||||
|
||||
Return wether the current voice is positional. See :ref:`voice_set_positional<AudioServer_voice_set_positional>`.
|
||||
|
||||
.. _class_AudioServer_voice_stop:
|
||||
|
||||
- void **voice_stop** **(** :ref:`RID<class_rid>` voice **)**
|
||||
|
||||
Stop a given voice.
|
||||
|
||||
.. _class_AudioServer_free_rid:
|
||||
|
||||
- void **free_rid** **(** :ref:`RID<class_rid>` rid **)**
|
||||
|
||||
Free a :ref:`RID<class_rid>` resource.
|
||||
|
||||
.. _class_AudioServer_set_stream_global_volume_scale:
|
||||
|
||||
- void **set_stream_global_volume_scale** **(** :ref:`float<class_float>` scale **)**
|
||||
|
||||
Set global scale for stream playback. Default is 1.0.
|
||||
|
||||
.. _class_AudioServer_get_stream_global_volume_scale:
|
||||
|
||||
- :ref:`float<class_float>` **get_stream_global_volume_scale** **(** **)** const
|
||||
|
||||
Return the global scale for stream playback.
|
||||
|
||||
.. _class_AudioServer_set_fx_global_volume_scale:
|
||||
|
||||
- void **set_fx_global_volume_scale** **(** :ref:`float<class_float>` scale **)**
|
||||
|
||||
Set global scale for all voices (not including streams). Default is 1.0.
|
||||
|
||||
.. _class_AudioServer_get_fx_global_volume_scale:
|
||||
|
||||
- :ref:`float<class_float>` **get_fx_global_volume_scale** **(** **)** const
|
||||
|
||||
Return the global scale for all voices.
|
||||
|
||||
.. _class_AudioServer_set_event_voice_global_volume_scale:
|
||||
|
||||
- void **set_event_voice_global_volume_scale** **(** :ref:`float<class_float>` scale **)**
|
||||
|
||||
Set global scale for event-based stream (:ref:`EventStream<class_eventstream>`) playback. Default is 1.0.
|
||||
|
||||
.. _class_AudioServer_get_event_voice_global_volume_scale:
|
||||
|
||||
- :ref:`float<class_float>` **get_event_voice_global_volume_scale** **(** **)** const
|
||||
|
||||
Return the global scale for event-based stream playback.
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
.. _class_AudioServerSW:
|
||||
|
||||
AudioServerSW
|
||||
=============
|
||||
|
||||
Inherits: :ref:`AudioServer<class_audioserver>`
|
||||
-----------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Software implementation of :ref:`AudioServer<class_audioserver>`.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
This is a software audio server. It does not use any kind of hardware acceleration.
|
||||
|
||||
This class does not expose any new method.
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
.. _class_AudioStream:
|
||||
|
||||
AudioStream
|
||||
===========
|
||||
|
||||
Inherits: :ref:`Resource<class_resource>`
|
||||
-----------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Base class for audio streams.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Base class for audio streams. Audio streams are used for music playback, or other types of streamed sounds that don't fit or requiere more flexibility than a :ref:`Sample<class_sample>`.
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
.. _class_AudioStreamMPC:
|
||||
|
||||
AudioStreamMPC
|
||||
==============
|
||||
|
||||
Inherits: :ref:`AudioStream<class_audiostream>`
|
||||
-----------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
MusePack audio stream driver.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
MusePack audio stream driver.
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
.. _class_AudioStreamOGGVorbis:
|
||||
|
||||
AudioStreamOGGVorbis
|
||||
====================
|
||||
|
||||
Inherits: :ref:`AudioStream<class_audiostream>`
|
||||
-----------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
OGG Vorbis audio stream driver.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
OGG Vorbis audio stream driver.
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
.. _class_AudioStreamOpus:
|
||||
|
||||
AudioStreamOpus
|
||||
===============
|
||||
|
||||
Inherits: :ref:`AudioStream<class_audiostream>`
|
||||
-----------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Opus Codec audio stream driver.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Opus Codec audio stream driver.
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
.. _class_AudioStreamPlayback:
|
||||
|
||||
AudioStreamPlayback
|
||||
===================
|
||||
|
||||
Inherits: :ref:`Reference<class_reference>`
|
||||
-------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`play<class_AudioStreamPlayback_play>` **(** :ref:`float<class_float>` from_pos_sec=0 **)** |
|
||||
+----------------------------+------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`stop<class_AudioStreamPlayback_stop>` **(** **)** |
|
||||
+----------------------------+------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_playing<class_AudioStreamPlayback_is_playing>` **(** **)** const |
|
||||
+----------------------------+------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_loop<class_AudioStreamPlayback_set_loop>` **(** :ref:`bool<class_bool>` enabled **)** |
|
||||
+----------------------------+------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_loop<class_AudioStreamPlayback_has_loop>` **(** **)** const |
|
||||
+----------------------------+------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_loop_count<class_AudioStreamPlayback_get_loop_count>` **(** **)** const |
|
||||
+----------------------------+------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`seek_pos<class_AudioStreamPlayback_seek_pos>` **(** :ref:`float<class_float>` pos **)** |
|
||||
+----------------------------+------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_pos<class_AudioStreamPlayback_get_pos>` **(** **)** const |
|
||||
+----------------------------+------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_length<class_AudioStreamPlayback_get_length>` **(** **)** const |
|
||||
+----------------------------+------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_channels<class_AudioStreamPlayback_get_channels>` **(** **)** const |
|
||||
+----------------------------+------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_mix_rate<class_AudioStreamPlayback_get_mix_rate>` **(** **)** const |
|
||||
+----------------------------+------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_minimum_buffer_size<class_AudioStreamPlayback_get_minimum_buffer_size>` **(** **)** const |
|
||||
+----------------------------+------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_AudioStreamPlayback_play:
|
||||
|
||||
- void **play** **(** :ref:`float<class_float>` from_pos_sec=0 **)**
|
||||
|
||||
.. _class_AudioStreamPlayback_stop:
|
||||
|
||||
- void **stop** **(** **)**
|
||||
|
||||
.. _class_AudioStreamPlayback_is_playing:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_playing** **(** **)** const
|
||||
|
||||
.. _class_AudioStreamPlayback_set_loop:
|
||||
|
||||
- void **set_loop** **(** :ref:`bool<class_bool>` enabled **)**
|
||||
|
||||
.. _class_AudioStreamPlayback_has_loop:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_loop** **(** **)** const
|
||||
|
||||
.. _class_AudioStreamPlayback_get_loop_count:
|
||||
|
||||
- :ref:`int<class_int>` **get_loop_count** **(** **)** const
|
||||
|
||||
.. _class_AudioStreamPlayback_seek_pos:
|
||||
|
||||
- void **seek_pos** **(** :ref:`float<class_float>` pos **)**
|
||||
|
||||
.. _class_AudioStreamPlayback_get_pos:
|
||||
|
||||
- :ref:`float<class_float>` **get_pos** **(** **)** const
|
||||
|
||||
.. _class_AudioStreamPlayback_get_length:
|
||||
|
||||
- :ref:`float<class_float>` **get_length** **(** **)** const
|
||||
|
||||
.. _class_AudioStreamPlayback_get_channels:
|
||||
|
||||
- :ref:`int<class_int>` **get_channels** **(** **)** const
|
||||
|
||||
.. _class_AudioStreamPlayback_get_mix_rate:
|
||||
|
||||
- :ref:`int<class_int>` **get_mix_rate** **(** **)** const
|
||||
|
||||
.. _class_AudioStreamPlayback_get_minimum_buffer_size:
|
||||
|
||||
- :ref:`int<class_int>` **get_minimum_buffer_size** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
.. _class_AudioStreamSpeex:
|
||||
|
||||
AudioStreamSpeex
|
||||
================
|
||||
|
||||
Inherits: :ref:`AudioStream<class_audiostream>`
|
||||
-----------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Speex audio stream driver.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Speex audio stream driver. Speex is very useful for compressed speech. It allows loading a very large amount of speech in memory at little IO/latency cost.
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
.. _class_BackBufferCopy:
|
||||
|
||||
BackBufferCopy
|
||||
==============
|
||||
|
||||
Inherits: :ref:`Node2D<class_node2d>`
|
||||
-------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+--------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_rect<class_BackBufferCopy_set_rect>` **(** :ref:`Rect2<class_rect2>` rect **)** |
|
||||
+----------------------------+--------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Rect2<class_rect2>` | :ref:`get_rect<class_BackBufferCopy_get_rect>` **(** **)** const |
|
||||
+----------------------------+--------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_copy_mode<class_BackBufferCopy_set_copy_mode>` **(** :ref:`int<class_int>` copy_mode **)** |
|
||||
+----------------------------+--------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_copy_mode<class_BackBufferCopy_get_copy_mode>` **(** **)** const |
|
||||
+----------------------------+--------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **COPY_MODE_DISABLED** = **0**
|
||||
- **COPY_MODE_RECT** = **1**
|
||||
- **COPY_MODE_VIEWPORT** = **2**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_BackBufferCopy_set_rect:
|
||||
|
||||
- void **set_rect** **(** :ref:`Rect2<class_rect2>` rect **)**
|
||||
|
||||
.. _class_BackBufferCopy_get_rect:
|
||||
|
||||
- :ref:`Rect2<class_rect2>` **get_rect** **(** **)** const
|
||||
|
||||
.. _class_BackBufferCopy_set_copy_mode:
|
||||
|
||||
- void **set_copy_mode** **(** :ref:`int<class_int>` copy_mode **)**
|
||||
|
||||
.. _class_BackBufferCopy_get_copy_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_copy_mode** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,294 @@
|
||||
.. _class_BakedLight:
|
||||
|
||||
BakedLight
|
||||
==========
|
||||
|
||||
Inherits: :ref:`Resource<class_resource>`
|
||||
-----------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_mode<class_BakedLight_set_mode>` **(** :ref:`int<class_int>` mode **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_mode<class_BakedLight_get_mode>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_octree<class_BakedLight_set_octree>` **(** :ref:`RawArray<class_rawarray>` octree **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RawArray<class_rawarray>` | :ref:`get_octree<class_BakedLight_get_octree>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_light<class_BakedLight_set_light>` **(** :ref:`RawArray<class_rawarray>` light **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RawArray<class_rawarray>` | :ref:`get_light<class_BakedLight_get_light>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_sampler_octree<class_BakedLight_set_sampler_octree>` **(** :ref:`IntArray<class_intarray>` sampler_octree **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`IntArray<class_intarray>` | :ref:`get_sampler_octree<class_BakedLight_get_sampler_octree>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_lightmap<class_BakedLight_add_lightmap>` **(** :ref:`Texture<class_texture>` texture, :ref:`Vector2<class_vector2>` gen_size **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`erase_lightmap<class_BakedLight_erase_lightmap>` **(** :ref:`int<class_int>` id **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_lightmaps<class_BakedLight_clear_lightmaps>` **(** **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_cell_subdivision<class_BakedLight_set_cell_subdivision>` **(** :ref:`int<class_int>` cell_subdivision **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_cell_subdivision<class_BakedLight_get_cell_subdivision>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_initial_lattice_subdiv<class_BakedLight_set_initial_lattice_subdiv>` **(** :ref:`int<class_int>` cell_subdivision **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_initial_lattice_subdiv<class_BakedLight_get_initial_lattice_subdiv>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_plot_size<class_BakedLight_set_plot_size>` **(** :ref:`float<class_float>` plot_size **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_plot_size<class_BakedLight_get_plot_size>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_bounces<class_BakedLight_set_bounces>` **(** :ref:`int<class_int>` bounces **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_bounces<class_BakedLight_get_bounces>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_cell_extra_margin<class_BakedLight_set_cell_extra_margin>` **(** :ref:`float<class_float>` cell_extra_margin **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_cell_extra_margin<class_BakedLight_get_cell_extra_margin>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_edge_damp<class_BakedLight_set_edge_damp>` **(** :ref:`float<class_float>` edge_damp **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_edge_damp<class_BakedLight_get_edge_damp>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_normal_damp<class_BakedLight_set_normal_damp>` **(** :ref:`float<class_float>` normal_damp **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_normal_damp<class_BakedLight_get_normal_damp>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_tint<class_BakedLight_set_tint>` **(** :ref:`float<class_float>` tint **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_tint<class_BakedLight_get_tint>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_saturation<class_BakedLight_set_saturation>` **(** :ref:`float<class_float>` saturation **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_saturation<class_BakedLight_get_saturation>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_ao_radius<class_BakedLight_set_ao_radius>` **(** :ref:`float<class_float>` ao_radius **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_ao_radius<class_BakedLight_get_ao_radius>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_ao_strength<class_BakedLight_set_ao_strength>` **(** :ref:`float<class_float>` ao_strength **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_ao_strength<class_BakedLight_get_ao_strength>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_format<class_BakedLight_set_format>` **(** :ref:`int<class_int>` format **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_format<class_BakedLight_get_format>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_transfer_lightmaps_only_to_uv2<class_BakedLight_set_transfer_lightmaps_only_to_uv2>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_transfer_lightmaps_only_to_uv2<class_BakedLight_get_transfer_lightmaps_only_to_uv2>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_energy_multiplier<class_BakedLight_set_energy_multiplier>` **(** :ref:`float<class_float>` energy_multiplier **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_energy_multiplier<class_BakedLight_get_energy_multiplier>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_gamma_adjust<class_BakedLight_set_gamma_adjust>` **(** :ref:`float<class_float>` gamma_adjust **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_gamma_adjust<class_BakedLight_get_gamma_adjust>` **(** **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_bake_flag<class_BakedLight_set_bake_flag>` **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` enabled **)** |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_bake_flag<class_BakedLight_get_bake_flag>` **(** :ref:`int<class_int>` flag **)** const |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **MODE_OCTREE** = **0**
|
||||
- **MODE_LIGHTMAPS** = **1**
|
||||
- **BAKE_DIFFUSE** = **0**
|
||||
- **BAKE_SPECULAR** = **1**
|
||||
- **BAKE_TRANSLUCENT** = **2**
|
||||
- **BAKE_CONSERVE_ENERGY** = **3**
|
||||
- **BAKE_MAX** = **5**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_BakedLight_set_mode:
|
||||
|
||||
- void **set_mode** **(** :ref:`int<class_int>` mode **)**
|
||||
|
||||
.. _class_BakedLight_get_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_mode** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_octree:
|
||||
|
||||
- void **set_octree** **(** :ref:`RawArray<class_rawarray>` octree **)**
|
||||
|
||||
.. _class_BakedLight_get_octree:
|
||||
|
||||
- :ref:`RawArray<class_rawarray>` **get_octree** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_light:
|
||||
|
||||
- void **set_light** **(** :ref:`RawArray<class_rawarray>` light **)**
|
||||
|
||||
.. _class_BakedLight_get_light:
|
||||
|
||||
- :ref:`RawArray<class_rawarray>` **get_light** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_sampler_octree:
|
||||
|
||||
- void **set_sampler_octree** **(** :ref:`IntArray<class_intarray>` sampler_octree **)**
|
||||
|
||||
.. _class_BakedLight_get_sampler_octree:
|
||||
|
||||
- :ref:`IntArray<class_intarray>` **get_sampler_octree** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_add_lightmap:
|
||||
|
||||
- void **add_lightmap** **(** :ref:`Texture<class_texture>` texture, :ref:`Vector2<class_vector2>` gen_size **)**
|
||||
|
||||
.. _class_BakedLight_erase_lightmap:
|
||||
|
||||
- void **erase_lightmap** **(** :ref:`int<class_int>` id **)**
|
||||
|
||||
.. _class_BakedLight_clear_lightmaps:
|
||||
|
||||
- void **clear_lightmaps** **(** **)**
|
||||
|
||||
.. _class_BakedLight_set_cell_subdivision:
|
||||
|
||||
- void **set_cell_subdivision** **(** :ref:`int<class_int>` cell_subdivision **)**
|
||||
|
||||
.. _class_BakedLight_get_cell_subdivision:
|
||||
|
||||
- :ref:`int<class_int>` **get_cell_subdivision** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_initial_lattice_subdiv:
|
||||
|
||||
- void **set_initial_lattice_subdiv** **(** :ref:`int<class_int>` cell_subdivision **)**
|
||||
|
||||
.. _class_BakedLight_get_initial_lattice_subdiv:
|
||||
|
||||
- :ref:`int<class_int>` **get_initial_lattice_subdiv** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_plot_size:
|
||||
|
||||
- void **set_plot_size** **(** :ref:`float<class_float>` plot_size **)**
|
||||
|
||||
.. _class_BakedLight_get_plot_size:
|
||||
|
||||
- :ref:`float<class_float>` **get_plot_size** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_bounces:
|
||||
|
||||
- void **set_bounces** **(** :ref:`int<class_int>` bounces **)**
|
||||
|
||||
.. _class_BakedLight_get_bounces:
|
||||
|
||||
- :ref:`int<class_int>` **get_bounces** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_cell_extra_margin:
|
||||
|
||||
- void **set_cell_extra_margin** **(** :ref:`float<class_float>` cell_extra_margin **)**
|
||||
|
||||
.. _class_BakedLight_get_cell_extra_margin:
|
||||
|
||||
- :ref:`float<class_float>` **get_cell_extra_margin** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_edge_damp:
|
||||
|
||||
- void **set_edge_damp** **(** :ref:`float<class_float>` edge_damp **)**
|
||||
|
||||
.. _class_BakedLight_get_edge_damp:
|
||||
|
||||
- :ref:`float<class_float>` **get_edge_damp** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_normal_damp:
|
||||
|
||||
- void **set_normal_damp** **(** :ref:`float<class_float>` normal_damp **)**
|
||||
|
||||
.. _class_BakedLight_get_normal_damp:
|
||||
|
||||
- :ref:`float<class_float>` **get_normal_damp** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_tint:
|
||||
|
||||
- void **set_tint** **(** :ref:`float<class_float>` tint **)**
|
||||
|
||||
.. _class_BakedLight_get_tint:
|
||||
|
||||
- :ref:`float<class_float>` **get_tint** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_saturation:
|
||||
|
||||
- void **set_saturation** **(** :ref:`float<class_float>` saturation **)**
|
||||
|
||||
.. _class_BakedLight_get_saturation:
|
||||
|
||||
- :ref:`float<class_float>` **get_saturation** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_ao_radius:
|
||||
|
||||
- void **set_ao_radius** **(** :ref:`float<class_float>` ao_radius **)**
|
||||
|
||||
.. _class_BakedLight_get_ao_radius:
|
||||
|
||||
- :ref:`float<class_float>` **get_ao_radius** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_ao_strength:
|
||||
|
||||
- void **set_ao_strength** **(** :ref:`float<class_float>` ao_strength **)**
|
||||
|
||||
.. _class_BakedLight_get_ao_strength:
|
||||
|
||||
- :ref:`float<class_float>` **get_ao_strength** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_format:
|
||||
|
||||
- void **set_format** **(** :ref:`int<class_int>` format **)**
|
||||
|
||||
.. _class_BakedLight_get_format:
|
||||
|
||||
- :ref:`int<class_int>` **get_format** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_transfer_lightmaps_only_to_uv2:
|
||||
|
||||
- void **set_transfer_lightmaps_only_to_uv2** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
.. _class_BakedLight_get_transfer_lightmaps_only_to_uv2:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_transfer_lightmaps_only_to_uv2** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_energy_multiplier:
|
||||
|
||||
- void **set_energy_multiplier** **(** :ref:`float<class_float>` energy_multiplier **)**
|
||||
|
||||
.. _class_BakedLight_get_energy_multiplier:
|
||||
|
||||
- :ref:`float<class_float>` **get_energy_multiplier** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_gamma_adjust:
|
||||
|
||||
- void **set_gamma_adjust** **(** :ref:`float<class_float>` gamma_adjust **)**
|
||||
|
||||
.. _class_BakedLight_get_gamma_adjust:
|
||||
|
||||
- :ref:`float<class_float>` **get_gamma_adjust** **(** **)** const
|
||||
|
||||
.. _class_BakedLight_set_bake_flag:
|
||||
|
||||
- void **set_bake_flag** **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` enabled **)**
|
||||
|
||||
.. _class_BakedLight_get_bake_flag:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_bake_flag** **(** :ref:`int<class_int>` flag **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
.. _class_BakedLightInstance:
|
||||
|
||||
BakedLightInstance
|
||||
==================
|
||||
|
||||
Inherits: :ref:`VisualInstance<class_visualinstance>`
|
||||
-----------------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_baked_light<class_BakedLightInstance_set_baked_light>` **(** :ref:`Object<class_object>` baked_light **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`get_baked_light<class_BakedLightInstance_get_baked_light>` **(** **)** const |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_rid>` | :ref:`get_baked_light_instance<class_BakedLightInstance_get_baked_light_instance>` **(** **)** const |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **baked_light_changed** **(** **)**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_BakedLightInstance_set_baked_light:
|
||||
|
||||
- void **set_baked_light** **(** :ref:`Object<class_object>` baked_light **)**
|
||||
|
||||
.. _class_BakedLightInstance_get_baked_light:
|
||||
|
||||
- :ref:`Object<class_object>` **get_baked_light** **(** **)** const
|
||||
|
||||
.. _class_BakedLightInstance_get_baked_light_instance:
|
||||
|
||||
- :ref:`RID<class_rid>` **get_baked_light_instance** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
.. _class_BakedLightSampler:
|
||||
|
||||
BakedLightSampler
|
||||
=================
|
||||
|
||||
Inherits: :ref:`VisualInstance<class_visualinstance>`
|
||||
-----------------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_param<class_BakedLightSampler_set_param>` **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)** |
|
||||
+----------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_param<class_BakedLightSampler_get_param>` **(** :ref:`int<class_int>` param **)** const |
|
||||
+----------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_resolution<class_BakedLightSampler_set_resolution>` **(** :ref:`int<class_int>` resolution **)** |
|
||||
+----------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_resolution<class_BakedLightSampler_get_resolution>` **(** **)** const |
|
||||
+----------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **PARAM_RADIUS** = **0**
|
||||
- **PARAM_STRENGTH** = **1**
|
||||
- **PARAM_ATTENUATION** = **2**
|
||||
- **PARAM_DETAIL_RATIO** = **3**
|
||||
- **PARAM_MAX** = **4**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_BakedLightSampler_set_param:
|
||||
|
||||
- void **set_param** **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)**
|
||||
|
||||
.. _class_BakedLightSampler_get_param:
|
||||
|
||||
- :ref:`float<class_float>` **get_param** **(** :ref:`int<class_int>` param **)** const
|
||||
|
||||
.. _class_BakedLightSampler_set_resolution:
|
||||
|
||||
- void **set_resolution** **(** :ref:`int<class_int>` resolution **)**
|
||||
|
||||
.. _class_BakedLightSampler_get_resolution:
|
||||
|
||||
- :ref:`int<class_int>` **get_resolution** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
.. _class_BaseButton:
|
||||
|
||||
BaseButton
|
||||
==========
|
||||
|
||||
Inherits: :ref:`Control<class_control>`
|
||||
---------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Provides a base class for different kinds of buttons.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------+-------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_pressed<class_BaseButton__pressed>` **(** **)** virtual |
|
||||
+--------------------------+-------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_toggled<class_BaseButton__toggled>` **(** :ref:`bool<class_bool>` pressed **)** virtual |
|
||||
+--------------------------+-------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_pressed<class_BaseButton_set_pressed>` **(** :ref:`bool<class_bool>` pressed **)** |
|
||||
+--------------------------+-------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_pressed<class_BaseButton_is_pressed>` **(** **)** const |
|
||||
+--------------------------+-------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_hovered<class_BaseButton_is_hovered>` **(** **)** const |
|
||||
+--------------------------+-------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_toggle_mode<class_BaseButton_set_toggle_mode>` **(** :ref:`bool<class_bool>` enabled **)** |
|
||||
+--------------------------+-------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_toggle_mode<class_BaseButton_is_toggle_mode>` **(** **)** const |
|
||||
+--------------------------+-------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_disabled<class_BaseButton_set_disabled>` **(** :ref:`bool<class_bool>` disabled **)** |
|
||||
+--------------------------+-------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_disabled<class_BaseButton_is_disabled>` **(** **)** const |
|
||||
+--------------------------+-------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_click_on_press<class_BaseButton_set_click_on_press>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+--------------------------+-------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_click_on_press<class_BaseButton_get_click_on_press>` **(** **)** const |
|
||||
+--------------------------+-------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_draw_mode<class_BaseButton_get_draw_mode>` **(** **)** const |
|
||||
+--------------------------+-------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **released** **(** **)**
|
||||
- **toggled** **(** :ref:`bool<class_bool>` pressed **)**
|
||||
- **pressed** **(** **)**
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **DRAW_NORMAL** = **0**
|
||||
- **DRAW_PRESSED** = **1**
|
||||
- **DRAW_HOVER** = **2**
|
||||
- **DRAW_DISABLED** = **3**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
BaseButton is the abstract base class for buttons, so it shouldn't be used directly (It doesnt display anything). Other types of buttons inherit from it.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_BaseButton__pressed:
|
||||
|
||||
- void **_pressed** **(** **)** virtual
|
||||
|
||||
.. _class_BaseButton__toggled:
|
||||
|
||||
- void **_toggled** **(** :ref:`bool<class_bool>` pressed **)** virtual
|
||||
|
||||
.. _class_BaseButton_set_pressed:
|
||||
|
||||
- void **set_pressed** **(** :ref:`bool<class_bool>` pressed **)**
|
||||
|
||||
Set the button to pressed state (only if toggle_mode is active).
|
||||
|
||||
.. _class_BaseButton_is_pressed:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_pressed** **(** **)** const
|
||||
|
||||
If toggle_mode is active, return whether the button is toggled. If toggle_mode is not active, return whether the button is pressed down.
|
||||
|
||||
.. _class_BaseButton_is_hovered:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_hovered** **(** **)** const
|
||||
|
||||
.. _class_BaseButton_set_toggle_mode:
|
||||
|
||||
- void **set_toggle_mode** **(** :ref:`bool<class_bool>` enabled **)**
|
||||
|
||||
Set the button toggle_mode property. Toggle mode makes the button flip state between pressed and unpressed each time its area is clicked.
|
||||
|
||||
.. _class_BaseButton_is_toggle_mode:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_toggle_mode** **(** **)** const
|
||||
|
||||
Return the toggle_mode property (see :ref:`set_toggle_mode<BaseButton_set_toggle_mode>`).
|
||||
|
||||
.. _class_BaseButton_set_disabled:
|
||||
|
||||
- void **set_disabled** **(** :ref:`bool<class_bool>` disabled **)**
|
||||
|
||||
Set the button into disabled state. When a button is disabled, it can't be clicked or toggled.
|
||||
|
||||
.. _class_BaseButton_is_disabled:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_disabled** **(** **)** const
|
||||
|
||||
Return wether the button is in disabled state (see :ref:`set_disabled<BaseButton_set_disabled>`).
|
||||
|
||||
.. _class_BaseButton_set_click_on_press:
|
||||
|
||||
- void **set_click_on_press** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
Set the button click_on_press mode. This mode generates click events when a mousebutton or key is just pressed (by default events are generated when the button/keys are released and both press and release occur in the visual area of the Button).
|
||||
|
||||
.. _class_BaseButton_get_click_on_press:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_click_on_press** **(** **)** const
|
||||
|
||||
Return the state of the click_on_press property (see :ref:`set_click_on_press<BaseButton_set_click_on_press>`).
|
||||
|
||||
.. _class_BaseButton_get_draw_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_draw_mode** **(** **)** const
|
||||
|
||||
Return the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overiding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW_* enum.
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
.. _class_BitMap:
|
||||
|
||||
BitMap
|
||||
======
|
||||
|
||||
Inherits: :ref:`Resource<class_resource>`
|
||||
-----------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`create<class_BitMap_create>` **(** :ref:`Vector2<class_vector2>` size **)** |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`create_from_image_alpha<class_BitMap_create_from_image_alpha>` **(** :ref:`Image<class_image>` image **)** |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_bit<class_BitMap_set_bit>` **(** :ref:`Vector2<class_vector2>` pos, :ref:`bool<class_bool>` bit **)** |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_bit<class_BitMap_get_bit>` **(** :ref:`Vector2<class_vector2>` pos **)** const |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_bit_rect<class_BitMap_set_bit_rect>` **(** :ref:`Rect2<class_rect2>` p_rect, :ref:`bool<class_bool>` bit **)** |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_true_bit_count<class_BitMap_get_true_bit_count>` **(** **)** const |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_size<class_BitMap_get_size>` **(** **)** const |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_BitMap_create:
|
||||
|
||||
- void **create** **(** :ref:`Vector2<class_vector2>` size **)**
|
||||
|
||||
.. _class_BitMap_create_from_image_alpha:
|
||||
|
||||
- void **create_from_image_alpha** **(** :ref:`Image<class_image>` image **)**
|
||||
|
||||
.. _class_BitMap_set_bit:
|
||||
|
||||
- void **set_bit** **(** :ref:`Vector2<class_vector2>` pos, :ref:`bool<class_bool>` bit **)**
|
||||
|
||||
.. _class_BitMap_get_bit:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_bit** **(** :ref:`Vector2<class_vector2>` pos **)** const
|
||||
|
||||
.. _class_BitMap_set_bit_rect:
|
||||
|
||||
- void **set_bit_rect** **(** :ref:`Rect2<class_rect2>` p_rect, :ref:`bool<class_bool>` bit **)**
|
||||
|
||||
.. _class_BitMap_get_true_bit_count:
|
||||
|
||||
- :ref:`int<class_int>` **get_true_bit_count** **(** **)** const
|
||||
|
||||
.. _class_BitMap_get_size:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_size** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
.. _class_BoneAttachment:
|
||||
|
||||
BoneAttachment
|
||||
==============
|
||||
|
||||
Inherits: :ref:`Spatial<class_spatial>`
|
||||
---------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
.. _class_bool:
|
||||
|
||||
bool
|
||||
====
|
||||
|
||||
Category: Built-In Types
|
||||
------------------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Boolean built-in type
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------+-----------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`bool<class_bool_bool>` **(** :ref:`int<class_int>` from **)** |
|
||||
+--------------------------+-----------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`bool<class_bool_bool>` **(** :ref:`float<class_float>` from **)** |
|
||||
+--------------------------+-----------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`bool<class_bool_bool>` **(** :ref:`String<class_string>` from **)** |
|
||||
+--------------------------+-----------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Boolean built-in type.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_bool_bool:
|
||||
|
||||
- :ref:`bool<class_bool>` **bool** **(** :ref:`int<class_int>` from **)**
|
||||
|
||||
.. _class_bool_bool:
|
||||
|
||||
- :ref:`bool<class_bool>` **bool** **(** :ref:`float<class_float>` from **)**
|
||||
|
||||
.. _class_bool_bool:
|
||||
|
||||
- :ref:`bool<class_bool>` **bool** **(** :ref:`String<class_string>` from **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
.. _class_BoxContainer:
|
||||
|
||||
BoxContainer
|
||||
============
|
||||
|
||||
Inherits: :ref:`Container<class_container>`
|
||||
-------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Base class for Box containers.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------+------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_alignment<class_BoxContainer_get_alignment>` **(** **)** const |
|
||||
+------------------------+------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_alignment<class_BoxContainer_set_alignment>` **(** :ref:`int<class_int>` alignment **)** |
|
||||
+------------------------+------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **ALIGN_BEGIN** = **0**
|
||||
- **ALIGN_CENTER** = **1**
|
||||
- **ALIGN_END** = **2**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Base class for Box containers. It arranges children controls vertically or horizontally, and rearranges them automatically when their minimum size changes.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_BoxContainer_get_alignment:
|
||||
|
||||
- :ref:`int<class_int>` **get_alignment** **(** **)** const
|
||||
|
||||
.. _class_BoxContainer_set_alignment:
|
||||
|
||||
- void **set_alignment** **(** :ref:`int<class_int>` alignment **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
.. _class_BoxShape:
|
||||
|
||||
BoxShape
|
||||
========
|
||||
|
||||
Inherits: :ref:`Shape<class_shape>`
|
||||
-----------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Box shape resource.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_extents<class_BoxShape_set_extents>` **(** :ref:`Vector3<class_vector3>` extents **)** |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_extents<class_BoxShape_get_extents>` **(** **)** const |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Box shape resource, which can be set into a :ref:`PhysicsBody<class_physicsbody>` or area.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_BoxShape_set_extents:
|
||||
|
||||
- void **set_extents** **(** :ref:`Vector3<class_vector3>` extents **)**
|
||||
|
||||
Set the half extents for the shape.
|
||||
|
||||
.. _class_BoxShape_get_extents:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **get_extents** **(** **)** const
|
||||
|
||||
Return the half extents of the shape.
|
||||
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
.. _class_Button:
|
||||
|
||||
Button
|
||||
======
|
||||
|
||||
Inherits: :ref:`BaseButton<class_basebutton>`
|
||||
---------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Standard themed Button.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_text<class_Button_set_text>` **(** :ref:`String<class_string>` text **)** |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_text<class_Button_get_text>` **(** **)** const |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_button_icon<class_Button_set_button_icon>` **(** :ref:`Texture<class_texture>` texture **)** |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Texture<class_texture>` | :ref:`get_button_icon<class_Button_get_button_icon>` **(** **)** const |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_flat<class_Button_set_flat>` **(** :ref:`bool<class_bool>` enabled **)** |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_clip_text<class_Button_set_clip_text>` **(** :ref:`bool<class_bool>` enabled **)** |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_clip_text<class_Button_get_clip_text>` **(** **)** const |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_text_align<class_Button_set_text_align>` **(** :ref:`int<class_int>` align **)** |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_text_align<class_Button_get_text_align>` **(** **)** const |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_flat<class_Button_is_flat>` **(** **)** const |
|
||||
+--------------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Button is just the standard themed button: :ref:`image src="images/button_example.png"/<class_image src="images/button_example.png"/>` It can contain text and an icon, and will display them according to the current :ref:`Theme<class_theme>`.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Button_set_text:
|
||||
|
||||
- void **set_text** **(** :ref:`String<class_string>` text **)**
|
||||
|
||||
Set the button text, which will be displayed inside the button area.
|
||||
|
||||
.. _class_Button_get_text:
|
||||
|
||||
- :ref:`String<class_string>` **get_text** **(** **)** const
|
||||
|
||||
Return the button text.
|
||||
|
||||
.. _class_Button_set_button_icon:
|
||||
|
||||
- void **set_button_icon** **(** :ref:`Texture<class_texture>` texture **)**
|
||||
|
||||
.. _class_Button_get_button_icon:
|
||||
|
||||
- :ref:`Texture<class_texture>` **get_button_icon** **(** **)** const
|
||||
|
||||
.. _class_Button_set_flat:
|
||||
|
||||
- void **set_flat** **(** :ref:`bool<class_bool>` enabled **)**
|
||||
|
||||
Set the *flat* property of a Button. Flat buttons don't display decoration unless hoevered or pressed.
|
||||
|
||||
.. _class_Button_set_clip_text:
|
||||
|
||||
- void **set_clip_text** **(** :ref:`bool<class_bool>` enabled **)**
|
||||
|
||||
Set the *clip_text* property of a Button. When this property is enabled, text that is too large to fit the button is clipped, when disabled (default) the Button will always be wide enough to hold the text.
|
||||
|
||||
.. _class_Button_get_clip_text:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_clip_text** **(** **)** const
|
||||
|
||||
Return the state of the *clip_text* property (see :ref:`set_clip_text<Button_set_clip_text>`)
|
||||
|
||||
.. _class_Button_set_text_align:
|
||||
|
||||
- void **set_text_align** **(** :ref:`int<class_int>` align **)**
|
||||
|
||||
.. _class_Button_get_text_align:
|
||||
|
||||
- :ref:`int<class_int>` **get_text_align** **(** **)** const
|
||||
|
||||
.. _class_Button_is_flat:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_flat** **(** **)** const
|
||||
|
||||
Return the state of the *flat* property (see :ref:`set_flat<Button_set_flat>`)
|
||||
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
.. _class_ButtonArray:
|
||||
|
||||
ButtonArray
|
||||
===========
|
||||
|
||||
Inherits: :ref:`Control<class_control>`
|
||||
---------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Array of Buttons.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_button<class_ButtonArray_add_button>` **(** :ref:`String<class_string>` text **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_icon_button<class_ButtonArray_add_icon_button>` **(** :ref:`Object<class_object>` icon, :ref:`String<class_string>` text="" **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_button_text<class_ButtonArray_set_button_text>` **(** :ref:`int<class_int>` button, :ref:`String<class_string>` text **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_button_icon<class_ButtonArray_set_button_icon>` **(** :ref:`int<class_int>` button, :ref:`Object<class_object>` icon **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_button_text<class_ButtonArray_get_button_text>` **(** :ref:`int<class_int>` button **)** const |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`get_button_icon<class_ButtonArray_get_button_icon>` **(** :ref:`int<class_int>` button **)** const |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_button_count<class_ButtonArray_get_button_count>` **(** **)** const |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_selected<class_ButtonArray_get_selected>` **(** **)** const |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_hovered<class_ButtonArray_get_hovered>` **(** **)** const |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_selected<class_ButtonArray_set_selected>` **(** :ref:`int<class_int>` button **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`erase_button<class_ButtonArray_erase_button>` **(** :ref:`int<class_int>` button **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear<class_ButtonArray_clear>` **(** **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **button_selected** **(** :ref:`int<class_int>` button **)**
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **ALIGN_BEGIN** = **0** --- Align buttons at the begining.
|
||||
- **ALIGN_CENTER** = **1** --- Align buttons in the middle.
|
||||
- **ALIGN_END** = **2** --- Align buttons at the end.
|
||||
- **ALIGN_FILL** = **3** --- Spread the buttons, but keep them small.
|
||||
- **ALIGN_EXPAND_FILL** = **4** --- Spread the buttons, but expand them.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Array of Buttons. A Button array is useful to have an array of buttons laid out vertically or horizontally. Only one can be selected. This is useful for joypad based interfaces and option menus.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_ButtonArray_add_button:
|
||||
|
||||
- void **add_button** **(** :ref:`String<class_string>` text **)**
|
||||
|
||||
Add a new button.
|
||||
|
||||
.. _class_ButtonArray_add_icon_button:
|
||||
|
||||
- void **add_icon_button** **(** :ref:`Object<class_object>` icon, :ref:`String<class_string>` text="" **)**
|
||||
|
||||
.. _class_ButtonArray_set_button_text:
|
||||
|
||||
- void **set_button_text** **(** :ref:`int<class_int>` button, :ref:`String<class_string>` text **)**
|
||||
|
||||
.. _class_ButtonArray_set_button_icon:
|
||||
|
||||
- void **set_button_icon** **(** :ref:`int<class_int>` button, :ref:`Object<class_object>` icon **)**
|
||||
|
||||
Set the icon of an existing button.
|
||||
|
||||
.. _class_ButtonArray_get_button_text:
|
||||
|
||||
- :ref:`String<class_string>` **get_button_text** **(** :ref:`int<class_int>` button **)** const
|
||||
|
||||
Return the text of an existing button.
|
||||
|
||||
.. _class_ButtonArray_get_button_icon:
|
||||
|
||||
- :ref:`Object<class_object>` **get_button_icon** **(** :ref:`int<class_int>` button **)** const
|
||||
|
||||
Return the icon of an existing button.
|
||||
|
||||
.. _class_ButtonArray_get_button_count:
|
||||
|
||||
- :ref:`int<class_int>` **get_button_count** **(** **)** const
|
||||
|
||||
Return the amount of buttons in the array.
|
||||
|
||||
.. _class_ButtonArray_get_selected:
|
||||
|
||||
- :ref:`int<class_int>` **get_selected** **(** **)** const
|
||||
|
||||
Return the currently selected button in the array.
|
||||
|
||||
.. _class_ButtonArray_get_hovered:
|
||||
|
||||
- :ref:`int<class_int>` **get_hovered** **(** **)** const
|
||||
|
||||
Return the currently hovered button in the array.
|
||||
|
||||
.. _class_ButtonArray_set_selected:
|
||||
|
||||
- void **set_selected** **(** :ref:`int<class_int>` button **)**
|
||||
|
||||
Sekect a button in the array.
|
||||
|
||||
.. _class_ButtonArray_erase_button:
|
||||
|
||||
- void **erase_button** **(** :ref:`int<class_int>` button **)**
|
||||
|
||||
Remove a button in the array, by index.
|
||||
|
||||
.. _class_ButtonArray_clear:
|
||||
|
||||
- void **clear** **(** **)**
|
||||
|
||||
Clear the button array.
|
||||
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
.. _class_ButtonGroup:
|
||||
|
||||
ButtonGroup
|
||||
===========
|
||||
|
||||
Inherits: :ref:`BoxContainer<class_boxcontainer>`
|
||||
-------------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Group of Buttons.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BaseButton<class_basebutton>` | :ref:`get_pressed_button<class_ButtonGroup_get_pressed_button>` **(** **)** const |
|
||||
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_pressed_button_index<class_ButtonGroup_get_pressed_button_index>` **(** **)** const |
|
||||
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BaseButton<class_basebutton>` | :ref:`get_focused_button<class_ButtonGroup_get_focused_button>` **(** **)** const |
|
||||
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`get_button_list<class_ButtonGroup_get_button_list>` **(** **)** const |
|
||||
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_pressed_button<class_ButtonGroup_set_pressed_button>` **(** :ref:`BaseButton<class_basebutton>` button **)** |
|
||||
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Group of :ref:`Button<class_button>`s. All direct and indirect children buttons become radios. Only one allows being pressed.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_ButtonGroup_get_pressed_button:
|
||||
|
||||
- :ref:`BaseButton<class_basebutton>` **get_pressed_button** **(** **)** const
|
||||
|
||||
Return the pressed button.
|
||||
|
||||
.. _class_ButtonGroup_get_pressed_button_index:
|
||||
|
||||
- :ref:`int<class_int>` **get_pressed_button_index** **(** **)** const
|
||||
|
||||
Return the index of the pressed button (by tree order).
|
||||
|
||||
.. _class_ButtonGroup_get_focused_button:
|
||||
|
||||
- :ref:`BaseButton<class_basebutton>` **get_focused_button** **(** **)** const
|
||||
|
||||
Return the focused button.
|
||||
|
||||
.. _class_ButtonGroup_get_button_list:
|
||||
|
||||
- :ref:`Array<class_array>` **get_button_list** **(** **)** const
|
||||
|
||||
Return the list of all the buttons in the group.
|
||||
|
||||
.. _class_ButtonGroup_set_pressed_button:
|
||||
|
||||
- void **set_pressed_button** **(** :ref:`BaseButton<class_basebutton>` button **)**
|
||||
|
||||
Set the button to be pressed.
|
||||
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
.. _class_Camera:
|
||||
|
||||
Camera
|
||||
======
|
||||
|
||||
Inherits: :ref:`Spatial<class_spatial>`
|
||||
---------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Camera node, displays from a point of view.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`project_ray_normal<class_Camera_project_ray_normal>` **(** :ref:`Vector2<class_vector2>` screen_point **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`project_local_ray_normal<class_Camera_project_local_ray_normal>` **(** :ref:`Vector2<class_vector2>` screen_point **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`project_ray_origin<class_Camera_project_ray_origin>` **(** :ref:`Vector2<class_vector2>` screen_point **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`unproject_position<class_Camera_unproject_position>` **(** :ref:`Vector3<class_vector3>` world_point **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_position_behind<class_Camera_is_position_behind>` **(** :ref:`Vector3<class_vector3>` world_point **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`project_position<class_Camera_project_position>` **(** :ref:`Vector2<class_vector2>` screen_point **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_perspective<class_Camera_set_perspective>` **(** :ref:`float<class_float>` fov, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_orthogonal<class_Camera_set_orthogonal>` **(** :ref:`float<class_float>` size, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`make_current<class_Camera_make_current>` **(** **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_current<class_Camera_clear_current>` **(** **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_current<class_Camera_is_current>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Transform<class_transform>` | :ref:`get_camera_transform<class_Camera_get_camera_transform>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_fov<class_Camera_get_fov>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_size<class_Camera_get_size>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_zfar<class_Camera_get_zfar>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_znear<class_Camera_get_znear>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_projection<class_Camera_get_projection>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_visible_layers<class_Camera_set_visible_layers>` **(** :ref:`int<class_int>` mask **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_visible_layers<class_Camera_get_visible_layers>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_environment<class_Camera_set_environment>` **(** :ref:`Environment<class_environment>` env **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Environment<class_environment>` | :ref:`get_environment<class_Camera_get_environment>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_keep_aspect_mode<class_Camera_set_keep_aspect_mode>` **(** :ref:`int<class_int>` mode **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_keep_aspect_mode<class_Camera_get_keep_aspect_mode>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **PROJECTION_PERSPECTIVE** = **0** --- Perspective Projection (object's size on the screen becomes smaller when far away).
|
||||
- **PROJECTION_ORTHOGONAL** = **1** --- Orthogonal Projection (objects remain the same size on the screen no matter how far away they are).
|
||||
- **KEEP_WIDTH** = **0**
|
||||
- **KEEP_HEIGHT** = **1**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest :ref:`Viewport<class_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<class_viewport>`, and, without one, a :ref:`Scene<class_scene>` registered in that :ref:`Viewport<class_viewport>` (or higher viewports) can't be displayed.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Camera_project_ray_normal:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **project_ray_normal** **(** :ref:`Vector2<class_vector2>` screen_point **)** const
|
||||
|
||||
Return a normal vector in worldspace, that is the result of projecting a point on the :ref:`Viewport<class_viewport>` rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking.
|
||||
|
||||
.. _class_Camera_project_local_ray_normal:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **project_local_ray_normal** **(** :ref:`Vector2<class_vector2>` screen_point **)** const
|
||||
|
||||
.. _class_Camera_project_ray_origin:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **project_ray_origin** **(** :ref:`Vector2<class_vector2>` screen_point **)** const
|
||||
|
||||
Return a 3D position in worldspace, that is the result of projecting a point on the :ref:`Viewport<class_viewport>` rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking.
|
||||
|
||||
.. _class_Camera_unproject_position:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **unproject_position** **(** :ref:`Vector3<class_vector3>` world_point **)** const
|
||||
|
||||
Return how a 3D point in worldpsace maps to a 2D coordinate in the :ref:`Viewport<class_viewport>` rectangle.
|
||||
|
||||
.. _class_Camera_is_position_behind:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_position_behind** **(** :ref:`Vector3<class_vector3>` world_point **)** const
|
||||
|
||||
.. _class_Camera_project_position:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **project_position** **(** :ref:`Vector2<class_vector2>` screen_point **)** const
|
||||
|
||||
.. _class_Camera_set_perspective:
|
||||
|
||||
- void **set_perspective** **(** :ref:`float<class_float>` fov, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)**
|
||||
|
||||
Set the camera projection to perspective mode, by specifying a *FOV* Y angle in degrees (FOV means Field of View), and the *near* and *far* clip planes in worldspace units.
|
||||
|
||||
.. _class_Camera_set_orthogonal:
|
||||
|
||||
- void **set_orthogonal** **(** :ref:`float<class_float>` size, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)**
|
||||
|
||||
Set the camera projection to orthogonal mode, by specifying a width and the *near* and *far* clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels)
|
||||
|
||||
.. _class_Camera_make_current:
|
||||
|
||||
- void **make_current** **(** **)**
|
||||
|
||||
Make this camera the current Camera for the :ref:`Viewport<class_viewport>` (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added.
|
||||
|
||||
.. _class_Camera_clear_current:
|
||||
|
||||
- void **clear_current** **(** **)**
|
||||
|
||||
.. _class_Camera_is_current:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_current** **(** **)** const
|
||||
|
||||
Return wether the Camera is the current one in the :ref:`Viewport<class_viewport>`, or plans to become current (if outside the scene tree).
|
||||
|
||||
.. _class_Camera_get_camera_transform:
|
||||
|
||||
- :ref:`Transform<class_transform>` **get_camera_transform** **(** **)** const
|
||||
|
||||
Get the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the :ref:`Node<class_node>` transform.
|
||||
|
||||
.. _class_Camera_get_fov:
|
||||
|
||||
- :ref:`float<class_float>` **get_fov** **(** **)** const
|
||||
|
||||
.. _class_Camera_get_size:
|
||||
|
||||
- :ref:`float<class_float>` **get_size** **(** **)** const
|
||||
|
||||
.. _class_Camera_get_zfar:
|
||||
|
||||
- :ref:`float<class_float>` **get_zfar** **(** **)** const
|
||||
|
||||
.. _class_Camera_get_znear:
|
||||
|
||||
- :ref:`float<class_float>` **get_znear** **(** **)** const
|
||||
|
||||
.. _class_Camera_get_projection:
|
||||
|
||||
- :ref:`int<class_int>` **get_projection** **(** **)** const
|
||||
|
||||
.. _class_Camera_set_visible_layers:
|
||||
|
||||
- void **set_visible_layers** **(** :ref:`int<class_int>` mask **)**
|
||||
|
||||
.. _class_Camera_get_visible_layers:
|
||||
|
||||
- :ref:`int<class_int>` **get_visible_layers** **(** **)** const
|
||||
|
||||
.. _class_Camera_set_environment:
|
||||
|
||||
- void **set_environment** **(** :ref:`Environment<class_environment>` env **)**
|
||||
|
||||
.. _class_Camera_get_environment:
|
||||
|
||||
- :ref:`Environment<class_environment>` **get_environment** **(** **)** const
|
||||
|
||||
.. _class_Camera_set_keep_aspect_mode:
|
||||
|
||||
- void **set_keep_aspect_mode** **(** :ref:`int<class_int>` mode **)**
|
||||
|
||||
.. _class_Camera_get_keep_aspect_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_keep_aspect_mode** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
.. _class_Camera2D:
|
||||
|
||||
Camera2D
|
||||
========
|
||||
|
||||
Inherits: :ref:`Node2D<class_node2d>`
|
||||
-------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Camera node for 2D scenes.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_offset<class_Camera2D_set_offset>` **(** :ref:`Vector2<class_vector2>` offset **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_offset<class_Camera2D_get_offset>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_anchor_mode<class_Camera2D_set_anchor_mode>` **(** :ref:`int<class_int>` anchor_mode **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_anchor_mode<class_Camera2D_get_anchor_mode>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_rotating<class_Camera2D_set_rotating>` **(** :ref:`bool<class_bool>` rotating **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_rotating<class_Camera2D_is_rotating>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`make_current<class_Camera2D_make_current>` **(** **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_current<class_Camera2D_clear_current>` **(** **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_current<class_Camera2D_is_current>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_limit<class_Camera2D_set_limit>` **(** :ref:`int<class_int>` margin, :ref:`int<class_int>` limit **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_limit<class_Camera2D_get_limit>` **(** :ref:`int<class_int>` margin **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_v_drag_enabled<class_Camera2D_set_v_drag_enabled>` **(** :ref:`bool<class_bool>` enabled **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_v_drag_enabled<class_Camera2D_is_v_drag_enabled>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_h_drag_enabled<class_Camera2D_set_h_drag_enabled>` **(** :ref:`bool<class_bool>` enabled **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_h_drag_enabled<class_Camera2D_is_h_drag_enabled>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_v_offset<class_Camera2D_set_v_offset>` **(** :ref:`float<class_float>` ofs **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_v_offset<class_Camera2D_get_v_offset>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_h_offset<class_Camera2D_set_h_offset>` **(** :ref:`float<class_float>` ofs **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_h_offset<class_Camera2D_get_h_offset>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_drag_margin<class_Camera2D_set_drag_margin>` **(** :ref:`int<class_int>` margin, :ref:`float<class_float>` drag_margin **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_drag_margin<class_Camera2D_get_drag_margin>` **(** :ref:`int<class_int>` margin **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_camera_pos<class_Camera2D_get_camera_pos>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_camera_screen_center<class_Camera2D_get_camera_screen_center>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_zoom<class_Camera2D_set_zoom>` **(** :ref:`Vector2<class_vector2>` zoom **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_zoom<class_Camera2D_get_zoom>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_follow_smoothing<class_Camera2D_set_follow_smoothing>` **(** :ref:`float<class_float>` follow_smoothing **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_follow_smoothing<class_Camera2D_get_follow_smoothing>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_enable_follow_smoothing<class_Camera2D_set_enable_follow_smoothing>` **(** :ref:`bool<class_bool>` follow_smoothing **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_follow_smoothing_enabled<class_Camera2D_is_follow_smoothing_enabled>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`force_update_scroll<class_Camera2D_force_update_scroll>` **(** **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **ANCHOR_MODE_DRAG_CENTER** = **1**
|
||||
- **ANCHOR_MODE_FIXED_TOP_LEFT** = **0**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of :ref:`CanvasItem<class_canvasitem>` based nodes.
|
||||
|
||||
This node is intended to be a simple helper get get things going quickly and it may happen often that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from :ref:`Node2D<class_node2d>` and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in :ref:`Viewport<class_viewport>`.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Camera2D_set_offset:
|
||||
|
||||
- void **set_offset** **(** :ref:`Vector2<class_vector2>` offset **)**
|
||||
|
||||
Set the scroll offset. Useful for looking around or camera shake animations.
|
||||
|
||||
.. _class_Camera2D_get_offset:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_offset** **(** **)** const
|
||||
|
||||
Return the scroll offset.
|
||||
|
||||
.. _class_Camera2D_set_anchor_mode:
|
||||
|
||||
- void **set_anchor_mode** **(** :ref:`int<class_int>` anchor_mode **)**
|
||||
|
||||
.. _class_Camera2D_get_anchor_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_anchor_mode** **(** **)** const
|
||||
|
||||
.. _class_Camera2D_set_rotating:
|
||||
|
||||
- void **set_rotating** **(** :ref:`bool<class_bool>` rotating **)**
|
||||
|
||||
.. _class_Camera2D_is_rotating:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_rotating** **(** **)** const
|
||||
|
||||
.. _class_Camera2D_make_current:
|
||||
|
||||
- void **make_current** **(** **)**
|
||||
|
||||
Make this the current 2D camera for the scene (viewport and layer), in case there's many cameras in the scene.
|
||||
|
||||
.. _class_Camera2D_clear_current:
|
||||
|
||||
- void **clear_current** **(** **)**
|
||||
|
||||
.. _class_Camera2D_is_current:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_current** **(** **)** const
|
||||
|
||||
Return true of this is the current camera (see :ref:`Camera2D.make_current<camera2d_make_current>`).
|
||||
|
||||
.. _class_Camera2D_set_limit:
|
||||
|
||||
- void **set_limit** **(** :ref:`int<class_int>` margin, :ref:`int<class_int>` limit **)**
|
||||
|
||||
Set the scrolling limit in pixels.
|
||||
|
||||
.. _class_Camera2D_get_limit:
|
||||
|
||||
- :ref:`int<class_int>` **get_limit** **(** :ref:`int<class_int>` margin **)** const
|
||||
|
||||
Return the scrolling limit in pixels.
|
||||
|
||||
.. _class_Camera2D_set_v_drag_enabled:
|
||||
|
||||
- void **set_v_drag_enabled** **(** :ref:`bool<class_bool>` enabled **)**
|
||||
|
||||
.. _class_Camera2D_is_v_drag_enabled:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_v_drag_enabled** **(** **)** const
|
||||
|
||||
.. _class_Camera2D_set_h_drag_enabled:
|
||||
|
||||
- void **set_h_drag_enabled** **(** :ref:`bool<class_bool>` enabled **)**
|
||||
|
||||
.. _class_Camera2D_is_h_drag_enabled:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_h_drag_enabled** **(** **)** const
|
||||
|
||||
.. _class_Camera2D_set_v_offset:
|
||||
|
||||
- void **set_v_offset** **(** :ref:`float<class_float>` ofs **)**
|
||||
|
||||
.. _class_Camera2D_get_v_offset:
|
||||
|
||||
- :ref:`float<class_float>` **get_v_offset** **(** **)** const
|
||||
|
||||
.. _class_Camera2D_set_h_offset:
|
||||
|
||||
- void **set_h_offset** **(** :ref:`float<class_float>` ofs **)**
|
||||
|
||||
.. _class_Camera2D_get_h_offset:
|
||||
|
||||
- :ref:`float<class_float>` **get_h_offset** **(** **)** const
|
||||
|
||||
.. _class_Camera2D_set_drag_margin:
|
||||
|
||||
- void **set_drag_margin** **(** :ref:`int<class_int>` margin, :ref:`float<class_float>` drag_margin **)**
|
||||
|
||||
Set the margins needed to drag the camera (relative to the screen size). Margin uses the MARGIN_* enum. Drag margins of 0,0,0,0 will keep the camera at the center of the screen, while drag margins of 1,1,1,1 will only move when the camera is at the edges.
|
||||
|
||||
.. _class_Camera2D_get_drag_margin:
|
||||
|
||||
- :ref:`float<class_float>` **get_drag_margin** **(** :ref:`int<class_int>` margin **)** const
|
||||
|
||||
Return the margins needed to drag the camera (see :ref:`set_drag_margin<Camera2D_set_drag_margin>`).
|
||||
|
||||
.. _class_Camera2D_get_camera_pos:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_camera_pos** **(** **)** const
|
||||
|
||||
Return the camera position.
|
||||
|
||||
.. _class_Camera2D_get_camera_screen_center:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_camera_screen_center** **(** **)** const
|
||||
|
||||
.. _class_Camera2D_set_zoom:
|
||||
|
||||
- void **set_zoom** **(** :ref:`Vector2<class_vector2>` zoom **)**
|
||||
|
||||
.. _class_Camera2D_get_zoom:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_zoom** **(** **)** const
|
||||
|
||||
.. _class_Camera2D_set_follow_smoothing:
|
||||
|
||||
- void **set_follow_smoothing** **(** :ref:`float<class_float>` follow_smoothing **)**
|
||||
|
||||
.. _class_Camera2D_get_follow_smoothing:
|
||||
|
||||
- :ref:`float<class_float>` **get_follow_smoothing** **(** **)** const
|
||||
|
||||
.. _class_Camera2D_set_enable_follow_smoothing:
|
||||
|
||||
- void **set_enable_follow_smoothing** **(** :ref:`bool<class_bool>` follow_smoothing **)**
|
||||
|
||||
.. _class_Camera2D_is_follow_smoothing_enabled:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_follow_smoothing_enabled** **(** **)** const
|
||||
|
||||
.. _class_Camera2D_force_update_scroll:
|
||||
|
||||
- void **force_update_scroll** **(** **)**
|
||||
|
||||
Force the camera to update scroll immediately.
|
||||
|
||||
|
||||
@@ -0,0 +1,444 @@
|
||||
.. _class_CanvasItem:
|
||||
|
||||
CanvasItem
|
||||
==========
|
||||
|
||||
Inherits: :ref:`Node<class_node>`
|
||||
---------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Base class of anything 2D.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_draw<class_CanvasItem__draw>` **(** **)** virtual |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`edit_set_state<class_CanvasItem_edit_set_state>` **(** var state **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`edit_get<class_CanvasItem_edit_get>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`edit_set_rect<class_CanvasItem_edit_set_rect>` **(** :ref:`Rect2<class_rect2>` rect **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`edit_rotate<class_CanvasItem_edit_rotate>` **(** :ref:`float<class_float>` degrees **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Rect2<class_rect2>` | :ref:`get_item_rect<class_CanvasItem_get_item_rect>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_rid>` | :ref:`get_canvas_item<class_CanvasItem_get_canvas_item>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_visible<class_CanvasItem_is_visible>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_hidden<class_CanvasItem_is_hidden>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`show<class_CanvasItem_show>` **(** **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`hide<class_CanvasItem_hide>` **(** **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_hidden<class_CanvasItem_set_hidden>` **(** :ref:`bool<class_bool>` hidden **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`update<class_CanvasItem_update>` **(** **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_as_toplevel<class_CanvasItem_set_as_toplevel>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_set_as_toplevel<class_CanvasItem_is_set_as_toplevel>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_blend_mode<class_CanvasItem_set_blend_mode>` **(** :ref:`int<class_int>` blend_mode **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_blend_mode<class_CanvasItem_get_blend_mode>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_light_mask<class_CanvasItem_set_light_mask>` **(** :ref:`int<class_int>` light_mask **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_light_mask<class_CanvasItem_get_light_mask>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_opacity<class_CanvasItem_set_opacity>` **(** :ref:`float<class_float>` opacity **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_opacity<class_CanvasItem_get_opacity>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_self_opacity<class_CanvasItem_set_self_opacity>` **(** :ref:`float<class_float>` self_opacity **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_self_opacity<class_CanvasItem_get_self_opacity>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_draw_behind_parent<class_CanvasItem_set_draw_behind_parent>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_draw_behind_parent_enabled<class_CanvasItem_is_draw_behind_parent_enabled>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`draw_line<class_CanvasItem_draw_line>` **(** :ref:`Vector2<class_vector2>` from, :ref:`Vector2<class_vector2>` to, :ref:`Color<class_color>` color, :ref:`float<class_float>` width=1 **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`draw_rect<class_CanvasItem_draw_rect>` **(** :ref:`Rect2<class_rect2>` rect, :ref:`Color<class_color>` color **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`draw_circle<class_CanvasItem_draw_circle>` **(** :ref:`Vector2<class_vector2>` pos, :ref:`float<class_float>` radius, :ref:`Color<class_color>` color **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`draw_texture<class_CanvasItem_draw_texture>` **(** :ref:`Texture<class_texture>` texture, :ref:`Vector2<class_vector2>` pos, :ref:`Color<class_color>` modulate=Color(1,1,1,1) **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`draw_texture_rect<class_CanvasItem_draw_texture_rect>` **(** :ref:`Texture<class_texture>` texture, :ref:`Rect2<class_rect2>` rect, :ref:`bool<class_bool>` tile, :ref:`Color<class_color>` modulate=Color(1,1,1,1), :ref:`bool<class_bool>` transpose=false **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`draw_texture_rect_region<class_CanvasItem_draw_texture_rect_region>` **(** :ref:`Texture<class_texture>` texture, :ref:`Rect2<class_rect2>` rect, :ref:`Rect2<class_rect2>` src_rect, :ref:`Color<class_color>` modulate=Color(1,1,1,1), :ref:`bool<class_bool>` transpose=false **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`draw_style_box<class_CanvasItem_draw_style_box>` **(** :ref:`StyleBox<class_stylebox>` style_box, :ref:`Rect2<class_rect2>` rect **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`draw_primitive<class_CanvasItem_draw_primitive>` **(** :ref:`Vector2Array<class_vector2array>` points, :ref:`ColorArray<class_colorarray>` colors, :ref:`Vector2Array<class_vector2array>` uvs=Array(), :ref:`Texture<class_texture>` texture=Object(), :ref:`float<class_float>` width=1 **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`draw_polygon<class_CanvasItem_draw_polygon>` **(** :ref:`Vector2Array<class_vector2array>` points, :ref:`ColorArray<class_colorarray>` colors, :ref:`Vector2Array<class_vector2array>` uvs=Array(), :ref:`Texture<class_texture>` texture=Object() **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`draw_colored_polygon<class_CanvasItem_draw_colored_polygon>` **(** :ref:`Vector2Array<class_vector2array>` points, :ref:`Color<class_color>` color, :ref:`Vector2Array<class_vector2array>` uvs=Array(), :ref:`Texture<class_texture>` texture=Object() **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`draw_string<class_CanvasItem_draw_string>` **(** :ref:`Font<class_font>` font, :ref:`Vector2<class_vector2>` pos, :ref:`String<class_string>` text, :ref:`Color<class_color>` modulate=Color(1,1,1,1), :ref:`int<class_int>` clip_w=-1 **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`draw_char<class_CanvasItem_draw_char>` **(** :ref:`Font<class_font>` font, :ref:`Vector2<class_vector2>` pos, :ref:`String<class_string>` char, :ref:`String<class_string>` next, :ref:`Color<class_color>` modulate=Color(1,1,1,1) **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`draw_set_transform<class_CanvasItem_draw_set_transform>` **(** :ref:`Vector2<class_vector2>` pos, :ref:`float<class_float>` rot, :ref:`Vector2<class_vector2>` scale **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Matrix32<class_matrix32>` | :ref:`get_transform<class_CanvasItem_get_transform>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Matrix32<class_matrix32>` | :ref:`get_global_transform<class_CanvasItem_get_global_transform>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Matrix32<class_matrix32>` | :ref:`get_global_transform_with_canvas<class_CanvasItem_get_global_transform_with_canvas>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Matrix32<class_matrix32>` | :ref:`get_viewport_transform<class_CanvasItem_get_viewport_transform>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Rect2<class_rect2>` | :ref:`get_viewport_rect<class_CanvasItem_get_viewport_rect>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Matrix32<class_matrix32>` | :ref:`get_canvas_transform<class_CanvasItem_get_canvas_transform>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_local_mouse_pos<class_CanvasItem_get_local_mouse_pos>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_global_mouse_pos<class_CanvasItem_get_global_mouse_pos>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_rid>` | :ref:`get_canvas<class_CanvasItem_get_canvas>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`get_world_2d<class_CanvasItem_get_world_2d>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_material<class_CanvasItem_set_material>` **(** :ref:`CanvasItemMaterial<class_canvasitemmaterial>` material **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`CanvasItemMaterial<class_canvasitemmaterial>` | :ref:`get_material<class_CanvasItem_get_material>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_use_parent_material<class_CanvasItem_set_use_parent_material>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_use_parent_material<class_CanvasItem_get_use_parent_material>` **(** **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`InputEvent<class_inputevent>` | :ref:`make_input_local<class_CanvasItem_make_input_local>` **(** :ref:`InputEvent<class_inputevent>` event **)** const |
|
||||
+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **item_rect_changed** **(** **)**
|
||||
- **draw** **(** **)**
|
||||
- **visibility_changed** **(** **)**
|
||||
- **hide** **(** **)**
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **BLEND_MODE_MIX** = **0** --- Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
|
||||
- **BLEND_MODE_ADD** = **1** --- Additive blending mode.
|
||||
- **BLEND_MODE_SUB** = **2** --- Substractive blending mode.
|
||||
- **BLEND_MODE_MUL** = **3** --- Multiplicative blending mode.
|
||||
- **BLEND_MODE_PREMULT_ALPHA** = **4** --- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
|
||||
- **NOTIFICATION_DRAW** = **30** --- CanvasItem is requested to draw.
|
||||
- **NOTIFICATION_VISIBILITY_CHANGED** = **31** --- Canvas item visibility has changed.
|
||||
- **NOTIFICATION_ENTER_CANVAS** = **32** --- Canvas item has entered the canvas.
|
||||
- **NOTIFICATION_EXIT_CANVAS** = **33** --- Canvas item has exited the canvas.
|
||||
- **NOTIFICATION_TRANSFORM_CHANGED** = **29** --- Canvas item transform has changed. Only received if requested.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Base class of anything 2D. Canvas items are laid out in a tree and children inherit and extend the transform of their parent. CanvasItem is extended by :ref:`Control<class_control>`, for anything GUI related, and by :ref:`Node2D<class_node2d>` for anything 2D engine related.
|
||||
|
||||
Any CanvasItem can draw. For this, the "update" function must be called, then NOTIFICATION_DRAW will be received on idle time to request redraw. Because of this, canvas items don't need to be redraw on every frame, improving the performance significan'tly. Several functions for drawing on the CanvasItem are provided (see draw_* functions). They can only be used inside the notification, signal or _draw() overrided function, though.
|
||||
|
||||
Canvas items are draw in tree order. By default, children are on top of their parents so a root CanvasItem will be drawn behind everything (this can be changed per item though).
|
||||
|
||||
Canvas items can also be hidden (hiding also their subtree). They provide many means for changing standard parameters such as opacity (for it and the subtree) and self opacity, blend mode.
|
||||
|
||||
Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_CanvasItem__draw:
|
||||
|
||||
- void **_draw** **(** **)** virtual
|
||||
|
||||
Called (if exists) to draw the canvas item.
|
||||
|
||||
.. _class_CanvasItem_edit_set_state:
|
||||
|
||||
- void **edit_set_state** **(** var state **)**
|
||||
|
||||
Used for editing, returns an opaque value represeting the transform state.
|
||||
|
||||
.. _class_CanvasItem_edit_get:
|
||||
|
||||
- void **edit_get** **(** **)** const
|
||||
|
||||
.. _class_CanvasItem_edit_set_rect:
|
||||
|
||||
- void **edit_set_rect** **(** :ref:`Rect2<class_rect2>` rect **)**
|
||||
|
||||
.. _class_CanvasItem_edit_rotate:
|
||||
|
||||
- void **edit_rotate** **(** :ref:`float<class_float>` degrees **)**
|
||||
|
||||
Used for editing, handle rotation.
|
||||
|
||||
.. _class_CanvasItem_get_item_rect:
|
||||
|
||||
- :ref:`Rect2<class_rect2>` **get_item_rect** **(** **)** const
|
||||
|
||||
Return a rect containing the editable contents of the item.
|
||||
|
||||
.. _class_CanvasItem_get_canvas_item:
|
||||
|
||||
- :ref:`RID<class_rid>` **get_canvas_item** **(** **)** const
|
||||
|
||||
Return the canvas item RID used by :ref:`VisualServer<class_visualserver>` for this item.
|
||||
|
||||
.. _class_CanvasItem_is_visible:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_visible** **(** **)** const
|
||||
|
||||
Return true if this CanvasItem is visible. It may be invisible because itself or a parent canvas item is hidden.
|
||||
|
||||
.. _class_CanvasItem_is_hidden:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_hidden** **(** **)** const
|
||||
|
||||
Return true if this CanvasItem is hidden. Note that the CanvasItem may not be visible, but as long as it's not hidden (:ref:`hide<CanvasItem_hide>` called) the function will return false.
|
||||
|
||||
.. _class_CanvasItem_show:
|
||||
|
||||
- void **show** **(** **)**
|
||||
|
||||
Show the CanvasItem currently hidden.
|
||||
|
||||
.. _class_CanvasItem_hide:
|
||||
|
||||
- void **hide** **(** **)**
|
||||
|
||||
Hide the CanvasItem currently visible.
|
||||
|
||||
.. _class_CanvasItem_set_hidden:
|
||||
|
||||
- void **set_hidden** **(** :ref:`bool<class_bool>` hidden **)**
|
||||
|
||||
.. _class_CanvasItem_update:
|
||||
|
||||
- void **update** **(** **)**
|
||||
|
||||
Queue the CanvasItem for update. NOTIFICATION_DRAW will be called on idle time to request redraw.
|
||||
|
||||
.. _class_CanvasItem_set_as_toplevel:
|
||||
|
||||
- void **set_as_toplevel** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
Set as toplevel. This means that it will not inherit transform from parent canvas items.
|
||||
|
||||
.. _class_CanvasItem_is_set_as_toplevel:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_set_as_toplevel** **(** **)** const
|
||||
|
||||
Return if set as toplevel. See :ref:`set_as_toplevel<CanvasItem_set_as_toplevel>`/
|
||||
|
||||
.. _class_CanvasItem_set_blend_mode:
|
||||
|
||||
- void **set_blend_mode** **(** :ref:`int<class_int>` blend_mode **)**
|
||||
|
||||
Set the blending mode from enum BLEND_MODE_*.
|
||||
|
||||
.. _class_CanvasItem_get_blend_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_blend_mode** **(** **)** const
|
||||
|
||||
Return the current blending mode from enum BLEND_MODE_*.
|
||||
|
||||
.. _class_CanvasItem_set_light_mask:
|
||||
|
||||
- void **set_light_mask** **(** :ref:`int<class_int>` light_mask **)**
|
||||
|
||||
.. _class_CanvasItem_get_light_mask:
|
||||
|
||||
- :ref:`int<class_int>` **get_light_mask** **(** **)** const
|
||||
|
||||
.. _class_CanvasItem_set_opacity:
|
||||
|
||||
- void **set_opacity** **(** :ref:`float<class_float>` opacity **)**
|
||||
|
||||
Set canvas item opacity. This will affect the canvas item and all the children.
|
||||
|
||||
.. _class_CanvasItem_get_opacity:
|
||||
|
||||
- :ref:`float<class_float>` **get_opacity** **(** **)** const
|
||||
|
||||
Return the canvas item opacity. This affects the canvas item and all the children.
|
||||
|
||||
.. _class_CanvasItem_set_self_opacity:
|
||||
|
||||
- void **set_self_opacity** **(** :ref:`float<class_float>` self_opacity **)**
|
||||
|
||||
Set canvas item self-opacity. This does not affect the opacity of children items.
|
||||
|
||||
.. _class_CanvasItem_get_self_opacity:
|
||||
|
||||
- :ref:`float<class_float>` **get_self_opacity** **(** **)** const
|
||||
|
||||
Return the canvas item self-opacity.
|
||||
|
||||
.. _class_CanvasItem_set_draw_behind_parent:
|
||||
|
||||
- void **set_draw_behind_parent** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
Sets whether the canvas item is drawn behind its parent.
|
||||
|
||||
.. _class_CanvasItem_is_draw_behind_parent_enabled:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_draw_behind_parent_enabled** **(** **)** const
|
||||
|
||||
Return whether the item is drawn behind its parent.
|
||||
|
||||
.. _class_CanvasItem_draw_line:
|
||||
|
||||
- void **draw_line** **(** :ref:`Vector2<class_vector2>` from, :ref:`Vector2<class_vector2>` to, :ref:`Color<class_color>` color, :ref:`float<class_float>` width=1 **)**
|
||||
|
||||
Draw a line from a 2D point to another, with a given color and width.
|
||||
|
||||
.. _class_CanvasItem_draw_rect:
|
||||
|
||||
- void **draw_rect** **(** :ref:`Rect2<class_rect2>` rect, :ref:`Color<class_color>` color **)**
|
||||
|
||||
Draw a colored rectangle.
|
||||
|
||||
.. _class_CanvasItem_draw_circle:
|
||||
|
||||
- void **draw_circle** **(** :ref:`Vector2<class_vector2>` pos, :ref:`float<class_float>` radius, :ref:`Color<class_color>` color **)**
|
||||
|
||||
Draw a colored circle.
|
||||
|
||||
.. _class_CanvasItem_draw_texture:
|
||||
|
||||
- void **draw_texture** **(** :ref:`Texture<class_texture>` texture, :ref:`Vector2<class_vector2>` pos, :ref:`Color<class_color>` modulate=Color(1,1,1,1) **)**
|
||||
|
||||
Draw a texture at a given position.
|
||||
|
||||
.. _class_CanvasItem_draw_texture_rect:
|
||||
|
||||
- void **draw_texture_rect** **(** :ref:`Texture<class_texture>` texture, :ref:`Rect2<class_rect2>` rect, :ref:`bool<class_bool>` tile, :ref:`Color<class_color>` modulate=Color(1,1,1,1), :ref:`bool<class_bool>` transpose=false **)**
|
||||
|
||||
Draw a textured rectangle at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
|
||||
|
||||
.. _class_CanvasItem_draw_texture_rect_region:
|
||||
|
||||
- void **draw_texture_rect_region** **(** :ref:`Texture<class_texture>` texture, :ref:`Rect2<class_rect2>` rect, :ref:`Rect2<class_rect2>` src_rect, :ref:`Color<class_color>` modulate=Color(1,1,1,1), :ref:`bool<class_bool>` transpose=false **)**
|
||||
|
||||
Draw a textured rectangle region at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
|
||||
|
||||
.. _class_CanvasItem_draw_style_box:
|
||||
|
||||
- void **draw_style_box** **(** :ref:`StyleBox<class_stylebox>` style_box, :ref:`Rect2<class_rect2>` rect **)**
|
||||
|
||||
Draw a styled rectangle.
|
||||
|
||||
.. _class_CanvasItem_draw_primitive:
|
||||
|
||||
- void **draw_primitive** **(** :ref:`Vector2Array<class_vector2array>` points, :ref:`ColorArray<class_colorarray>` colors, :ref:`Vector2Array<class_vector2array>` uvs=Array(), :ref:`Texture<class_texture>` texture=Object(), :ref:`float<class_float>` width=1 **)**
|
||||
|
||||
Draw a custom primitive, 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad.
|
||||
|
||||
.. _class_CanvasItem_draw_polygon:
|
||||
|
||||
- void **draw_polygon** **(** :ref:`Vector2Array<class_vector2array>` points, :ref:`ColorArray<class_colorarray>` colors, :ref:`Vector2Array<class_vector2array>` uvs=Array(), :ref:`Texture<class_texture>` texture=Object() **)**
|
||||
|
||||
Draw a polygon of any amount of points, convex or concave.
|
||||
|
||||
.. _class_CanvasItem_draw_colored_polygon:
|
||||
|
||||
- void **draw_colored_polygon** **(** :ref:`Vector2Array<class_vector2array>` points, :ref:`Color<class_color>` color, :ref:`Vector2Array<class_vector2array>` uvs=Array(), :ref:`Texture<class_texture>` texture=Object() **)**
|
||||
|
||||
Draw a colored polygon of any amount of points, convex or concave.
|
||||
|
||||
.. _class_CanvasItem_draw_string:
|
||||
|
||||
- void **draw_string** **(** :ref:`Font<class_font>` font, :ref:`Vector2<class_vector2>` pos, :ref:`String<class_string>` text, :ref:`Color<class_color>` modulate=Color(1,1,1,1), :ref:`int<class_int>` clip_w=-1 **)**
|
||||
|
||||
Draw a string using a custom font.
|
||||
|
||||
.. _class_CanvasItem_draw_char:
|
||||
|
||||
- :ref:`float<class_float>` **draw_char** **(** :ref:`Font<class_font>` font, :ref:`Vector2<class_vector2>` pos, :ref:`String<class_string>` char, :ref:`String<class_string>` next, :ref:`Color<class_color>` modulate=Color(1,1,1,1) **)**
|
||||
|
||||
Draw a string character using a custom font. Returns the advance, depending on the char width and kerning with an optional next char.
|
||||
|
||||
.. _class_CanvasItem_draw_set_transform:
|
||||
|
||||
- void **draw_set_transform** **(** :ref:`Vector2<class_vector2>` pos, :ref:`float<class_float>` rot, :ref:`Vector2<class_vector2>` scale **)**
|
||||
|
||||
Set a custom transform for drawing. Anything drawn afterwards will be transformed by this.
|
||||
|
||||
.. _class_CanvasItem_get_transform:
|
||||
|
||||
- :ref:`Matrix32<class_matrix32>` **get_transform** **(** **)** const
|
||||
|
||||
.. _class_CanvasItem_get_global_transform:
|
||||
|
||||
- :ref:`Matrix32<class_matrix32>` **get_global_transform** **(** **)** const
|
||||
|
||||
.. _class_CanvasItem_get_global_transform_with_canvas:
|
||||
|
||||
- :ref:`Matrix32<class_matrix32>` **get_global_transform_with_canvas** **(** **)** const
|
||||
|
||||
.. _class_CanvasItem_get_viewport_transform:
|
||||
|
||||
- :ref:`Matrix32<class_matrix32>` **get_viewport_transform** **(** **)** const
|
||||
|
||||
.. _class_CanvasItem_get_viewport_rect:
|
||||
|
||||
- :ref:`Rect2<class_rect2>` **get_viewport_rect** **(** **)** const
|
||||
|
||||
.. _class_CanvasItem_get_canvas_transform:
|
||||
|
||||
- :ref:`Matrix32<class_matrix32>` **get_canvas_transform** **(** **)** const
|
||||
|
||||
.. _class_CanvasItem_get_local_mouse_pos:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_local_mouse_pos** **(** **)** const
|
||||
|
||||
.. _class_CanvasItem_get_global_mouse_pos:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_global_mouse_pos** **(** **)** const
|
||||
|
||||
.. _class_CanvasItem_get_canvas:
|
||||
|
||||
- :ref:`RID<class_rid>` **get_canvas** **(** **)** const
|
||||
|
||||
.. _class_CanvasItem_get_world_2d:
|
||||
|
||||
- :ref:`Object<class_object>` **get_world_2d** **(** **)** const
|
||||
|
||||
.. _class_CanvasItem_set_material:
|
||||
|
||||
- void **set_material** **(** :ref:`CanvasItemMaterial<class_canvasitemmaterial>` material **)**
|
||||
|
||||
.. _class_CanvasItem_get_material:
|
||||
|
||||
- :ref:`CanvasItemMaterial<class_canvasitemmaterial>` **get_material** **(** **)** const
|
||||
|
||||
.. _class_CanvasItem_set_use_parent_material:
|
||||
|
||||
- void **set_use_parent_material** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
.. _class_CanvasItem_get_use_parent_material:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_use_parent_material** **(** **)** const
|
||||
|
||||
.. _class_CanvasItem_make_input_local:
|
||||
|
||||
- :ref:`InputEvent<class_inputevent>` **make_input_local** **(** :ref:`InputEvent<class_inputevent>` event **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
.. _class_CanvasItemMaterial:
|
||||
|
||||
CanvasItemMaterial
|
||||
==================
|
||||
|
||||
Inherits: :ref:`Resource<class_resource>`
|
||||
-----------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_shader<class_CanvasItemMaterial_set_shader>` **(** :ref:`Shader<class_shader>` shader **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Shader<class_shader>` | :ref:`get_shader<class_CanvasItemMaterial_get_shader>` **(** **)** const |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_shader_param<class_CanvasItemMaterial_set_shader_param>` **(** :ref:`String<class_string>` param, var value **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`get_shader_param<class_CanvasItemMaterial_get_shader_param>` **(** :ref:`String<class_string>` param **)** const |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_shading_mode<class_CanvasItemMaterial_set_shading_mode>` **(** :ref:`int<class_int>` mode **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_shading_mode<class_CanvasItemMaterial_get_shading_mode>` **(** **)** const |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **SHADING_NORMAL** = **0**
|
||||
- **SHADING_UNSHADED** = **1**
|
||||
- **SHADING_ONLY_LIGHT** = **2**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_CanvasItemMaterial_set_shader:
|
||||
|
||||
- void **set_shader** **(** :ref:`Shader<class_shader>` shader **)**
|
||||
|
||||
.. _class_CanvasItemMaterial_get_shader:
|
||||
|
||||
- :ref:`Shader<class_shader>` **get_shader** **(** **)** const
|
||||
|
||||
.. _class_CanvasItemMaterial_set_shader_param:
|
||||
|
||||
- void **set_shader_param** **(** :ref:`String<class_string>` param, var value **)**
|
||||
|
||||
.. _class_CanvasItemMaterial_get_shader_param:
|
||||
|
||||
- void **get_shader_param** **(** :ref:`String<class_string>` param **)** const
|
||||
|
||||
.. _class_CanvasItemMaterial_set_shading_mode:
|
||||
|
||||
- void **set_shading_mode** **(** :ref:`int<class_int>` mode **)**
|
||||
|
||||
.. _class_CanvasItemMaterial_get_shading_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_shading_mode** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
.. _class_CanvasItemShader:
|
||||
|
||||
CanvasItemShader
|
||||
================
|
||||
|
||||
Inherits: :ref:`Shader<class_shader>`
|
||||
-------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
.. _class_CanvasItemShaderGraph:
|
||||
|
||||
CanvasItemShaderGraph
|
||||
=====================
|
||||
|
||||
Inherits: :ref:`ShaderGraph<class_shadergraph>`
|
||||
-----------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
.. _class_CanvasLayer:
|
||||
|
||||
CanvasLayer
|
||||
===========
|
||||
|
||||
Inherits: :ref:`Node<class_node>`
|
||||
---------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Canvas Item layer.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_layer<class_CanvasLayer_set_layer>` **(** :ref:`int<class_int>` layer **)** |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_layer<class_CanvasLayer_get_layer>` **(** **)** const |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_transform<class_CanvasLayer_set_transform>` **(** :ref:`Matrix32<class_matrix32>` transform **)** |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Matrix32<class_matrix32>` | :ref:`get_transform<class_CanvasLayer_get_transform>` **(** **)** const |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_offset<class_CanvasLayer_set_offset>` **(** :ref:`Vector2<class_vector2>` offset **)** |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_offset<class_CanvasLayer_get_offset>` **(** **)** const |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_rotation<class_CanvasLayer_set_rotation>` **(** :ref:`float<class_float>` rotation **)** |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_rotation<class_CanvasLayer_get_rotation>` **(** **)** const |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_scale<class_CanvasLayer_set_scale>` **(** :ref:`Vector2<class_vector2>` scale **)** |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_scale<class_CanvasLayer_get_scale>` **(** **)** const |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------------------------+
|
||||
| Canvas | :ref:`get_world_2d<class_CanvasLayer_get_world_2d>` **(** **)** const |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_rid>` | :ref:`get_viewport<class_CanvasLayer_get_viewport>` **(** **)** const |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Canvas Item layer. :ref:`CanvasItem<class_canvasitem>` nodes that are direct or indirect children of a :ref:`CanvasLayer<class_canvaslayer>` will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a :ref:`CanvasLayer<class_canvaslayer>` with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_CanvasLayer_set_layer:
|
||||
|
||||
- void **set_layer** **(** :ref:`int<class_int>` layer **)**
|
||||
|
||||
Set the layer index, determines the draw order, a lower value will be below a higher one.
|
||||
|
||||
.. _class_CanvasLayer_get_layer:
|
||||
|
||||
- :ref:`int<class_int>` **get_layer** **(** **)** const
|
||||
|
||||
Return the layer index, determines the draw order, a lower value will be below a higher one.
|
||||
|
||||
.. _class_CanvasLayer_set_transform:
|
||||
|
||||
- void **set_transform** **(** :ref:`Matrix32<class_matrix32>` transform **)**
|
||||
|
||||
Set the base transform for this layer.
|
||||
|
||||
.. _class_CanvasLayer_get_transform:
|
||||
|
||||
- :ref:`Matrix32<class_matrix32>` **get_transform** **(** **)** const
|
||||
|
||||
Return the base transform for this layer.
|
||||
|
||||
.. _class_CanvasLayer_set_offset:
|
||||
|
||||
- void **set_offset** **(** :ref:`Vector2<class_vector2>` offset **)**
|
||||
|
||||
Set the base offset for this layer (helper).
|
||||
|
||||
.. _class_CanvasLayer_get_offset:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_offset** **(** **)** const
|
||||
|
||||
Return the base offset for this layer (helper).
|
||||
|
||||
.. _class_CanvasLayer_set_rotation:
|
||||
|
||||
- void **set_rotation** **(** :ref:`float<class_float>` rotation **)**
|
||||
|
||||
Set the base rotation for this layer (helper).
|
||||
|
||||
.. _class_CanvasLayer_get_rotation:
|
||||
|
||||
- :ref:`float<class_float>` **get_rotation** **(** **)** const
|
||||
|
||||
Return the base rotation for this layer (helper).
|
||||
|
||||
.. _class_CanvasLayer_set_scale:
|
||||
|
||||
- void **set_scale** **(** :ref:`Vector2<class_vector2>` scale **)**
|
||||
|
||||
Set the base scale for this layer (helper).
|
||||
|
||||
.. _class_CanvasLayer_get_scale:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_scale** **(** **)** const
|
||||
|
||||
Return the base scale for this layer (helper).
|
||||
|
||||
.. _class_CanvasLayer_get_world_2d:
|
||||
|
||||
- Canvas **get_world_2d** **(** **)** const
|
||||
|
||||
Return the :ref:`World2D<class_world2d>` used by this layer.
|
||||
|
||||
.. _class_CanvasLayer_get_viewport:
|
||||
|
||||
- :ref:`RID<class_rid>` **get_viewport** **(** **)** const
|
||||
|
||||
Return the viewport RID for this layer.
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
.. _class_CanvasModulate:
|
||||
|
||||
CanvasModulate
|
||||
==============
|
||||
|
||||
Inherits: :ref:`Node2D<class_node2d>`
|
||||
-------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_color<class_CanvasModulate_set_color>` **(** :ref:`Color<class_color>` color **)** |
|
||||
+----------------------------+------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`get_color<class_CanvasModulate_get_color>` **(** **)** const |
|
||||
+----------------------------+------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_CanvasModulate_set_color:
|
||||
|
||||
- void **set_color** **(** :ref:`Color<class_color>` color **)**
|
||||
|
||||
.. _class_CanvasModulate_get_color:
|
||||
|
||||
- :ref:`Color<class_color>` **get_color** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
.. _class_CapsuleShape:
|
||||
|
||||
CapsuleShape
|
||||
============
|
||||
|
||||
Inherits: :ref:`Shape<class_shape>`
|
||||
-----------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Capsule shape resource.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_radius<class_CapsuleShape_set_radius>` **(** :ref:`float<class_float>` radius **)** |
|
||||
+----------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_radius<class_CapsuleShape_get_radius>` **(** **)** const |
|
||||
+----------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_height<class_CapsuleShape_set_height>` **(** :ref:`float<class_float>` height **)** |
|
||||
+----------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_height<class_CapsuleShape_get_height>` **(** **)** const |
|
||||
+----------------------------+-------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Capsule shape resource, which can be set into a :ref:`PhysicsBody<class_physicsbody>` or area.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_CapsuleShape_set_radius:
|
||||
|
||||
- void **set_radius** **(** :ref:`float<class_float>` radius **)**
|
||||
|
||||
Set the capsule radius.
|
||||
|
||||
.. _class_CapsuleShape_get_radius:
|
||||
|
||||
- :ref:`float<class_float>` **get_radius** **(** **)** const
|
||||
|
||||
Return the capsule radius.
|
||||
|
||||
.. _class_CapsuleShape_set_height:
|
||||
|
||||
- void **set_height** **(** :ref:`float<class_float>` height **)**
|
||||
|
||||
Set the capsule height.
|
||||
|
||||
.. _class_CapsuleShape_get_height:
|
||||
|
||||
- :ref:`float<class_float>` **get_height** **(** **)** const
|
||||
|
||||
Return the capsule height.
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
.. _class_CapsuleShape2D:
|
||||
|
||||
CapsuleShape2D
|
||||
==============
|
||||
|
||||
Inherits: :ref:`Shape2D<class_shape2d>`
|
||||
---------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Capsule 2D shape resource for physics.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_radius<class_CapsuleShape2D_set_radius>` **(** :ref:`float<class_float>` radius **)** |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_radius<class_CapsuleShape2D_get_radius>` **(** **)** const |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_height<class_CapsuleShape2D_set_height>` **(** :ref:`float<class_float>` height **)** |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_height<class_CapsuleShape2D_get_height>` **(** **)** const |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Capsule 2D shape resource for physics. A capsule (or sometimes called "pill") is like a line grown in all directions. It has a radius and a height, and is often useful for modelling biped characters.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_CapsuleShape2D_set_radius:
|
||||
|
||||
- void **set_radius** **(** :ref:`float<class_float>` radius **)**
|
||||
|
||||
Set the radius of the :ref:`CapsuleShape2D<class_capsuleshape2d>`.
|
||||
|
||||
.. _class_CapsuleShape2D_get_radius:
|
||||
|
||||
- :ref:`float<class_float>` **get_radius** **(** **)** const
|
||||
|
||||
Return the radius of the :ref:`CapsuleShape2D<class_capsuleshape2d>`.
|
||||
|
||||
.. _class_CapsuleShape2D_set_height:
|
||||
|
||||
- void **set_height** **(** :ref:`float<class_float>` height **)**
|
||||
|
||||
Set the height of the :ref:`CapsuleShape2D<class_capsuleshape2d>`.
|
||||
|
||||
.. _class_CapsuleShape2D_get_height:
|
||||
|
||||
- :ref:`float<class_float>` **get_height** **(** **)** const
|
||||
|
||||
Return the height of the :ref:`CapsuleShape2D<class_capsuleshape2d>`.
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
.. _class_CenterContainer:
|
||||
|
||||
CenterContainer
|
||||
===============
|
||||
|
||||
Inherits: :ref:`Container<class_container>`
|
||||
-------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Keeps children controls centered.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------+--------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_use_top_left<class_CenterContainer_set_use_top_left>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+--------------------------+--------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_using_top_left<class_CenterContainer_is_using_top_left>` **(** **)** const |
|
||||
+--------------------------+--------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
CenterContainer Keeps children controls centered. This container keeps all children to their minimum size, in the center.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_CenterContainer_set_use_top_left:
|
||||
|
||||
- void **set_use_top_left** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
.. _class_CenterContainer_is_using_top_left:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_using_top_left** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
.. _class_CheckBox:
|
||||
|
||||
CheckBox
|
||||
========
|
||||
|
||||
Inherits: :ref:`Button<class_button>`
|
||||
-------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
.. _class_CheckButton:
|
||||
|
||||
CheckButton
|
||||
===========
|
||||
|
||||
Inherits: :ref:`Button<class_button>`
|
||||
-------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Checkable button.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
CheckButton is a toggle button displayed as a check field.
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
.. _class_CircleShape2D:
|
||||
|
||||
CircleShape2D
|
||||
=============
|
||||
|
||||
Inherits: :ref:`Shape2D<class_shape2d>`
|
||||
---------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Circular Shape for 2D Physics.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_radius<class_CircleShape2D_set_radius>` **(** :ref:`float<class_float>` radius **)** |
|
||||
+----------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_radius<class_CircleShape2D_get_radius>` **(** **)** const |
|
||||
+----------------------------+--------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Circular Shape for 2D Physics. This shape is useful for modelling balls or small characters and it's collision detection with everything else is very fast.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_CircleShape2D_set_radius:
|
||||
|
||||
- void **set_radius** **(** :ref:`float<class_float>` radius **)**
|
||||
|
||||
Set the radius of the circle shape.
|
||||
|
||||
.. _class_CircleShape2D_get_radius:
|
||||
|
||||
- :ref:`float<class_float>` **get_radius** **(** **)** const
|
||||
|
||||
Return the radius of the circle shape.
|
||||
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
.. _class_CollisionObject:
|
||||
|
||||
CollisionObject
|
||||
===============
|
||||
|
||||
Inherits: :ref:`Spatial<class_spatial>`
|
||||
---------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_input_event<class_CollisionObject__input_event>` **(** :ref:`Object<class_object>` camera, :ref:`InputEvent<class_inputevent>` event, :ref:`Vector3<class_vector3>` click_pos, :ref:`Vector3<class_vector3>` click_normal, :ref:`int<class_int>` shape_idx **)** virtual |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_shape<class_CollisionObject_add_shape>` **(** :ref:`Shape<class_shape>` shape, :ref:`Transform<class_transform>` transform=Transform() **)** |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_shape_count<class_CollisionObject_get_shape_count>` **(** **)** const |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_shape<class_CollisionObject_set_shape>` **(** :ref:`int<class_int>` shape_idx, :ref:`Shape<class_shape>` shape **)** |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_shape_transform<class_CollisionObject_set_shape_transform>` **(** :ref:`int<class_int>` shape_idx, :ref:`Transform<class_transform>` transform **)** |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_shape_as_trigger<class_CollisionObject_set_shape_as_trigger>` **(** :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` enable **)** |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_shape_set_as_trigger<class_CollisionObject_is_shape_set_as_trigger>` **(** :ref:`int<class_int>` shape_idx **)** const |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Shape<class_shape>` | :ref:`get_shape<class_CollisionObject_get_shape>` **(** :ref:`int<class_int>` shape_idx **)** const |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Transform<class_transform>` | :ref:`get_shape_transform<class_CollisionObject_get_shape_transform>` **(** :ref:`int<class_int>` shape_idx **)** const |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_shape<class_CollisionObject_remove_shape>` **(** :ref:`int<class_int>` shape_idx **)** |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_shapes<class_CollisionObject_clear_shapes>` **(** **)** |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_ray_pickable<class_CollisionObject_set_ray_pickable>` **(** :ref:`bool<class_bool>` ray_pickable **)** |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_ray_pickable<class_CollisionObject_is_ray_pickable>` **(** **)** const |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_capture_input_on_drag<class_CollisionObject_set_capture_input_on_drag>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_capture_input_on_drag<class_CollisionObject_get_capture_input_on_drag>` **(** **)** const |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_rid>` | :ref:`get_rid<class_CollisionObject_get_rid>` **(** **)** const |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **mouse_enter** **(** **)**
|
||||
- **input_event** **(** :ref:`Object<class_object>` camera, :ref:`InputEvent<class_inputevent>` event, :ref:`Vector3<class_vector3>` click_pos, :ref:`Vector3<class_vector3>` click_normal, :ref:`int<class_int>` shape_idx **)**
|
||||
- **mouse_exit** **(** **)**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_CollisionObject__input_event:
|
||||
|
||||
- void **_input_event** **(** :ref:`Object<class_object>` camera, :ref:`InputEvent<class_inputevent>` event, :ref:`Vector3<class_vector3>` click_pos, :ref:`Vector3<class_vector3>` click_normal, :ref:`int<class_int>` shape_idx **)** virtual
|
||||
|
||||
.. _class_CollisionObject_add_shape:
|
||||
|
||||
- void **add_shape** **(** :ref:`Shape<class_shape>` shape, :ref:`Transform<class_transform>` transform=Transform() **)**
|
||||
|
||||
.. _class_CollisionObject_get_shape_count:
|
||||
|
||||
- :ref:`int<class_int>` **get_shape_count** **(** **)** const
|
||||
|
||||
.. _class_CollisionObject_set_shape:
|
||||
|
||||
- void **set_shape** **(** :ref:`int<class_int>` shape_idx, :ref:`Shape<class_shape>` shape **)**
|
||||
|
||||
.. _class_CollisionObject_set_shape_transform:
|
||||
|
||||
- void **set_shape_transform** **(** :ref:`int<class_int>` shape_idx, :ref:`Transform<class_transform>` transform **)**
|
||||
|
||||
.. _class_CollisionObject_set_shape_as_trigger:
|
||||
|
||||
- void **set_shape_as_trigger** **(** :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
.. _class_CollisionObject_is_shape_set_as_trigger:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_shape_set_as_trigger** **(** :ref:`int<class_int>` shape_idx **)** const
|
||||
|
||||
.. _class_CollisionObject_get_shape:
|
||||
|
||||
- :ref:`Shape<class_shape>` **get_shape** **(** :ref:`int<class_int>` shape_idx **)** const
|
||||
|
||||
.. _class_CollisionObject_get_shape_transform:
|
||||
|
||||
- :ref:`Transform<class_transform>` **get_shape_transform** **(** :ref:`int<class_int>` shape_idx **)** const
|
||||
|
||||
.. _class_CollisionObject_remove_shape:
|
||||
|
||||
- void **remove_shape** **(** :ref:`int<class_int>` shape_idx **)**
|
||||
|
||||
.. _class_CollisionObject_clear_shapes:
|
||||
|
||||
- void **clear_shapes** **(** **)**
|
||||
|
||||
.. _class_CollisionObject_set_ray_pickable:
|
||||
|
||||
- void **set_ray_pickable** **(** :ref:`bool<class_bool>` ray_pickable **)**
|
||||
|
||||
.. _class_CollisionObject_is_ray_pickable:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_ray_pickable** **(** **)** const
|
||||
|
||||
.. _class_CollisionObject_set_capture_input_on_drag:
|
||||
|
||||
- void **set_capture_input_on_drag** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
.. _class_CollisionObject_get_capture_input_on_drag:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_capture_input_on_drag** **(** **)** const
|
||||
|
||||
.. _class_CollisionObject_get_rid:
|
||||
|
||||
- :ref:`RID<class_rid>` **get_rid** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
.. _class_CollisionObject2D:
|
||||
|
||||
CollisionObject2D
|
||||
=================
|
||||
|
||||
Inherits: :ref:`Node2D<class_node2d>`
|
||||
-------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Base node for 2D collisionables.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_input_event<class_CollisionObject2D__input_event>` **(** :ref:`Object<class_object>` viewport, :ref:`InputEvent<class_inputevent>` event, :ref:`int<class_int>` shape_idx **)** virtual |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_shape<class_CollisionObject2D_add_shape>` **(** :ref:`Shape2D<class_shape2d>` shape, :ref:`Matrix32<class_matrix32>` transform=1,0, 0,1, 0,0 **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_shape_count<class_CollisionObject2D_get_shape_count>` **(** **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_shape<class_CollisionObject2D_set_shape>` **(** :ref:`int<class_int>` shape_idx, :ref:`Shape<class_shape>` shape **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_shape_transform<class_CollisionObject2D_set_shape_transform>` **(** :ref:`int<class_int>` shape_idx, :ref:`Matrix32<class_matrix32>` transform **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_shape_as_trigger<class_CollisionObject2D_set_shape_as_trigger>` **(** :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` enable **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Shape2D<class_shape2d>` | :ref:`get_shape<class_CollisionObject2D_get_shape>` **(** :ref:`int<class_int>` shape_idx **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Matrix32<class_matrix32>` | :ref:`get_shape_transform<class_CollisionObject2D_get_shape_transform>` **(** :ref:`int<class_int>` shape_idx **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_shape_set_as_trigger<class_CollisionObject2D_is_shape_set_as_trigger>` **(** :ref:`int<class_int>` shape_idx **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_shape<class_CollisionObject2D_remove_shape>` **(** :ref:`int<class_int>` shape_idx **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_shapes<class_CollisionObject2D_clear_shapes>` **(** **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_rid>` | :ref:`get_rid<class_CollisionObject2D_get_rid>` **(** **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_pickable<class_CollisionObject2D_set_pickable>` **(** :ref:`bool<class_bool>` enabled **)** |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_pickable<class_CollisionObject2D_is_pickable>` **(** **)** const |
|
||||
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **mouse_enter** **(** **)**
|
||||
- **input_event** **(** :ref:`Object<class_object>` viewport, :ref:`InputEvent<class_inputevent>` event, :ref:`int<class_int>` shape_idx **)**
|
||||
- **mouse_exit** **(** **)**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
CollisionObject2D is the base class for 2D physics collisionables. They can hold any number of 2D collision shapes. Usually, they are edited by placing :ref:`CollisionShape2D<class_collisionshape2d>` and/or :ref:`CollisionPolygon2D<class_collisionpolygon2d>` nodes as children. Such nodes are for reference and not present outside the editor, so code should use the regular shape API.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_CollisionObject2D__input_event:
|
||||
|
||||
- void **_input_event** **(** :ref:`Object<class_object>` viewport, :ref:`InputEvent<class_inputevent>` event, :ref:`int<class_int>` shape_idx **)** virtual
|
||||
|
||||
This method can be used to override normal input processing. The first parameter is the viewport where the event took place. The second holds the input event received, and the third the shape of this object where it happened.
|
||||
|
||||
.. _class_CollisionObject2D_add_shape:
|
||||
|
||||
- void **add_shape** **(** :ref:`Shape2D<class_shape2d>` shape, :ref:`Matrix32<class_matrix32>` transform=1,0, 0,1, 0,0 **)**
|
||||
|
||||
Add a :ref:`Shape2D<class_shape2d>` to the collision body, with a given custom transform.
|
||||
|
||||
.. _class_CollisionObject2D_get_shape_count:
|
||||
|
||||
- :ref:`int<class_int>` **get_shape_count** **(** **)** const
|
||||
|
||||
Return the amount of shapes in the collision body. Because a :ref:`CollisionPolygon2D<class_collisionpolygon2d>` can generate more than one :ref:`Shape2D<class_shape2d>`, the amount returned does not have to match the sum of :ref:`CollisionShape2D<class_collisionshape2d>` and :ref:`CollisionPolygon2D<class_collisionpolygon2d>`.
|
||||
|
||||
.. _class_CollisionObject2D_set_shape:
|
||||
|
||||
- void **set_shape** **(** :ref:`int<class_int>` shape_idx, :ref:`Shape<class_shape>` shape **)**
|
||||
|
||||
Change a shape in the collision body.
|
||||
|
||||
.. _class_CollisionObject2D_set_shape_transform:
|
||||
|
||||
- void **set_shape_transform** **(** :ref:`int<class_int>` shape_idx, :ref:`Matrix32<class_matrix32>` transform **)**
|
||||
|
||||
Change the shape transform in the collision body.
|
||||
|
||||
.. _class_CollisionObject2D_set_shape_as_trigger:
|
||||
|
||||
- void **set_shape_as_trigger** **(** :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
Set whether a shape is a trigger. A trigger shape detects collisions, but is otherwise unaffected by physics (i.e. colliding objects will not get blocked).
|
||||
|
||||
.. _class_CollisionObject2D_get_shape:
|
||||
|
||||
- :ref:`Shape2D<class_shape2d>` **get_shape** **(** :ref:`int<class_int>` shape_idx **)** const
|
||||
|
||||
Return the shape in the given index.
|
||||
|
||||
.. _class_CollisionObject2D_get_shape_transform:
|
||||
|
||||
- :ref:`Matrix32<class_matrix32>` **get_shape_transform** **(** :ref:`int<class_int>` shape_idx **)** const
|
||||
|
||||
Return the shape transform in the given index.
|
||||
|
||||
.. _class_CollisionObject2D_is_shape_set_as_trigger:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_shape_set_as_trigger** **(** :ref:`int<class_int>` shape_idx **)** const
|
||||
|
||||
Return whether a shape is a trigger. A trigger shape detects collisions, but is otherwise unaffected by physics (i.e. colliding objects will not get blocked).
|
||||
|
||||
.. _class_CollisionObject2D_remove_shape:
|
||||
|
||||
- void **remove_shape** **(** :ref:`int<class_int>` shape_idx **)**
|
||||
|
||||
Remove the shape in the given index.
|
||||
|
||||
.. _class_CollisionObject2D_clear_shapes:
|
||||
|
||||
- void **clear_shapes** **(** **)**
|
||||
|
||||
Remove all shapes.
|
||||
|
||||
.. _class_CollisionObject2D_get_rid:
|
||||
|
||||
- :ref:`RID<class_rid>` **get_rid** **(** **)** const
|
||||
|
||||
Return the RID of this object.
|
||||
|
||||
.. _class_CollisionObject2D_set_pickable:
|
||||
|
||||
- void **set_pickable** **(** :ref:`bool<class_bool>` enabled **)**
|
||||
|
||||
Set whether this object is pickable. A pickable object can detect the mouse pointer enter/leave it and, if the mouse is inside it, report input events.
|
||||
|
||||
.. _class_CollisionObject2D_is_pickable:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_pickable** **(** **)** const
|
||||
|
||||
Return whether this object is pickable.
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
.. _class_CollisionPolygon:
|
||||
|
||||
CollisionPolygon
|
||||
================
|
||||
|
||||
Inherits: :ref:`Spatial<class_spatial>`
|
||||
---------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_build_mode<class_CollisionPolygon_set_build_mode>` **(** :ref:`int<class_int>` build_mode **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_build_mode<class_CollisionPolygon_get_build_mode>` **(** **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_depth<class_CollisionPolygon_set_depth>` **(** :ref:`float<class_float>` depth **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_depth<class_CollisionPolygon_get_depth>` **(** **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_polygon<class_CollisionPolygon_set_polygon>` **(** :ref:`Vector2Array<class_vector2array>` polygon **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2Array<class_vector2array>` | :ref:`get_polygon<class_CollisionPolygon_get_polygon>` **(** **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_collision_object_first_shape<class_CollisionPolygon_get_collision_object_first_shape>` **(** **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_collision_object_last_shape<class_CollisionPolygon_get_collision_object_last_shape>` **(** **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_CollisionPolygon_set_build_mode:
|
||||
|
||||
- void **set_build_mode** **(** :ref:`int<class_int>` build_mode **)**
|
||||
|
||||
.. _class_CollisionPolygon_get_build_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_build_mode** **(** **)** const
|
||||
|
||||
.. _class_CollisionPolygon_set_depth:
|
||||
|
||||
- void **set_depth** **(** :ref:`float<class_float>` depth **)**
|
||||
|
||||
.. _class_CollisionPolygon_get_depth:
|
||||
|
||||
- :ref:`float<class_float>` **get_depth** **(** **)** const
|
||||
|
||||
.. _class_CollisionPolygon_set_polygon:
|
||||
|
||||
- void **set_polygon** **(** :ref:`Vector2Array<class_vector2array>` polygon **)**
|
||||
|
||||
.. _class_CollisionPolygon_get_polygon:
|
||||
|
||||
- :ref:`Vector2Array<class_vector2array>` **get_polygon** **(** **)** const
|
||||
|
||||
.. _class_CollisionPolygon_get_collision_object_first_shape:
|
||||
|
||||
- :ref:`int<class_int>` **get_collision_object_first_shape** **(** **)** const
|
||||
|
||||
.. _class_CollisionPolygon_get_collision_object_last_shape:
|
||||
|
||||
- :ref:`int<class_int>` **get_collision_object_last_shape** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
.. _class_CollisionPolygon2D:
|
||||
|
||||
CollisionPolygon2D
|
||||
==================
|
||||
|
||||
Inherits: :ref:`Node2D<class_node2d>`
|
||||
-------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Editor-only class for easy editing of collision polygons.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_polygon<class_CollisionPolygon2D_set_polygon>` **(** :ref:`Vector2Array<class_vector2array>` polygon **)** |
|
||||
+------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2Array<class_vector2array>` | :ref:`get_polygon<class_CollisionPolygon2D_get_polygon>` **(** **)** const |
|
||||
+------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_build_mode<class_CollisionPolygon2D_set_build_mode>` **(** :ref:`int<class_int>` build_mode **)** |
|
||||
+------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_build_mode<class_CollisionPolygon2D_get_build_mode>` **(** **)** const |
|
||||
+------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_trigger<class_CollisionPolygon2D_set_trigger>` **(** :ref:`bool<class_bool>` trigger **)** |
|
||||
+------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_trigger<class_CollisionPolygon2D_is_trigger>` **(** **)** const |
|
||||
+------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_collision_object_first_shape<class_CollisionPolygon2D_get_collision_object_first_shape>` **(** **)** const |
|
||||
+------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_collision_object_last_shape<class_CollisionPolygon2D_get_collision_object_last_shape>` **(** **)** const |
|
||||
+------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in :ref:`CollisionObject2D<class_collisionobject2d>`. This is not accessible from regular code. This class is for editing custom shape polygons.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_CollisionPolygon2D_set_polygon:
|
||||
|
||||
- void **set_polygon** **(** :ref:`Vector2Array<class_vector2array>` polygon **)**
|
||||
|
||||
Set the array of points forming the polygon.
|
||||
|
||||
When editing the point list via the editor, depending on :ref:`get_build_mode<CollisionPolygon2D_get_build_mode>`, it has to be a list of points (for :ref:`code<class_code>`build_mode:ref:`/code<class_/code>`=0), or a list of lines (for :ref:`code<class_code>`build_mode:ref:`/code<class_/code>`=1). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point.
|
||||
|
||||
.. _class_CollisionPolygon2D_get_polygon:
|
||||
|
||||
- :ref:`Vector2Array<class_vector2array>` **get_polygon** **(** **)** const
|
||||
|
||||
Return the list of points that define the polygon.
|
||||
|
||||
.. _class_CollisionPolygon2D_set_build_mode:
|
||||
|
||||
- void **set_build_mode** **(** :ref:`int<class_int>` build_mode **)**
|
||||
|
||||
Set whether the polygon is to be a :ref:`ConvexPolygon2D<class_convexpolygon2d>` (:ref:`code<class_code>`build_mode:ref:`/code<class_/code>`=0), or a :ref:`ConcavePolygon2D<class_concavepolygon2d>` (:ref:`code<class_code>`build_mode:ref:`/code<class_/code>`=1).
|
||||
|
||||
.. _class_CollisionPolygon2D_get_build_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_build_mode** **(** **)** const
|
||||
|
||||
Return whether the polygon is a :ref:`ConvexPolygon2D<class_convexpolygon2d>` (:ref:`code<class_code>`build_mode:ref:`/code<class_/code>`=0), or a :ref:`ConcavePolygon2D<class_concavepolygon2d>` (:ref:`code<class_code>`build_mode:ref:`/code<class_/code>`=1).
|
||||
|
||||
.. _class_CollisionPolygon2D_set_trigger:
|
||||
|
||||
- void **set_trigger** **(** :ref:`bool<class_bool>` trigger **)**
|
||||
|
||||
Set whether this polygon is a trigger. A trigger polygon detects collisions, but is otherwise unaffected by physics (i.e. colliding objects will not get blocked).
|
||||
|
||||
.. _class_CollisionPolygon2D_is_trigger:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_trigger** **(** **)** const
|
||||
|
||||
Return whether this polygon is a trigger.
|
||||
|
||||
.. _class_CollisionPolygon2D_get_collision_object_first_shape:
|
||||
|
||||
- :ref:`int<class_int>` **get_collision_object_first_shape** **(** **)** const
|
||||
|
||||
Return the index of the first shape generated by the editor.
|
||||
|
||||
When :ref:`code<class_code>`build_mode:ref:`/code<class_/code>` is set to generate convex polygons, the shape shown in the editor may be decomopsed into many convex polygons. In that case, a range of indexes is needed to directly access the :ref:`Shape2D<class_shape2d>`s.
|
||||
|
||||
When :ref:`code<class_code>`build_mode:ref:`/code<class_/code>` is set to generate concave polygons, there is only one :ref:`Shape2D<class_shape2d>` generated, so the start index and the end index are the same.
|
||||
|
||||
.. _class_CollisionPolygon2D_get_collision_object_last_shape:
|
||||
|
||||
- :ref:`int<class_int>` **get_collision_object_last_shape** **(** **)** const
|
||||
|
||||
Return the index of the last shape generated by the editor.
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
.. _class_CollisionShape:
|
||||
|
||||
CollisionShape
|
||||
==============
|
||||
|
||||
Inherits: :ref:`Spatial<class_spatial>`
|
||||
---------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`resource_changed<class_CollisionShape_resource_changed>` **(** :ref:`Object<class_object>` resource **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_shape<class_CollisionShape_set_shape>` **(** :ref:`Object<class_object>` shape **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`get_shape<class_CollisionShape_get_shape>` **(** **)** const |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_trigger<class_CollisionShape_set_trigger>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_trigger<class_CollisionShape_is_trigger>` **(** **)** const |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`make_convex_from_brothers<class_CollisionShape_make_convex_from_brothers>` **(** **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_collision_object_shape_index<class_CollisionShape_get_collision_object_shape_index>` **(** **)** const |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_CollisionShape_resource_changed:
|
||||
|
||||
- void **resource_changed** **(** :ref:`Object<class_object>` resource **)**
|
||||
|
||||
.. _class_CollisionShape_set_shape:
|
||||
|
||||
- void **set_shape** **(** :ref:`Object<class_object>` shape **)**
|
||||
|
||||
.. _class_CollisionShape_get_shape:
|
||||
|
||||
- :ref:`Object<class_object>` **get_shape** **(** **)** const
|
||||
|
||||
.. _class_CollisionShape_set_trigger:
|
||||
|
||||
- void **set_trigger** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
.. _class_CollisionShape_is_trigger:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_trigger** **(** **)** const
|
||||
|
||||
.. _class_CollisionShape_make_convex_from_brothers:
|
||||
|
||||
- void **make_convex_from_brothers** **(** **)**
|
||||
|
||||
.. _class_CollisionShape_get_collision_object_shape_index:
|
||||
|
||||
- :ref:`int<class_int>` **get_collision_object_shape_index** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
.. _class_CollisionShape2D:
|
||||
|
||||
CollisionShape2D
|
||||
================
|
||||
|
||||
Inherits: :ref:`Node2D<class_node2d>`
|
||||
-------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Editor-only class for easy editing of shapes.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------+---------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_shape<class_CollisionShape2D_set_shape>` **(** :ref:`Object<class_object>` shape **)** |
|
||||
+------------------------------+---------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`get_shape<class_CollisionShape2D_get_shape>` **(** **)** const |
|
||||
+------------------------------+---------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_trigger<class_CollisionShape2D_set_trigger>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+------------------------------+---------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_trigger<class_CollisionShape2D_is_trigger>` **(** **)** const |
|
||||
+------------------------------+---------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_collision_object_shape_index<class_CollisionShape2D_get_collision_object_shape_index>` **(** **)** const |
|
||||
+------------------------------+---------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in :ref:`CollisionObject2D<class_collisionobject2d>`. This is not accessible from regular code.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_CollisionShape2D_set_shape:
|
||||
|
||||
- void **set_shape** **(** :ref:`Object<class_object>` shape **)**
|
||||
|
||||
Set this shape's :ref:`Shape2D<class_shape2d>`. This will not appear as a node, but can be directly edited as a property.
|
||||
|
||||
.. _class_CollisionShape2D_get_shape:
|
||||
|
||||
- :ref:`Object<class_object>` **get_shape** **(** **)** const
|
||||
|
||||
Return this shape's :ref:`Shape2D<class_shape2d>`.
|
||||
|
||||
.. _class_CollisionShape2D_set_trigger:
|
||||
|
||||
- void **set_trigger** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
Set whether this shape is a trigger. A trigger shape detects collisions, but is otherwise unaffected by physics (i.e. will not block movement of colliding objects).
|
||||
|
||||
.. _class_CollisionShape2D_is_trigger:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_trigger** **(** **)** const
|
||||
|
||||
Return whether this shape is a trigger.
|
||||
|
||||
.. _class_CollisionShape2D_get_collision_object_shape_index:
|
||||
|
||||
- :ref:`int<class_int>` **get_collision_object_shape_index** **(** **)** const
|
||||
|
||||
Return the index of this shape inside its container :ref:`CollisionObject2D<class_collisionobject2d>`. This can be used to directly access the underlying :ref:`Shape2D<class_shape2d>`.
|
||||
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
.. _class_Color:
|
||||
|
||||
Color
|
||||
=====
|
||||
|
||||
Category: Built-In Types
|
||||
------------------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Color in RGBA format.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`blend<class_Color_blend>` **(** :ref:`Color<class_color>` over **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`contrasted<class_Color_contrasted>` **(** **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`gray<class_Color_gray>` **(** **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`inverted<class_Color_inverted>` **(** **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`linear_interpolate<class_Color_linear_interpolate>` **(** :ref:`Color<class_color>` b, :ref:`float<class_float>` t **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`to_32<class_Color_to_32>` **(** **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`to_ARGB32<class_Color_to_ARGB32>` **(** **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`to_html<class_Color_to_html>` **(** :ref:`bool<class_bool>` with_alpha=True **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`Color<class_Color_Color>` **(** :ref:`float<class_float>` r, :ref:`float<class_float>` g, :ref:`float<class_float>` b, :ref:`float<class_float>` a **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`Color<class_Color_Color>` **(** :ref:`float<class_float>` r, :ref:`float<class_float>` g, :ref:`float<class_float>` b **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`Color<class_Color_Color>` **(** :ref:`int<class_int>` from **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`Color<class_Color_Color>` **(** :ref:`String<class_string>` from **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Variables
|
||||
----------------
|
||||
|
||||
- :ref:`float<class_float>` **r**
|
||||
- :ref:`float<class_float>` **g**
|
||||
- :ref:`float<class_float>` **b**
|
||||
- :ref:`float<class_float>` **a**
|
||||
- :ref:`float<class_float>` **h**
|
||||
- :ref:`float<class_float>` **s**
|
||||
- :ref:`float<class_float>` **v**
|
||||
- :ref:`int<class_int>` **r8**
|
||||
- :ref:`int<class_int>` **g8**
|
||||
- :ref:`int<class_int>` **b8**
|
||||
- :ref:`int<class_int>` **a8**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate() ) may accept values > 1.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Color_blend:
|
||||
|
||||
- :ref:`Color<class_color>` **blend** **(** :ref:`Color<class_color>` over **)**
|
||||
|
||||
.. _class_Color_contrasted:
|
||||
|
||||
- :ref:`Color<class_color>` **contrasted** **(** **)**
|
||||
|
||||
Return the most contrasting color with this one.
|
||||
|
||||
.. _class_Color_gray:
|
||||
|
||||
- :ref:`float<class_float>` **gray** **(** **)**
|
||||
|
||||
Convert the color to gray.
|
||||
|
||||
.. _class_Color_inverted:
|
||||
|
||||
- :ref:`Color<class_color>` **inverted** **(** **)**
|
||||
|
||||
Return the inverted color (1-r, 1-g, 1-b, 1-a).
|
||||
|
||||
.. _class_Color_linear_interpolate:
|
||||
|
||||
- :ref:`Color<class_color>` **linear_interpolate** **(** :ref:`Color<class_color>` b, :ref:`float<class_float>` t **)**
|
||||
|
||||
Return the linear interpolation with another color.
|
||||
|
||||
.. _class_Color_to_32:
|
||||
|
||||
- :ref:`int<class_int>` **to_32** **(** **)**
|
||||
|
||||
Convert the color to a 32 its integer (each byte represets a RGBA).
|
||||
|
||||
.. _class_Color_to_ARGB32:
|
||||
|
||||
- :ref:`int<class_int>` **to_ARGB32** **(** **)**
|
||||
|
||||
Convert color to ARGB32, more compatible with DirectX.
|
||||
|
||||
.. _class_Color_to_html:
|
||||
|
||||
- :ref:`String<class_string>` **to_html** **(** :ref:`bool<class_bool>` with_alpha=True **)**
|
||||
|
||||
Return the HTML hexadecimal color string.
|
||||
|
||||
.. _class_Color_Color:
|
||||
|
||||
- :ref:`Color<class_color>` **Color** **(** :ref:`float<class_float>` r, :ref:`float<class_float>` g, :ref:`float<class_float>` b, :ref:`float<class_float>` a **)**
|
||||
|
||||
Construct the color from an RGBA profile.
|
||||
|
||||
.. _class_Color_Color:
|
||||
|
||||
- :ref:`Color<class_color>` **Color** **(** :ref:`float<class_float>` r, :ref:`float<class_float>` g, :ref:`float<class_float>` b **)**
|
||||
|
||||
Construct the color from an RGBA profile.
|
||||
|
||||
.. _class_Color_Color:
|
||||
|
||||
- :ref:`Color<class_color>` **Color** **(** :ref:`int<class_int>` from **)**
|
||||
|
||||
Construct the color from an RGBA profile.
|
||||
|
||||
.. _class_Color_Color:
|
||||
|
||||
- :ref:`Color<class_color>` **Color** **(** :ref:`String<class_string>` from **)**
|
||||
|
||||
Construct the color from an RGBA profile.
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
.. _class_ColorArray:
|
||||
|
||||
ColorArray
|
||||
==========
|
||||
|
||||
Category: Built-In Types
|
||||
------------------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Array of Colors
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`push_back<class_ColorArray_push_back>` **(** :ref:`Color<class_color>` color **)** |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`resize<class_ColorArray_resize>` **(** :ref:`int<class_int>` idx **)** |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set<class_ColorArray_set>` **(** :ref:`int<class_int>` idx, :ref:`Color<class_color>` color **)** |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`size<class_ColorArray_size>` **(** **)** |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`ColorArray<class_colorarray>` | :ref:`ColorArray<class_ColorArray_ColorArray>` **(** :ref:`Array<class_array>` from **)** |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Array of Color, can only contains colors. Optimized for memory usage, can't fragment the memory.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_ColorArray_push_back:
|
||||
|
||||
- void **push_back** **(** :ref:`Color<class_color>` color **)**
|
||||
|
||||
Append a value to the array.
|
||||
|
||||
.. _class_ColorArray_resize:
|
||||
|
||||
- void **resize** **(** :ref:`int<class_int>` idx **)**
|
||||
|
||||
Resize the array.
|
||||
|
||||
.. _class_ColorArray_set:
|
||||
|
||||
- void **set** **(** :ref:`int<class_int>` idx, :ref:`Color<class_color>` color **)**
|
||||
|
||||
Set an index in the array.
|
||||
|
||||
.. _class_ColorArray_size:
|
||||
|
||||
- :ref:`int<class_int>` **size** **(** **)**
|
||||
|
||||
Return the array size.
|
||||
|
||||
.. _class_ColorArray_ColorArray:
|
||||
|
||||
- :ref:`ColorArray<class_colorarray>` **ColorArray** **(** :ref:`Array<class_array>` from **)**
|
||||
|
||||
Create from a generic array.
|
||||
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
.. _class_ColorPicker:
|
||||
|
||||
ColorPicker
|
||||
===========
|
||||
|
||||
Inherits: :ref:`BoxContainer<class_boxcontainer>`
|
||||
-------------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Color picker control.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_color<class_ColorPicker_set_color>` **(** :ref:`Color<class_color>` color **)** |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`get_color<class_ColorPicker_get_color>` **(** **)** const |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_raw_mode<class_ColorPicker_set_raw_mode>` **(** :ref:`bool<class_bool>` mode **)** |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_raw_mode<class_ColorPicker_is_raw_mode>` **(** **)** const |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_edit_alpha<class_ColorPicker_set_edit_alpha>` **(** :ref:`bool<class_bool>` show **)** |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_editing_alpha<class_ColorPicker_is_editing_alpha>` **(** **)** const |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_preset<class_ColorPicker_add_preset>` **(** :ref:`Color<class_color>` arg0 **)** |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **color_changed** **(** :ref:`Color<class_color>` color **)**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
This is a simple color picker :ref:`Control<class_control>`. It's useful for selecting a color from an RGB/RGBA colorspace.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_ColorPicker_set_color:
|
||||
|
||||
- void **set_color** **(** :ref:`Color<class_color>` color **)**
|
||||
|
||||
Select the current color.
|
||||
|
||||
.. _class_ColorPicker_get_color:
|
||||
|
||||
- :ref:`Color<class_color>` **get_color** **(** **)** const
|
||||
|
||||
Return the current (edited) color.
|
||||
|
||||
.. _class_ColorPicker_set_raw_mode:
|
||||
|
||||
- void **set_raw_mode** **(** :ref:`bool<class_bool>` mode **)**
|
||||
|
||||
.. _class_ColorPicker_is_raw_mode:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_raw_mode** **(** **)** const
|
||||
|
||||
.. _class_ColorPicker_set_edit_alpha:
|
||||
|
||||
- void **set_edit_alpha** **(** :ref:`bool<class_bool>` show **)**
|
||||
|
||||
.. _class_ColorPicker_is_editing_alpha:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_editing_alpha** **(** **)** const
|
||||
|
||||
.. _class_ColorPicker_add_preset:
|
||||
|
||||
- void **add_preset** **(** :ref:`Color<class_color>` arg0 **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
.. _class_ColorPickerButton:
|
||||
|
||||
ColorPickerButton
|
||||
=================
|
||||
|
||||
Inherits: :ref:`Button<class_button>`
|
||||
-------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_color<class_ColorPickerButton_set_color>` **(** :ref:`Color<class_color>` color **)** |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`get_color<class_ColorPickerButton_get_color>` **(** **)** const |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_edit_alpha<class_ColorPickerButton_set_edit_alpha>` **(** :ref:`bool<class_bool>` show **)** |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_editing_alpha<class_ColorPickerButton_is_editing_alpha>` **(** **)** const |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **color_changed** **(** :ref:`Color<class_color>` color **)**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_ColorPickerButton_set_color:
|
||||
|
||||
- void **set_color** **(** :ref:`Color<class_color>` color **)**
|
||||
|
||||
.. _class_ColorPickerButton_get_color:
|
||||
|
||||
- :ref:`Color<class_color>` **get_color** **(** **)** const
|
||||
|
||||
.. _class_ColorPickerButton_set_edit_alpha:
|
||||
|
||||
- void **set_edit_alpha** **(** :ref:`bool<class_bool>` show **)**
|
||||
|
||||
.. _class_ColorPickerButton_is_editing_alpha:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_editing_alpha** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
.. _class_ColorRamp:
|
||||
|
||||
ColorRamp
|
||||
=========
|
||||
|
||||
Inherits: :ref:`Resource<class_resource>`
|
||||
-----------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_point<class_ColorRamp_add_point>` **(** :ref:`float<class_float>` offset, :ref:`Color<class_color>` color **)** |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_point<class_ColorRamp_remove_point>` **(** :ref:`int<class_int>` offset **)** |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_offset<class_ColorRamp_set_offset>` **(** :ref:`int<class_int>` point, :ref:`float<class_float>` offset **)** |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_offset<class_ColorRamp_get_offset>` **(** :ref:`int<class_int>` point **)** const |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_color<class_ColorRamp_set_color>` **(** :ref:`int<class_int>` point, :ref:`Color<class_color>` color **)** |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`get_color<class_ColorRamp_get_color>` **(** :ref:`int<class_int>` point **)** const |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`interpolate<class_ColorRamp_interpolate>` **(** :ref:`float<class_float>` offset **)** |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_point_count<class_ColorRamp_get_point_count>` **(** **)** const |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_offsets<class_ColorRamp_set_offsets>` **(** :ref:`RealArray<class_realarray>` offsets **)** |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RealArray<class_realarray>` | :ref:`get_offsets<class_ColorRamp_get_offsets>` **(** **)** const |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_colors<class_ColorRamp_set_colors>` **(** :ref:`ColorArray<class_colorarray>` colors **)** |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`ColorArray<class_colorarray>` | :ref:`get_colors<class_ColorRamp_get_colors>` **(** **)** const |
|
||||
+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_ColorRamp_add_point:
|
||||
|
||||
- void **add_point** **(** :ref:`float<class_float>` offset, :ref:`Color<class_color>` color **)**
|
||||
|
||||
.. _class_ColorRamp_remove_point:
|
||||
|
||||
- void **remove_point** **(** :ref:`int<class_int>` offset **)**
|
||||
|
||||
.. _class_ColorRamp_set_offset:
|
||||
|
||||
- void **set_offset** **(** :ref:`int<class_int>` point, :ref:`float<class_float>` offset **)**
|
||||
|
||||
.. _class_ColorRamp_get_offset:
|
||||
|
||||
- :ref:`float<class_float>` **get_offset** **(** :ref:`int<class_int>` point **)** const
|
||||
|
||||
.. _class_ColorRamp_set_color:
|
||||
|
||||
- void **set_color** **(** :ref:`int<class_int>` point, :ref:`Color<class_color>` color **)**
|
||||
|
||||
.. _class_ColorRamp_get_color:
|
||||
|
||||
- :ref:`Color<class_color>` **get_color** **(** :ref:`int<class_int>` point **)** const
|
||||
|
||||
.. _class_ColorRamp_interpolate:
|
||||
|
||||
- :ref:`Color<class_color>` **interpolate** **(** :ref:`float<class_float>` offset **)**
|
||||
|
||||
.. _class_ColorRamp_get_point_count:
|
||||
|
||||
- :ref:`int<class_int>` **get_point_count** **(** **)** const
|
||||
|
||||
.. _class_ColorRamp_set_offsets:
|
||||
|
||||
- void **set_offsets** **(** :ref:`RealArray<class_realarray>` offsets **)**
|
||||
|
||||
.. _class_ColorRamp_get_offsets:
|
||||
|
||||
- :ref:`RealArray<class_realarray>` **get_offsets** **(** **)** const
|
||||
|
||||
.. _class_ColorRamp_set_colors:
|
||||
|
||||
- void **set_colors** **(** :ref:`ColorArray<class_colorarray>` colors **)**
|
||||
|
||||
.. _class_ColorRamp_get_colors:
|
||||
|
||||
- :ref:`ColorArray<class_colorarray>` **get_colors** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
.. _class_ConcavePolygonShape:
|
||||
|
||||
ConcavePolygonShape
|
||||
===================
|
||||
|
||||
Inherits: :ref:`Shape<class_shape>`
|
||||
-----------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Concave polygon shape.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------------------+-------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_faces<class_ConcavePolygonShape_set_faces>` **(** :ref:`Vector3Array<class_vector3array>` faces **)** |
|
||||
+------------------------------------------+-------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3Array<class_vector3array>` | :ref:`get_faces<class_ConcavePolygonShape_get_faces>` **(** **)** const |
|
||||
+------------------------------------------+-------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Concave polygon shape resource, which can be set into a :ref:`PhysicsBody<class_physicsbody>` or area. This shape is created by feeding a list of triangles.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_ConcavePolygonShape_set_faces:
|
||||
|
||||
- void **set_faces** **(** :ref:`Vector3Array<class_vector3array>` faces **)**
|
||||
|
||||
Set the faces (an array of triangles).
|
||||
|
||||
.. _class_ConcavePolygonShape_get_faces:
|
||||
|
||||
- :ref:`Vector3Array<class_vector3array>` **get_faces** **(** **)** const
|
||||
|
||||
Return the faces (an array of triangles).
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
.. _class_ConcavePolygonShape2D:
|
||||
|
||||
ConcavePolygonShape2D
|
||||
=====================
|
||||
|
||||
Inherits: :ref:`Shape2D<class_shape2d>`
|
||||
---------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Concave polygon 2D shape resource for physics.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_segments<class_ConcavePolygonShape2D_set_segments>` **(** :ref:`Vector2Array<class_vector2array>` segments **)** |
|
||||
+------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2Array<class_vector2array>` | :ref:`get_segments<class_ConcavePolygonShape2D_get_segments>` **(** **)** const |
|
||||
+------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Concave polygon 2D shape resource for physics. It is made out of segments and is very optimal for complex polygonal concave collisions. It is really not advised to use for RigidBody nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions.
|
||||
|
||||
The main difference between a :ref:`ConvexPolygonShape2D<class_convexpolygonshape2d>` and a :ref:`ConcavePolygonShape2D<class_concavepolygonshape2d>` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_ConcavePolygonShape2D_set_segments:
|
||||
|
||||
- void **set_segments** **(** :ref:`Vector2Array<class_vector2array>` segments **)**
|
||||
|
||||
Set the array of segments.
|
||||
|
||||
.. _class_ConcavePolygonShape2D_get_segments:
|
||||
|
||||
- :ref:`Vector2Array<class_vector2array>` **get_segments** **(** **)** const
|
||||
|
||||
Return the array of segments.
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
.. _class_ConeTwistJoint:
|
||||
|
||||
ConeTwistJoint
|
||||
==============
|
||||
|
||||
Inherits: :ref:`Joint<class_joint>`
|
||||
-----------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_param<class_ConeTwistJoint_set_param>` **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_param<class_ConeTwistJoint_get_param>` **(** :ref:`int<class_int>` param **)** const |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **PARAM_SWING_SPAN** = **0**
|
||||
- **PARAM_TWIST_SPAN** = **1**
|
||||
- **PARAM_BIAS** = **2**
|
||||
- **PARAM_SOFTNESS** = **3**
|
||||
- **PARAM_RELAXATION** = **4**
|
||||
- **PARAM_MAX** = **5**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_ConeTwistJoint_set_param:
|
||||
|
||||
- void **set_param** **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)**
|
||||
|
||||
.. _class_ConeTwistJoint_get_param:
|
||||
|
||||
- :ref:`float<class_float>` **get_param** **(** :ref:`int<class_int>` param **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
.. _class_ConfigFile:
|
||||
|
||||
ConfigFile
|
||||
==========
|
||||
|
||||
Inherits: :ref:`Reference<class_reference>`
|
||||
-------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_value<class_ConfigFile_set_value>` **(** :ref:`String<class_string>` section, :ref:`String<class_string>` key, var value **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`get_value<class_ConfigFile_get_value>` **(** :ref:`String<class_string>` section, :ref:`String<class_string>` key, var default=NULL **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_section<class_ConfigFile_has_section>` **(** :ref:`String<class_string>` section **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_section_key<class_ConfigFile_has_section_key>` **(** :ref:`String<class_string>` section, :ref:`String<class_string>` key **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StringArray<class_stringarray>` | :ref:`get_sections<class_ConfigFile_get_sections>` **(** **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StringArray<class_stringarray>` | :ref:`get_section_keys<class_ConfigFile_get_section_keys>` **(** :ref:`String<class_string>` section **)** const |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Error | :ref:`load<class_ConfigFile_load>` **(** :ref:`String<class_string>` path **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Error | :ref:`save<class_ConfigFile_save>` **(** :ref:`String<class_string>` path **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_ConfigFile_set_value:
|
||||
|
||||
- void **set_value** **(** :ref:`String<class_string>` section, :ref:`String<class_string>` key, var value **)**
|
||||
|
||||
.. _class_ConfigFile_get_value:
|
||||
|
||||
- void **get_value** **(** :ref:`String<class_string>` section, :ref:`String<class_string>` key, var default=NULL **)** const
|
||||
|
||||
.. _class_ConfigFile_has_section:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_section** **(** :ref:`String<class_string>` section **)** const
|
||||
|
||||
.. _class_ConfigFile_has_section_key:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_section_key** **(** :ref:`String<class_string>` section, :ref:`String<class_string>` key **)** const
|
||||
|
||||
.. _class_ConfigFile_get_sections:
|
||||
|
||||
- :ref:`StringArray<class_stringarray>` **get_sections** **(** **)** const
|
||||
|
||||
.. _class_ConfigFile_get_section_keys:
|
||||
|
||||
- :ref:`StringArray<class_stringarray>` **get_section_keys** **(** :ref:`String<class_string>` section **)** const
|
||||
|
||||
.. _class_ConfigFile_load:
|
||||
|
||||
- Error **load** **(** :ref:`String<class_string>` path **)**
|
||||
|
||||
.. _class_ConfigFile_save:
|
||||
|
||||
- Error **save** **(** :ref:`String<class_string>` path **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
.. _class_ConfirmationDialog:
|
||||
|
||||
ConfirmationDialog
|
||||
==================
|
||||
|
||||
Inherits: :ref:`AcceptDialog<class_acceptdialog>`
|
||||
-------------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Dialog for confirmation of actions.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------+---------------------------------------------------------------------+
|
||||
| :ref:`Button<class_button>` | :ref:`get_cancel<class_ConfirmationDialog_get_cancel>` **(** **)** |
|
||||
+------------------------------+---------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Dialog for confirmation of actions. This dialog inherits from :ref:`AcceptDialog<class_acceptdialog>`, but has by default an OK and Cancel buton (in host OS order).
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_ConfirmationDialog_get_cancel:
|
||||
|
||||
- :ref:`Button<class_button>` **get_cancel** **(** **)**
|
||||
|
||||
Return the cancel button.
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
.. _class_Container:
|
||||
|
||||
Container
|
||||
=========
|
||||
|
||||
Inherits: :ref:`Control<class_control>`
|
||||
---------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Base node for containers.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`queue_sort<class_Container_queue_sort>` **(** **)** |
|
||||
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`fit_child_in_rect<class_Container_fit_child_in_rect>` **(** :ref:`Control<class_control>` child, :ref:`Rect2<class_rect2>` rect **)** |
|
||||
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **sort_children** **(** **)**
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **NOTIFICATION_SORT_CHILDREN** = **50** --- Notification for when sorting the children, it must be obeyed immediately.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Base node for conainers. A :ref:`Container<class_container>` contains other controls and automatically arranges them in a certain way.
|
||||
|
||||
A Control can inherit this to reate custom container classes.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Container_queue_sort:
|
||||
|
||||
- void **queue_sort** **(** **)**
|
||||
|
||||
Queue resort of the contained children. This is called automatically anyway, but can be called upon request.
|
||||
|
||||
.. _class_Container_fit_child_in_rect:
|
||||
|
||||
- void **fit_child_in_rect** **(** :ref:`Control<class_control>` child, :ref:`Rect2<class_rect2>` rect **)**
|
||||
|
||||
Fit a child control in a given rect. This is mainly a helper for creating custom container classes.
|
||||
|
||||
|
||||
@@ -0,0 +1,633 @@
|
||||
.. _class_Control:
|
||||
|
||||
Control
|
||||
=======
|
||||
|
||||
Inherits: :ref:`CanvasItem<class_canvasitem>`
|
||||
---------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Control is the base node for all the GUI components.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_input_event<class_Control__input_event>` **(** :ref:`InputEvent<class_inputevent>` event **)** virtual |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`can_drop_data<class_Control_can_drop_data>` **(** :ref:`Vector2<class_vector2>` pos, var data **)** virtual |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`drop_data<class_Control_drop_data>` **(** :ref:`Vector2<class_vector2>` pos, var data **)** virtual |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`get_drag_data<class_Control_get_drag_data>` **(** :ref:`Vector2<class_vector2>` pos **)** virtual |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_minimum_size<class_Control_get_minimum_size>` **(** **)** virtual |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`accept_event<class_Control_accept_event>` **(** **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_minimum_size<class_Control_get_minimum_size>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_combined_minimum_size<class_Control_get_combined_minimum_size>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_anchor<class_Control_set_anchor>` **(** :ref:`int<class_int>` margin, :ref:`int<class_int>` anchor_mode **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_anchor<class_Control_get_anchor>` **(** :ref:`int<class_int>` margin **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_margin<class_Control_set_margin>` **(** :ref:`int<class_int>` margin, :ref:`float<class_float>` offset **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_anchor_and_margin<class_Control_set_anchor_and_margin>` **(** :ref:`int<class_int>` margin, :ref:`int<class_int>` anchor_mode, :ref:`float<class_float>` offset **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_begin<class_Control_set_begin>` **(** :ref:`Vector2<class_vector2>` pos **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_end<class_Control_set_end>` **(** :ref:`Vector2<class_vector2>` pos **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_pos<class_Control_set_pos>` **(** :ref:`Vector2<class_vector2>` pos **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_size<class_Control_set_size>` **(** :ref:`Vector2<class_vector2>` size **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_custom_minimum_size<class_Control_set_custom_minimum_size>` **(** :ref:`Vector2<class_vector2>` size **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_global_pos<class_Control_set_global_pos>` **(** :ref:`Vector2<class_vector2>` pos **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_rotation<class_Control_set_rotation>` **(** :ref:`float<class_float>` rotation **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_scale<class_Control_set_scale>` **(** :ref:`Vector2<class_vector2>` scale **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_margin<class_Control_get_margin>` **(** :ref:`int<class_int>` margin **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_begin<class_Control_get_begin>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_end<class_Control_get_end>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_pos<class_Control_get_pos>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_size<class_Control_get_size>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_rotation<class_Control_get_rotation>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_scale<class_Control_get_scale>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_custom_minimum_size<class_Control_get_custom_minimum_size>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_parent_area_size<class_Control_get_parent_area_size>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_global_pos<class_Control_get_global_pos>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Rect2<class_rect2>` | :ref:`get_rect<class_Control_get_rect>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Rect2<class_rect2>` | :ref:`get_global_rect<class_Control_get_global_rect>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_area_as_parent_rect<class_Control_set_area_as_parent_rect>` **(** :ref:`int<class_int>` margin=0 **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`show_modal<class_Control_show_modal>` **(** :ref:`bool<class_bool>` exclusive=false **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_focus_mode<class_Control_set_focus_mode>` **(** :ref:`int<class_int>` mode **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_focus<class_Control_has_focus>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`grab_focus<class_Control_grab_focus>` **(** **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`release_focus<class_Control_release_focus>` **(** **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Control<class_control>` | :ref:`get_focus_owner<class_Control_get_focus_owner>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_h_size_flags<class_Control_set_h_size_flags>` **(** :ref:`int<class_int>` flags **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_h_size_flags<class_Control_get_h_size_flags>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_stretch_ratio<class_Control_set_stretch_ratio>` **(** :ref:`float<class_float>` ratio **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_stretch_ratio<class_Control_get_stretch_ratio>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_v_size_flags<class_Control_set_v_size_flags>` **(** :ref:`int<class_int>` flags **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_v_size_flags<class_Control_get_v_size_flags>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_theme<class_Control_set_theme>` **(** :ref:`Theme<class_theme>` theme **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Theme<class_theme>` | :ref:`get_theme<class_Control_get_theme>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_icon_override<class_Control_add_icon_override>` **(** :ref:`String<class_string>` name, :ref:`Texture<class_texture>` texture **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_shader_override<class_Control_add_shader_override>` **(** :ref:`String<class_string>` name, :ref:`Shader<class_shader>` shader **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_style_override<class_Control_add_style_override>` **(** :ref:`String<class_string>` name, :ref:`StyleBox<class_stylebox>` stylebox **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_font_override<class_Control_add_font_override>` **(** :ref:`String<class_string>` name, :ref:`Font<class_font>` font **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_color_override<class_Control_add_color_override>` **(** :ref:`String<class_string>` name, :ref:`Color<class_color>` color **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_constant_override<class_Control_add_constant_override>` **(** :ref:`String<class_string>` name, :ref:`int<class_int>` constant **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Texture<class_texture>` | :ref:`get_icon<class_Control_get_icon>` **(** :ref:`String<class_string>` name, :ref:`String<class_string>` type="" **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StyleBox<class_stylebox>` | :ref:`get_stylebox<class_Control_get_stylebox>` **(** :ref:`String<class_string>` name, :ref:`String<class_string>` type="" **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Font<class_font>` | :ref:`get_font<class_Control_get_font>` **(** :ref:`String<class_string>` name, :ref:`String<class_string>` type="" **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`get_color<class_Control_get_color>` **(** :ref:`String<class_string>` name, :ref:`String<class_string>` type="" **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_constant<class_Control_get_constant>` **(** :ref:`String<class_string>` name, :ref:`String<class_string>` type="" **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Control<class_control>` | :ref:`get_parent_control<class_Control_get_parent_control>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_tooltip<class_Control_set_tooltip>` **(** :ref:`String<class_string>` tooltip **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_tooltip<class_Control_get_tooltip>` **(** :ref:`Vector2<class_vector2>` atpos=Vector2(0,0) **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_default_cursor_shape<class_Control_set_default_cursor_shape>` **(** :ref:`int<class_int>` shape **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_default_cursor_shape<class_Control_get_default_cursor_shape>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_cursor_shape<class_Control_get_cursor_shape>` **(** :ref:`Vector2<class_vector2>` pos=Vector2(0,0) **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_focus_neighbour<class_Control_set_focus_neighbour>` **(** :ref:`int<class_int>` margin, :ref:`NodePath<class_nodepath>` neighbour **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`NodePath<class_nodepath>` | :ref:`get_focus_neighbour<class_Control_get_focus_neighbour>` **(** :ref:`int<class_int>` margin **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_ignore_mouse<class_Control_set_ignore_mouse>` **(** :ref:`bool<class_bool>` ignore **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_ignoring_mouse<class_Control_is_ignoring_mouse>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`force_drag<class_Control_force_drag>` **(** var data, :ref:`Object<class_object>` preview **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_stop_mouse<class_Control_set_stop_mouse>` **(** :ref:`bool<class_bool>` stop **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_stopping_mouse<class_Control_is_stopping_mouse>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`grab_click_focus<class_Control_grab_click_focus>` **(** **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_drag_preview<class_Control_set_drag_preview>` **(** :ref:`Control<class_control>` control **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`warp_mouse<class_Control_warp_mouse>` **(** :ref:`Vector2<class_vector2>` to_pos **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **focus_enter** **(** **)**
|
||||
- **mouse_enter** **(** **)**
|
||||
- **resized** **(** **)**
|
||||
- **minimum_size_changed** **(** **)**
|
||||
- **size_flags_changed** **(** **)**
|
||||
- **focus_exit** **(** **)**
|
||||
- **input_event** **(** :ref:`InputEvent<class_inputevent>` ev **)**
|
||||
- **modal_close** **(** **)**
|
||||
- **mouse_exit** **(** **)**
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **ANCHOR_BEGIN** = **0** --- X is relative to MARGIN_LEFT, Y is relative to MARGIN_TOP.
|
||||
- **ANCHOR_END** = **1** --- X is relative to -MARGIN_RIGHT, Y is relative to -MARGIN_BOTTOM.
|
||||
- **ANCHOR_RATIO** = **2** --- X and Y are a ratio (0 to 1) relative to the parent size 0 is left/top, 1 is right/bottom.
|
||||
- **ANCHOR_CENTER** = **3**
|
||||
- **FOCUS_NONE** = **0** --- Control can't acquire focus.
|
||||
- **FOCUS_CLICK** = **1** --- Control can acquire focus only if clicked.
|
||||
- **FOCUS_ALL** = **2** --- Control can acquire focus if clicked, or by pressing TAB/Directionals in the keyboard from another Control.
|
||||
- **NOTIFICATION_RESIZED** = **40** --- Control changed size (get_size() reports the new size).
|
||||
- **NOTIFICATION_MOUSE_ENTER** = **41** --- Mouse pointer entered the area of the Control.
|
||||
- **NOTIFICATION_MOUSE_EXIT** = **42** --- Mouse pointer exited the area of the Control.
|
||||
- **NOTIFICATION_FOCUS_ENTER** = **43** --- Control gained focus.
|
||||
- **NOTIFICATION_FOCUS_EXIT** = **44** --- Control lost focus.
|
||||
- **NOTIFICATION_THEME_CHANGED** = **45** --- Theme changed. Redrawing is desired.
|
||||
- **NOTIFICATION_MODAL_CLOSE** = **46** --- Modal control was closed.
|
||||
- **CURSOR_ARROW** = **0**
|
||||
- **CURSOR_IBEAM** = **1**
|
||||
- **CURSOR_POINTING_HAND** = **2**
|
||||
- **CURSOR_CROSS** = **3**
|
||||
- **CURSOR_WAIT** = **4**
|
||||
- **CURSOR_BUSY** = **5**
|
||||
- **CURSOR_DRAG** = **6**
|
||||
- **CURSOR_CAN_DROP** = **7**
|
||||
- **CURSOR_FORBIDDEN** = **8**
|
||||
- **CURSOR_VSIZE** = **9**
|
||||
- **CURSOR_HSIZE** = **10**
|
||||
- **CURSOR_BDIAGSIZE** = **11**
|
||||
- **CURSOR_FDIAGSIZE** = **12**
|
||||
- **CURSOR_MOVE** = **13**
|
||||
- **CURSOR_VSPLIT** = **14**
|
||||
- **CURSOR_HSPLIT** = **15**
|
||||
- **CURSOR_HELP** = **16**
|
||||
- **SIZE_EXPAND** = **1**
|
||||
- **SIZE_FILL** = **2**
|
||||
- **SIZE_EXPAND_FILL** = **3**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Control is the base class Node for all the GUI components. Every GUI component inherits from it, directly or indirectly. In this way, sections of the scene tree made of contiguous control nodes, become user interfaces.
|
||||
|
||||
Controls are relative to the parent position and size by using anchors and margins. This ensures that they can adapt easily in most situation to changing dialog and screen sizes. When more flexibility is desired, :ref:`Container<class_container>` derived nodes can be used.
|
||||
|
||||
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<class_inputevent>`) are first sent to the root controls via the :ref:`Node._input<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<class_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<node__unhandled_input>`), the control can accept it by calling :ref:`accept_event<Control_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<Control_set_focus_mode>`. Focus is lost when another control gains it, or the current focus owner is hidden.
|
||||
|
||||
It is sometimes desired for a control to ignore mouse/pointer events. This is often the case when placing other controls on top of a button, in such cases. Calling :ref:`set_ignore_mouse<Control_set_ignore_mouse>` enables this function.
|
||||
|
||||
Finally, controls are skinned according to a :ref:`Theme<class_theme>`. Setting a :ref:`Theme<class_theme>` on a control will propagate all the skinning down the tree. Optionally, skinning can be overrided per each control by calling the add_*_override functions, or from the editor.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Control__input_event:
|
||||
|
||||
- void **_input_event** **(** :ref:`InputEvent<class_inputevent>` event **)** virtual
|
||||
|
||||
Called when an input event reaches the control.
|
||||
|
||||
.. _class_Control_can_drop_data:
|
||||
|
||||
- :ref:`bool<class_bool>` **can_drop_data** **(** :ref:`Vector2<class_vector2>` pos, var data **)** virtual
|
||||
|
||||
.. _class_Control_drop_data:
|
||||
|
||||
- void **drop_data** **(** :ref:`Vector2<class_vector2>` pos, var data **)** virtual
|
||||
|
||||
.. _class_Control_get_drag_data:
|
||||
|
||||
- :ref:`Object<class_object>` **get_drag_data** **(** :ref:`Vector2<class_vector2>` pos **)** virtual
|
||||
|
||||
.. _class_Control_get_minimum_size:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_minimum_size** **(** **)** virtual
|
||||
|
||||
Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size.
|
||||
|
||||
.. _class_Control_accept_event:
|
||||
|
||||
- void **accept_event** **(** **)**
|
||||
|
||||
Handles the event, no other control will receive it and it will not be sent to nodes waiting on :ref:`Node._unhandled_input<node__unhandled_input>` or :ref:`Node._unhandled_key_input<node__unhandled_key_input>`.
|
||||
|
||||
.. _class_Control_get_minimum_size:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_minimum_size** **(** **)** const
|
||||
|
||||
Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size.
|
||||
|
||||
.. _class_Control_get_combined_minimum_size:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_combined_minimum_size** **(** **)** const
|
||||
|
||||
.. _class_Control_set_anchor:
|
||||
|
||||
- void **set_anchor** **(** :ref:`int<class_int>` margin, :ref:`int<class_int>` anchor_mode **)**
|
||||
|
||||
Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Changing the anchor mode converts the current margin offset from the previos anchor mode to the new one, so margin offsets (:ref:`set_margin<Control_set_margin>`) must be done after setting anchors, or at the same time (:ref:`set_anchor_and_margin<Control_set_anchor_and_margin>`).
|
||||
|
||||
.. _class_Control_get_anchor:
|
||||
|
||||
- :ref:`int<class_int>` **get_anchor** **(** :ref:`int<class_int>` margin **)** const
|
||||
|
||||
Return the anchor type (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM).
|
||||
|
||||
.. _class_Control_set_margin:
|
||||
|
||||
- void **set_margin** **(** :ref:`int<class_int>` margin, :ref:`float<class_float>` offset **)**
|
||||
|
||||
Set a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being set depends on the anchor mode.
|
||||
|
||||
.. _class_Control_set_anchor_and_margin:
|
||||
|
||||
- void **set_anchor_and_margin** **(** :ref:`int<class_int>` margin, :ref:`int<class_int>` anchor_mode, :ref:`float<class_float>` offset **)**
|
||||
|
||||
Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM), and also set its offset. This is a helper (see :ref:`set_anchor<Control_set_anchor>` and :ref:`set_margin<Control_set_margin>`).
|
||||
|
||||
.. _class_Control_set_begin:
|
||||
|
||||
- void **set_begin** **(** :ref:`Vector2<class_vector2>` pos **)**
|
||||
|
||||
Sets MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see :ref:`set_margin<Control_set_margin>`).
|
||||
|
||||
.. _class_Control_set_end:
|
||||
|
||||
- void **set_end** **(** :ref:`Vector2<class_vector2>` pos **)**
|
||||
|
||||
Sets MARGIN_RIGHT and MARGIN_BOTTOM at the same time. This is a helper (see :ref:`set_margin<Control_set_margin>`).
|
||||
|
||||
.. _class_Control_set_pos:
|
||||
|
||||
- void **set_pos** **(** :ref:`Vector2<class_vector2>` pos **)**
|
||||
|
||||
Move the Control to a new position, relative to the top-left corner of the parent Control, changing all margins if needed and without changing current anchor mode. This is a helper (see :ref:`set_margin<Control_set_margin>`).
|
||||
|
||||
.. _class_Control_set_size:
|
||||
|
||||
- void **set_size** **(** :ref:`Vector2<class_vector2>` size **)**
|
||||
|
||||
Changes MARGIN_RIGHT and MARGIN_BOTTOM to fit a given size. This is a helper (see :ref:`set_margin<Control_set_margin>`).
|
||||
|
||||
.. _class_Control_set_custom_minimum_size:
|
||||
|
||||
- void **set_custom_minimum_size** **(** :ref:`Vector2<class_vector2>` size **)**
|
||||
|
||||
.. _class_Control_set_global_pos:
|
||||
|
||||
- void **set_global_pos** **(** :ref:`Vector2<class_vector2>` pos **)**
|
||||
|
||||
Move the Control to a new position, relative to the top-left corner of the *window* Control, and without changing current anchor mode. (see :ref:`set_margin<Control_set_margin>`).
|
||||
|
||||
.. _class_Control_set_rotation:
|
||||
|
||||
- void **set_rotation** **(** :ref:`float<class_float>` rotation **)**
|
||||
|
||||
.. _class_Control_set_scale:
|
||||
|
||||
- void **set_scale** **(** :ref:`Vector2<class_vector2>` scale **)**
|
||||
|
||||
.. _class_Control_get_margin:
|
||||
|
||||
- :ref:`float<class_float>` **get_margin** **(** :ref:`int<class_int>` margin **)** const
|
||||
|
||||
Return a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being returned depends on the anchor mode.
|
||||
|
||||
.. _class_Control_get_begin:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_begin** **(** **)** const
|
||||
|
||||
.. _class_Control_get_end:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_end** **(** **)** const
|
||||
|
||||
Returns MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see :ref:`set_margin<Control_set_margin>`).
|
||||
|
||||
.. _class_Control_get_pos:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_pos** **(** **)** const
|
||||
|
||||
Returns the Control position, relative to the top-left corner of the parent Control and independly of the anchor mode.
|
||||
|
||||
.. _class_Control_get_size:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_size** **(** **)** const
|
||||
|
||||
Returns the size of the Control, computed from all margins, however the size returned will **never be smaller than the minimum size reported by :ref:`get_minimum_size<Control_get_minimum_size>`**. This means that even if end position of the Control rectangle is smaller than the begin position, the Control will still display and interact correctly. (see description, :ref:`get_minimum_size<Control_get_minimum_size>`, :ref:`set_margin<Control_set_margin>`, :ref:`set_anchor<Control_set_anchor>`).
|
||||
|
||||
.. _class_Control_get_rotation:
|
||||
|
||||
- :ref:`float<class_float>` **get_rotation** **(** **)** const
|
||||
|
||||
.. _class_Control_get_scale:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_scale** **(** **)** const
|
||||
|
||||
.. _class_Control_get_custom_minimum_size:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_custom_minimum_size** **(** **)** const
|
||||
|
||||
.. _class_Control_get_parent_area_size:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_parent_area_size** **(** **)** const
|
||||
|
||||
.. _class_Control_get_global_pos:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_global_pos** **(** **)** const
|
||||
|
||||
Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode.
|
||||
|
||||
.. _class_Control_get_rect:
|
||||
|
||||
- :ref:`Rect2<class_rect2>` **get_rect** **(** **)** const
|
||||
|
||||
Return position and size of the Control, relative to the top-left corner of the parent Control. This is a helper (see :ref:`get_pos<Control_get_pos>`,:ref:`get_size<Control_get_size>`).
|
||||
|
||||
.. _class_Control_get_global_rect:
|
||||
|
||||
- :ref:`Rect2<class_rect2>` **get_global_rect** **(** **)** const
|
||||
|
||||
Return position and size of the Control, relative to the top-left corner of the *window* Control. This is a helper (see :ref:`get_global_pos<Control_get_global_pos>`,:ref:`get_size<Control_get_size>`).
|
||||
|
||||
.. _class_Control_set_area_as_parent_rect:
|
||||
|
||||
- void **set_area_as_parent_rect** **(** :ref:`int<class_int>` margin=0 **)**
|
||||
|
||||
Change all margins and anchors, so this Control always takes up the same area as the parent Control. This is a helper (see :ref:`set_anchor<Control_set_anchor>`,:ref:`set_margin<Control_set_margin>`).
|
||||
|
||||
.. _class_Control_show_modal:
|
||||
|
||||
- void **show_modal** **(** :ref:`bool<class_bool>` exclusive=false **)**
|
||||
|
||||
Display a Control as modal. Control must be a subwindow (see :ref:`set_as_subwindow<Control_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.
|
||||
|
||||
.. _class_Control_set_focus_mode:
|
||||
|
||||
- void **set_focus_mode** **(** :ref:`int<class_int>` mode **)**
|
||||
|
||||
Set the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL). Only one Control can be focused at the same time, and it will receive keyboard signals.
|
||||
|
||||
.. _class_Control_has_focus:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_focus** **(** **)** const
|
||||
|
||||
Return wether the Control is the current focused control (see :ref:`set_focus_mode<Control_set_focus_mode>`).
|
||||
|
||||
.. _class_Control_grab_focus:
|
||||
|
||||
- void **grab_focus** **(** **)**
|
||||
|
||||
Steal the focus from another control and become the focused control (see :ref:`set_focus_mode<Control_set_focus_mode>`).
|
||||
|
||||
.. _class_Control_release_focus:
|
||||
|
||||
- void **release_focus** **(** **)**
|
||||
|
||||
Give up the focus, no other control will be able to receive keyboard input.
|
||||
|
||||
.. _class_Control_get_focus_owner:
|
||||
|
||||
- :ref:`Control<class_control>` **get_focus_owner** **(** **)** const
|
||||
|
||||
Return which control is owning the keyboard focus, or null if no one.
|
||||
|
||||
.. _class_Control_set_h_size_flags:
|
||||
|
||||
- void **set_h_size_flags** **(** :ref:`int<class_int>` flags **)**
|
||||
|
||||
Hint for containers, set horizontal positioning flags.
|
||||
|
||||
.. _class_Control_get_h_size_flags:
|
||||
|
||||
- :ref:`int<class_int>` **get_h_size_flags** **(** **)** const
|
||||
|
||||
Hint for containers, return horizontal positioning flags.
|
||||
|
||||
.. _class_Control_set_stretch_ratio:
|
||||
|
||||
- void **set_stretch_ratio** **(** :ref:`float<class_float>` ratio **)**
|
||||
|
||||
Hint for containers, set the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big.
|
||||
|
||||
.. _class_Control_get_stretch_ratio:
|
||||
|
||||
- :ref:`float<class_float>` **get_stretch_ratio** **(** **)** const
|
||||
|
||||
Hint for containers, return the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big.
|
||||
|
||||
.. _class_Control_set_v_size_flags:
|
||||
|
||||
- void **set_v_size_flags** **(** :ref:`int<class_int>` flags **)**
|
||||
|
||||
Hint for containers, set vertical positioning flags.
|
||||
|
||||
.. _class_Control_get_v_size_flags:
|
||||
|
||||
- :ref:`int<class_int>` **get_v_size_flags** **(** **)** const
|
||||
|
||||
Hint for containers, return vertical positioning flags.
|
||||
|
||||
.. _class_Control_set_theme:
|
||||
|
||||
- void **set_theme** **(** :ref:`Theme<class_theme>` theme **)**
|
||||
|
||||
Override whole the :ref:`Theme<class_theme>` for this Control and all its children controls.
|
||||
|
||||
.. _class_Control_get_theme:
|
||||
|
||||
- :ref:`Theme<class_theme>` **get_theme** **(** **)** const
|
||||
|
||||
Return a :ref:`Theme<class_theme>` override, if one exists (see :ref:`set_theme<Control_set_theme>`).
|
||||
|
||||
.. _class_Control_add_icon_override:
|
||||
|
||||
- void **add_icon_override** **(** :ref:`String<class_string>` name, :ref:`Texture<class_texture>` texture **)**
|
||||
|
||||
Override a single icon (:ref:`Texture<class_texture>`) in the theme of this Control. If texture is empty, override is cleared.
|
||||
|
||||
.. _class_Control_add_shader_override:
|
||||
|
||||
- void **add_shader_override** **(** :ref:`String<class_string>` name, :ref:`Shader<class_shader>` shader **)**
|
||||
|
||||
.. _class_Control_add_style_override:
|
||||
|
||||
- void **add_style_override** **(** :ref:`String<class_string>` name, :ref:`StyleBox<class_stylebox>` stylebox **)**
|
||||
|
||||
Override a single stylebox (:ref:`Stylebox<class_stylebox>`) in the theme of this Control. If stylebox is empty, override is cleared.
|
||||
|
||||
.. _class_Control_add_font_override:
|
||||
|
||||
- void **add_font_override** **(** :ref:`String<class_string>` name, :ref:`Font<class_font>` font **)**
|
||||
|
||||
Override a single font (font) in the theme of this Control. If font is empty, override is cleared.
|
||||
|
||||
.. _class_Control_add_color_override:
|
||||
|
||||
- void **add_color_override** **(** :ref:`String<class_string>` name, :ref:`Color<class_color>` color **)**
|
||||
|
||||
.. _class_Control_add_constant_override:
|
||||
|
||||
- void **add_constant_override** **(** :ref:`String<class_string>` name, :ref:`int<class_int>` constant **)**
|
||||
|
||||
Override a single constant (integer) in the theme of this Control. If constant equals Theme.INVALID_CONSTANT, override is cleared.
|
||||
|
||||
.. _class_Control_get_icon:
|
||||
|
||||
- :ref:`Texture<class_texture>` **get_icon** **(** :ref:`String<class_string>` name, :ref:`String<class_string>` type="" **)** const
|
||||
|
||||
.. _class_Control_get_stylebox:
|
||||
|
||||
- :ref:`StyleBox<class_stylebox>` **get_stylebox** **(** :ref:`String<class_string>` name, :ref:`String<class_string>` type="" **)** const
|
||||
|
||||
.. _class_Control_get_font:
|
||||
|
||||
- :ref:`Font<class_font>` **get_font** **(** :ref:`String<class_string>` name, :ref:`String<class_string>` type="" **)** const
|
||||
|
||||
.. _class_Control_get_color:
|
||||
|
||||
- :ref:`Color<class_color>` **get_color** **(** :ref:`String<class_string>` name, :ref:`String<class_string>` type="" **)** const
|
||||
|
||||
.. _class_Control_get_constant:
|
||||
|
||||
- :ref:`int<class_int>` **get_constant** **(** :ref:`String<class_string>` name, :ref:`String<class_string>` type="" **)** const
|
||||
|
||||
.. _class_Control_get_parent_control:
|
||||
|
||||
- :ref:`Control<class_control>` **get_parent_control** **(** **)** const
|
||||
|
||||
.. _class_Control_set_tooltip:
|
||||
|
||||
- void **set_tooltip** **(** :ref:`String<class_string>` tooltip **)**
|
||||
|
||||
Set a tooltip, which will appear when the cursor is resting over this control.
|
||||
|
||||
.. _class_Control_get_tooltip:
|
||||
|
||||
- :ref:`String<class_string>` **get_tooltip** **(** :ref:`Vector2<class_vector2>` atpos=Vector2(0,0) **)** const
|
||||
|
||||
Return the tooltip, which will appear when the cursor is resting over this control.
|
||||
|
||||
.. _class_Control_set_default_cursor_shape:
|
||||
|
||||
- void **set_default_cursor_shape** **(** :ref:`int<class_int>` shape **)**
|
||||
|
||||
Set the default cursor shape for this control. See enum CURSOR_* for the list of shapes.
|
||||
|
||||
.. _class_Control_get_default_cursor_shape:
|
||||
|
||||
- :ref:`int<class_int>` **get_default_cursor_shape** **(** **)** const
|
||||
|
||||
Return the default cursor shape for this control. See enum CURSOR_* for the list of shapes.
|
||||
|
||||
.. _class_Control_get_cursor_shape:
|
||||
|
||||
- :ref:`int<class_int>` **get_cursor_shape** **(** :ref:`Vector2<class_vector2>` pos=Vector2(0,0) **)** const
|
||||
|
||||
Return the cursor shape at a certain position in the control.
|
||||
|
||||
.. _class_Control_set_focus_neighbour:
|
||||
|
||||
- void **set_focus_neighbour** **(** :ref:`int<class_int>` margin, :ref:`NodePath<class_nodepath>` neighbour **)**
|
||||
|
||||
Force a neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function.
|
||||
|
||||
.. _class_Control_get_focus_neighbour:
|
||||
|
||||
- :ref:`NodePath<class_nodepath>` **get_focus_neighbour** **(** :ref:`int<class_int>` margin **)** const
|
||||
|
||||
Return the forced neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function.
|
||||
|
||||
.. _class_Control_set_ignore_mouse:
|
||||
|
||||
- void **set_ignore_mouse** **(** :ref:`bool<class_bool>` ignore **)**
|
||||
|
||||
Ignore mouse events on this control (even touchpad events send mouse events).
|
||||
|
||||
.. _class_Control_is_ignoring_mouse:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_ignoring_mouse** **(** **)** const
|
||||
|
||||
Return if the control is ignoring mouse events (even touchpad events send mouse events).
|
||||
|
||||
.. _class_Control_force_drag:
|
||||
|
||||
- void **force_drag** **(** var data, :ref:`Object<class_object>` preview **)**
|
||||
|
||||
.. _class_Control_set_stop_mouse:
|
||||
|
||||
- void **set_stop_mouse** **(** :ref:`bool<class_bool>` stop **)**
|
||||
|
||||
.. _class_Control_is_stopping_mouse:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_stopping_mouse** **(** **)** const
|
||||
|
||||
.. _class_Control_grab_click_focus:
|
||||
|
||||
- void **grab_click_focus** **(** **)**
|
||||
|
||||
.. _class_Control_set_drag_preview:
|
||||
|
||||
- void **set_drag_preview** **(** :ref:`Control<class_control>` control **)**
|
||||
|
||||
.. _class_Control_warp_mouse:
|
||||
|
||||
- void **warp_mouse** **(** :ref:`Vector2<class_vector2>` to_pos **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
.. _class_ConvexPolygonShape:
|
||||
|
||||
ConvexPolygonShape
|
||||
==================
|
||||
|
||||
Inherits: :ref:`Shape<class_shape>`
|
||||
-----------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Convex Polygon Shape.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_points<class_ConvexPolygonShape_set_points>` **(** :ref:`Vector3Array<class_vector3array>` points **)** |
|
||||
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3Array<class_vector3array>` | :ref:`get_points<class_ConvexPolygonShape_get_points>` **(** **)** const |
|
||||
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Convex polygon shape resource, which can be set into a :ref:`PhysicsBody<class_physicsbody>` or area.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_ConvexPolygonShape_set_points:
|
||||
|
||||
- void **set_points** **(** :ref:`Vector3Array<class_vector3array>` points **)**
|
||||
|
||||
.. _class_ConvexPolygonShape_get_points:
|
||||
|
||||
- :ref:`Vector3Array<class_vector3array>` **get_points** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
.. _class_ConvexPolygonShape2D:
|
||||
|
||||
ConvexPolygonShape2D
|
||||
====================
|
||||
|
||||
Inherits: :ref:`Shape2D<class_shape2d>`
|
||||
---------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Convex Polygon Shape for 2D physics.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_point_cloud<class_ConvexPolygonShape2D_set_point_cloud>` **(** :ref:`Vector2Array<class_vector2array>` point_cloud **)** |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_points<class_ConvexPolygonShape2D_set_points>` **(** :ref:`Vector2Array<class_vector2array>` points **)** |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2Array<class_vector2array>` | :ref:`get_points<class_ConvexPolygonShape2D_get_points>` **(** **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Convex Polygon Shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check).
|
||||
|
||||
The main difference between a :ref:`ConvexPolygonShape2D<class_convexpolygonshape2d>` and a :ref:`ConcavePolygonShape2D<class_concavepolygonshape2d>` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_ConvexPolygonShape2D_set_point_cloud:
|
||||
|
||||
- void **set_point_cloud** **(** :ref:`Vector2Array<class_vector2array>` point_cloud **)**
|
||||
|
||||
Currently, this method does nothing.
|
||||
|
||||
.. _class_ConvexPolygonShape2D_set_points:
|
||||
|
||||
- void **set_points** **(** :ref:`Vector2Array<class_vector2array>` points **)**
|
||||
|
||||
Set a list of points in either clockwise or counter clockwise order, forming a convex polygon.
|
||||
|
||||
.. _class_ConvexPolygonShape2D_get_points:
|
||||
|
||||
- :ref:`Vector2Array<class_vector2array>` **get_points** **(** **)** const
|
||||
|
||||
Return a list of points in either clockwise or counter clockwise order, forming a convex polygon.
|
||||
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
.. _class_CubeMap:
|
||||
|
||||
CubeMap
|
||||
=======
|
||||
|
||||
Inherits: :ref:`Resource<class_resource>`
|
||||
-----------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_width<class_CubeMap_get_width>` **(** **)** const |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_height<class_CubeMap_get_height>` **(** **)** const |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_rid>` | :ref:`get_rid<class_CubeMap_get_rid>` **(** **)** const |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_flags<class_CubeMap_set_flags>` **(** :ref:`int<class_int>` flags **)** |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_flags<class_CubeMap_get_flags>` **(** **)** const |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_side<class_CubeMap_set_side>` **(** :ref:`int<class_int>` side, :ref:`Image<class_image>` image **)** |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Image<class_image>` | :ref:`get_side<class_CubeMap_get_side>` **(** :ref:`int<class_int>` side **)** const |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_storage<class_CubeMap_set_storage>` **(** :ref:`int<class_int>` mode **)** |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_storage<class_CubeMap_get_storage>` **(** **)** const |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_lossy_storage_quality<class_CubeMap_set_lossy_storage_quality>` **(** :ref:`float<class_float>` quality **)** |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_lossy_storage_quality<class_CubeMap_get_lossy_storage_quality>` **(** **)** const |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **STORAGE_RAW** = **0**
|
||||
- **STORAGE_COMPRESS_LOSSY** = **1**
|
||||
- **STORAGE_COMPRESS_LOSSLESS** = **2**
|
||||
- **SIDE_LEFT** = **0**
|
||||
- **SIDE_RIGHT** = **1**
|
||||
- **SIDE_BOTTOM** = **2**
|
||||
- **SIDE_TOP** = **3**
|
||||
- **SIDE_FRONT** = **4**
|
||||
- **SIDE_BACK** = **5**
|
||||
- **FLAG_MIPMAPS** = **1**
|
||||
- **FLAG_REPEAT** = **2**
|
||||
- **FLAG_FILTER** = **4**
|
||||
- **FLAGS_DEFAULT** = **7**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_CubeMap_get_width:
|
||||
|
||||
- :ref:`int<class_int>` **get_width** **(** **)** const
|
||||
|
||||
.. _class_CubeMap_get_height:
|
||||
|
||||
- :ref:`int<class_int>` **get_height** **(** **)** const
|
||||
|
||||
.. _class_CubeMap_get_rid:
|
||||
|
||||
- :ref:`RID<class_rid>` **get_rid** **(** **)** const
|
||||
|
||||
.. _class_CubeMap_set_flags:
|
||||
|
||||
- void **set_flags** **(** :ref:`int<class_int>` flags **)**
|
||||
|
||||
.. _class_CubeMap_get_flags:
|
||||
|
||||
- :ref:`int<class_int>` **get_flags** **(** **)** const
|
||||
|
||||
.. _class_CubeMap_set_side:
|
||||
|
||||
- void **set_side** **(** :ref:`int<class_int>` side, :ref:`Image<class_image>` image **)**
|
||||
|
||||
.. _class_CubeMap_get_side:
|
||||
|
||||
- :ref:`Image<class_image>` **get_side** **(** :ref:`int<class_int>` side **)** const
|
||||
|
||||
.. _class_CubeMap_set_storage:
|
||||
|
||||
- void **set_storage** **(** :ref:`int<class_int>` mode **)**
|
||||
|
||||
.. _class_CubeMap_get_storage:
|
||||
|
||||
- :ref:`int<class_int>` **get_storage** **(** **)** const
|
||||
|
||||
.. _class_CubeMap_set_lossy_storage_quality:
|
||||
|
||||
- void **set_lossy_storage_quality** **(** :ref:`float<class_float>` quality **)**
|
||||
|
||||
.. _class_CubeMap_get_lossy_storage_quality:
|
||||
|
||||
- :ref:`float<class_float>` **get_lossy_storage_quality** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
.. _class_Curve2D:
|
||||
|
||||
Curve2D
|
||||
=======
|
||||
|
||||
Inherits: :ref:`Resource<class_resource>`
|
||||
-----------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Describes a Bezier curve in 2D space.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_point_count<class_Curve2D_get_point_count>` **(** **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_point<class_Curve2D_add_point>` **(** :ref:`Vector2<class_vector2>` pos, :ref:`Vector2<class_vector2>` in=Vector2(0,0), :ref:`Vector2<class_vector2>` out=Vector2(0,0), :ref:`int<class_int>` atpos=-1 **)** |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_point_pos<class_Curve2D_set_point_pos>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_vector2>` pos **)** |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_point_pos<class_Curve2D_get_point_pos>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_point_in<class_Curve2D_set_point_in>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_vector2>` pos **)** |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_point_in<class_Curve2D_get_point_in>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_point_out<class_Curve2D_set_point_out>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_vector2>` pos **)** |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_point_out<class_Curve2D_get_point_out>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_point<class_Curve2D_remove_point>` **(** :ref:`int<class_int>` idx **)** |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`interpolate<class_Curve2D_interpolate>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` t **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`interpolatef<class_Curve2D_interpolatef>` **(** :ref:`float<class_float>` fofs **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_bake_interval<class_Curve2D_set_bake_interval>` **(** :ref:`float<class_float>` distance **)** |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_bake_interval<class_Curve2D_get_bake_interval>` **(** **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_baked_length<class_Curve2D_get_baked_length>` **(** **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`interpolate_baked<class_Curve2D_interpolate_baked>` **(** :ref:`float<class_float>` offset, :ref:`bool<class_bool>` cubic=false **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2Array<class_vector2array>` | :ref:`get_baked_points<class_Curve2D_get_baked_points>` **(** **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2Array<class_vector2array>` | :ref:`tesselate<class_Curve2D_tesselate>` **(** :ref:`int<class_int>` max_stages=5, :ref:`float<class_float>` tolerance_degrees=4 **)** const |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
This class describes a Bezier curve in 2D space. It is mainly used to give a shape to a :ref:`Path2D<class_path2d>`, but can be manually sampled for other purposes.
|
||||
|
||||
It keeps a cache of precalculated points along the curve, to speed further calculations up.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Curve2D_get_point_count:
|
||||
|
||||
- :ref:`int<class_int>` **get_point_count** **(** **)** const
|
||||
|
||||
Returns the number of points describing the curve.
|
||||
|
||||
.. _class_Curve2D_add_point:
|
||||
|
||||
- void **add_point** **(** :ref:`Vector2<class_vector2>` pos, :ref:`Vector2<class_vector2>` in=Vector2(0,0), :ref:`Vector2<class_vector2>` out=Vector2(0,0), :ref:`int<class_int>` atpos=-1 **)**
|
||||
|
||||
Adds a point to a curve, at position "pos", with control points "in" and "out".
|
||||
|
||||
If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos <0 or atpos >= :ref:`get_point_count<Curve2D_get_point_count>`), the point will be appended at the end of the point list.
|
||||
|
||||
.. _class_Curve2D_set_point_pos:
|
||||
|
||||
- void **set_point_pos** **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_vector2>` pos **)**
|
||||
|
||||
Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console.
|
||||
|
||||
.. _class_Curve2D_get_point_pos:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_point_pos** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
|
||||
|
||||
.. _class_Curve2D_set_point_in:
|
||||
|
||||
- void **set_point_in** **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_vector2>` pos **)**
|
||||
|
||||
Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console.
|
||||
|
||||
.. _class_Curve2D_get_point_in:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_point_in** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
|
||||
|
||||
.. _class_Curve2D_set_point_out:
|
||||
|
||||
- void **set_point_out** **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_vector2>` pos **)**
|
||||
|
||||
Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console.
|
||||
|
||||
.. _class_Curve2D_get_point_out:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_point_out** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
|
||||
|
||||
.. _class_Curve2D_remove_point:
|
||||
|
||||
- void **remove_point** **(** :ref:`int<class_int>` idx **)**
|
||||
|
||||
Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds.
|
||||
|
||||
.. _class_Curve2D_interpolate:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **interpolate** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` t **)** const
|
||||
|
||||
Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results.
|
||||
|
||||
If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0).
|
||||
|
||||
.. _class_Curve2D_interpolatef:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **interpolatef** **(** :ref:`float<class_float>` fofs **)** const
|
||||
|
||||
Returns the position at the vertex "fofs". It calls :ref:`interpolate<Curve2D_interpolate>` using the integer part of fofs as "idx", and its fractional part as "t".
|
||||
|
||||
.. _class_Curve2D_set_bake_interval:
|
||||
|
||||
- void **set_bake_interval** **(** :ref:`float<class_float>` distance **)**
|
||||
|
||||
Sets the distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care.
|
||||
|
||||
.. _class_Curve2D_get_bake_interval:
|
||||
|
||||
- :ref:`float<class_float>` **get_bake_interval** **(** **)** const
|
||||
|
||||
Returns the distance between two adjacent cached points.
|
||||
|
||||
.. _class_Curve2D_get_baked_length:
|
||||
|
||||
- :ref:`float<class_float>` **get_baked_length** **(** **)** const
|
||||
|
||||
Returns the total length of the curve, based on the cached points. Given enough density (see :ref:`set_bake_interval<Curve2D_set_bake_interval>`), it should be approximate enough.
|
||||
|
||||
.. _class_Curve2D_interpolate_baked:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **interpolate_baked** **(** :ref:`float<class_float>` offset, :ref:`bool<class_bool>` cubic=false **)** const
|
||||
|
||||
Returns a point within the curve at position "offset", where "offset" is measured as a pixel distance along the curve.
|
||||
|
||||
To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false.
|
||||
|
||||
Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
|
||||
|
||||
.. _class_Curve2D_get_baked_points:
|
||||
|
||||
- :ref:`Vector2Array<class_vector2array>` **get_baked_points** **(** **)** const
|
||||
|
||||
Returns the cache of points as a :ref:`Vector2Array<class_vector2array>`.
|
||||
|
||||
.. _class_Curve2D_tesselate:
|
||||
|
||||
- :ref:`Vector2Array<class_vector2array>` **tesselate** **(** :ref:`int<class_int>` max_stages=5, :ref:`float<class_float>` tolerance_degrees=4 **)** const
|
||||
|
||||
Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
|
||||
|
||||
This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
|
||||
|
||||
"max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
|
||||
|
||||
"tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
|
||||
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
.. _class_Curve3D:
|
||||
|
||||
Curve3D
|
||||
=======
|
||||
|
||||
Inherits: :ref:`Resource<class_resource>`
|
||||
-----------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Describes a Bezier curve in 3D space.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_point_count<class_Curve3D_get_point_count>` **(** **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_point<class_Curve3D_add_point>` **(** :ref:`Vector3<class_vector3>` pos, :ref:`Vector3<class_vector3>` in=Vector3(0, 0, 0), :ref:`Vector3<class_vector3>` out=Vector3(0, 0, 0), :ref:`int<class_int>` atpos=-1 **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_point_pos<class_Curve3D_set_point_pos>` **(** :ref:`int<class_int>` idx, :ref:`Vector3<class_vector3>` pos **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_point_pos<class_Curve3D_get_point_pos>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_point_tilt<class_Curve3D_set_point_tilt>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` tilt **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_point_tilt<class_Curve3D_get_point_tilt>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_point_in<class_Curve3D_set_point_in>` **(** :ref:`int<class_int>` idx, :ref:`Vector3<class_vector3>` pos **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_point_in<class_Curve3D_get_point_in>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_point_out<class_Curve3D_set_point_out>` **(** :ref:`int<class_int>` idx, :ref:`Vector3<class_vector3>` pos **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_point_out<class_Curve3D_get_point_out>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_point<class_Curve3D_remove_point>` **(** :ref:`int<class_int>` idx **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`interpolate<class_Curve3D_interpolate>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` t **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`interpolatef<class_Curve3D_interpolatef>` **(** :ref:`float<class_float>` fofs **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_bake_interval<class_Curve3D_set_bake_interval>` **(** :ref:`float<class_float>` distance **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_bake_interval<class_Curve3D_get_bake_interval>` **(** **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_baked_length<class_Curve3D_get_baked_length>` **(** **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`interpolate_baked<class_Curve3D_interpolate_baked>` **(** :ref:`float<class_float>` offset, :ref:`bool<class_bool>` cubic=false **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3Array<class_vector3array>` | :ref:`get_baked_points<class_Curve3D_get_baked_points>` **(** **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RealArray<class_realarray>` | :ref:`get_baked_tilts<class_Curve3D_get_baked_tilts>` **(** **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3Array<class_vector3array>` | :ref:`tesselate<class_Curve3D_tesselate>` **(** :ref:`int<class_int>` max_stages=5, :ref:`float<class_float>` tolerance_degrees=4 **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
This class describes a Bezier curve in 3D space. It is mainly used to give a shape to a :ref:`Path<class_path>`, but can be manually sampled for other purposes.
|
||||
|
||||
It keeps a cache of precalculated points along the curve, to speed further calculations up.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Curve3D_get_point_count:
|
||||
|
||||
- :ref:`int<class_int>` **get_point_count** **(** **)** const
|
||||
|
||||
Returns the number of points describing the curve.
|
||||
|
||||
.. _class_Curve3D_add_point:
|
||||
|
||||
- void **add_point** **(** :ref:`Vector3<class_vector3>` pos, :ref:`Vector3<class_vector3>` in=Vector3(0, 0, 0), :ref:`Vector3<class_vector3>` out=Vector3(0, 0, 0), :ref:`int<class_int>` atpos=-1 **)**
|
||||
|
||||
Adds a point to a curve, at position "pos", with control points "in" and "out".
|
||||
|
||||
If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos <0 or atpos >= :ref:`get_point_count<Curve3D_get_point_count>`), the point will be appended at the end of the point list.
|
||||
|
||||
.. _class_Curve3D_set_point_pos:
|
||||
|
||||
- void **set_point_pos** **(** :ref:`int<class_int>` idx, :ref:`Vector3<class_vector3>` pos **)**
|
||||
|
||||
Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console.
|
||||
|
||||
.. _class_Curve3D_get_point_pos:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **get_point_pos** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
|
||||
|
||||
.. _class_Curve3D_set_point_tilt:
|
||||
|
||||
- void **set_point_tilt** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` tilt **)**
|
||||
|
||||
Sets the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console.
|
||||
|
||||
The tilt controls the rotation along the look-at axis an object travelling the path would have. In the case of a curve controlling a :ref:`PathFollow<class_pathfollow>`, this tilt is an offset over the natural tilt the PathFollow calculates.
|
||||
|
||||
.. _class_Curve3D_get_point_tilt:
|
||||
|
||||
- :ref:`float<class_float>` **get_point_tilt** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Returns the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console, and returns 0.
|
||||
|
||||
.. _class_Curve3D_set_point_in:
|
||||
|
||||
- void **set_point_in** **(** :ref:`int<class_int>` idx, :ref:`Vector3<class_vector3>` pos **)**
|
||||
|
||||
Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console.
|
||||
|
||||
.. _class_Curve3D_get_point_in:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **get_point_in** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
|
||||
|
||||
.. _class_Curve3D_set_point_out:
|
||||
|
||||
- void **set_point_out** **(** :ref:`int<class_int>` idx, :ref:`Vector3<class_vector3>` pos **)**
|
||||
|
||||
Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console.
|
||||
|
||||
.. _class_Curve3D_get_point_out:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **get_point_out** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
|
||||
|
||||
.. _class_Curve3D_remove_point:
|
||||
|
||||
- void **remove_point** **(** :ref:`int<class_int>` idx **)**
|
||||
|
||||
Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds.
|
||||
|
||||
.. _class_Curve3D_interpolate:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **interpolate** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` t **)** const
|
||||
|
||||
Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results.
|
||||
|
||||
If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0, 0).
|
||||
|
||||
.. _class_Curve3D_interpolatef:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **interpolatef** **(** :ref:`float<class_float>` fofs **)** const
|
||||
|
||||
Returns the position at the vertex "fofs". It calls :ref:`interpolate<Curve3D_interpolate>` using the integer part of fofs as "idx", and its fractional part as "t".
|
||||
|
||||
.. _class_Curve3D_set_bake_interval:
|
||||
|
||||
- void **set_bake_interval** **(** :ref:`float<class_float>` distance **)**
|
||||
|
||||
Sets the distance in 3D units between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care.
|
||||
|
||||
.. _class_Curve3D_get_bake_interval:
|
||||
|
||||
- :ref:`float<class_float>` **get_bake_interval** **(** **)** const
|
||||
|
||||
Returns the distance between two adjacent cached points.
|
||||
|
||||
.. _class_Curve3D_get_baked_length:
|
||||
|
||||
- :ref:`float<class_float>` **get_baked_length** **(** **)** const
|
||||
|
||||
Returns the total length of the curve, based on the cached points. Given enough density (see :ref:`set_bake_interval<Curve3D_set_bake_interval>`), it should be approximate enough.
|
||||
|
||||
.. _class_Curve3D_interpolate_baked:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **interpolate_baked** **(** :ref:`float<class_float>` offset, :ref:`bool<class_bool>` cubic=false **)** const
|
||||
|
||||
Returns a point within the curve at position "offset", where "offset" is measured as a distance in 3D units along the curve.
|
||||
|
||||
To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false.
|
||||
|
||||
Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
|
||||
|
||||
.. _class_Curve3D_get_baked_points:
|
||||
|
||||
- :ref:`Vector3Array<class_vector3array>` **get_baked_points** **(** **)** const
|
||||
|
||||
Returns the cache of points as a :ref:`Vector3Array<class_vector3array>`.
|
||||
|
||||
.. _class_Curve3D_get_baked_tilts:
|
||||
|
||||
- :ref:`RealArray<class_realarray>` **get_baked_tilts** **(** **)** const
|
||||
|
||||
Returns the cache of tilts as a :ref:`RealArray<class_realarray>`.
|
||||
|
||||
.. _class_Curve3D_tesselate:
|
||||
|
||||
- :ref:`Vector3Array<class_vector3array>` **tesselate** **(** :ref:`int<class_int>` max_stages=5, :ref:`float<class_float>` tolerance_degrees=4 **)** const
|
||||
|
||||
Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
|
||||
|
||||
This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
|
||||
|
||||
"max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
|
||||
|
||||
"tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
|
||||
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
.. _class_DampedSpringJoint2D:
|
||||
|
||||
DampedSpringJoint2D
|
||||
===================
|
||||
|
||||
Inherits: :ref:`Joint2D<class_joint2d>`
|
||||
---------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Damped spring constraint for 2D physics.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_length<class_DampedSpringJoint2D_set_length>` **(** :ref:`float<class_float>` length **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_length<class_DampedSpringJoint2D_get_length>` **(** **)** const |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_rest_length<class_DampedSpringJoint2D_set_rest_length>` **(** :ref:`float<class_float>` rest_length **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_rest_length<class_DampedSpringJoint2D_get_rest_length>` **(** **)** const |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_stiffness<class_DampedSpringJoint2D_set_stiffness>` **(** :ref:`float<class_float>` stiffness **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_stiffness<class_DampedSpringJoint2D_get_stiffness>` **(** **)** const |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_damping<class_DampedSpringJoint2D_set_damping>` **(** :ref:`float<class_float>` damping **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_damping<class_DampedSpringJoint2D_get_damping>` **(** **)** const |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Damped spring constraint for 2D physics. This resembles a spring joint that always want to go back to a given length.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_DampedSpringJoint2D_set_length:
|
||||
|
||||
- void **set_length** **(** :ref:`float<class_float>` length **)**
|
||||
|
||||
Set the maximum length of the spring joint.
|
||||
|
||||
.. _class_DampedSpringJoint2D_get_length:
|
||||
|
||||
- :ref:`float<class_float>` **get_length** **(** **)** const
|
||||
|
||||
Return the maximum length of the spring joint.
|
||||
|
||||
.. _class_DampedSpringJoint2D_set_rest_length:
|
||||
|
||||
- void **set_rest_length** **(** :ref:`float<class_float>` rest_length **)**
|
||||
|
||||
Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
|
||||
|
||||
.. _class_DampedSpringJoint2D_get_rest_length:
|
||||
|
||||
- :ref:`float<class_float>` **get_rest_length** **(** **)** const
|
||||
|
||||
Return the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
|
||||
|
||||
.. _class_DampedSpringJoint2D_set_stiffness:
|
||||
|
||||
- void **set_stiffness** **(** :ref:`float<class_float>` stiffness **)**
|
||||
|
||||
Set the stiffness of the spring joint.
|
||||
|
||||
.. _class_DampedSpringJoint2D_get_stiffness:
|
||||
|
||||
- :ref:`float<class_float>` **get_stiffness** **(** **)** const
|
||||
|
||||
Return the stiffness of the spring joint.
|
||||
|
||||
.. _class_DampedSpringJoint2D_set_damping:
|
||||
|
||||
- void **set_damping** **(** :ref:`float<class_float>` damping **)**
|
||||
|
||||
Set the damping of the spring joint.
|
||||
|
||||
.. _class_DampedSpringJoint2D_get_damping:
|
||||
|
||||
- :ref:`float<class_float>` **get_damping** **(** **)** const
|
||||
|
||||
Return the damping of the spring joint.
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
.. _class_Dictionary:
|
||||
|
||||
Dictionary
|
||||
==========
|
||||
|
||||
**Category:** Built-In Types
|
||||
----------------------------
|
||||
Category: Built-In Types
|
||||
------------------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
@@ -12,71 +14,82 @@ Dictionary type.
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
- void **`clear <#clear>`__** **(** **)**
|
||||
- `bool <class_bool>`__ **`empty <#empty>`__** **(** **)**
|
||||
- void **`erase <#erase>`__** **(** var value **)**
|
||||
- `bool <class_bool>`__ **`has <#has>`__** **(** var value **)**
|
||||
- `int <class_int>`__ **`hash <#hash>`__** **(** **)**
|
||||
- `Array <class_array>`__ **`keys <#keys>`__** **(** **)**
|
||||
- `int <class_int>`__ **`parse\_json <#parse_json>`__** **(**
|
||||
`String <class_string>`__ json **)**
|
||||
- `int <class_int>`__ **`size <#size>`__** **(** **)**
|
||||
- `String <class_string>`__ **`to\_json <#to_json>`__** **(** **)**
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear<class_Dictionary_clear>` **(** **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`empty<class_Dictionary_empty>` **(** **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`erase<class_Dictionary_erase>` **(** var value **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has<class_Dictionary_has>` **(** var value **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`hash<class_Dictionary_hash>` **(** **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`keys<class_Dictionary_keys>` **(** **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`parse_json<class_Dictionary_parse_json>` **(** :ref:`String<class_string>` json **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`size<class_Dictionary_size>` **(** **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`to_json<class_Dictionary_to_json>` **(** **)** |
|
||||
+------------------------------+-----------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Dictionary type. Associative container which contains values referenced
|
||||
by unique keys. Dictionaries are always passed by reference.
|
||||
Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
clear
|
||||
~~~~~
|
||||
.. _class_Dictionary_clear:
|
||||
|
||||
- void **clear** **(** **)**
|
||||
|
||||
Clear the dictionary, removing all key/value pairs.
|
||||
|
||||
empty
|
||||
~~~~~
|
||||
.. _class_Dictionary_empty:
|
||||
|
||||
- `bool <class_bool>`__ **empty** **(** **)**
|
||||
- :ref:`bool<class_bool>` **empty** **(** **)**
|
||||
|
||||
Return true if the dictionary is empty.
|
||||
|
||||
erase
|
||||
~~~~~
|
||||
.. _class_Dictionary_erase:
|
||||
|
||||
- void **erase** **(** var value **)**
|
||||
|
||||
Erase a dictionary key/value pair by key.
|
||||
|
||||
has
|
||||
~~~
|
||||
.. _class_Dictionary_has:
|
||||
|
||||
- `bool <class_bool>`__ **has** **(** var value **)**
|
||||
- :ref:`bool<class_bool>` **has** **(** var value **)**
|
||||
|
||||
Return true if the dictionary has a given key.
|
||||
|
||||
hash
|
||||
~~~~
|
||||
.. _class_Dictionary_hash:
|
||||
|
||||
- `int <class_int>`__ **hash** **(** **)**
|
||||
- :ref:`int<class_int>` **hash** **(** **)**
|
||||
|
||||
Return a hashed integer value representing the dictionary contents.
|
||||
|
||||
keys
|
||||
~~~~
|
||||
.. _class_Dictionary_keys:
|
||||
|
||||
- `Array <class_array>`__ **keys** **(** **)**
|
||||
- :ref:`Array<class_array>` **keys** **(** **)**
|
||||
|
||||
Return the list of keys in the dictionary.
|
||||
|
||||
size
|
||||
~~~~
|
||||
.. _class_Dictionary_parse_json:
|
||||
|
||||
- `int <class_int>`__ **size** **(** **)**
|
||||
- :ref:`int<class_int>` **parse_json** **(** :ref:`String<class_string>` json **)**
|
||||
|
||||
.. _class_Dictionary_size:
|
||||
|
||||
- :ref:`int<class_int>` **size** **(** **)**
|
||||
|
||||
Return the size of the dictionary (in pairs).
|
||||
|
||||
.. _class_Dictionary_to_json:
|
||||
|
||||
- :ref:`String<class_string>` **to_json** **(** **)**
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
.. _class_DirectionalLight:
|
||||
|
||||
DirectionalLight
|
||||
================
|
||||
|
||||
Inherits: :ref:`Light<class_light>`
|
||||
-----------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Directional Light, such as the Sun or the Moon.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_shadow_mode<class_DirectionalLight_set_shadow_mode>` **(** :ref:`int<class_int>` mode **)** |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_shadow_mode<class_DirectionalLight_get_shadow_mode>` **(** **)** const |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_shadow_param<class_DirectionalLight_set_shadow_param>` **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)** |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_shadow_param<class_DirectionalLight_get_shadow_param>` **(** :ref:`int<class_int>` param **)** const |
|
||||
+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **SHADOW_ORTHOGONAL** = **0**
|
||||
- **SHADOW_PERSPECTIVE** = **1**
|
||||
- **SHADOW_PARALLEL_2_SPLITS** = **2**
|
||||
- **SHADOW_PARALLEL_4_SPLITS** = **3**
|
||||
- **SHADOW_PARAM_MAX_DISTANCE** = **0**
|
||||
- **SHADOW_PARAM_PSSM_SPLIT_WEIGHT** = **1**
|
||||
- **SHADOW_PARAM_PSSM_ZOFFSET_SCALE** = **2**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
A DirectionalLight is a type of :ref:`Light<class_light>` node that emits light constantly in one direction (the negative z axis of the node). It is used lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldpace location of the DirectionalLight transform (origin) is ignored, only the basis is used do determine light direction.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_DirectionalLight_set_shadow_mode:
|
||||
|
||||
- void **set_shadow_mode** **(** :ref:`int<class_int>` mode **)**
|
||||
|
||||
.. _class_DirectionalLight_get_shadow_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_shadow_mode** **(** **)** const
|
||||
|
||||
.. _class_DirectionalLight_set_shadow_param:
|
||||
|
||||
- void **set_shadow_param** **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)**
|
||||
|
||||
.. _class_DirectionalLight_get_shadow_param:
|
||||
|
||||
- :ref:`float<class_float>` **get_shadow_param** **(** :ref:`int<class_int>` param **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
.. _class_Directory:
|
||||
|
||||
Directory
|
||||
=========
|
||||
|
||||
Inherits: :ref:`Reference<class_reference>`
|
||||
-------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| Error | :ref:`open<class_Directory_open>` **(** :ref:`String<class_string>` path **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`list_dir_begin<class_Directory_list_dir_begin>` **(** **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_next<class_Directory_get_next>` **(** **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`current_is_dir<class_Directory_current_is_dir>` **(** **)** const |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`list_dir_end<class_Directory_list_dir_end>` **(** **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_drive_count<class_Directory_get_drive_count>` **(** **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_drive<class_Directory_get_drive>` **(** :ref:`int<class_int>` idx **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| Error | :ref:`change_dir<class_Directory_change_dir>` **(** :ref:`String<class_string>` todir **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_current_dir<class_Directory_get_current_dir>` **(** **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| Error | :ref:`make_dir<class_Directory_make_dir>` **(** :ref:`String<class_string>` name **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| Error | :ref:`make_dir_recursive<class_Directory_make_dir_recursive>` **(** :ref:`String<class_string>` name **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`file_exists<class_Directory_file_exists>` **(** :ref:`String<class_string>` name **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`dir_exists<class_Directory_dir_exists>` **(** :ref:`String<class_string>` name **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_space_left<class_Directory_get_space_left>` **(** **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| Error | :ref:`copy<class_Directory_copy>` **(** :ref:`String<class_string>` from, :ref:`String<class_string>` to **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| Error | :ref:`rename<class_Directory_rename>` **(** :ref:`String<class_string>` from, :ref:`String<class_string>` to **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| Error | :ref:`remove<class_Directory_remove>` **(** :ref:`String<class_string>` file **)** |
|
||||
+------------------------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Directory_open:
|
||||
|
||||
- Error **open** **(** :ref:`String<class_string>` path **)**
|
||||
|
||||
.. _class_Directory_list_dir_begin:
|
||||
|
||||
- :ref:`bool<class_bool>` **list_dir_begin** **(** **)**
|
||||
|
||||
.. _class_Directory_get_next:
|
||||
|
||||
- :ref:`String<class_string>` **get_next** **(** **)**
|
||||
|
||||
.. _class_Directory_current_is_dir:
|
||||
|
||||
- :ref:`bool<class_bool>` **current_is_dir** **(** **)** const
|
||||
|
||||
.. _class_Directory_list_dir_end:
|
||||
|
||||
- void **list_dir_end** **(** **)**
|
||||
|
||||
.. _class_Directory_get_drive_count:
|
||||
|
||||
- :ref:`int<class_int>` **get_drive_count** **(** **)**
|
||||
|
||||
.. _class_Directory_get_drive:
|
||||
|
||||
- :ref:`String<class_string>` **get_drive** **(** :ref:`int<class_int>` idx **)**
|
||||
|
||||
.. _class_Directory_change_dir:
|
||||
|
||||
- Error **change_dir** **(** :ref:`String<class_string>` todir **)**
|
||||
|
||||
.. _class_Directory_get_current_dir:
|
||||
|
||||
- :ref:`String<class_string>` **get_current_dir** **(** **)**
|
||||
|
||||
.. _class_Directory_make_dir:
|
||||
|
||||
- Error **make_dir** **(** :ref:`String<class_string>` name **)**
|
||||
|
||||
.. _class_Directory_make_dir_recursive:
|
||||
|
||||
- Error **make_dir_recursive** **(** :ref:`String<class_string>` name **)**
|
||||
|
||||
.. _class_Directory_file_exists:
|
||||
|
||||
- :ref:`bool<class_bool>` **file_exists** **(** :ref:`String<class_string>` name **)**
|
||||
|
||||
.. _class_Directory_dir_exists:
|
||||
|
||||
- :ref:`bool<class_bool>` **dir_exists** **(** :ref:`String<class_string>` name **)**
|
||||
|
||||
.. _class_Directory_get_space_left:
|
||||
|
||||
- :ref:`int<class_int>` **get_space_left** **(** **)**
|
||||
|
||||
.. _class_Directory_copy:
|
||||
|
||||
- Error **copy** **(** :ref:`String<class_string>` from, :ref:`String<class_string>` to **)**
|
||||
|
||||
.. _class_Directory_rename:
|
||||
|
||||
- Error **rename** **(** :ref:`String<class_string>` from, :ref:`String<class_string>` to **)**
|
||||
|
||||
.. _class_Directory_remove:
|
||||
|
||||
- Error **remove** **(** :ref:`String<class_string>` file **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
.. _class_EditorFileDialog:
|
||||
|
||||
EditorFileDialog
|
||||
================
|
||||
|
||||
Inherits: :ref:`ConfirmationDialog<class_confirmationdialog>`
|
||||
-------------------------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_filters<class_EditorFileDialog_clear_filters>` **(** **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_filter<class_EditorFileDialog_add_filter>` **(** :ref:`String<class_string>` filter **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_current_dir<class_EditorFileDialog_get_current_dir>` **(** **)** const |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_current_file<class_EditorFileDialog_get_current_file>` **(** **)** const |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_current_path<class_EditorFileDialog_get_current_path>` **(** **)** const |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_current_dir<class_EditorFileDialog_set_current_dir>` **(** :ref:`String<class_string>` dir **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_current_file<class_EditorFileDialog_set_current_file>` **(** :ref:`String<class_string>` file **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_current_path<class_EditorFileDialog_set_current_path>` **(** :ref:`String<class_string>` path **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_mode<class_EditorFileDialog_set_mode>` **(** :ref:`int<class_int>` mode **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_mode<class_EditorFileDialog_get_mode>` **(** **)** const |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`VBoxContainer<class_vboxcontainer>` | :ref:`get_vbox<class_EditorFileDialog_get_vbox>` **(** **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_access<class_EditorFileDialog_set_access>` **(** :ref:`int<class_int>` access **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_access<class_EditorFileDialog_get_access>` **(** **)** const |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_show_hidden_files<class_EditorFileDialog_set_show_hidden_files>` **(** :ref:`bool<class_bool>` show **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_showing_hidden_files<class_EditorFileDialog_is_showing_hidden_files>` **(** **)** const |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_display_mode<class_EditorFileDialog_set_display_mode>` **(** :ref:`int<class_int>` mode **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_display_mode<class_EditorFileDialog_get_display_mode>` **(** **)** const |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`invalidate<class_EditorFileDialog_invalidate>` **(** **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **files_selected** **(** :ref:`StringArray<class_stringarray>` paths **)**
|
||||
- **dir_selected** **(** :ref:`String<class_string>` dir **)**
|
||||
- **file_selected** **(** :ref:`String<class_string>` path **)**
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **MODE_OPEN_FILE** = **0**
|
||||
- **MODE_OPEN_FILES** = **1**
|
||||
- **MODE_OPEN_DIR** = **2**
|
||||
- **MODE_SAVE_FILE** = **3**
|
||||
- **ACCESS_RESOURCES** = **0**
|
||||
- **ACCESS_USERDATA** = **1**
|
||||
- **ACCESS_FILESYSTEM** = **2**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_EditorFileDialog_clear_filters:
|
||||
|
||||
- void **clear_filters** **(** **)**
|
||||
|
||||
.. _class_EditorFileDialog_add_filter:
|
||||
|
||||
- void **add_filter** **(** :ref:`String<class_string>` filter **)**
|
||||
|
||||
.. _class_EditorFileDialog_get_current_dir:
|
||||
|
||||
- :ref:`String<class_string>` **get_current_dir** **(** **)** const
|
||||
|
||||
.. _class_EditorFileDialog_get_current_file:
|
||||
|
||||
- :ref:`String<class_string>` **get_current_file** **(** **)** const
|
||||
|
||||
.. _class_EditorFileDialog_get_current_path:
|
||||
|
||||
- :ref:`String<class_string>` **get_current_path** **(** **)** const
|
||||
|
||||
.. _class_EditorFileDialog_set_current_dir:
|
||||
|
||||
- void **set_current_dir** **(** :ref:`String<class_string>` dir **)**
|
||||
|
||||
.. _class_EditorFileDialog_set_current_file:
|
||||
|
||||
- void **set_current_file** **(** :ref:`String<class_string>` file **)**
|
||||
|
||||
.. _class_EditorFileDialog_set_current_path:
|
||||
|
||||
- void **set_current_path** **(** :ref:`String<class_string>` path **)**
|
||||
|
||||
.. _class_EditorFileDialog_set_mode:
|
||||
|
||||
- void **set_mode** **(** :ref:`int<class_int>` mode **)**
|
||||
|
||||
.. _class_EditorFileDialog_get_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_mode** **(** **)** const
|
||||
|
||||
.. _class_EditorFileDialog_get_vbox:
|
||||
|
||||
- :ref:`VBoxContainer<class_vboxcontainer>` **get_vbox** **(** **)**
|
||||
|
||||
.. _class_EditorFileDialog_set_access:
|
||||
|
||||
- void **set_access** **(** :ref:`int<class_int>` access **)**
|
||||
|
||||
.. _class_EditorFileDialog_get_access:
|
||||
|
||||
- :ref:`int<class_int>` **get_access** **(** **)** const
|
||||
|
||||
.. _class_EditorFileDialog_set_show_hidden_files:
|
||||
|
||||
- void **set_show_hidden_files** **(** :ref:`bool<class_bool>` show **)**
|
||||
|
||||
.. _class_EditorFileDialog_is_showing_hidden_files:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_showing_hidden_files** **(** **)** const
|
||||
|
||||
.. _class_EditorFileDialog_set_display_mode:
|
||||
|
||||
- void **set_display_mode** **(** :ref:`int<class_int>` mode **)**
|
||||
|
||||
.. _class_EditorFileDialog_get_display_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_display_mode** **(** **)** const
|
||||
|
||||
.. _class_EditorFileDialog_invalidate:
|
||||
|
||||
- void **invalidate** **(** **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
.. _class_EditorImportPlugin:
|
||||
|
||||
EditorImportPlugin
|
||||
==================
|
||||
|
||||
Inherits: :ref:`Reference<class_reference>`
|
||||
-------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RawArray<class_rawarray>` | :ref:`custom_export<class_EditorImportPlugin_custom_export>` **(** :ref:`String<class_string>` path **)** virtual |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_name<class_EditorImportPlugin_get_name>` **(** **)** virtual |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_visible_name<class_EditorImportPlugin_get_visible_name>` **(** **)** virtual |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`import<class_EditorImportPlugin_import>` **(** :ref:`String<class_string>` path, ResourceImportMetaData from **)** virtual |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`import_dialog<class_EditorImportPlugin_import_dialog>` **(** :ref:`String<class_string>` from **)** virtual |
|
||||
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_EditorImportPlugin_custom_export:
|
||||
|
||||
- :ref:`RawArray<class_rawarray>` **custom_export** **(** :ref:`String<class_string>` path **)** virtual
|
||||
|
||||
.. _class_EditorImportPlugin_get_name:
|
||||
|
||||
- :ref:`String<class_string>` **get_name** **(** **)** virtual
|
||||
|
||||
.. _class_EditorImportPlugin_get_visible_name:
|
||||
|
||||
- :ref:`String<class_string>` **get_visible_name** **(** **)** virtual
|
||||
|
||||
.. _class_EditorImportPlugin_import:
|
||||
|
||||
- :ref:`int<class_int>` **import** **(** :ref:`String<class_string>` path, ResourceImportMetaData from **)** virtual
|
||||
|
||||
.. _class_EditorImportPlugin_import_dialog:
|
||||
|
||||
- void **import_dialog** **(** :ref:`String<class_string>` from **)** virtual
|
||||
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
.. _class_EditorPlugin:
|
||||
|
||||
EditorPlugin
|
||||
============
|
||||
|
||||
Inherits: :ref:`Node<class_node>`
|
||||
---------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`apply_changes<class_EditorPlugin_apply_changes>` **(** **)** virtual |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear<class_EditorPlugin_clear>` **(** **)** virtual |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`edit<class_EditorPlugin_edit>` **(** :ref:`Object<class_object>` object **)** virtual |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`forward_input_event<class_EditorPlugin_forward_input_event>` **(** :ref:`InputEvent<class_inputevent>` event **)** virtual |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`forward_spatial_input_event<class_EditorPlugin_forward_spatial_input_event>` **(** :ref:`Camera<class_camera>` camera, :ref:`InputEvent<class_inputevent>` event **)** virtual |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StringArray<class_stringarray>` | :ref:`get_breakpoints<class_EditorPlugin_get_breakpoints>` **(** **)** virtual |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_name<class_EditorPlugin_get_name>` **(** **)** virtual |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Dictionary<class_dictionary>` | :ref:`get_state<class_EditorPlugin_get_state>` **(** **)** virtual |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`handles<class_EditorPlugin_handles>` **(** :ref:`Object<class_object>` object **)** virtual |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_main_screen<class_EditorPlugin_has_main_screen>` **(** **)** virtual |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`make_visible<class_EditorPlugin_make_visible>` **(** :ref:`bool<class_bool>` visible **)** virtual |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_state<class_EditorPlugin_set_state>` **(** :ref:`Dictionary<class_dictionary>` state **)** virtual |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`get_undo_redo<class_EditorPlugin_get_undo_redo>` **(** **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_custom_control<class_EditorPlugin_add_custom_control>` **(** :ref:`int<class_int>` container, :ref:`Object<class_object>` control **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_custom_type<class_EditorPlugin_add_custom_type>` **(** :ref:`String<class_string>` type, :ref:`String<class_string>` base, :ref:`Script<class_script>` script, :ref:`Texture<class_texture>` icon **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_custom_type<class_EditorPlugin_remove_custom_type>` **(** :ref:`String<class_string>` type **)** |
|
||||
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **CONTAINER_TOOLBAR** = **0**
|
||||
- **CONTAINER_SPATIAL_EDITOR_MENU** = **1**
|
||||
- **CONTAINER_SPATIAL_EDITOR_SIDE** = **2**
|
||||
- **CONTAINER_SPATIAL_EDITOR_BOTTOM** = **3**
|
||||
- **CONTAINER_CANVAS_EDITOR_MENU** = **4**
|
||||
- **CONTAINER_CANVAS_EDITOR_SIDE** = **5**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_EditorPlugin_apply_changes:
|
||||
|
||||
- void **apply_changes** **(** **)** virtual
|
||||
|
||||
.. _class_EditorPlugin_clear:
|
||||
|
||||
- void **clear** **(** **)** virtual
|
||||
|
||||
.. _class_EditorPlugin_edit:
|
||||
|
||||
- void **edit** **(** :ref:`Object<class_object>` object **)** virtual
|
||||
|
||||
.. _class_EditorPlugin_forward_input_event:
|
||||
|
||||
- :ref:`bool<class_bool>` **forward_input_event** **(** :ref:`InputEvent<class_inputevent>` event **)** virtual
|
||||
|
||||
.. _class_EditorPlugin_forward_spatial_input_event:
|
||||
|
||||
- :ref:`bool<class_bool>` **forward_spatial_input_event** **(** :ref:`Camera<class_camera>` camera, :ref:`InputEvent<class_inputevent>` event **)** virtual
|
||||
|
||||
.. _class_EditorPlugin_get_breakpoints:
|
||||
|
||||
- :ref:`StringArray<class_stringarray>` **get_breakpoints** **(** **)** virtual
|
||||
|
||||
.. _class_EditorPlugin_get_name:
|
||||
|
||||
- :ref:`String<class_string>` **get_name** **(** **)** virtual
|
||||
|
||||
.. _class_EditorPlugin_get_state:
|
||||
|
||||
- :ref:`Dictionary<class_dictionary>` **get_state** **(** **)** virtual
|
||||
|
||||
.. _class_EditorPlugin_handles:
|
||||
|
||||
- :ref:`bool<class_bool>` **handles** **(** :ref:`Object<class_object>` object **)** virtual
|
||||
|
||||
.. _class_EditorPlugin_has_main_screen:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_main_screen** **(** **)** virtual
|
||||
|
||||
.. _class_EditorPlugin_make_visible:
|
||||
|
||||
- void **make_visible** **(** :ref:`bool<class_bool>` visible **)** virtual
|
||||
|
||||
.. _class_EditorPlugin_set_state:
|
||||
|
||||
- void **set_state** **(** :ref:`Dictionary<class_dictionary>` state **)** virtual
|
||||
|
||||
.. _class_EditorPlugin_get_undo_redo:
|
||||
|
||||
- :ref:`Object<class_object>` **get_undo_redo** **(** **)**
|
||||
|
||||
.. _class_EditorPlugin_add_custom_control:
|
||||
|
||||
- void **add_custom_control** **(** :ref:`int<class_int>` container, :ref:`Object<class_object>` control **)**
|
||||
|
||||
.. _class_EditorPlugin_add_custom_type:
|
||||
|
||||
- void **add_custom_type** **(** :ref:`String<class_string>` type, :ref:`String<class_string>` base, :ref:`Script<class_script>` script, :ref:`Texture<class_texture>` icon **)**
|
||||
|
||||
.. _class_EditorPlugin_remove_custom_type:
|
||||
|
||||
- void **remove_custom_type** **(** :ref:`String<class_string>` type **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
.. _class_EditorScenePostImport:
|
||||
|
||||
EditorScenePostImport
|
||||
=====================
|
||||
|
||||
Inherits: :ref:`Reference<class_reference>`
|
||||
-------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+-------+---------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`post_import<class_EditorScenePostImport_post_import>` **(** :ref:`Object<class_object>` scene **)** virtual |
|
||||
+-------+---------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_EditorScenePostImport_post_import:
|
||||
|
||||
- void **post_import** **(** :ref:`Object<class_object>` scene **)** virtual
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
.. _class_EditorScript:
|
||||
|
||||
EditorScript
|
||||
============
|
||||
|
||||
Inherits: :ref:`Reference<class_reference>`
|
||||
-------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_run<class_EditorScript__run>` **(** **)** virtual |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_root_node<class_EditorScript_add_root_node>` **(** :ref:`Object<class_object>` node **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`get_scene<class_EditorScript_get_scene>` **(** **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_EditorScript__run:
|
||||
|
||||
- void **_run** **(** **)** virtual
|
||||
|
||||
.. _class_EditorScript_add_root_node:
|
||||
|
||||
- void **add_root_node** **(** :ref:`Object<class_object>` node **)**
|
||||
|
||||
.. _class_EditorScript_get_scene:
|
||||
|
||||
- :ref:`Object<class_object>` **get_scene** **(** **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
.. _class_Environment:
|
||||
|
||||
Environment
|
||||
===========
|
||||
|
||||
Inherits: :ref:`Resource<class_resource>`
|
||||
-----------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_background<class_Environment_set_background>` **(** :ref:`int<class_int>` bgmode **)** |
|
||||
+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_background<class_Environment_get_background>` **(** **)** const |
|
||||
+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_background_param<class_Environment_set_background_param>` **(** :ref:`int<class_int>` param, var value **)** |
|
||||
+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`get_background_param<class_Environment_get_background_param>` **(** :ref:`int<class_int>` param **)** const |
|
||||
+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_enable_fx<class_Environment_set_enable_fx>` **(** :ref:`int<class_int>` effect, :ref:`bool<class_bool>` enabled **)** |
|
||||
+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_fx_enabled<class_Environment_is_fx_enabled>` **(** :ref:`int<class_int>` effect **)** const |
|
||||
+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`fx_set_param<class_Environment_fx_set_param>` **(** :ref:`int<class_int>` param, var value **)** |
|
||||
+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`fx_get_param<class_Environment_fx_get_param>` **(** :ref:`int<class_int>` param **)** const |
|
||||
+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **BG_KEEP** = **0**
|
||||
- **BG_DEFAULT_COLOR** = **1**
|
||||
- **BG_COLOR** = **2**
|
||||
- **BG_TEXTURE** = **3**
|
||||
- **BG_CUBEMAP** = **4**
|
||||
- **BG_CANVAS** = **5**
|
||||
- **BG_MAX** = **6**
|
||||
- **BG_PARAM_CANVAS_MAX_LAYER** = **0**
|
||||
- **BG_PARAM_COLOR** = **1**
|
||||
- **BG_PARAM_TEXTURE** = **2**
|
||||
- **BG_PARAM_CUBEMAP** = **3**
|
||||
- **BG_PARAM_ENERGY** = **4**
|
||||
- **BG_PARAM_GLOW** = **6**
|
||||
- **BG_PARAM_MAX** = **7**
|
||||
- **FX_AMBIENT_LIGHT** = **0**
|
||||
- **FX_FXAA** = **1**
|
||||
- **FX_GLOW** = **2**
|
||||
- **FX_DOF_BLUR** = **3**
|
||||
- **FX_HDR** = **4**
|
||||
- **FX_FOG** = **5**
|
||||
- **FX_BCS** = **6**
|
||||
- **FX_SRGB** = **7**
|
||||
- **FX_MAX** = **8**
|
||||
- **FX_BLUR_BLEND_MODE_ADDITIVE** = **0**
|
||||
- **FX_BLUR_BLEND_MODE_SCREEN** = **1**
|
||||
- **FX_BLUR_BLEND_MODE_SOFTLIGHT** = **2**
|
||||
- **FX_HDR_TONE_MAPPER_LINEAR** = **0**
|
||||
- **FX_HDR_TONE_MAPPER_LOG** = **1**
|
||||
- **FX_HDR_TONE_MAPPER_REINHARDT** = **2**
|
||||
- **FX_HDR_TONE_MAPPER_REINHARDT_AUTOWHITE** = **3**
|
||||
- **FX_PARAM_AMBIENT_LIGHT_COLOR** = **0**
|
||||
- **FX_PARAM_AMBIENT_LIGHT_ENERGY** = **1**
|
||||
- **FX_PARAM_GLOW_BLUR_PASSES** = **2**
|
||||
- **FX_PARAM_GLOW_BLUR_SCALE** = **3**
|
||||
- **FX_PARAM_GLOW_BLUR_STRENGTH** = **4**
|
||||
- **FX_PARAM_GLOW_BLUR_BLEND_MODE** = **5**
|
||||
- **FX_PARAM_GLOW_BLOOM** = **6**
|
||||
- **FX_PARAM_GLOW_BLOOM_TRESHOLD** = **7**
|
||||
- **FX_PARAM_DOF_BLUR_PASSES** = **8**
|
||||
- **FX_PARAM_DOF_BLUR_BEGIN** = **9**
|
||||
- **FX_PARAM_DOF_BLUR_RANGE** = **10**
|
||||
- **FX_PARAM_HDR_TONEMAPPER** = **11**
|
||||
- **FX_PARAM_HDR_EXPOSURE** = **12**
|
||||
- **FX_PARAM_HDR_WHITE** = **13**
|
||||
- **FX_PARAM_HDR_GLOW_TRESHOLD** = **14**
|
||||
- **FX_PARAM_HDR_GLOW_SCALE** = **15**
|
||||
- **FX_PARAM_HDR_MIN_LUMINANCE** = **16**
|
||||
- **FX_PARAM_HDR_MAX_LUMINANCE** = **17**
|
||||
- **FX_PARAM_HDR_EXPOSURE_ADJUST_SPEED** = **18**
|
||||
- **FX_PARAM_FOG_BEGIN** = **19**
|
||||
- **FX_PARAM_FOG_ATTENUATION** = **22**
|
||||
- **FX_PARAM_FOG_BEGIN_COLOR** = **20**
|
||||
- **FX_PARAM_FOG_END_COLOR** = **21**
|
||||
- **FX_PARAM_FOG_BG** = **23**
|
||||
- **FX_PARAM_BCS_BRIGHTNESS** = **24**
|
||||
- **FX_PARAM_BCS_CONTRAST** = **25**
|
||||
- **FX_PARAM_BCS_SATURATION** = **26**
|
||||
- **FX_PARAM_MAX** = **27**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Environment_set_background:
|
||||
|
||||
- void **set_background** **(** :ref:`int<class_int>` bgmode **)**
|
||||
|
||||
.. _class_Environment_get_background:
|
||||
|
||||
- :ref:`int<class_int>` **get_background** **(** **)** const
|
||||
|
||||
.. _class_Environment_set_background_param:
|
||||
|
||||
- void **set_background_param** **(** :ref:`int<class_int>` param, var value **)**
|
||||
|
||||
.. _class_Environment_get_background_param:
|
||||
|
||||
- void **get_background_param** **(** :ref:`int<class_int>` param **)** const
|
||||
|
||||
.. _class_Environment_set_enable_fx:
|
||||
|
||||
- void **set_enable_fx** **(** :ref:`int<class_int>` effect, :ref:`bool<class_bool>` enabled **)**
|
||||
|
||||
.. _class_Environment_is_fx_enabled:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_fx_enabled** **(** :ref:`int<class_int>` effect **)** const
|
||||
|
||||
.. _class_Environment_fx_set_param:
|
||||
|
||||
- void **fx_set_param** **(** :ref:`int<class_int>` param, var value **)**
|
||||
|
||||
.. _class_Environment_fx_get_param:
|
||||
|
||||
- void **fx_get_param** **(** :ref:`int<class_int>` param **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,252 @@
|
||||
.. _class_EventPlayer:
|
||||
|
||||
EventPlayer
|
||||
===========
|
||||
|
||||
Inherits: :ref:`Node<class_node>`
|
||||
---------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Class for event stream playback.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_stream<class_EventPlayer_set_stream>` **(** :ref:`EventStream<class_eventstream>` stream **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EventStream<class_eventstream>` | :ref:`get_stream<class_EventPlayer_get_stream>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`play<class_EventPlayer_play>` **(** **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`stop<class_EventPlayer_stop>` **(** **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_playing<class_EventPlayer_is_playing>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_paused<class_EventPlayer_set_paused>` **(** :ref:`bool<class_bool>` paused **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_paused<class_EventPlayer_is_paused>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_loop<class_EventPlayer_set_loop>` **(** :ref:`bool<class_bool>` enabled **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_loop<class_EventPlayer_has_loop>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_volume<class_EventPlayer_set_volume>` **(** :ref:`float<class_float>` volume **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_volume<class_EventPlayer_get_volume>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_pitch_scale<class_EventPlayer_set_pitch_scale>` **(** :ref:`float<class_float>` pitch_scale **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_pitch_scale<class_EventPlayer_get_pitch_scale>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_tempo_scale<class_EventPlayer_set_tempo_scale>` **(** :ref:`float<class_float>` tempo_scale **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_tempo_scale<class_EventPlayer_get_tempo_scale>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_volume_db<class_EventPlayer_set_volume_db>` **(** :ref:`float<class_float>` db **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_volume_db<class_EventPlayer_get_volume_db>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_stream_name<class_EventPlayer_get_stream_name>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_loop_count<class_EventPlayer_get_loop_count>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_pos<class_EventPlayer_get_pos>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`seek_pos<class_EventPlayer_seek_pos>` **(** :ref:`float<class_float>` time **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_length<class_EventPlayer_get_length>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_autoplay<class_EventPlayer_set_autoplay>` **(** :ref:`bool<class_bool>` enabled **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_autoplay<class_EventPlayer_has_autoplay>` **(** **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_channel_volume<class_EventPlayer_set_channel_volume>` **(** :ref:`int<class_int>` channel, :ref:`float<class_float>` channel_volume **)** |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_channel_volume<class_EventPlayer_get_channel_volume>` **(** :ref:`int<class_int>` channel **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_channel_last_note_time<class_EventPlayer_get_channel_last_note_time>` **(** :ref:`int<class_int>` channel **)** const |
|
||||
+----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Class for event stream playback. Event streams are music expressed as a series of events (note on, note off, instrument change...), as opposed to audio streams, which are just audio data. Examples of event-based streams are MIDI files, or MOD music.
|
||||
|
||||
Currently, only MOD, S3M, IT, and XM music is supported.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_EventPlayer_set_stream:
|
||||
|
||||
- void **set_stream** **(** :ref:`EventStream<class_eventstream>` stream **)**
|
||||
|
||||
Set the :ref:`EventStream<class_eventstream>` this player will play.
|
||||
|
||||
.. _class_EventPlayer_get_stream:
|
||||
|
||||
- :ref:`EventStream<class_eventstream>` **get_stream** **(** **)** const
|
||||
|
||||
Return the currently assigned stream.
|
||||
|
||||
.. _class_EventPlayer_play:
|
||||
|
||||
- void **play** **(** **)**
|
||||
|
||||
Play the currently assigned stream.
|
||||
|
||||
.. _class_EventPlayer_stop:
|
||||
|
||||
- void **stop** **(** **)**
|
||||
|
||||
Stop playing.
|
||||
|
||||
.. _class_EventPlayer_is_playing:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_playing** **(** **)** const
|
||||
|
||||
Return whether this player is playing.
|
||||
|
||||
.. _class_EventPlayer_set_paused:
|
||||
|
||||
- void **set_paused** **(** :ref:`bool<class_bool>` paused **)**
|
||||
|
||||
Pause stream playback.
|
||||
|
||||
.. _class_EventPlayer_is_paused:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_paused** **(** **)** const
|
||||
|
||||
Return whether the playback is currently paused.
|
||||
|
||||
.. _class_EventPlayer_set_loop:
|
||||
|
||||
- void **set_loop** **(** :ref:`bool<class_bool>` enabled **)**
|
||||
|
||||
Set whether the stream will be restarted at the end.
|
||||
|
||||
.. _class_EventPlayer_has_loop:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_loop** **(** **)** const
|
||||
|
||||
Return whether this player will be restart the playback at the end.
|
||||
|
||||
.. _class_EventPlayer_set_volume:
|
||||
|
||||
- void **set_volume** **(** :ref:`float<class_float>` volume **)**
|
||||
|
||||
Set the playback volume for this player. This is a float between 0.0 (silent) and 1.0 (full volume). Values over 1.0 may amplify sound even more, but may introduce distortion. Negative values may just invert the output waveform, which produces no audible difference.
|
||||
|
||||
The effect of these special values uiltimately depends on the low-level implementation of the file format being played.
|
||||
|
||||
.. _class_EventPlayer_get_volume:
|
||||
|
||||
- :ref:`float<class_float>` **get_volume** **(** **)** const
|
||||
|
||||
Return the playback volume for this player.
|
||||
|
||||
.. _class_EventPlayer_set_pitch_scale:
|
||||
|
||||
- void **set_pitch_scale** **(** :ref:`float<class_float>` pitch_scale **)**
|
||||
|
||||
Set the pitch multiplier for all sounds coming from this stream. A value of 2.0 shifts all pitches one octave up, and a value of 0.5 shifts pitches one octave down.
|
||||
|
||||
.. _class_EventPlayer_get_pitch_scale:
|
||||
|
||||
- :ref:`float<class_float>` **get_pitch_scale** **(** **)** const
|
||||
|
||||
Return the pitch scale factor for this player.
|
||||
|
||||
.. _class_EventPlayer_set_tempo_scale:
|
||||
|
||||
- void **set_tempo_scale** **(** :ref:`float<class_float>` tempo_scale **)**
|
||||
|
||||
Set the tempo multiplier. This allows to slow down or speed up the music, without affecting its pitch.
|
||||
|
||||
.. _class_EventPlayer_get_tempo_scale:
|
||||
|
||||
- :ref:`float<class_float>` **get_tempo_scale** **(** **)** const
|
||||
|
||||
Return the tempo multiplier.
|
||||
|
||||
.. _class_EventPlayer_set_volume_db:
|
||||
|
||||
- void **set_volume_db** **(** :ref:`float<class_float>` db **)**
|
||||
|
||||
Set the playback volume for this player, in decibels. This is a float between -80.0 (silent) and 0.0 (full volume). Values under -79.0 get truncated to -80, but values over 0.0 do not, so the warnings for overamplifying (see :ref:`set_volume<class_set_volume>`) still apply.
|
||||
|
||||
.. _class_EventPlayer_get_volume_db:
|
||||
|
||||
- :ref:`float<class_float>` **get_volume_db** **(** **)** const
|
||||
|
||||
Return the playback volume for this player, in decibels.
|
||||
|
||||
.. _class_EventPlayer_get_stream_name:
|
||||
|
||||
- :ref:`String<class_string>` **get_stream_name** **(** **)** const
|
||||
|
||||
Return the name of the currently assigned stream. This is not the file name, but a field inside the file. If no stream is assigned, if returns "<No Stream>".
|
||||
|
||||
.. _class_EventPlayer_get_loop_count:
|
||||
|
||||
- :ref:`int<class_int>` **get_loop_count** **(** **)** const
|
||||
|
||||
Return the number of times the playback has looped.
|
||||
|
||||
.. _class_EventPlayer_get_pos:
|
||||
|
||||
- :ref:`float<class_float>` **get_pos** **(** **)** const
|
||||
|
||||
Return the playback position. May be in seconds, but depends on the stream type.
|
||||
|
||||
.. _class_EventPlayer_seek_pos:
|
||||
|
||||
- void **seek_pos** **(** :ref:`float<class_float>` time **)**
|
||||
|
||||
Set the playback position. May be in seconds, but depends on the stream type.
|
||||
|
||||
.. _class_EventPlayer_get_length:
|
||||
|
||||
- :ref:`float<class_float>` **get_length** **(** **)** const
|
||||
|
||||
Return the song length. May be in seconds, but depends on the stream type.
|
||||
|
||||
.. _class_EventPlayer_set_autoplay:
|
||||
|
||||
- void **set_autoplay** **(** :ref:`bool<class_bool>` enabled **)**
|
||||
|
||||
Set whether this player will start playing as soon as it enters the scene tree.
|
||||
|
||||
.. _class_EventPlayer_has_autoplay:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_autoplay** **(** **)** const
|
||||
|
||||
Return whether this player will start playing as soon as it enters the scene tree.
|
||||
|
||||
.. _class_EventPlayer_set_channel_volume:
|
||||
|
||||
- void **set_channel_volume** **(** :ref:`int<class_int>` channel, :ref:`float<class_float>` channel_volume **)**
|
||||
|
||||
Set the volume scale for an individual channel of the stream, with the same value range as :ref:`methid set_volume<class_methid set_volume>`. The channel number depends on the stream format. For example, MIDIs range from 0 to 15, and MODs from 0 to 63.
|
||||
|
||||
Many stream formats are multichannel, so this allows to affect only a part of the music.
|
||||
|
||||
.. _class_EventPlayer_get_channel_volume:
|
||||
|
||||
- :ref:`float<class_float>` **get_channel_volume** **(** :ref:`int<class_int>` channel **)** const
|
||||
|
||||
Return the volume scale for an individual channel of the stream.
|
||||
|
||||
.. _class_EventPlayer_get_channel_last_note_time:
|
||||
|
||||
- :ref:`float<class_float>` **get_channel_last_note_time** **(** :ref:`int<class_int>` channel **)** const
|
||||
|
||||
Return the time at which the last note of a given channel in the stream plays.
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
.. _class_EventStream:
|
||||
|
||||
EventStream
|
||||
===========
|
||||
|
||||
Inherits: :ref:`Resource<class_resource>`
|
||||
-----------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Base class for all event-based stream drivers.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Base class for all event-based stream drivers. Event streams are music expressed as a series of events (note on, note off, instrument change...), as opposed to audio streams, which are just audio data. Examples of event-based streams are MIDI files, of MOD music.
|
||||
|
||||
This class exposes no methods.
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
.. _class_EventStreamChibi:
|
||||
|
||||
EventStreamChibi
|
||||
================
|
||||
|
||||
Inherits: :ref:`EventStream<class_eventstream>`
|
||||
-----------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Driver for MOD playback.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
This driver plays MOD music. MOD music, as all event-based streams, is a music format defined by note events ocurring at defined moments, instead of a stream of audio samples.
|
||||
|
||||
Currently, this driver supports the MOD, S3M, IT, and XM formats.
|
||||
|
||||
This class exposes no methods.
|
||||
|
||||
This class can return its playback positon in seconds, but does not allow to set it, failing with only a console warning.
|
||||
|
||||
This class can not return its song length, returning 1.0 when queried.
|
||||
|
||||
This class does not limit its volume settings, allowing for overflow/distortion and wave inversion.
|
||||
|
||||
@@ -0,0 +1,267 @@
|
||||
.. _class_File:
|
||||
|
||||
File
|
||||
====
|
||||
|
||||
Inherits: :ref:`Reference<class_reference>`
|
||||
-------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`open_encrypted<class_File_open_encrypted>` **(** :ref:`String<class_string>` path, :ref:`int<class_int>` mode_flags, :ref:`RawArray<class_rawarray>` key **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`open_encrypted_with_pass<class_File_open_encrypted_with_pass>` **(** :ref:`String<class_string>` path, :ref:`int<class_int>` mode_flags, :ref:`String<class_string>` pass **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`open<class_File_open>` **(** :ref:`String<class_string>` path, :ref:`int<class_int>` flags **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`close<class_File_close>` **(** **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_open<class_File_is_open>` **(** **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`seek<class_File_seek>` **(** :ref:`int<class_int>` pos **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`seek_end<class_File_seek_end>` **(** :ref:`int<class_int>` pos=0 **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_pos<class_File_get_pos>` **(** **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_len<class_File_get_len>` **(** **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`eof_reached<class_File_eof_reached>` **(** **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_8<class_File_get_8>` **(** **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_16<class_File_get_16>` **(** **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_32<class_File_get_32>` **(** **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_64<class_File_get_64>` **(** **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_float<class_File_get_float>` **(** **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_double<class_File_get_double>` **(** **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_real<class_File_get_real>` **(** **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RawArray<class_rawarray>` | :ref:`get_buffer<class_File_get_buffer>` **(** :ref:`int<class_int>` len **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_line<class_File_get_line>` **(** **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_as_text<class_File_get_as_text>` **(** **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_endian_swap<class_File_get_endian_swap>` **(** **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_endian_swap<class_File_set_endian_swap>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Error | :ref:`get_error<class_File_get_error>` **(** **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`get_var<class_File_get_var>` **(** **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StringArray<class_stringarray>` | :ref:`get_csv_line<class_File_get_csv_line>` **(** :ref:`String<class_string>` delim="," **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`store_8<class_File_store_8>` **(** :ref:`int<class_int>` value **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`store_16<class_File_store_16>` **(** :ref:`int<class_int>` value **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`store_32<class_File_store_32>` **(** :ref:`int<class_int>` value **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`store_64<class_File_store_64>` **(** :ref:`int<class_int>` value **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`store_float<class_File_store_float>` **(** :ref:`float<class_float>` value **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`store_double<class_File_store_double>` **(** :ref:`float<class_float>` value **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`store_real<class_File_store_real>` **(** :ref:`float<class_float>` value **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`store_buffer<class_File_store_buffer>` **(** :ref:`RawArray<class_rawarray>` buffer **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`store_line<class_File_store_line>` **(** :ref:`String<class_string>` line **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`store_string<class_File_store_string>` **(** :ref:`String<class_string>` string **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`store_var<class_File_store_var>` **(** var value **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`store_pascal_string<class_File_store_pascal_string>` **(** :ref:`String<class_string>` string **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_pascal_string<class_File_get_pascal_string>` **(** **)** |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`file_exists<class_File_file_exists>` **(** :ref:`String<class_string>` path **)** const |
|
||||
+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **READ** = **1**
|
||||
- **WRITE** = **2**
|
||||
- **READ_WRITE** = **3**
|
||||
- **WRITE_READ** = **7**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_File_open_encrypted:
|
||||
|
||||
- :ref:`int<class_int>` **open_encrypted** **(** :ref:`String<class_string>` path, :ref:`int<class_int>` mode_flags, :ref:`RawArray<class_rawarray>` key **)**
|
||||
|
||||
.. _class_File_open_encrypted_with_pass:
|
||||
|
||||
- :ref:`int<class_int>` **open_encrypted_with_pass** **(** :ref:`String<class_string>` path, :ref:`int<class_int>` mode_flags, :ref:`String<class_string>` pass **)**
|
||||
|
||||
.. _class_File_open:
|
||||
|
||||
- :ref:`int<class_int>` **open** **(** :ref:`String<class_string>` path, :ref:`int<class_int>` flags **)**
|
||||
|
||||
.. _class_File_close:
|
||||
|
||||
- void **close** **(** **)**
|
||||
|
||||
.. _class_File_is_open:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_open** **(** **)** const
|
||||
|
||||
.. _class_File_seek:
|
||||
|
||||
- void **seek** **(** :ref:`int<class_int>` pos **)**
|
||||
|
||||
.. _class_File_seek_end:
|
||||
|
||||
- void **seek_end** **(** :ref:`int<class_int>` pos=0 **)**
|
||||
|
||||
.. _class_File_get_pos:
|
||||
|
||||
- :ref:`int<class_int>` **get_pos** **(** **)** const
|
||||
|
||||
.. _class_File_get_len:
|
||||
|
||||
- :ref:`int<class_int>` **get_len** **(** **)** const
|
||||
|
||||
.. _class_File_eof_reached:
|
||||
|
||||
- :ref:`bool<class_bool>` **eof_reached** **(** **)** const
|
||||
|
||||
.. _class_File_get_8:
|
||||
|
||||
- :ref:`int<class_int>` **get_8** **(** **)** const
|
||||
|
||||
.. _class_File_get_16:
|
||||
|
||||
- :ref:`int<class_int>` **get_16** **(** **)** const
|
||||
|
||||
.. _class_File_get_32:
|
||||
|
||||
- :ref:`int<class_int>` **get_32** **(** **)** const
|
||||
|
||||
.. _class_File_get_64:
|
||||
|
||||
- :ref:`int<class_int>` **get_64** **(** **)** const
|
||||
|
||||
.. _class_File_get_float:
|
||||
|
||||
- :ref:`float<class_float>` **get_float** **(** **)** const
|
||||
|
||||
.. _class_File_get_double:
|
||||
|
||||
- :ref:`float<class_float>` **get_double** **(** **)** const
|
||||
|
||||
.. _class_File_get_real:
|
||||
|
||||
- :ref:`float<class_float>` **get_real** **(** **)** const
|
||||
|
||||
.. _class_File_get_buffer:
|
||||
|
||||
- :ref:`RawArray<class_rawarray>` **get_buffer** **(** :ref:`int<class_int>` len **)** const
|
||||
|
||||
.. _class_File_get_line:
|
||||
|
||||
- :ref:`String<class_string>` **get_line** **(** **)** const
|
||||
|
||||
.. _class_File_get_as_text:
|
||||
|
||||
- :ref:`String<class_string>` **get_as_text** **(** **)** const
|
||||
|
||||
.. _class_File_get_endian_swap:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_endian_swap** **(** **)**
|
||||
|
||||
.. _class_File_set_endian_swap:
|
||||
|
||||
- void **set_endian_swap** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
.. _class_File_get_error:
|
||||
|
||||
- Error **get_error** **(** **)** const
|
||||
|
||||
.. _class_File_get_var:
|
||||
|
||||
- void **get_var** **(** **)** const
|
||||
|
||||
.. _class_File_get_csv_line:
|
||||
|
||||
- :ref:`StringArray<class_stringarray>` **get_csv_line** **(** :ref:`String<class_string>` delim="," **)** const
|
||||
|
||||
.. _class_File_store_8:
|
||||
|
||||
- void **store_8** **(** :ref:`int<class_int>` value **)**
|
||||
|
||||
.. _class_File_store_16:
|
||||
|
||||
- void **store_16** **(** :ref:`int<class_int>` value **)**
|
||||
|
||||
.. _class_File_store_32:
|
||||
|
||||
- void **store_32** **(** :ref:`int<class_int>` value **)**
|
||||
|
||||
.. _class_File_store_64:
|
||||
|
||||
- void **store_64** **(** :ref:`int<class_int>` value **)**
|
||||
|
||||
.. _class_File_store_float:
|
||||
|
||||
- void **store_float** **(** :ref:`float<class_float>` value **)**
|
||||
|
||||
.. _class_File_store_double:
|
||||
|
||||
- void **store_double** **(** :ref:`float<class_float>` value **)**
|
||||
|
||||
.. _class_File_store_real:
|
||||
|
||||
- void **store_real** **(** :ref:`float<class_float>` value **)**
|
||||
|
||||
.. _class_File_store_buffer:
|
||||
|
||||
- void **store_buffer** **(** :ref:`RawArray<class_rawarray>` buffer **)**
|
||||
|
||||
.. _class_File_store_line:
|
||||
|
||||
- void **store_line** **(** :ref:`String<class_string>` line **)**
|
||||
|
||||
.. _class_File_store_string:
|
||||
|
||||
- void **store_string** **(** :ref:`String<class_string>` string **)**
|
||||
|
||||
.. _class_File_store_var:
|
||||
|
||||
- void **store_var** **(** var value **)**
|
||||
|
||||
.. _class_File_store_pascal_string:
|
||||
|
||||
- void **store_pascal_string** **(** :ref:`String<class_string>` string **)**
|
||||
|
||||
.. _class_File_get_pascal_string:
|
||||
|
||||
- :ref:`String<class_string>` **get_pascal_string** **(** **)**
|
||||
|
||||
.. _class_File_file_exists:
|
||||
|
||||
- :ref:`bool<class_bool>` **file_exists** **(** :ref:`String<class_string>` path **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
.. _class_FileDialog:
|
||||
|
||||
FileDialog
|
||||
==========
|
||||
|
||||
Inherits: :ref:`ConfirmationDialog<class_confirmationdialog>`
|
||||
-------------------------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Dialog for selecting files or directories in the filesystem.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_filters<class_FileDialog_clear_filters>` **(** **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_filter<class_FileDialog_add_filter>` **(** :ref:`String<class_string>` filter **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_current_dir<class_FileDialog_get_current_dir>` **(** **)** const |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_current_file<class_FileDialog_get_current_file>` **(** **)** const |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_current_path<class_FileDialog_get_current_path>` **(** **)** const |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_current_dir<class_FileDialog_set_current_dir>` **(** :ref:`String<class_string>` dir **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_current_file<class_FileDialog_set_current_file>` **(** :ref:`String<class_string>` file **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_current_path<class_FileDialog_set_current_path>` **(** :ref:`String<class_string>` path **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_mode<class_FileDialog_set_mode>` **(** :ref:`int<class_int>` mode **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_mode<class_FileDialog_get_mode>` **(** **)** const |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`VBoxContainer<class_vboxcontainer>` | :ref:`get_vbox<class_FileDialog_get_vbox>` **(** **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_access<class_FileDialog_set_access>` **(** :ref:`int<class_int>` access **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_access<class_FileDialog_get_access>` **(** **)** const |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_show_hidden_files<class_FileDialog_set_show_hidden_files>` **(** :ref:`bool<class_bool>` show **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_showing_hidden_files<class_FileDialog_is_showing_hidden_files>` **(** **)** const |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`invalidate<class_FileDialog_invalidate>` **(** **)** |
|
||||
+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **files_selected** **(** :ref:`StringArray<class_stringarray>` paths **)**
|
||||
- **dir_selected** **(** :ref:`String<class_string>` dir **)**
|
||||
- **file_selected** **(** :ref:`String<class_string>` path **)**
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **MODE_OPEN_FILE** = **0** --- The dialog allows the selection of one, and only one file.
|
||||
- **MODE_OPEN_FILES** = **1** --- The dialog allows the selection of multiple files.
|
||||
- **MODE_OPEN_DIR** = **2** --- The dialog functions as a folder selector, disallowing the selection of any file.
|
||||
- **MODE_SAVE_FILE** = **3** --- The dialog will warn when a file exists.
|
||||
- **ACCESS_RESOURCES** = **0**
|
||||
- **ACCESS_USERDATA** = **1**
|
||||
- **ACCESS_FILESYSTEM** = **2**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_FileDialog_clear_filters:
|
||||
|
||||
- void **clear_filters** **(** **)**
|
||||
|
||||
Clear all the added filters in the dialog.
|
||||
|
||||
.. _class_FileDialog_add_filter:
|
||||
|
||||
- void **add_filter** **(** :ref:`String<class_string>` filter **)**
|
||||
|
||||
Add a custom filter. Filter format is: "mask ; description", example (C++): dialog->add_filter("*.png ; PNG Images");
|
||||
|
||||
.. _class_FileDialog_get_current_dir:
|
||||
|
||||
- :ref:`String<class_string>` **get_current_dir** **(** **)** const
|
||||
|
||||
Get the current working directory of the file dialog.
|
||||
|
||||
.. _class_FileDialog_get_current_file:
|
||||
|
||||
- :ref:`String<class_string>` **get_current_file** **(** **)** const
|
||||
|
||||
Get the current selected file of the file dialog (empty if none).
|
||||
|
||||
.. _class_FileDialog_get_current_path:
|
||||
|
||||
- :ref:`String<class_string>` **get_current_path** **(** **)** const
|
||||
|
||||
Get the current selected path (directory and file) of the file dialog (empty if none).
|
||||
|
||||
.. _class_FileDialog_set_current_dir:
|
||||
|
||||
- void **set_current_dir** **(** :ref:`String<class_string>` dir **)**
|
||||
|
||||
.. _class_FileDialog_set_current_file:
|
||||
|
||||
- void **set_current_file** **(** :ref:`String<class_string>` file **)**
|
||||
|
||||
.. _class_FileDialog_set_current_path:
|
||||
|
||||
- void **set_current_path** **(** :ref:`String<class_string>` path **)**
|
||||
|
||||
.. _class_FileDialog_set_mode:
|
||||
|
||||
- void **set_mode** **(** :ref:`int<class_int>` mode **)**
|
||||
|
||||
Set the file dialog mode from the MODE_* enum.
|
||||
|
||||
.. _class_FileDialog_get_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_mode** **(** **)** const
|
||||
|
||||
Get the file dialog mode from the MODE_* enum.
|
||||
|
||||
.. _class_FileDialog_get_vbox:
|
||||
|
||||
- :ref:`VBoxContainer<class_vboxcontainer>` **get_vbox** **(** **)**
|
||||
|
||||
.. _class_FileDialog_set_access:
|
||||
|
||||
- void **set_access** **(** :ref:`int<class_int>` access **)**
|
||||
|
||||
.. _class_FileDialog_get_access:
|
||||
|
||||
- :ref:`int<class_int>` **get_access** **(** **)** const
|
||||
|
||||
.. _class_FileDialog_set_show_hidden_files:
|
||||
|
||||
- void **set_show_hidden_files** **(** :ref:`bool<class_bool>` show **)**
|
||||
|
||||
.. _class_FileDialog_is_showing_hidden_files:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_showing_hidden_files** **(** **)** const
|
||||
|
||||
.. _class_FileDialog_invalidate:
|
||||
|
||||
- void **invalidate** **(** **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
.. _class_FixedMaterial:
|
||||
|
||||
FixedMaterial
|
||||
=============
|
||||
|
||||
Inherits: :ref:`Material<class_material>`
|
||||
-----------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Simple Material with a fixed parameter set.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_parameter<class_FixedMaterial_set_parameter>` **(** :ref:`int<class_int>` param, var value **)** |
|
||||
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`get_parameter<class_FixedMaterial_get_parameter>` **(** :ref:`int<class_int>` param **)** const |
|
||||
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_texture<class_FixedMaterial_set_texture>` **(** :ref:`int<class_int>` param, :ref:`Texture<class_texture>` texture **)** |
|
||||
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Texture<class_texture>` | :ref:`get_texture<class_FixedMaterial_get_texture>` **(** :ref:`int<class_int>` param **)** const |
|
||||
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_texcoord_mode<class_FixedMaterial_set_texcoord_mode>` **(** :ref:`int<class_int>` param, :ref:`int<class_int>` mode **)** |
|
||||
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_texcoord_mode<class_FixedMaterial_get_texcoord_mode>` **(** :ref:`int<class_int>` param **)** const |
|
||||
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_fixed_flag<class_FixedMaterial_set_fixed_flag>` **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)** |
|
||||
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_fixed_flag<class_FixedMaterial_get_fixed_flag>` **(** :ref:`int<class_int>` flag **)** const |
|
||||
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_uv_transform<class_FixedMaterial_set_uv_transform>` **(** :ref:`Transform<class_transform>` transform **)** |
|
||||
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Transform<class_transform>` | :ref:`get_uv_transform<class_FixedMaterial_get_uv_transform>` **(** **)** const |
|
||||
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_light_shader<class_FixedMaterial_set_light_shader>` **(** :ref:`int<class_int>` shader **)** |
|
||||
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_light_shader<class_FixedMaterial_get_light_shader>` **(** **)** const |
|
||||
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_point_size<class_FixedMaterial_set_point_size>` **(** :ref:`float<class_float>` size **)** |
|
||||
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_point_size<class_FixedMaterial_get_point_size>` **(** **)** const |
|
||||
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **PARAM_DIFFUSE** = **0** --- Diffuse Lighting (light scattered from surface).
|
||||
- **PARAM_DETAIL** = **1** --- Detail Layer for diffuse lighting.
|
||||
- **PARAM_SPECULAR** = **2** --- Specular Lighting (light reflected from the surface).
|
||||
- **PARAM_EMISSION** = **3** --- Emission Lighting (light emitted from the surface).
|
||||
- **PARAM_SPECULAR_EXP** = **4** --- Specular Exponent (size of the specular dot).
|
||||
- **PARAM_GLOW** = **5** --- Glow (Visible emitted scattered light).
|
||||
- **PARAM_NORMAL** = **6** --- Normal Map (irregularity map).
|
||||
- **PARAM_SHADE_PARAM** = **7**
|
||||
- **PARAM_MAX** = **8** --- Maximum amount of parameters.
|
||||
- **TEXCOORD_SPHERE** = **3**
|
||||
- **TEXCOORD_UV** = **0** --- Read texture coordinates from the UV array.
|
||||
- **TEXCOORD_UV_TRANSFORM** = **1** --- Read texture coordinates from the UV array and transform them by uv_xform.
|
||||
- **TEXCOORD_UV2** = **2** --- Read texture coordinates from the UV2 array.
|
||||
- **FLAG_USE_ALPHA** = **0**
|
||||
- **FLAG_USE_COLOR_ARRAY** = **1**
|
||||
- **FLAG_USE_POINT_SIZE** = **2**
|
||||
- **FLAG_DISCARD_ALPHA** = **3**
|
||||
- **LIGHT_SHADER_LAMBERT** = **0**
|
||||
- **LIGHT_SHADER_WRAP** = **1**
|
||||
- **LIGHT_SHADER_VELVET** = **2**
|
||||
- **LIGHT_SHADER_TOON** = **3**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
FixedMaterial is a simple type of material :ref:`Resource<class_resource>`, which contains a fixed amount of paramters. It is the only type of material supported in fixed-pipeline devices and APIs. It is also an often a better alternative to :ref:`ShaderMaterial<class_shadermaterial>` for most simple use cases.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_FixedMaterial_set_parameter:
|
||||
|
||||
- void **set_parameter** **(** :ref:`int<class_int>` param, var value **)**
|
||||
|
||||
Set a parameter, parameters are defined in the PARAM_* enum. The type of each parameter may change, so it's best to check the enum.
|
||||
|
||||
.. _class_FixedMaterial_get_parameter:
|
||||
|
||||
- void **get_parameter** **(** :ref:`int<class_int>` param **)** const
|
||||
|
||||
Return a parameter, parameters are defined in the PARAM_* enum. The type of each parameter may change, so it's best to check the enum.
|
||||
|
||||
.. _class_FixedMaterial_set_texture:
|
||||
|
||||
- void **set_texture** **(** :ref:`int<class_int>` param, :ref:`Texture<class_texture>` texture **)**
|
||||
|
||||
Set a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see :ref:`set_texcoord_mode<FixedMaterial_set_texcoord_mode>`).
|
||||
|
||||
.. _class_FixedMaterial_get_texture:
|
||||
|
||||
- :ref:`Texture<class_texture>` **get_texture** **(** :ref:`int<class_int>` param **)** const
|
||||
|
||||
Return a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see :ref:`set_texcoord_mode<FixedMaterial_set_texcoord_mode>`).
|
||||
|
||||
.. _class_FixedMaterial_set_texcoord_mode:
|
||||
|
||||
- void **set_texcoord_mode** **(** :ref:`int<class_int>` param, :ref:`int<class_int>` mode **)**
|
||||
|
||||
Set the texture coordinate mode. Each texture param (from the PARAM_* enum) has one. It defines how the textures are mapped to the object.
|
||||
|
||||
.. _class_FixedMaterial_get_texcoord_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_texcoord_mode** **(** :ref:`int<class_int>` param **)** const
|
||||
|
||||
Return the texture coordinate mode. Each texture param (from the PARAM_* enum) has one. It defines how the textures are mapped to the object.
|
||||
|
||||
.. _class_FixedMaterial_set_fixed_flag:
|
||||
|
||||
- void **set_fixed_flag** **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)**
|
||||
|
||||
.. _class_FixedMaterial_get_fixed_flag:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_fixed_flag** **(** :ref:`int<class_int>` flag **)** const
|
||||
|
||||
.. _class_FixedMaterial_set_uv_transform:
|
||||
|
||||
- void **set_uv_transform** **(** :ref:`Transform<class_transform>` transform **)**
|
||||
|
||||
Sets a special transform used to post-transform UV coordinates of the uv_xfrom tecoord mode: TEXCOORD_UV_TRANSFORM.
|
||||
|
||||
.. _class_FixedMaterial_get_uv_transform:
|
||||
|
||||
- :ref:`Transform<class_transform>` **get_uv_transform** **(** **)** const
|
||||
|
||||
Returns the special transform used to post-transform UV coordinates of the uv_xfrom tecoord mode: TEXCOORD_UV_TRANSFORM.
|
||||
|
||||
.. _class_FixedMaterial_set_light_shader:
|
||||
|
||||
- void **set_light_shader** **(** :ref:`int<class_int>` shader **)**
|
||||
|
||||
.. _class_FixedMaterial_get_light_shader:
|
||||
|
||||
- :ref:`int<class_int>` **get_light_shader** **(** **)** const
|
||||
|
||||
.. _class_FixedMaterial_set_point_size:
|
||||
|
||||
- void **set_point_size** **(** :ref:`float<class_float>` size **)**
|
||||
|
||||
.. _class_FixedMaterial_get_point_size:
|
||||
|
||||
- :ref:`float<class_float>` **get_point_size** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
.. _class_float:
|
||||
|
||||
float
|
||||
=====
|
||||
|
||||
Category: Built-In Types
|
||||
------------------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+--------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`float<class_float_float>` **(** :ref:`bool<class_bool>` from **)** |
|
||||
+----------------------------+--------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`float<class_float_float>` **(** :ref:`int<class_int>` from **)** |
|
||||
+----------------------------+--------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`float<class_float_float>` **(** :ref:`String<class_string>` from **)** |
|
||||
+----------------------------+--------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_float_float:
|
||||
|
||||
- :ref:`float<class_float>` **float** **(** :ref:`bool<class_bool>` from **)**
|
||||
|
||||
.. _class_float_float:
|
||||
|
||||
- :ref:`float<class_float>` **float** **(** :ref:`int<class_int>` from **)**
|
||||
|
||||
.. _class_float_float:
|
||||
|
||||
- :ref:`float<class_float>` **float** **(** :ref:`String<class_string>` from **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
.. _class_Font:
|
||||
|
||||
Font
|
||||
====
|
||||
|
||||
Inherits: :ref:`Resource<class_resource>`
|
||||
-----------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Internationalized font and text drawing support.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`create_from_fnt<class_Font_create_from_fnt>` **(** :ref:`String<class_string>` path **)** |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_height<class_Font_set_height>` **(** :ref:`float<class_float>` px **)** |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_height<class_Font_get_height>` **(** **)** const |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_ascent<class_Font_set_ascent>` **(** :ref:`float<class_float>` px **)** |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_ascent<class_Font_get_ascent>` **(** **)** const |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_descent<class_Font_get_descent>` **(** **)** const |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_kerning_pair<class_Font_add_kerning_pair>` **(** :ref:`int<class_int>` char_a, :ref:`int<class_int>` char_b, :ref:`int<class_int>` kerning **)** |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_kerning_pair<class_Font_get_kerning_pair>` **(** :ref:`int<class_int>` char_a, :ref:`int<class_int>` char_b **)** const |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_texture<class_Font_add_texture>` **(** :ref:`Texture<class_texture>` texture **)** |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_char<class_Font_add_char>` **(** :ref:`int<class_int>` character, :ref:`int<class_int>` texture, :ref:`Rect2<class_rect2>` rect, :ref:`Vector2<class_vector2>` align=Vector2(0,0), :ref:`float<class_float>` advance=-1 **)** |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_texture_count<class_Font_get_texture_count>` **(** **)** const |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Texture<class_texture>` | :ref:`get_texture<class_Font_get_texture>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_char_size<class_Font_get_char_size>` **(** :ref:`int<class_int>` char, :ref:`int<class_int>` next=0 **)** const |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_string_size<class_Font_get_string_size>` **(** :ref:`String<class_string>` string **)** const |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_distance_field_hint<class_Font_set_distance_field_hint>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_distance_field_hint<class_Font_is_distance_field_hint>` **(** **)** const |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear<class_Font_clear>` **(** **)** |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`draw<class_Font_draw>` **(** :ref:`RID<class_rid>` canvas_item, :ref:`Vector2<class_vector2>` pos, :ref:`String<class_string>` string, :ref:`Color<class_color>` modulate=Color(1,1,1,1), :ref:`int<class_int>` clip_w=-1 **)** const |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`draw_char<class_Font_draw_char>` **(** :ref:`RID<class_rid>` canvas_item, :ref:`Vector2<class_vector2>` pos, :ref:`int<class_int>` char, :ref:`int<class_int>` next=-1, :ref:`Color<class_color>` modulate=Color(1,1,1,1) **)** const |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_fallback<class_Font_set_fallback>` **(** :ref:`Object<class_object>` fallback **)** |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`get_fallback<class_Font_get_fallback>` **(** **)** const |
|
||||
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Font contains an unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. TODO check wikipedia for graph of ascent/baseline/descent/height/etc.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Font_create_from_fnt:
|
||||
|
||||
- :ref:`int<class_int>` **create_from_fnt** **(** :ref:`String<class_string>` path **)**
|
||||
|
||||
.. _class_Font_set_height:
|
||||
|
||||
- void **set_height** **(** :ref:`float<class_float>` px **)**
|
||||
|
||||
Set the total font height (ascent plus descent) in pixels.
|
||||
|
||||
.. _class_Font_get_height:
|
||||
|
||||
- :ref:`float<class_float>` **get_height** **(** **)** const
|
||||
|
||||
Return the total font height (ascent plus descent) in pixels.
|
||||
|
||||
.. _class_Font_set_ascent:
|
||||
|
||||
- void **set_ascent** **(** :ref:`float<class_float>` px **)**
|
||||
|
||||
Set the font ascent (number of pixels above the baseline).
|
||||
|
||||
.. _class_Font_get_ascent:
|
||||
|
||||
- :ref:`float<class_float>` **get_ascent** **(** **)** const
|
||||
|
||||
Return the font ascent (number of pixels above the baseline).
|
||||
|
||||
.. _class_Font_get_descent:
|
||||
|
||||
- :ref:`float<class_float>` **get_descent** **(** **)** const
|
||||
|
||||
Return the font descent (number of pixels below the baseline).
|
||||
|
||||
.. _class_Font_add_kerning_pair:
|
||||
|
||||
- void **add_kerning_pair** **(** :ref:`int<class_int>` char_a, :ref:`int<class_int>` char_b, :ref:`int<class_int>` kerning **)**
|
||||
|
||||
Add a kerning pair to the :ref:`Font<class_font>` as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
|
||||
|
||||
.. _class_Font_get_kerning_pair:
|
||||
|
||||
- :ref:`int<class_int>` **get_kerning_pair** **(** :ref:`int<class_int>` char_a, :ref:`int<class_int>` char_b **)** const
|
||||
|
||||
Return a kerning pair as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
|
||||
|
||||
.. _class_Font_add_texture:
|
||||
|
||||
- void **add_texture** **(** :ref:`Texture<class_texture>` texture **)**
|
||||
|
||||
Add a texture to the :ref:`Font<class_font>`.
|
||||
|
||||
.. _class_Font_add_char:
|
||||
|
||||
- void **add_char** **(** :ref:`int<class_int>` character, :ref:`int<class_int>` texture, :ref:`Rect2<class_rect2>` rect, :ref:`Vector2<class_vector2>` align=Vector2(0,0), :ref:`float<class_float>` advance=-1 **)**
|
||||
|
||||
Add a character to the font, where "character" is the unicode value, "texture" is the texture index, "rect" is the region in the texture (in pixels!), "align" is the (optional) alignment for the character and "advance" is the (optional) advance.
|
||||
|
||||
.. _class_Font_get_texture_count:
|
||||
|
||||
- :ref:`int<class_int>` **get_texture_count** **(** **)** const
|
||||
|
||||
.. _class_Font_get_texture:
|
||||
|
||||
- :ref:`Texture<class_texture>` **get_texture** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
.. _class_Font_get_char_size:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_char_size** **(** :ref:`int<class_int>` char, :ref:`int<class_int>` next=0 **)** const
|
||||
|
||||
Return the size of a character, optionally taking kerning into account if the next character is provided.
|
||||
|
||||
.. _class_Font_get_string_size:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_string_size** **(** :ref:`String<class_string>` string **)** const
|
||||
|
||||
Return the size of a string, taking kerning and advance into account.
|
||||
|
||||
.. _class_Font_set_distance_field_hint:
|
||||
|
||||
- void **set_distance_field_hint** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
.. _class_Font_is_distance_field_hint:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_distance_field_hint** **(** **)** const
|
||||
|
||||
.. _class_Font_clear:
|
||||
|
||||
- void **clear** **(** **)**
|
||||
|
||||
Clear all the font data.
|
||||
|
||||
.. _class_Font_draw:
|
||||
|
||||
- void **draw** **(** :ref:`RID<class_rid>` canvas_item, :ref:`Vector2<class_vector2>` pos, :ref:`String<class_string>` string, :ref:`Color<class_color>` modulate=Color(1,1,1,1), :ref:`int<class_int>` clip_w=-1 **)** const
|
||||
|
||||
Draw "string" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally clipping the width. "pos" specifies te baseline, not the top. To draw from the top, *ascent* must be added to the Y axis.
|
||||
|
||||
.. _class_Font_draw_char:
|
||||
|
||||
- :ref:`float<class_float>` **draw_char** **(** :ref:`RID<class_rid>` canvas_item, :ref:`Vector2<class_vector2>` pos, :ref:`int<class_int>` char, :ref:`int<class_int>` next=-1, :ref:`Color<class_color>` modulate=Color(1,1,1,1) **)** const
|
||||
|
||||
Draw character "char" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally kerning if "next" is apassed. clipping the width. "pos" specifies te baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character.
|
||||
|
||||
.. _class_Font_set_fallback:
|
||||
|
||||
- void **set_fallback** **(** :ref:`Object<class_object>` fallback **)**
|
||||
|
||||
.. _class_Font_get_fallback:
|
||||
|
||||
- :ref:`Object<class_object>` **get_fallback** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
.. _class_FuncRef:
|
||||
|
||||
FuncRef
|
||||
=======
|
||||
|
||||
Inherits: :ref:`Reference<class_reference>`
|
||||
-------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`call_func<class_FuncRef_call_func>` **(** var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL, var arg6=NULL, var arg7=NULL, var arg8=NULL, var arg9=NULL **)** |
|
||||
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_instance<class_FuncRef_set_instance>` **(** :ref:`Object<class_object>` instance **)** |
|
||||
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_function<class_FuncRef_set_function>` **(** :ref:`String<class_string>` name **)** |
|
||||
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_FuncRef_call_func:
|
||||
|
||||
- void **call_func** **(** var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL, var arg6=NULL, var arg7=NULL, var arg8=NULL, var arg9=NULL **)**
|
||||
|
||||
.. _class_FuncRef_set_instance:
|
||||
|
||||
- void **set_instance** **(** :ref:`Object<class_object>` instance **)**
|
||||
|
||||
.. _class_FuncRef_set_function:
|
||||
|
||||
- void **set_function** **(** :ref:`String<class_string>` name **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
.. _class_GDFunctionState:
|
||||
|
||||
GDFunctionState
|
||||
===============
|
||||
|
||||
Inherits: :ref:`Reference<class_reference>`
|
||||
-------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------+------------------------------------------------------------------------+
|
||||
| Variant | :ref:`resume<class_GDFunctionState_resume>` **(** var arg=NULL **)** |
|
||||
+--------------------------+------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_valid<class_GDFunctionState_is_valid>` **(** **)** const |
|
||||
+--------------------------+------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_GDFunctionState_resume:
|
||||
|
||||
- Variant **resume** **(** var arg=NULL **)**
|
||||
|
||||
.. _class_GDFunctionState_is_valid:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_valid** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
.. _class_GDNativeClass:
|
||||
|
||||
GDNativeClass
|
||||
=============
|
||||
|
||||
Inherits: :ref:`Reference<class_reference>`
|
||||
-------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+-------+--------------------------------------------------+
|
||||
| void | :ref:`new<class_GDNativeClass_new>` **(** **)** |
|
||||
+-------+--------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_GDNativeClass_new:
|
||||
|
||||
- void **new** **(** **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
.. _class_GDScript:
|
||||
|
||||
GDScript
|
||||
========
|
||||
|
||||
Inherits: :ref:`Script<class_script>`
|
||||
-------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------------+-----------------------------------------------------------------------------+
|
||||
| void | :ref:`new<class_GDScript_new>` **(** **)** |
|
||||
+----------------------------------+-----------------------------------------------------------------------------+
|
||||
| :ref:`RawArray<class_rawarray>` | :ref:`get_as_byte_code<class_GDScript_get_as_byte_code>` **(** **)** const |
|
||||
+----------------------------------+-----------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_GDScript_new:
|
||||
|
||||
- void **new** **(** **)**
|
||||
|
||||
.. _class_GDScript_get_as_byte_code:
|
||||
|
||||
- :ref:`RawArray<class_rawarray>` **get_as_byte_code** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
.. _class_Generic6DOFJoint:
|
||||
|
||||
Generic6DOFJoint
|
||||
================
|
||||
|
||||
Inherits: :ref:`Joint<class_joint>`
|
||||
-----------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_param_x<class_Generic6DOFJoint_set_param_x>` **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_param_x<class_Generic6DOFJoint_get_param_x>` **(** :ref:`int<class_int>` param **)** const |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_param_y<class_Generic6DOFJoint_set_param_y>` **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_param_y<class_Generic6DOFJoint_get_param_y>` **(** :ref:`int<class_int>` param **)** const |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_param_z<class_Generic6DOFJoint_set_param_z>` **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_param_z<class_Generic6DOFJoint_get_param_z>` **(** :ref:`int<class_int>` param **)** const |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_flag_x<class_Generic6DOFJoint_set_flag_x>` **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_flag_x<class_Generic6DOFJoint_get_flag_x>` **(** :ref:`int<class_int>` flag **)** const |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_flag_y<class_Generic6DOFJoint_set_flag_y>` **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_flag_y<class_Generic6DOFJoint_get_flag_y>` **(** :ref:`int<class_int>` flag **)** const |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_flag_z<class_Generic6DOFJoint_set_flag_z>` **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)** |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_flag_z<class_Generic6DOFJoint_get_flag_z>` **(** :ref:`int<class_int>` flag **)** const |
|
||||
+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **PARAM_LINEAR_LOWER_LIMIT** = **0**
|
||||
- **PARAM_LINEAR_UPPER_LIMIT** = **1**
|
||||
- **PARAM_LINEAR_LIMIT_SOFTNESS** = **2**
|
||||
- **PARAM_LINEAR_RESTITUTION** = **3**
|
||||
- **PARAM_LINEAR_DAMPING** = **4**
|
||||
- **PARAM_ANGULAR_LOWER_LIMIT** = **5**
|
||||
- **PARAM_ANGULAR_UPPER_LIMIT** = **6**
|
||||
- **PARAM_ANGULAR_LIMIT_SOFTNESS** = **7**
|
||||
- **PARAM_ANGULAR_DAMPING** = **8**
|
||||
- **PARAM_ANGULAR_RESTITUTION** = **9**
|
||||
- **PARAM_ANGULAR_FORCE_LIMIT** = **10**
|
||||
- **PARAM_ANGULAR_ERP** = **11**
|
||||
- **PARAM_ANGULAR_MOTOR_TARGET_VELOCITY** = **12**
|
||||
- **PARAM_ANGULAR_MOTOR_FORCE_LIMIT** = **13**
|
||||
- **PARAM_MAX** = **14**
|
||||
- **FLAG_ENABLE_LINEAR_LIMIT** = **0**
|
||||
- **FLAG_ENABLE_ANGULAR_LIMIT** = **1**
|
||||
- **FLAG_ENABLE_MOTOR** = **2**
|
||||
- **FLAG_MAX** = **3**
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Generic6DOFJoint_set_param_x:
|
||||
|
||||
- void **set_param_x** **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)**
|
||||
|
||||
.. _class_Generic6DOFJoint_get_param_x:
|
||||
|
||||
- :ref:`float<class_float>` **get_param_x** **(** :ref:`int<class_int>` param **)** const
|
||||
|
||||
.. _class_Generic6DOFJoint_set_param_y:
|
||||
|
||||
- void **set_param_y** **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)**
|
||||
|
||||
.. _class_Generic6DOFJoint_get_param_y:
|
||||
|
||||
- :ref:`float<class_float>` **get_param_y** **(** :ref:`int<class_int>` param **)** const
|
||||
|
||||
.. _class_Generic6DOFJoint_set_param_z:
|
||||
|
||||
- void **set_param_z** **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)**
|
||||
|
||||
.. _class_Generic6DOFJoint_get_param_z:
|
||||
|
||||
- :ref:`float<class_float>` **get_param_z** **(** :ref:`int<class_int>` param **)** const
|
||||
|
||||
.. _class_Generic6DOFJoint_set_flag_x:
|
||||
|
||||
- void **set_flag_x** **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)**
|
||||
|
||||
.. _class_Generic6DOFJoint_get_flag_x:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_flag_x** **(** :ref:`int<class_int>` flag **)** const
|
||||
|
||||
.. _class_Generic6DOFJoint_set_flag_y:
|
||||
|
||||
- void **set_flag_y** **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)**
|
||||
|
||||
.. _class_Generic6DOFJoint_get_flag_y:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_flag_y** **(** :ref:`int<class_int>` flag **)** const
|
||||
|
||||
.. _class_Generic6DOFJoint_set_flag_z:
|
||||
|
||||
- void **set_flag_z** **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)**
|
||||
|
||||
.. _class_Generic6DOFJoint_get_flag_z:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_flag_z** **(** :ref:`int<class_int>` flag **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
.. _class_Geometry:
|
||||
|
||||
Geometry
|
||||
========
|
||||
|
||||
Inherits: :ref:`Object<class_object>`
|
||||
-------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`build_box_planes<class_Geometry_build_box_planes>` **(** :ref:`Vector3<class_vector3>` extents **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`build_cylinder_planes<class_Geometry_build_cylinder_planes>` **(** :ref:`float<class_float>` radius, :ref:`float<class_float>` height, :ref:`int<class_int>` sides, :ref:`int<class_int>` axis=2 **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`build_capsule_planes<class_Geometry_build_capsule_planes>` **(** :ref:`float<class_float>` radius, :ref:`float<class_float>` height, :ref:`int<class_int>` sides, :ref:`int<class_int>` lats, :ref:`int<class_int>` axis=2 **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`segment_intersects_circle<class_Geometry_segment_intersects_circle>` **(** :ref:`Vector2<class_vector2>` segment_from, :ref:`Vector2<class_vector2>` segment_to, :ref:`Vector2<class_vector2>` circle_pos, :ref:`float<class_float>` circle_radius **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`segment_intersects_segment_2d<class_Geometry_segment_intersects_segment_2d>` **(** :ref:`Vector2<class_vector2>` from_a, :ref:`Vector2<class_vector2>` to_a, :ref:`Vector2<class_vector2>` from_b, :ref:`Vector2<class_vector2>` to_b **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2Array<class_vector2array>` | :ref:`get_closest_points_between_segments_2d<class_Geometry_get_closest_points_between_segments_2d>` **(** :ref:`Vector2<class_vector2>` p1, :ref:`Vector2<class_vector2>` q1, :ref:`Vector2<class_vector2>` p2, :ref:`Vector2<class_vector2>` q2 **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3Array<class_vector3array>` | :ref:`get_closest_points_between_segments<class_Geometry_get_closest_points_between_segments>` **(** :ref:`Vector3<class_vector3>` p1, :ref:`Vector3<class_vector3>` p2, :ref:`Vector3<class_vector3>` q1, :ref:`Vector3<class_vector3>` q2 **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_closest_point_to_segment<class_Geometry_get_closest_point_to_segment>` **(** :ref:`Vector3<class_vector3>` point, :ref:`Vector3<class_vector3>` s1, :ref:`Vector3<class_vector3>` s2 **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_uv84_normal_bit<class_Geometry_get_uv84_normal_bit>` **(** :ref:`Vector3<class_vector3>` normal **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`ray_intersects_triangle<class_Geometry_ray_intersects_triangle>` **(** :ref:`Vector3<class_vector3>` from, :ref:`Vector3<class_vector3>` dir, :ref:`Vector3<class_vector3>` a, :ref:`Vector3<class_vector3>` b, :ref:`Vector3<class_vector3>` c **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`segment_intersects_triangle<class_Geometry_segment_intersects_triangle>` **(** :ref:`Vector3<class_vector3>` from, :ref:`Vector3<class_vector3>` to, :ref:`Vector3<class_vector3>` a, :ref:`Vector3<class_vector3>` b, :ref:`Vector3<class_vector3>` c **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3Array<class_vector3array>` | :ref:`segment_intersects_sphere<class_Geometry_segment_intersects_sphere>` **(** :ref:`Vector3<class_vector3>` from, :ref:`Vector3<class_vector3>` to, :ref:`Vector3<class_vector3>` spos, :ref:`float<class_float>` sradius **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3Array<class_vector3array>` | :ref:`segment_intersects_cylinder<class_Geometry_segment_intersects_cylinder>` **(** :ref:`Vector3<class_vector3>` from, :ref:`Vector3<class_vector3>` to, :ref:`float<class_float>` height, :ref:`float<class_float>` radius **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3Array<class_vector3array>` | :ref:`segment_intersects_convex<class_Geometry_segment_intersects_convex>` **(** :ref:`Vector3<class_vector3>` from, :ref:`Vector3<class_vector3>` to, :ref:`Array<class_array>` planes **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`point_is_inside_triangle<class_Geometry_point_is_inside_triangle>` **(** :ref:`Vector2<class_vector2>` point, :ref:`Vector2<class_vector2>` a, :ref:`Vector2<class_vector2>` b, :ref:`Vector2<class_vector2>` c **)** const |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`IntArray<class_intarray>` | :ref:`triangulate_polygon<class_Geometry_triangulate_polygon>` **(** :ref:`Vector2Array<class_vector2array>` polygon **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Dictionary<class_dictionary>` | :ref:`make_atlas<class_Geometry_make_atlas>` **(** :ref:`Vector2Array<class_vector2array>` sizes **)** |
|
||||
+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Geometry_build_box_planes:
|
||||
|
||||
- :ref:`Array<class_array>` **build_box_planes** **(** :ref:`Vector3<class_vector3>` extents **)**
|
||||
|
||||
.. _class_Geometry_build_cylinder_planes:
|
||||
|
||||
- :ref:`Array<class_array>` **build_cylinder_planes** **(** :ref:`float<class_float>` radius, :ref:`float<class_float>` height, :ref:`int<class_int>` sides, :ref:`int<class_int>` axis=2 **)**
|
||||
|
||||
.. _class_Geometry_build_capsule_planes:
|
||||
|
||||
- :ref:`Array<class_array>` **build_capsule_planes** **(** :ref:`float<class_float>` radius, :ref:`float<class_float>` height, :ref:`int<class_int>` sides, :ref:`int<class_int>` lats, :ref:`int<class_int>` axis=2 **)**
|
||||
|
||||
.. _class_Geometry_segment_intersects_circle:
|
||||
|
||||
- :ref:`float<class_float>` **segment_intersects_circle** **(** :ref:`Vector2<class_vector2>` segment_from, :ref:`Vector2<class_vector2>` segment_to, :ref:`Vector2<class_vector2>` circle_pos, :ref:`float<class_float>` circle_radius **)**
|
||||
|
||||
.. _class_Geometry_segment_intersects_segment_2d:
|
||||
|
||||
- void **segment_intersects_segment_2d** **(** :ref:`Vector2<class_vector2>` from_a, :ref:`Vector2<class_vector2>` to_a, :ref:`Vector2<class_vector2>` from_b, :ref:`Vector2<class_vector2>` to_b **)**
|
||||
|
||||
.. _class_Geometry_get_closest_points_between_segments_2d:
|
||||
|
||||
- :ref:`Vector2Array<class_vector2array>` **get_closest_points_between_segments_2d** **(** :ref:`Vector2<class_vector2>` p1, :ref:`Vector2<class_vector2>` q1, :ref:`Vector2<class_vector2>` p2, :ref:`Vector2<class_vector2>` q2 **)**
|
||||
|
||||
.. _class_Geometry_get_closest_points_between_segments:
|
||||
|
||||
- :ref:`Vector3Array<class_vector3array>` **get_closest_points_between_segments** **(** :ref:`Vector3<class_vector3>` p1, :ref:`Vector3<class_vector3>` p2, :ref:`Vector3<class_vector3>` q1, :ref:`Vector3<class_vector3>` q2 **)**
|
||||
|
||||
.. _class_Geometry_get_closest_point_to_segment:
|
||||
|
||||
- :ref:`Vector3<class_vector3>` **get_closest_point_to_segment** **(** :ref:`Vector3<class_vector3>` point, :ref:`Vector3<class_vector3>` s1, :ref:`Vector3<class_vector3>` s2 **)**
|
||||
|
||||
.. _class_Geometry_get_uv84_normal_bit:
|
||||
|
||||
- :ref:`int<class_int>` **get_uv84_normal_bit** **(** :ref:`Vector3<class_vector3>` normal **)**
|
||||
|
||||
.. _class_Geometry_ray_intersects_triangle:
|
||||
|
||||
- void **ray_intersects_triangle** **(** :ref:`Vector3<class_vector3>` from, :ref:`Vector3<class_vector3>` dir, :ref:`Vector3<class_vector3>` a, :ref:`Vector3<class_vector3>` b, :ref:`Vector3<class_vector3>` c **)**
|
||||
|
||||
.. _class_Geometry_segment_intersects_triangle:
|
||||
|
||||
- void **segment_intersects_triangle** **(** :ref:`Vector3<class_vector3>` from, :ref:`Vector3<class_vector3>` to, :ref:`Vector3<class_vector3>` a, :ref:`Vector3<class_vector3>` b, :ref:`Vector3<class_vector3>` c **)**
|
||||
|
||||
.. _class_Geometry_segment_intersects_sphere:
|
||||
|
||||
- :ref:`Vector3Array<class_vector3array>` **segment_intersects_sphere** **(** :ref:`Vector3<class_vector3>` from, :ref:`Vector3<class_vector3>` to, :ref:`Vector3<class_vector3>` spos, :ref:`float<class_float>` sradius **)**
|
||||
|
||||
.. _class_Geometry_segment_intersects_cylinder:
|
||||
|
||||
- :ref:`Vector3Array<class_vector3array>` **segment_intersects_cylinder** **(** :ref:`Vector3<class_vector3>` from, :ref:`Vector3<class_vector3>` to, :ref:`float<class_float>` height, :ref:`float<class_float>` radius **)**
|
||||
|
||||
.. _class_Geometry_segment_intersects_convex:
|
||||
|
||||
- :ref:`Vector3Array<class_vector3array>` **segment_intersects_convex** **(** :ref:`Vector3<class_vector3>` from, :ref:`Vector3<class_vector3>` to, :ref:`Array<class_array>` planes **)**
|
||||
|
||||
.. _class_Geometry_point_is_inside_triangle:
|
||||
|
||||
- :ref:`bool<class_bool>` **point_is_inside_triangle** **(** :ref:`Vector2<class_vector2>` point, :ref:`Vector2<class_vector2>` a, :ref:`Vector2<class_vector2>` b, :ref:`Vector2<class_vector2>` c **)** const
|
||||
|
||||
.. _class_Geometry_triangulate_polygon:
|
||||
|
||||
- :ref:`IntArray<class_intarray>` **triangulate_polygon** **(** :ref:`Vector2Array<class_vector2array>` polygon **)**
|
||||
|
||||
.. _class_Geometry_make_atlas:
|
||||
|
||||
- :ref:`Dictionary<class_dictionary>` **make_atlas** **(** :ref:`Vector2Array<class_vector2array>` sizes **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
.. _class_GeometryInstance:
|
||||
|
||||
GeometryInstance
|
||||
================
|
||||
|
||||
Inherits: :ref:`VisualInstance<class_visualinstance>`
|
||||
-----------------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Base node for geometry based visual instances.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_material_override<class_GeometryInstance_set_material_override>` **(** :ref:`Object<class_object>` material **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`get_material_override<class_GeometryInstance_get_material_override>` **(** **)** const |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_flag<class_GeometryInstance_set_flag>` **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_flag<class_GeometryInstance_get_flag>` **(** :ref:`int<class_int>` flag **)** const |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_draw_range_begin<class_GeometryInstance_set_draw_range_begin>` **(** :ref:`float<class_float>` mode **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_draw_range_begin<class_GeometryInstance_get_draw_range_begin>` **(** **)** const |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_draw_range_end<class_GeometryInstance_set_draw_range_end>` **(** :ref:`float<class_float>` mode **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_draw_range_end<class_GeometryInstance_get_draw_range_end>` **(** **)** const |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_baked_light_texture_id<class_GeometryInstance_set_baked_light_texture_id>` **(** :ref:`int<class_int>` id **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_baked_light_texture_id<class_GeometryInstance_get_baked_light_texture_id>` **(** **)** const |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_extra_cull_margin<class_GeometryInstance_set_extra_cull_margin>` **(** :ref:`float<class_float>` margin **)** |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_extra_cull_margin<class_GeometryInstance_get_extra_cull_margin>` **(** **)** const |
|
||||
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **FLAG_VISIBLE** = **0**
|
||||
- **FLAG_CAST_SHADOW** = **3**
|
||||
- **FLAG_RECEIVE_SHADOWS** = **4**
|
||||
- **FLAG_BILLBOARD** = **1**
|
||||
- **FLAG_BILLBOARD_FIX_Y** = **2**
|
||||
- **FLAG_DEPH_SCALE** = **5**
|
||||
- **FLAG_VISIBLE_IN_ALL_ROOMS** = **6**
|
||||
- **FLAG_MAX** = **8**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Base node for geometry based visual instances. Shares some common functionality like visibility and custom materials.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_GeometryInstance_set_material_override:
|
||||
|
||||
- void **set_material_override** **(** :ref:`Object<class_object>` material **)**
|
||||
|
||||
Set the material override for the whole geometry.
|
||||
|
||||
.. _class_GeometryInstance_get_material_override:
|
||||
|
||||
- :ref:`Object<class_object>` **get_material_override** **(** **)** const
|
||||
|
||||
Return the material override for the whole geometry.
|
||||
|
||||
.. _class_GeometryInstance_set_flag:
|
||||
|
||||
- void **set_flag** **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)**
|
||||
|
||||
.. _class_GeometryInstance_get_flag:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_flag** **(** :ref:`int<class_int>` flag **)** const
|
||||
|
||||
.. _class_GeometryInstance_set_draw_range_begin:
|
||||
|
||||
- void **set_draw_range_begin** **(** :ref:`float<class_float>` mode **)**
|
||||
|
||||
.. _class_GeometryInstance_get_draw_range_begin:
|
||||
|
||||
- :ref:`float<class_float>` **get_draw_range_begin** **(** **)** const
|
||||
|
||||
.. _class_GeometryInstance_set_draw_range_end:
|
||||
|
||||
- void **set_draw_range_end** **(** :ref:`float<class_float>` mode **)**
|
||||
|
||||
.. _class_GeometryInstance_get_draw_range_end:
|
||||
|
||||
- :ref:`float<class_float>` **get_draw_range_end** **(** **)** const
|
||||
|
||||
.. _class_GeometryInstance_set_baked_light_texture_id:
|
||||
|
||||
- void **set_baked_light_texture_id** **(** :ref:`int<class_int>` id **)**
|
||||
|
||||
.. _class_GeometryInstance_get_baked_light_texture_id:
|
||||
|
||||
- :ref:`int<class_int>` **get_baked_light_texture_id** **(** **)** const
|
||||
|
||||
.. _class_GeometryInstance_set_extra_cull_margin:
|
||||
|
||||
- void **set_extra_cull_margin** **(** :ref:`float<class_float>` margin **)**
|
||||
|
||||
.. _class_GeometryInstance_get_extra_cull_margin:
|
||||
|
||||
- :ref:`float<class_float>` **get_extra_cull_margin** **(** **)** const
|
||||
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
.. _class_Globals:
|
||||
|
||||
Globals
|
||||
=======
|
||||
|
||||
Inherits: :ref:`Object<class_object>`
|
||||
-------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Contains global variables accessible from everywhere.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has<class_Globals_has>` **(** :ref:`String<class_string>` name **)** const |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_order<class_Globals_set_order>` **(** :ref:`String<class_string>` name, :ref:`int<class_int>` pos **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_order<class_Globals_get_order>` **(** :ref:`String<class_string>` name **)** const |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_persisting<class_Globals_set_persisting>` **(** :ref:`String<class_string>` name, :ref:`bool<class_bool>` enable **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_persisting<class_Globals_is_persisting>` **(** :ref:`String<class_string>` name **)** const |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear<class_Globals_clear>` **(** :ref:`String<class_string>` name **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`localize_path<class_Globals_localize_path>` **(** :ref:`String<class_string>` path **)** const |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`globalize_path<class_Globals_globalize_path>` **(** :ref:`String<class_string>` path **)** const |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`save<class_Globals_save>` **(** **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_singleton<class_Globals_has_singleton>` **(** :ref:`String<class_string>` name **)** const |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Object<class_object>` | :ref:`get_singleton<class_Globals_get_singleton>` **(** :ref:`String<class_string>` name **)** const |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`load_resource_pack<class_Globals_load_resource_pack>` **(** :ref:`String<class_string>` pack **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`save_custom<class_Globals_save_custom>` **(** :ref:`String<class_string>` file **)** |
|
||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Contains global variables accessible from everywhere. Use the normal :ref:`Object<class_object>` API, such as "Globals.get(variable)", "Globals.set(variable,value)" or "Globals.has(variable)" to access them. Variables stored in engine.cfg are also loaded into globals, making this object very useful for reading custom game configuration options.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_Globals_has:
|
||||
|
||||
- :ref:`bool<class_bool>` **has** **(** :ref:`String<class_string>` name **)** const
|
||||
|
||||
Return true if a configuration value is present.
|
||||
|
||||
.. _class_Globals_set_order:
|
||||
|
||||
- void **set_order** **(** :ref:`String<class_string>` name, :ref:`int<class_int>` pos **)**
|
||||
|
||||
Set the order of a configuration value (influences when saved to the config file).
|
||||
|
||||
.. _class_Globals_get_order:
|
||||
|
||||
- :ref:`int<class_int>` **get_order** **(** :ref:`String<class_string>` name **)** const
|
||||
|
||||
Return the order of a configuration value (influences when saved to the config file).
|
||||
|
||||
.. _class_Globals_set_persisting:
|
||||
|
||||
- void **set_persisting** **(** :ref:`String<class_string>` name, :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
If set to true, this value can be saved to the configuration file. This is useful for editors.
|
||||
|
||||
.. _class_Globals_is_persisting:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_persisting** **(** :ref:`String<class_string>` name **)** const
|
||||
|
||||
If returns true, this value can be saved to the configuration file. This is useful for editors.
|
||||
|
||||
.. _class_Globals_clear:
|
||||
|
||||
- void **clear** **(** :ref:`String<class_string>` name **)**
|
||||
|
||||
Clear the whole configuration (not recommended, may break things).
|
||||
|
||||
.. _class_Globals_localize_path:
|
||||
|
||||
- :ref:`String<class_string>` **localize_path** **(** :ref:`String<class_string>` path **)** const
|
||||
|
||||
Convert a path to a localized path (res:// path).
|
||||
|
||||
.. _class_Globals_globalize_path:
|
||||
|
||||
- :ref:`String<class_string>` **globalize_path** **(** :ref:`String<class_string>` path **)** const
|
||||
|
||||
Convert a localized path (res://) to a full native OS path.
|
||||
|
||||
.. _class_Globals_save:
|
||||
|
||||
- :ref:`int<class_int>` **save** **(** **)**
|
||||
|
||||
.. _class_Globals_has_singleton:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_singleton** **(** :ref:`String<class_string>` name **)** const
|
||||
|
||||
.. _class_Globals_get_singleton:
|
||||
|
||||
- :ref:`Object<class_object>` **get_singleton** **(** :ref:`String<class_string>` name **)** const
|
||||
|
||||
.. _class_Globals_load_resource_pack:
|
||||
|
||||
- :ref:`bool<class_bool>` **load_resource_pack** **(** :ref:`String<class_string>` pack **)**
|
||||
|
||||
.. _class_Globals_save_custom:
|
||||
|
||||
- :ref:`int<class_int>` **save_custom** **(** :ref:`String<class_string>` file **)**
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
.. _class_GraphEdit:
|
||||
|
||||
GraphEdit
|
||||
=========
|
||||
|
||||
Inherits: :ref:`Control<class_control>`
|
||||
---------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Error | :ref:`connect_node<class_GraphEdit_connect_node>` **(** :ref:`String<class_string>` from, :ref:`int<class_int>` from_port, :ref:`String<class_string>` to, :ref:`int<class_int>` to_port **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_node_connected<class_GraphEdit_is_node_connected>` **(** :ref:`String<class_string>` from, :ref:`int<class_int>` from_port, :ref:`String<class_string>` to, :ref:`int<class_int>` to_port **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`disconnect_node<class_GraphEdit_disconnect_node>` **(** :ref:`String<class_string>` from, :ref:`int<class_int>` from_port, :ref:`String<class_string>` to, :ref:`int<class_int>` to_port **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`get_connection_list<class_GraphEdit_get_connection_list>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_scroll_ofs<class_GraphEdit_get_scroll_ofs>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_zoom<class_GraphEdit_set_zoom>` **(** :ref:`float<class_float>` p_zoom **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_zoom<class_GraphEdit_get_zoom>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_right_disconnects<class_GraphEdit_set_right_disconnects>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_right_disconnects_enabled<class_GraphEdit_is_right_disconnects_enabled>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **delete_nodes_request** **(** **)**
|
||||
- **duplicate_nodes_request** **(** **)**
|
||||
- **popup_request** **(** :ref:`Vector2<class_vector2>` p_position **)**
|
||||
- **_begin_node_move** **(** **)**
|
||||
- **disconnection_request** **(** :ref:`String<class_string>` from, :ref:`int<class_int>` from_slot, :ref:`String<class_string>` to, :ref:`int<class_int>` to_slot **)**
|
||||
- **connection_request** **(** :ref:`String<class_string>` from, :ref:`int<class_int>` from_slot, :ref:`String<class_string>` to, :ref:`int<class_int>` to_slot **)**
|
||||
- **_end_node_move** **(** **)**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
GraphEdit manages the showing of GraphNodes it contains, as well as connections an disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNodes slots is disabled by default.
|
||||
|
||||
It is greatly advised to enable low processor usage mode :ref:`OS.set_low_processor_usage_mode()<class_os.set_low_processor_usage_mode()>` when using GraphEdits.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_GraphEdit_connect_node:
|
||||
|
||||
- Error **connect_node** **(** :ref:`String<class_string>` from, :ref:`int<class_int>` from_port, :ref:`String<class_string>` to, :ref:`int<class_int>` to_port **)**
|
||||
|
||||
Create a connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode. If the connection already exists, no connection is created.
|
||||
|
||||
.. _class_GraphEdit_is_node_connected:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_node_connected** **(** :ref:`String<class_string>` from, :ref:`int<class_int>` from_port, :ref:`String<class_string>` to, :ref:`int<class_int>` to_port **)**
|
||||
|
||||
Return true if the 'from_port' slot of 'from' GraphNode is connected to the 'to_port' slot of 'to' GraphNode.
|
||||
|
||||
.. _class_GraphEdit_disconnect_node:
|
||||
|
||||
- void **disconnect_node** **(** :ref:`String<class_string>` from, :ref:`int<class_int>` from_port, :ref:`String<class_string>` to, :ref:`int<class_int>` to_port **)**
|
||||
|
||||
Remove the connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode, if connection exists.
|
||||
|
||||
.. _class_GraphEdit_get_connection_list:
|
||||
|
||||
- :ref:`Array<class_array>` **get_connection_list** **(** **)** const
|
||||
|
||||
Return an Array containing the list of connections. A connection consists in a structure of the form {from_slot: 0, from: "GraphNode name 0", to_slot: 1, to: "GraphNode name 1" }
|
||||
|
||||
.. _class_GraphEdit_get_scroll_ofs:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_scroll_ofs** **(** **)** const
|
||||
|
||||
.. _class_GraphEdit_set_zoom:
|
||||
|
||||
- void **set_zoom** **(** :ref:`float<class_float>` p_zoom **)**
|
||||
|
||||
.. _class_GraphEdit_get_zoom:
|
||||
|
||||
- :ref:`float<class_float>` **get_zoom** **(** **)** const
|
||||
|
||||
.. _class_GraphEdit_set_right_disconnects:
|
||||
|
||||
- void **set_right_disconnects** **(** :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
Enable the disconnection of existing connections in the visual GraphEdit by left-clicking a connection and releasing into the void.
|
||||
|
||||
.. _class_GraphEdit_is_right_disconnects_enabled:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_right_disconnects_enabled** **(** **)** const
|
||||
|
||||
Return true is the disconnection of connections is enable in the visual GraphEdit. False otherwise.
|
||||
|
||||
|
||||
@@ -0,0 +1,222 @@
|
||||
.. _class_GraphNode:
|
||||
|
||||
GraphNode
|
||||
=========
|
||||
|
||||
Inherits: :ref:`Container<class_container>`
|
||||
-------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_title<class_GraphNode_set_title>` **(** :ref:`String<class_string>` title **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_title<class_GraphNode_get_title>` **(** **)** const |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_slot<class_GraphNode_set_slot>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` enable_left, :ref:`int<class_int>` type_left, :ref:`Color<class_color>` color_left, :ref:`bool<class_bool>` enable_right, :ref:`int<class_int>` type_right, :ref:`Color<class_color>` color_right **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_slot<class_GraphNode_clear_slot>` **(** :ref:`int<class_int>` idx **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_all_slots<class_GraphNode_clear_all_slots>` **(** **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_slot_enabled_left<class_GraphNode_is_slot_enabled_left>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_slot_type_left<class_GraphNode_get_slot_type_left>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`get_slot_color_left<class_GraphNode_get_slot_color_left>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_slot_enabled_right<class_GraphNode_is_slot_enabled_right>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_slot_type_right<class_GraphNode_get_slot_type_right>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`get_slot_color_right<class_GraphNode_get_slot_color_right>` **(** :ref:`int<class_int>` idx **)** const |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_offset<class_GraphNode_set_offset>` **(** :ref:`Vector2<class_vector2>` offset **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_offset<class_GraphNode_get_offset>` **(** **)** const |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_connection_output_count<class_GraphNode_get_connection_output_count>` **(** **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_connection_input_count<class_GraphNode_get_connection_input_count>` **(** **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_connection_output_pos<class_GraphNode_get_connection_output_pos>` **(** :ref:`int<class_int>` idx **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_connection_output_type<class_GraphNode_get_connection_output_type>` **(** :ref:`int<class_int>` idx **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`get_connection_output_color<class_GraphNode_get_connection_output_color>` **(** :ref:`int<class_int>` idx **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_connection_input_pos<class_GraphNode_get_connection_input_pos>` **(** :ref:`int<class_int>` idx **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_connection_input_type<class_GraphNode_get_connection_input_type>` **(** :ref:`int<class_int>` idx **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_color>` | :ref:`get_connection_input_color<class_GraphNode_get_connection_input_color>` **(** :ref:`int<class_int>` idx **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_show_close_button<class_GraphNode_set_show_close_button>` **(** :ref:`bool<class_bool>` show **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_close_button_visible<class_GraphNode_is_close_button_visible>` **(** **)** const |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
- **raise_request** **(** **)**
|
||||
- **close_request** **(** **)**
|
||||
- **dragged** **(** :ref:`Vector2<class_vector2>` from, :ref:`Vector2<class_vector2>` to **)**
|
||||
- **offset_changed** **(** **)**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
A GraphNode is a container defined by a title. It can have 1 or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_GraphNode_set_title:
|
||||
|
||||
- void **set_title** **(** :ref:`String<class_string>` title **)**
|
||||
|
||||
Set the title of the GraphNode.
|
||||
|
||||
.. _class_GraphNode_get_title:
|
||||
|
||||
- :ref:`String<class_string>` **get_title** **(** **)** const
|
||||
|
||||
Return the title of the GraphNode.
|
||||
|
||||
.. _class_GraphNode_set_slot:
|
||||
|
||||
- void **set_slot** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` enable_left, :ref:`int<class_int>` type_left, :ref:`Color<class_color>` color_left, :ref:`bool<class_bool>` enable_right, :ref:`int<class_int>` type_right, :ref:`Color<class_color>` color_right **)**
|
||||
|
||||
Set the tuple of input/output slots defined by 'idx' ID. 'left' slots are input, 'right' are output. 'type' is an integer defining the type of the slot. Refer to description for the compatibility between slot types.
|
||||
|
||||
.. _class_GraphNode_clear_slot:
|
||||
|
||||
- void **clear_slot** **(** :ref:`int<class_int>` idx **)**
|
||||
|
||||
Disable input and ouput slot whose index is 'idx'.
|
||||
|
||||
.. _class_GraphNode_clear_all_slots:
|
||||
|
||||
- void **clear_all_slots** **(** **)**
|
||||
|
||||
Disable all input and output slots of the GraphNode.
|
||||
|
||||
.. _class_GraphNode_is_slot_enabled_left:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_slot_enabled_left** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Return true if left (input) slot 'idx' is enabled. False otherwise.
|
||||
|
||||
.. _class_GraphNode_get_slot_type_left:
|
||||
|
||||
- :ref:`int<class_int>` **get_slot_type_left** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Return the (integer) type of left (input) 'idx' slot.
|
||||
|
||||
.. _class_GraphNode_get_slot_color_left:
|
||||
|
||||
- :ref:`Color<class_color>` **get_slot_color_left** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Return the color set to 'idx' left (input) slot.
|
||||
|
||||
.. _class_GraphNode_is_slot_enabled_right:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_slot_enabled_right** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Return true if right (output) slot 'idx' is enabled. False otherwise.
|
||||
|
||||
.. _class_GraphNode_get_slot_type_right:
|
||||
|
||||
- :ref:`int<class_int>` **get_slot_type_right** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Return the (integer) type of right (output) 'idx' slot.
|
||||
|
||||
.. _class_GraphNode_get_slot_color_right:
|
||||
|
||||
- :ref:`Color<class_color>` **get_slot_color_right** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Return the color set to 'idx' right (output) slot.
|
||||
|
||||
.. _class_GraphNode_set_offset:
|
||||
|
||||
- void **set_offset** **(** :ref:`Vector2<class_vector2>` offset **)**
|
||||
|
||||
Set the offset of the GraphNode.
|
||||
|
||||
.. _class_GraphNode_get_offset:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_offset** **(** **)** const
|
||||
|
||||
Return the offset of the GraphNode.
|
||||
|
||||
.. _class_GraphNode_get_connection_output_count:
|
||||
|
||||
- :ref:`int<class_int>` **get_connection_output_count** **(** **)**
|
||||
|
||||
Return the number of enabled output slots (connections) of the GraphNode.
|
||||
|
||||
.. _class_GraphNode_get_connection_input_count:
|
||||
|
||||
- :ref:`int<class_int>` **get_connection_input_count** **(** **)**
|
||||
|
||||
Return the number of enabled input slots (connections) to the GraphNode.
|
||||
|
||||
.. _class_GraphNode_get_connection_output_pos:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_connection_output_pos** **(** :ref:`int<class_int>` idx **)**
|
||||
|
||||
Return the position of the output connection 'idx'.
|
||||
|
||||
.. _class_GraphNode_get_connection_output_type:
|
||||
|
||||
- :ref:`int<class_int>` **get_connection_output_type** **(** :ref:`int<class_int>` idx **)**
|
||||
|
||||
Return the type of the output connection 'idx'.
|
||||
|
||||
.. _class_GraphNode_get_connection_output_color:
|
||||
|
||||
- :ref:`Color<class_color>` **get_connection_output_color** **(** :ref:`int<class_int>` idx **)**
|
||||
|
||||
Return the color of the output connection 'idx'.
|
||||
|
||||
.. _class_GraphNode_get_connection_input_pos:
|
||||
|
||||
- :ref:`Vector2<class_vector2>` **get_connection_input_pos** **(** :ref:`int<class_int>` idx **)**
|
||||
|
||||
Return the position of the input connection 'idx'.
|
||||
|
||||
.. _class_GraphNode_get_connection_input_type:
|
||||
|
||||
- :ref:`int<class_int>` **get_connection_input_type** **(** :ref:`int<class_int>` idx **)**
|
||||
|
||||
Return the type of the input connection 'idx'.
|
||||
|
||||
.. _class_GraphNode_get_connection_input_color:
|
||||
|
||||
- :ref:`Color<class_color>` **get_connection_input_color** **(** :ref:`int<class_int>` idx **)**
|
||||
|
||||
Return the color of the input connection 'idx'.
|
||||
|
||||
.. _class_GraphNode_set_show_close_button:
|
||||
|
||||
- void **set_show_close_button** **(** :ref:`bool<class_bool>` show **)**
|
||||
|
||||
Show the close button on the GraphNode if 'show' is true (disabled by default). If enabled, a connection on the signal close_request is needed for the close button to work.
|
||||
|
||||
.. _class_GraphNode_is_close_button_visible:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_close_button_visible** **(** **)** const
|
||||
|
||||
Returns true if the close button is shown. False otherwise.
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
.. _class_GridContainer:
|
||||
|
||||
GridContainer
|
||||
=============
|
||||
|
||||
Inherits: :ref:`Container<class_container>`
|
||||
-------------------------------------------
|
||||
|
||||
Category: Core
|
||||
--------------
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_columns<class_GridContainer_set_columns>` **(** :ref:`int<class_int>` columns **)** |
|
||||
+------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_columns<class_GridContainer_get_columns>` **(** **)** const |
|
||||
+------------------------+-------------------------------------------------------------------------------------------------+
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
.. _class_GridContainer_set_columns:
|
||||
|
||||
- void **set_columns** **(** :ref:`int<class_int>` columns **)**
|
||||
|
||||
.. _class_GridContainer_get_columns:
|
||||
|
||||
- :ref:`int<class_int>` **get_columns** **(** **)** const
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user