diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index bdad2dd16..0500ab328 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -341,7 +341,7 @@ Decodes a byte array back to a value. When ``allow_objects`` is ``true`` decodin - :ref:`Vector2` **cartesian2polar** **(** :ref:`float` x, :ref:`float` y **)** -Converts a 2D point expressed in the cartesian coordinate system (x and y axis) to the polar coordinate system (a distance from the origin and an angle). +Converts a 2D point expressed in the cartesian coordinate system (X and Y axis) to the polar coordinate system (a distance from the origin and an angle). .. _class_@GDScript_method_ceil: @@ -362,10 +362,8 @@ Returns a character as a String of the given ASCII code. :: - # a is 'A' - a = char(65) - # a is 'a' - a = char(65 + 32) + a = char(65) # a is "A" + a = char(65 + 32) # a is "a" .. _class_@GDScript_method_clamp: @@ -387,16 +385,15 @@ Clamps ``value`` and returns a value not less than ``min`` and not more than ``m - :ref:`Variant` **convert** **(** :ref:`Variant` what, :ref:`int` type **)** -Converts from a type to another in the best way possible. The ``type`` parameter uses the enum TYPE\_\* in :ref:`@GlobalScope`. +Converts from a type to another in the best way possible. The ``type`` parameter uses the enum ``TYPE_*`` in :ref:`@GlobalScope`. :: a = Vector2(1, 0) - # prints 1 + # Prints 1 print(a.length()) a = convert(a, TYPE_STRING) - # prints 6 - # (1, 0) is 6 characters + # Prints 6 as "(1, 0)" is 6 characters print(a.length()) .. _class_@GDScript_method_cos: @@ -407,7 +404,7 @@ Returns the cosine of angle ``s`` in radians. :: - # prints 1 and -1 + # Prints 1 then -1 print(cos(PI * 2)) print(cos(PI)) @@ -419,7 +416,7 @@ Returns the hyperbolic cosine of ``s`` in radians. :: - # prints 1.543081 + # Prints 1.543081 print(cosh(1)) .. _class_@GDScript_method_db2linear: @@ -432,7 +429,7 @@ Converts from decibels to linear energy (audio). - :ref:`int` **decimals** **(** :ref:`float` step **)** -Deprecated alias for ":ref:`step_decimals`". +Deprecated alias for :ref:`step_decimals`. .. _class_@GDScript_method_dectime: @@ -478,7 +475,7 @@ The natural exponential function. It raises the mathematical constant **e** to t :: - a = exp(2) # approximately 7.39 + a = exp(2) # Approximately 7.39 .. _class_@GDScript_method_floor: @@ -501,7 +498,7 @@ Returns the floating-point remainder of ``x/y``. :: - # remainder is 1.5 + # Remainder is 1.5 var remainder = fmod(7, 5.5) .. _class_@GDScript_method_fposmod: @@ -544,7 +541,7 @@ Returns a reference to the specified function ``funcname`` in the ``instance`` n return("bar") a = funcref(self, "foo") - print(a.call_func()) # prints bar + print(a.call_func()) # Prints bar .. _class_@GDScript_method_get_stack: @@ -577,7 +574,7 @@ Returns the integer hash of the variable passed. :: - print(hash("a")) # prints 177670 + print(hash("a")) # Prints 177670 .. _class_@GDScript_method_inst2dict: @@ -612,7 +609,7 @@ Returns the Object that corresponds to ``instance_id``. All Objects have a uniqu func _ready(): var id = get_instance_id() var inst = instance_from_id(id) - print(inst.foo) # prints bar + print(inst.foo) # Prints bar .. _class_@GDScript_method_inverse_lerp: @@ -622,7 +619,7 @@ Returns a normalized value considering the given range. :: - inverse_lerp(3, 5, 4) # returns 0.5 + inverse_lerp(3, 5, 4) # Returns 0.5 .. _class_@GDScript_method_is_equal_approx: @@ -665,7 +662,7 @@ Returns length of Variant ``var``. Length is the character count of String, elem :: a = [1, 2, 3, 4] - len(a) # returns 4 + len(a) # Returns 4 .. _class_@GDScript_method_lerp: @@ -679,8 +676,8 @@ If both are of the same vector type (:ref:`Vector2`, :ref:`Vector :: - lerp(0, 4, 0.75) # returns 3.0 - lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # returns Vector2(2, 3.5) + lerp(0, 4, 0.75) # Returns 3.0 + lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # Returns Vector2(2, 3.5) .. _class_@GDScript_method_linear2db: @@ -694,11 +691,11 @@ Converts from linear energy to decibels (audio). Loads a resource from the filesystem located at ``path``. -**Note:** Resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path". +**Note:** Resource paths can be obtained by right-clicking on a resource in the FileSystem dock and choosing **Copy Path**. :: - # load a scene called main located in the root of the project directory + # Load a scene called main located in the root of the project directory var main = load("res://main.tscn") .. _class_@GDScript_method_log: @@ -707,11 +704,11 @@ Loads a resource from the filesystem located at ``path``. Natural logarithm. The amount of time needed to reach a certain level of continuous growth. -**Note:** This is not the same as the log function on your calculator which is a base 10 logarithm. +**Note:** This is not the same as the "log" function on most calculators, which uses a base 10 logarithm. :: - log(10) # returns 2.302585 + log(10) # Returns 2.302585 .. _class_@GDScript_method_max: @@ -721,8 +718,8 @@ Returns the maximum of two values. :: - max(1, 2) # returns 2 - max(-3.99, -4) # returns -3.99 + max(1, 2) # Returns 2 + max(-3.99, -4) # Returns -3.99 .. _class_@GDScript_method_min: @@ -732,8 +729,8 @@ Returns the minimum of two values. :: - min(1, 2) # returns 1 - min(-3.99, -4) # returns -4 + min(1, 2) # Returns 1 + min(-3.99, -4) # Returns -4 .. _class_@GDScript_method_move_toward: @@ -745,7 +742,7 @@ Use a negative ``delta`` value to move away. :: - move_toward(10, 5, 4) # returns 6 + move_toward(10, 5, 4) # Returns 6 .. _class_@GDScript_method_nearest_po2: @@ -755,9 +752,9 @@ Returns the nearest larger power of 2 for integer ``value``. :: - nearest_po2(3) # returns 4 - nearest_po2(4) # returns 4 - nearest_po2(5) # returns 8 + nearest_po2(3) # Returns 4 + nearest_po2(4) # Returns 4 + nearest_po2(5) # Returns 8 .. _class_@GDScript_method_parse_json: @@ -773,7 +770,7 @@ Note that JSON objects do not preserve key order like Godot dictionaries, thus y p = parse_json('["a", "b", "c"]') if typeof(p) == TYPE_ARRAY: - print(p[0]) # prints a + print(p[0]) # Prints a else: print("unexpected results") @@ -781,7 +778,7 @@ Note that JSON objects do not preserve key order like Godot dictionaries, thus y - :ref:`Vector2` **polar2cartesian** **(** :ref:`float` r, :ref:`float` th **)** -Converts a 2D point expressed in the polar coordinate system (a distance from the origin ``r`` and an angle ``th``) to the cartesian coordinate system (x and y axis). +Converts a 2D point expressed in the polar coordinate system (a distance from the origin ``r`` and an angle ``th``) to the cartesian coordinate system (X and Y axis). .. _class_@GDScript_method_pow: @@ -791,7 +788,7 @@ Returns the result of ``x`` raised to the power of ``y``. :: - pow(2, 5) # returns 32 + pow(2, 5) # Returns 32 .. _class_@GDScript_method_preload: @@ -803,7 +800,7 @@ Returns a resource from the filesystem that is loaded during script parsing. :: - # load a scene called main located in the root of the project directory + # Load a scene called main located in the root of the project directory var main = preload("res://main.tscn") .. _class_@GDScript_method_print: @@ -815,7 +812,7 @@ Converts one or more arguments to strings in the best way possible and prints th :: a = [1, 2, 3] - print("a", "b", a) # prints ab[1, 2, 3] + print("a", "b", a) # Prints ab[1, 2, 3] .. _class_@GDScript_method_print_debug: @@ -855,7 +852,7 @@ Prints one or more arguments to strings in the best way possible to console. No printraw("A") printraw("B") - # prints AB + # Prints AB .. _class_@GDScript_method_prints: @@ -865,7 +862,7 @@ Prints one or more arguments to the console with a space between each argument. :: - prints("A", "B", "C") # prints A B C + prints("A", "B", "C") # Prints A B C .. _class_@GDScript_method_printt: @@ -875,7 +872,7 @@ Prints one or more arguments to the console with a tab between each argument. :: - printt("A", "B", "C") # prints A B C + printt("A", "B", "C") # Prints A B C .. _class_@GDScript_method_push_error: @@ -885,7 +882,7 @@ Pushes an error message to Godot's built-in debugger and to the OS terminal. :: - push_error("test error") # prints "test error" to debugger and terminal as error call + push_error("test error") # Prints "test error" to debugger and terminal as error call .. _class_@GDScript_method_push_warning: @@ -895,7 +892,7 @@ Pushes a warning message to Godot's built-in debugger and to the OS terminal. :: - push_warning("test warning") # prints "test warning" to debugger and terminal as warning call + push_warning("test warning") # Prints "test warning" to debugger and terminal as warning call .. _class_@GDScript_method_rad2deg: @@ -905,7 +902,7 @@ Converts from radians to degrees. :: - rad2deg(0.523599) # returns 30 + rad2deg(0.523599) # Returns 30 .. _class_@GDScript_method_rand_range: @@ -915,7 +912,7 @@ Random range, any floating point value between ``from`` and ``to``. :: - prints(rand_range(0, 1), rand_range(0, 1)) # prints e.g. 0.135591 0.405263 + prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263 .. _class_@GDScript_method_rand_seed: @@ -931,7 +928,7 @@ Returns a random floating point value on the interval ``[0, 1]``. :: - randf() # returns e.g. 0.375671 + randf() # Returns e.g. 0.375671 .. _class_@GDScript_method_randi: @@ -941,10 +938,10 @@ Returns a random unsigned 32 bit integer. Use remainder to obtain a random value :: - randi() # returns random integer between 0 and 2^32 - 1 - randi() % 20 # returns random integer between 0 and 19 - randi() % 100 # returns random integer between 0 and 99 - randi() % 100 + 1 # returns random integer between 1 and 100 + randi() # Returns random integer between 0 and 2^32 - 1 + randi() % 20 # Returns random integer between 0 and 19 + randi() % 100 # Returns random integer between 0 and 99 + randi() % 100 + 1 # Returns random integer between 1 and 100 .. _class_@GDScript_method_randomize: @@ -997,7 +994,7 @@ Maps a ``value`` from range ``[istart, istop]`` to ``[ostart, ostop]``. :: - range_lerp(75, 0, 100, -1, 1) # returns 0.5 + range_lerp(75, 0, 100, -1, 1) # Returns 0.5 .. _class_@GDScript_method_round: @@ -1007,7 +1004,7 @@ Returns the integral value that is nearest to ``s``, with halfway cases rounded :: - round(2.6) # returns 3 + round(2.6) # Returns 3 .. _class_@GDScript_method_seed: @@ -1028,9 +1025,9 @@ Returns the sign of ``s``: -1 or 1. Returns 0 if ``s`` is 0. :: - sign(-6) # returns -1 - sign(0) # returns 0 - sign(6) # returns 1 + sign(-6) # Returns -1 + sign(0) # Returns 0 + sign(6) # Returns 1 .. _class_@GDScript_method_sin: @@ -1040,7 +1037,7 @@ Returns the sine of angle ``s`` in radians. :: - sin(0.523599) # returns 0.5 + sin(0.523599) # Returns 0.5 .. _class_@GDScript_method_sinh: @@ -1050,8 +1047,8 @@ Returns the hyperbolic sine of ``s``. :: - a = log(2.0) # returns 0.693147 - sinh(a) # returns 0.75 + a = log(2.0) # Returns 0.693147 + sinh(a) # Returns 0.75 .. _class_@GDScript_method_smoothstep: @@ -1061,9 +1058,9 @@ Returns a number smoothly interpolated between the ``from`` and ``to``, based on :: - smoothstep(0, 2, 0.5) # returns 0.15 - smoothstep(0, 2, 1.0) # returns 0.5 - smoothstep(0, 2, 2.0) # returns 1.0 + smoothstep(0, 2, 0.5) # Returns 0.15 + smoothstep(0, 2, 1.0) # Returns 0.5 + smoothstep(0, 2, 2.0) # Returns 1.0 .. _class_@GDScript_method_sqrt: @@ -1073,7 +1070,7 @@ Returns the square root of ``s``. :: - sqrt(9) # returns 3 + sqrt(9) # Returns 3 .. _class_@GDScript_method_step_decimals: @@ -1106,8 +1103,8 @@ Converts one or more arguments to string in the best way possible. var a = [10, 20, 30] var b = str(a); - len(a) # returns 3 - len(b) # returns 12 + len(a) # Returns 3 + len(b) # Returns 12 .. _class_@GDScript_method_str2var: @@ -1119,7 +1116,7 @@ Converts a formatted string that was returned by :ref:`var2str`. :: - type_exists("Sprite") # returns true - type_exists("Variant") # returns false + type_exists("Sprite") # Returns true + type_exists("Variant") # Returns false .. _class_@GDScript_method_typeof: - :ref:`int` **typeof** **(** :ref:`Variant` what **)** -Returns the internal type of the given Variant object, using the TYPE\_\* enum in :ref:`@GlobalScope`. +Returns the internal type of the given Variant object, using the ``TYPE_*`` enum in :ref:`@GlobalScope`. :: p = parse_json('["a", "b", "c"]') if typeof(p) == TYPE_ARRAY: - print(p[0]) # prints a + print(p[0]) # Prints a else: print("unexpected results") @@ -1208,7 +1205,7 @@ Converts a Variant ``var`` to a formatted string that can later be parsed using :: - a = { 'a': 1, 'b': 2 } + a = { "a": 1, "b": 2 } print(var2str(a)) prints @@ -1248,9 +1245,23 @@ Usable for creating loop-alike behavior or infinite surfaces. :: - # infinite loop between 0.0 and 0.99 + # Infinite loop between 0.0 and 0.99 f = wrapf(f + 0.1, 0.0, 1.0) +:: + + # Infinite rotation (in radians) + angle = wrapf(angle + 0.1, 0.0, TAU) + +**Note:** If you just want to wrap between 0.0 and ``n`` (where ``n`` is a positive floating-point value), it is better for performance to use the :ref:`fmod` method like ``fmod(number, n)``. + +``wrapf`` is more flexible than using the :ref:`fmod` approach by giving the user a simple control over the minimum value. It also fully supports negative numbers, e.g. + +:: + + # Infinite rotation (in radians) + angle = wrapf(angle + 0.1, -PI, PI) + .. _class_@GDScript_method_wrapi: - :ref:`int` **wrapi** **(** :ref:`int` value, :ref:`int` min, :ref:`int` max **)** @@ -1271,9 +1282,18 @@ Usable for creating loop-alike behavior or infinite surfaces. :: - # infinite loop between 0 and 9 + # Infinite loop between 0 and 9 frame = wrapi(frame + 1, 0, 10) +**Note:** If you just want to wrap between 0 and ``n`` (where ``n`` is a positive integer value), it is better for performance to use the modulo operator like ``number % n``. + +``wrapi`` is more flexible than using the modulo approach by giving the user a simple control over the minimum value. It also fully supports negative numbers, e.g. + +:: + + # result is -2 + var result = wrapi(-6, -5, -1) + .. _class_@GDScript_method_yield: - :ref:`GDScriptFunctionState` **yield** **(** :ref:`Object` object=null, :ref:`String` signal="" **)** diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 21581f373..37e84a960 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -80,13 +80,13 @@ Enumerations enum **Margin**: -- **MARGIN_LEFT** = **0** --- Left margin, used usually for :ref:`Control` or :ref:`StyleBox` derived classes. +- **MARGIN_LEFT** = **0** --- Left margin, usually used for :ref:`Control` or :ref:`StyleBox`-derived classes. -- **MARGIN_TOP** = **1** --- Top margin, used usually for :ref:`Control` or :ref:`StyleBox` derived classes. +- **MARGIN_TOP** = **1** --- Top margin, usually used for :ref:`Control` or :ref:`StyleBox`-derived classes. -- **MARGIN_RIGHT** = **2** --- Right margin, used usually for :ref:`Control` or :ref:`StyleBox` derived classes. +- **MARGIN_RIGHT** = **2** --- Right margin, usually used for :ref:`Control` or :ref:`StyleBox`-derived classes. -- **MARGIN_BOTTOM** = **3** --- Bottom margin, used usually for :ref:`Control` or :ref:`StyleBox` derived classes. +- **MARGIN_BOTTOM** = **3** --- Bottom margin, usually used for :ref:`Control` or :ref:`StyleBox`-derived classes. .. _enum_@GlobalScope_Corner: @@ -100,13 +100,13 @@ enum **Margin**: enum **Corner**: -- **CORNER_TOP_LEFT** = **0** +- **CORNER_TOP_LEFT** = **0** --- Top-left corner. -- **CORNER_TOP_RIGHT** = **1** +- **CORNER_TOP_RIGHT** = **1** --- Top-right corner. -- **CORNER_BOTTOM_RIGHT** = **2** +- **CORNER_BOTTOM_RIGHT** = **2** --- Bottom-right corner. -- **CORNER_BOTTOM_LEFT** = **3** +- **CORNER_BOTTOM_LEFT** = **3** --- Bottom-left corner. .. _enum_@GlobalScope_Orientation: @@ -116,9 +116,9 @@ enum **Corner**: enum **Orientation**: -- **VERTICAL** = **1** --- General vertical alignment, used usually for :ref:`Separator`, :ref:`ScrollBar`, :ref:`Slider`, etc. +- **VERTICAL** = **1** --- General vertical alignment, usually used for :ref:`Separator`, :ref:`ScrollBar`, :ref:`Slider`, etc. -- **HORIZONTAL** = **0** --- General horizontal alignment, used usually for :ref:`Separator`, :ref:`ScrollBar`, :ref:`Slider`, etc. +- **HORIZONTAL** = **0** --- General horizontal alignment, usually used for :ref:`Separator`, :ref:`ScrollBar`, :ref:`Slider`, etc. .. _enum_@GlobalScope_HAlign: @@ -640,489 +640,489 @@ enum **VAlign**: enum **KeyList**: -- **KEY_ESCAPE** = **16777217** --- Escape Key +- **KEY_ESCAPE** = **16777217** --- Escape key. -- **KEY_TAB** = **16777218** --- Tab Key +- **KEY_TAB** = **16777218** --- Tab key. -- **KEY_BACKTAB** = **16777219** --- Shift-Tab Key +- **KEY_BACKTAB** = **16777219** --- Shift+Tab key. -- **KEY_BACKSPACE** = **16777220** --- Backspace Key +- **KEY_BACKSPACE** = **16777220** --- Backspace key. -- **KEY_ENTER** = **16777221** --- Return Key (On Main Keyboard) +- **KEY_ENTER** = **16777221** --- Return key (on the main keyboard). -- **KEY_KP_ENTER** = **16777222** --- Enter Key (On Numpad) +- **KEY_KP_ENTER** = **16777222** --- Enter key on the numeric keypad. -- **KEY_INSERT** = **16777223** --- Insert Key +- **KEY_INSERT** = **16777223** --- Insert key. -- **KEY_DELETE** = **16777224** --- Delete Key +- **KEY_DELETE** = **16777224** --- Delete key. -- **KEY_PAUSE** = **16777225** --- Pause Key +- **KEY_PAUSE** = **16777225** --- Pause key. -- **KEY_PRINT** = **16777226** --- Printscreen Key +- **KEY_PRINT** = **16777226** --- Print Screen key. -- **KEY_SYSREQ** = **16777227** --- System Request Key +- **KEY_SYSREQ** = **16777227** --- System Request key. -- **KEY_CLEAR** = **16777228** --- Clear Key +- **KEY_CLEAR** = **16777228** --- Clear key. -- **KEY_HOME** = **16777229** --- Home Key +- **KEY_HOME** = **16777229** --- Home key. -- **KEY_END** = **16777230** --- End Key +- **KEY_END** = **16777230** --- End key. -- **KEY_LEFT** = **16777231** --- Left Arrow Key +- **KEY_LEFT** = **16777231** --- Left arrow key. -- **KEY_UP** = **16777232** --- Up Arrow Key +- **KEY_UP** = **16777232** --- Up arrow key. -- **KEY_RIGHT** = **16777233** --- Right Arrow Key +- **KEY_RIGHT** = **16777233** --- Right arrow key. -- **KEY_DOWN** = **16777234** --- Down Arrow Key +- **KEY_DOWN** = **16777234** --- Down arrow key. -- **KEY_PAGEUP** = **16777235** --- Pageup Key +- **KEY_PAGEUP** = **16777235** --- Page Up key. -- **KEY_PAGEDOWN** = **16777236** --- Pagedown Key +- **KEY_PAGEDOWN** = **16777236** --- Page Down key. -- **KEY_SHIFT** = **16777237** --- Shift Key +- **KEY_SHIFT** = **16777237** --- Shift key. -- **KEY_CONTROL** = **16777238** --- Control Key +- **KEY_CONTROL** = **16777238** --- Control key. -- **KEY_META** = **16777239** --- Meta Key +- **KEY_META** = **16777239** --- Meta key. -- **KEY_ALT** = **16777240** --- Alt Key +- **KEY_ALT** = **16777240** --- Alt key. -- **KEY_CAPSLOCK** = **16777241** --- Capslock Key +- **KEY_CAPSLOCK** = **16777241** --- Caps Lock key. -- **KEY_NUMLOCK** = **16777242** --- Numlock Key +- **KEY_NUMLOCK** = **16777242** --- Num Lock key. -- **KEY_SCROLLLOCK** = **16777243** --- Scrolllock Key +- **KEY_SCROLLLOCK** = **16777243** --- Scroll Lock key. -- **KEY_F1** = **16777244** --- F1 Key +- **KEY_F1** = **16777244** --- F1 key. -- **KEY_F2** = **16777245** --- F2 Key +- **KEY_F2** = **16777245** --- F2 key. -- **KEY_F3** = **16777246** --- F3 Key +- **KEY_F3** = **16777246** --- F3 key. -- **KEY_F4** = **16777247** --- F4 Key +- **KEY_F4** = **16777247** --- F4 key. -- **KEY_F5** = **16777248** --- F5 Key +- **KEY_F5** = **16777248** --- F5 key. -- **KEY_F6** = **16777249** --- F6 Key +- **KEY_F6** = **16777249** --- F6 key. -- **KEY_F7** = **16777250** --- F7 Key +- **KEY_F7** = **16777250** --- F7 key. -- **KEY_F8** = **16777251** --- F8 Key +- **KEY_F8** = **16777251** --- F8 key. -- **KEY_F9** = **16777252** --- F9 Key +- **KEY_F9** = **16777252** --- F9 key. -- **KEY_F10** = **16777253** --- F10 Key +- **KEY_F10** = **16777253** --- F10 key. -- **KEY_F11** = **16777254** --- F11 Key +- **KEY_F11** = **16777254** --- F11 key. -- **KEY_F12** = **16777255** --- F12 Key +- **KEY_F12** = **16777255** --- F12 key. -- **KEY_F13** = **16777256** --- F13 Key +- **KEY_F13** = **16777256** --- F13 key. -- **KEY_F14** = **16777257** --- F14 Key +- **KEY_F14** = **16777257** --- F14 key. -- **KEY_F15** = **16777258** --- F15 Key +- **KEY_F15** = **16777258** --- F15 key. -- **KEY_F16** = **16777259** --- F16 Key +- **KEY_F16** = **16777259** --- F16 key. -- **KEY_KP_MULTIPLY** = **16777345** --- Multiply Key on Numpad +- **KEY_KP_MULTIPLY** = **16777345** --- Multiply (\*) key on the numeric keypad. -- **KEY_KP_DIVIDE** = **16777346** --- Divide Key on Numpad +- **KEY_KP_DIVIDE** = **16777346** --- Divide (/) key on the numeric keypad. -- **KEY_KP_SUBTRACT** = **16777347** --- Subtract Key on Numpad +- **KEY_KP_SUBTRACT** = **16777347** --- Subtract (-) key on the numeric keypad. -- **KEY_KP_PERIOD** = **16777348** --- Period Key on Numpad +- **KEY_KP_PERIOD** = **16777348** --- Period (.) key on the numeric keypad. -- **KEY_KP_ADD** = **16777349** --- Add Key on Numpad +- **KEY_KP_ADD** = **16777349** --- Add (+) key on the numeric keypad. -- **KEY_KP_0** = **16777350** --- Number 0 on Numpad +- **KEY_KP_0** = **16777350** --- Number 0 on the numeric keypad. -- **KEY_KP_1** = **16777351** --- Number 1 on Numpad +- **KEY_KP_1** = **16777351** --- Number 1 on the numeric keypad. -- **KEY_KP_2** = **16777352** --- Number 2 on Numpad +- **KEY_KP_2** = **16777352** --- Number 2 on the numeric keypad. -- **KEY_KP_3** = **16777353** --- Number 3 on Numpad +- **KEY_KP_3** = **16777353** --- Number 3 on the numeric keypad. -- **KEY_KP_4** = **16777354** --- Number 4 on Numpad +- **KEY_KP_4** = **16777354** --- Number 4 on the numeric keypad. -- **KEY_KP_5** = **16777355** --- Number 5 on Numpad +- **KEY_KP_5** = **16777355** --- Number 5 on the numeric keypad. -- **KEY_KP_6** = **16777356** --- Number 6 on Numpad +- **KEY_KP_6** = **16777356** --- Number 6 on the numeric keypad. -- **KEY_KP_7** = **16777357** --- Number 7 on Numpad +- **KEY_KP_7** = **16777357** --- Number 7 on the numeric keypad. -- **KEY_KP_8** = **16777358** --- Number 8 on Numpad +- **KEY_KP_8** = **16777358** --- Number 8 on the numeric keypad. -- **KEY_KP_9** = **16777359** --- Number 9 on Numpad +- **KEY_KP_9** = **16777359** --- Number 9 on the numeric keypad. -- **KEY_SUPER_L** = **16777260** --- Left Super Key (Windows Key) +- **KEY_SUPER_L** = **16777260** --- Left Super key (Windows key). -- **KEY_SUPER_R** = **16777261** --- Right Super Key (Windows Key) +- **KEY_SUPER_R** = **16777261** --- Right Super key (Windows key). -- **KEY_MENU** = **16777262** --- Context menu key +- **KEY_MENU** = **16777262** --- Context menu key. -- **KEY_HYPER_L** = **16777263** --- Left Hyper Key +- **KEY_HYPER_L** = **16777263** --- Left Hyper key. -- **KEY_HYPER_R** = **16777264** --- Right Hyper Key +- **KEY_HYPER_R** = **16777264** --- Right Hyper key. -- **KEY_HELP** = **16777265** --- Help key +- **KEY_HELP** = **16777265** --- Help key. -- **KEY_DIRECTION_L** = **16777266** --- Left Direction Key +- **KEY_DIRECTION_L** = **16777266** --- Left Direction key. -- **KEY_DIRECTION_R** = **16777267** --- Right Direction Key +- **KEY_DIRECTION_R** = **16777267** --- Right Direction key. -- **KEY_BACK** = **16777280** --- Back key +- **KEY_BACK** = **16777280** --- Back key. -- **KEY_FORWARD** = **16777281** --- Forward key +- **KEY_FORWARD** = **16777281** --- Forward key. -- **KEY_STOP** = **16777282** --- Stop key +- **KEY_STOP** = **16777282** --- Stop key. -- **KEY_REFRESH** = **16777283** --- Refresh key +- **KEY_REFRESH** = **16777283** --- Refresh key. -- **KEY_VOLUMEDOWN** = **16777284** --- Volume down key +- **KEY_VOLUMEDOWN** = **16777284** --- Volume down key. -- **KEY_VOLUMEMUTE** = **16777285** --- Mute volume key +- **KEY_VOLUMEMUTE** = **16777285** --- Mute volume key. -- **KEY_VOLUMEUP** = **16777286** --- Volume up key +- **KEY_VOLUMEUP** = **16777286** --- Volume up key. -- **KEY_BASSBOOST** = **16777287** --- Bass Boost Key +- **KEY_BASSBOOST** = **16777287** --- Bass Boost key. -- **KEY_BASSUP** = **16777288** --- Bass Up Key +- **KEY_BASSUP** = **16777288** --- Bass up key. -- **KEY_BASSDOWN** = **16777289** --- Bass Down Key +- **KEY_BASSDOWN** = **16777289** --- Bass down key. -- **KEY_TREBLEUP** = **16777290** --- Treble Up Key +- **KEY_TREBLEUP** = **16777290** --- Treble up key. -- **KEY_TREBLEDOWN** = **16777291** --- Treble Down Key +- **KEY_TREBLEDOWN** = **16777291** --- Treble down key. -- **KEY_MEDIAPLAY** = **16777292** --- Media play key +- **KEY_MEDIAPLAY** = **16777292** --- Media play key. -- **KEY_MEDIASTOP** = **16777293** --- Media stop key +- **KEY_MEDIASTOP** = **16777293** --- Media stop key. -- **KEY_MEDIAPREVIOUS** = **16777294** --- Previous song key +- **KEY_MEDIAPREVIOUS** = **16777294** --- Previous song key. -- **KEY_MEDIANEXT** = **16777295** --- Next song key +- **KEY_MEDIANEXT** = **16777295** --- Next song key. -- **KEY_MEDIARECORD** = **16777296** --- Media record key +- **KEY_MEDIARECORD** = **16777296** --- Media record key. -- **KEY_HOMEPAGE** = **16777297** --- Home page key +- **KEY_HOMEPAGE** = **16777297** --- Home page key. -- **KEY_FAVORITES** = **16777298** --- Favorites key +- **KEY_FAVORITES** = **16777298** --- Favorites key. -- **KEY_SEARCH** = **16777299** --- Search key +- **KEY_SEARCH** = **16777299** --- Search key. -- **KEY_STANDBY** = **16777300** --- Standby Key +- **KEY_STANDBY** = **16777300** --- Standby key. -- **KEY_OPENURL** = **16777301** --- Open URL / Launch Browser Key +- **KEY_OPENURL** = **16777301** --- Open URL / Launch Browser key. -- **KEY_LAUNCHMAIL** = **16777302** --- Launch Mail Key +- **KEY_LAUNCHMAIL** = **16777302** --- Launch Mail key. -- **KEY_LAUNCHMEDIA** = **16777303** --- Launch Media Key +- **KEY_LAUNCHMEDIA** = **16777303** --- Launch Media key. -- **KEY_LAUNCH0** = **16777304** --- Launch Shortcut 0 Key +- **KEY_LAUNCH0** = **16777304** --- Launch Shortcut 0 key. -- **KEY_LAUNCH1** = **16777305** --- Launch Shortcut 1 Key +- **KEY_LAUNCH1** = **16777305** --- Launch Shortcut 1 key. -- **KEY_LAUNCH2** = **16777306** --- Launch Shortcut 2 Key +- **KEY_LAUNCH2** = **16777306** --- Launch Shortcut 2 key. -- **KEY_LAUNCH3** = **16777307** --- Launch Shortcut 3 Key +- **KEY_LAUNCH3** = **16777307** --- Launch Shortcut 3 key. -- **KEY_LAUNCH4** = **16777308** --- Launch Shortcut 4 Key +- **KEY_LAUNCH4** = **16777308** --- Launch Shortcut 4 key. -- **KEY_LAUNCH5** = **16777309** --- Launch Shortcut 5 Key +- **KEY_LAUNCH5** = **16777309** --- Launch Shortcut 5 key. -- **KEY_LAUNCH6** = **16777310** --- Launch Shortcut 6 Key +- **KEY_LAUNCH6** = **16777310** --- Launch Shortcut 6 key. -- **KEY_LAUNCH7** = **16777311** --- Launch Shortcut 7 Key +- **KEY_LAUNCH7** = **16777311** --- Launch Shortcut 7 key. -- **KEY_LAUNCH8** = **16777312** --- Launch Shortcut 8 Key +- **KEY_LAUNCH8** = **16777312** --- Launch Shortcut 8 key. -- **KEY_LAUNCH9** = **16777313** --- Launch Shortcut 9 Key +- **KEY_LAUNCH9** = **16777313** --- Launch Shortcut 9 key. -- **KEY_LAUNCHA** = **16777314** --- Launch Shortcut A Key +- **KEY_LAUNCHA** = **16777314** --- Launch Shortcut A key. -- **KEY_LAUNCHB** = **16777315** --- Launch Shortcut B Key +- **KEY_LAUNCHB** = **16777315** --- Launch Shortcut B key. -- **KEY_LAUNCHC** = **16777316** --- Launch Shortcut C Key +- **KEY_LAUNCHC** = **16777316** --- Launch Shortcut C key. -- **KEY_LAUNCHD** = **16777317** --- Launch Shortcut D Key +- **KEY_LAUNCHD** = **16777317** --- Launch Shortcut D key. -- **KEY_LAUNCHE** = **16777318** --- Launch Shortcut E Key +- **KEY_LAUNCHE** = **16777318** --- Launch Shortcut E key. -- **KEY_LAUNCHF** = **16777319** --- Launch Shortcut F Key +- **KEY_LAUNCHF** = **16777319** --- Launch Shortcut F key. -- **KEY_UNKNOWN** = **33554431** --- Unknown Key +- **KEY_UNKNOWN** = **33554431** --- Unknown key. -- **KEY_SPACE** = **32** --- Space Key +- **KEY_SPACE** = **32** --- Space key. -- **KEY_EXCLAM** = **33** --- ! key +- **KEY_EXCLAM** = **33** --- ! key. -- **KEY_QUOTEDBL** = **34** --- " key +- **KEY_QUOTEDBL** = **34** --- " key. -- **KEY_NUMBERSIGN** = **35** --- # key +- **KEY_NUMBERSIGN** = **35** --- # key. -- **KEY_DOLLAR** = **36** --- $ key +- **KEY_DOLLAR** = **36** --- $ key. -- **KEY_PERCENT** = **37** --- % key +- **KEY_PERCENT** = **37** --- % key. -- **KEY_AMPERSAND** = **38** --- & key +- **KEY_AMPERSAND** = **38** --- & key. -- **KEY_APOSTROPHE** = **39** --- ' key +- **KEY_APOSTROPHE** = **39** --- ' key. -- **KEY_PARENLEFT** = **40** --- ( key +- **KEY_PARENLEFT** = **40** --- ( key. -- **KEY_PARENRIGHT** = **41** --- ) key +- **KEY_PARENRIGHT** = **41** --- ) key. -- **KEY_ASTERISK** = **42** --- \* key +- **KEY_ASTERISK** = **42** --- \* key. -- **KEY_PLUS** = **43** --- + key +- **KEY_PLUS** = **43** --- + key. -- **KEY_COMMA** = **44** --- , key +- **KEY_COMMA** = **44** --- , key. -- **KEY_MINUS** = **45** --- - key +- **KEY_MINUS** = **45** --- - key. -- **KEY_PERIOD** = **46** --- . key +- **KEY_PERIOD** = **46** --- . key. -- **KEY_SLASH** = **47** --- / key +- **KEY_SLASH** = **47** --- / key. -- **KEY_0** = **48** --- Number 0 +- **KEY_0** = **48** --- Number 0. -- **KEY_1** = **49** --- Number 1 +- **KEY_1** = **49** --- Number 1. -- **KEY_2** = **50** --- Number 2 +- **KEY_2** = **50** --- Number 2. -- **KEY_3** = **51** --- Number 3 +- **KEY_3** = **51** --- Number 3. -- **KEY_4** = **52** --- Number 4 +- **KEY_4** = **52** --- Number 4. -- **KEY_5** = **53** --- Number 5 +- **KEY_5** = **53** --- Number 5. -- **KEY_6** = **54** --- Number 6 +- **KEY_6** = **54** --- Number 6. -- **KEY_7** = **55** --- Number 7 +- **KEY_7** = **55** --- Number 7. -- **KEY_8** = **56** --- Number 8 +- **KEY_8** = **56** --- Number 8. -- **KEY_9** = **57** --- Number 9 +- **KEY_9** = **57** --- Number 9. -- **KEY_COLON** = **58** --- : key +- **KEY_COLON** = **58** --- : key. -- **KEY_SEMICOLON** = **59** --- ; key +- **KEY_SEMICOLON** = **59** --- ; key. -- **KEY_LESS** = **60** --- Lower than key +- **KEY_LESS** = **60** --- < key. -- **KEY_EQUAL** = **61** --- = key +- **KEY_EQUAL** = **61** --- = key. -- **KEY_GREATER** = **62** --- Greater than key +- **KEY_GREATER** = **62** --- > key. -- **KEY_QUESTION** = **63** --- ? key +- **KEY_QUESTION** = **63** --- ? key. -- **KEY_AT** = **64** --- @ key +- **KEY_AT** = **64** --- @ key. -- **KEY_A** = **65** --- A Key +- **KEY_A** = **65** --- A key. -- **KEY_B** = **66** --- B Key +- **KEY_B** = **66** --- B key. -- **KEY_C** = **67** --- C Key +- **KEY_C** = **67** --- C key. -- **KEY_D** = **68** --- D Key +- **KEY_D** = **68** --- D key. -- **KEY_E** = **69** --- E Key +- **KEY_E** = **69** --- E key. -- **KEY_F** = **70** --- F Key +- **KEY_F** = **70** --- F key. -- **KEY_G** = **71** --- G Key +- **KEY_G** = **71** --- G key. -- **KEY_H** = **72** --- H Key +- **KEY_H** = **72** --- H key. -- **KEY_I** = **73** --- I Key +- **KEY_I** = **73** --- I key. -- **KEY_J** = **74** --- J Key +- **KEY_J** = **74** --- J key. -- **KEY_K** = **75** --- K Key +- **KEY_K** = **75** --- K key. -- **KEY_L** = **76** --- L Key +- **KEY_L** = **76** --- L key. -- **KEY_M** = **77** --- M Key +- **KEY_M** = **77** --- M key. -- **KEY_N** = **78** --- N Key +- **KEY_N** = **78** --- N key. -- **KEY_O** = **79** --- O Key +- **KEY_O** = **79** --- O key. -- **KEY_P** = **80** --- P Key +- **KEY_P** = **80** --- P key. -- **KEY_Q** = **81** --- Q Key +- **KEY_Q** = **81** --- Q key. -- **KEY_R** = **82** --- R Key +- **KEY_R** = **82** --- R key. -- **KEY_S** = **83** --- S Key +- **KEY_S** = **83** --- S key. -- **KEY_T** = **84** --- T Key +- **KEY_T** = **84** --- T key. -- **KEY_U** = **85** --- U Key +- **KEY_U** = **85** --- U key. -- **KEY_V** = **86** --- V Key +- **KEY_V** = **86** --- V key. -- **KEY_W** = **87** --- W Key +- **KEY_W** = **87** --- W key. -- **KEY_X** = **88** --- X Key +- **KEY_X** = **88** --- X key. -- **KEY_Y** = **89** --- Y Key +- **KEY_Y** = **89** --- Y key. -- **KEY_Z** = **90** --- Z Key +- **KEY_Z** = **90** --- Z key. -- **KEY_BRACKETLEFT** = **91** --- [ key +- **KEY_BRACKETLEFT** = **91** --- [ key. -- **KEY_BACKSLASH** = **92** --- \\ key +- **KEY_BACKSLASH** = **92** --- \\ key. -- **KEY_BRACKETRIGHT** = **93** --- ] key +- **KEY_BRACKETRIGHT** = **93** --- ] key. -- **KEY_ASCIICIRCUM** = **94** --- ^ key +- **KEY_ASCIICIRCUM** = **94** --- ^ key. -- **KEY_UNDERSCORE** = **95** --- \_ key +- **KEY_UNDERSCORE** = **95** --- \_ key. -- **KEY_QUOTELEFT** = **96** --- Left Quote Key +- **KEY_QUOTELEFT** = **96** --- Left Quote key. -- **KEY_BRACELEFT** = **123** --- { key +- **KEY_BRACELEFT** = **123** --- { key. -- **KEY_BAR** = **124** --- | key +- **KEY_BAR** = **124** --- | key. -- **KEY_BRACERIGHT** = **125** --- } key +- **KEY_BRACERIGHT** = **125** --- } key. -- **KEY_ASCIITILDE** = **126** --- ~ key +- **KEY_ASCIITILDE** = **126** --- ~ key. -- **KEY_NOBREAKSPACE** = **160** +- **KEY_NOBREAKSPACE** = **160** --- Non-breakable space key. -- **KEY_EXCLAMDOWN** = **161** +- **KEY_EXCLAMDOWN** = **161** --- ¡ key. -- **KEY_CENT** = **162** --- ¢ key +- **KEY_CENT** = **162** --- ¢ key. -- **KEY_STERLING** = **163** +- **KEY_STERLING** = **163** --- £ key. - **KEY_CURRENCY** = **164** -- **KEY_YEN** = **165** --- Yen Key +- **KEY_YEN** = **165** --- Yen key. -- **KEY_BROKENBAR** = **166** --- ¦ key +- **KEY_BROKENBAR** = **166** --- ¦ key. -- **KEY_SECTION** = **167** --- § key +- **KEY_SECTION** = **167** --- § key. -- **KEY_DIAERESIS** = **168** --- ¨ key +- **KEY_DIAERESIS** = **168** --- ¨ key. -- **KEY_COPYRIGHT** = **169** --- © key +- **KEY_COPYRIGHT** = **169** --- © key. - **KEY_ORDFEMININE** = **170** -- **KEY_GUILLEMOTLEFT** = **171** --- « key +- **KEY_GUILLEMOTLEFT** = **171** --- « key. -- **KEY_NOTSIGN** = **172** --- » key +- **KEY_NOTSIGN** = **172** --- » key. -- **KEY_HYPHEN** = **173** --- ‐ key +- **KEY_HYPHEN** = **173** --- ‐ key. -- **KEY_REGISTERED** = **174** --- ® key +- **KEY_REGISTERED** = **174** --- ® key. -- **KEY_MACRON** = **175** --- Macron Key +- **KEY_MACRON** = **175** --- Macron key. -- **KEY_DEGREE** = **176** --- ° key +- **KEY_DEGREE** = **176** --- ° key. -- **KEY_PLUSMINUS** = **177** --- ± key +- **KEY_PLUSMINUS** = **177** --- ± key. -- **KEY_TWOSUPERIOR** = **178** --- ² key +- **KEY_TWOSUPERIOR** = **178** --- ² key. -- **KEY_THREESUPERIOR** = **179** --- ³ key +- **KEY_THREESUPERIOR** = **179** --- ³ key. -- **KEY_ACUTE** = **180** --- ´ key +- **KEY_ACUTE** = **180** --- ´ key. -- **KEY_MU** = **181** --- µ key +- **KEY_MU** = **181** --- µ key. -- **KEY_PARAGRAPH** = **182** --- Paragraph Key +- **KEY_PARAGRAPH** = **182** --- § key. -- **KEY_PERIODCENTERED** = **183** --- · key +- **KEY_PERIODCENTERED** = **183** --- · key. -- **KEY_CEDILLA** = **184** --- ¬ key +- **KEY_CEDILLA** = **184** --- ¬ key. -- **KEY_ONESUPERIOR** = **185** --- ¹ key +- **KEY_ONESUPERIOR** = **185** --- ¹ key. -- **KEY_MASCULINE** = **186** --- ♂ key +- **KEY_MASCULINE** = **186** --- ♂ key. -- **KEY_GUILLEMOTRIGHT** = **187** --- » key +- **KEY_GUILLEMOTRIGHT** = **187** --- » key. -- **KEY_ONEQUARTER** = **188** --- ¼ key +- **KEY_ONEQUARTER** = **188** --- ¼ key. -- **KEY_ONEHALF** = **189** --- ½ key +- **KEY_ONEHALF** = **189** --- ½ key. -- **KEY_THREEQUARTERS** = **190** --- ¾ key +- **KEY_THREEQUARTERS** = **190** --- ¾ key. -- **KEY_QUESTIONDOWN** = **191** --- ¿ key +- **KEY_QUESTIONDOWN** = **191** --- ¿ key. -- **KEY_AGRAVE** = **192** --- à key +- **KEY_AGRAVE** = **192** --- à key. -- **KEY_AACUTE** = **193** --- á key +- **KEY_AACUTE** = **193** --- á key. -- **KEY_ACIRCUMFLEX** = **194** --- â key +- **KEY_ACIRCUMFLEX** = **194** --- â key. -- **KEY_ATILDE** = **195** --- ã key +- **KEY_ATILDE** = **195** --- ã key. -- **KEY_ADIAERESIS** = **196** --- ä key +- **KEY_ADIAERESIS** = **196** --- ä key. -- **KEY_ARING** = **197** --- å key +- **KEY_ARING** = **197** --- å key. -- **KEY_AE** = **198** --- æ key +- **KEY_AE** = **198** --- æ key. -- **KEY_CCEDILLA** = **199** --- ç key +- **KEY_CCEDILLA** = **199** --- ç key. -- **KEY_EGRAVE** = **200** --- è key +- **KEY_EGRAVE** = **200** --- è key. -- **KEY_EACUTE** = **201** --- é key +- **KEY_EACUTE** = **201** --- é key. -- **KEY_ECIRCUMFLEX** = **202** --- ê key +- **KEY_ECIRCUMFLEX** = **202** --- ê key. -- **KEY_EDIAERESIS** = **203** --- ë key +- **KEY_EDIAERESIS** = **203** --- ë key. -- **KEY_IGRAVE** = **204** --- ì key +- **KEY_IGRAVE** = **204** --- ì key. -- **KEY_IACUTE** = **205** --- í key +- **KEY_IACUTE** = **205** --- í key. -- **KEY_ICIRCUMFLEX** = **206** --- î key +- **KEY_ICIRCUMFLEX** = **206** --- î key. -- **KEY_IDIAERESIS** = **207** --- ë key +- **KEY_IDIAERESIS** = **207** --- ë key. -- **KEY_ETH** = **208** --- ð key +- **KEY_ETH** = **208** --- ð key. -- **KEY_NTILDE** = **209** --- ñ key +- **KEY_NTILDE** = **209** --- ñ key. -- **KEY_OGRAVE** = **210** --- ò key +- **KEY_OGRAVE** = **210** --- ò key. -- **KEY_OACUTE** = **211** --- ó key +- **KEY_OACUTE** = **211** --- ó key. -- **KEY_OCIRCUMFLEX** = **212** --- ô key +- **KEY_OCIRCUMFLEX** = **212** --- ô key. -- **KEY_OTILDE** = **213** --- õ key +- **KEY_OTILDE** = **213** --- õ key. -- **KEY_ODIAERESIS** = **214** --- ö key +- **KEY_ODIAERESIS** = **214** --- ö key. -- **KEY_MULTIPLY** = **215** --- × key +- **KEY_MULTIPLY** = **215** --- × key. -- **KEY_OOBLIQUE** = **216** --- ø key +- **KEY_OOBLIQUE** = **216** --- ø key. -- **KEY_UGRAVE** = **217** --- ù key +- **KEY_UGRAVE** = **217** --- ù key. -- **KEY_UACUTE** = **218** --- ú key +- **KEY_UACUTE** = **218** --- ú key. -- **KEY_UCIRCUMFLEX** = **219** --- û key +- **KEY_UCIRCUMFLEX** = **219** --- û key. -- **KEY_UDIAERESIS** = **220** --- ü key +- **KEY_UDIAERESIS** = **220** --- ü key. -- **KEY_YACUTE** = **221** --- ý key +- **KEY_YACUTE** = **221** --- ý key. -- **KEY_THORN** = **222** --- þ key +- **KEY_THORN** = **222** --- þ key. -- **KEY_SSHARP** = **223** --- ß key +- **KEY_SSHARP** = **223** --- ß key. -- **KEY_DIVISION** = **247** --- ÷ key +- **KEY_DIVISION** = **247** --- ÷ key. -- **KEY_YDIAERESIS** = **255** --- ÿ key +- **KEY_YDIAERESIS** = **255** --- ÿ key. .. _enum_@GlobalScope_KeyModifierMask: @@ -1146,23 +1146,23 @@ enum **KeyList**: enum **KeyModifierMask**: -- **KEY_CODE_MASK** = **33554431** --- Key Code Mask +- **KEY_CODE_MASK** = **33554431** --- Key Code mask. -- **KEY_MODIFIER_MASK** = **-16777216** --- Modifier Key Mask +- **KEY_MODIFIER_MASK** = **-16777216** --- Modifier key mask. -- **KEY_MASK_SHIFT** = **33554432** --- Shift Key Mask +- **KEY_MASK_SHIFT** = **33554432** --- Shift key mask. -- **KEY_MASK_ALT** = **67108864** --- Alt Key Mask +- **KEY_MASK_ALT** = **67108864** --- Alt key mask. -- **KEY_MASK_META** = **134217728** --- Meta Key Mask +- **KEY_MASK_META** = **134217728** --- Meta key mask. -- **KEY_MASK_CTRL** = **268435456** --- CTRL Key Mask +- **KEY_MASK_CTRL** = **268435456** --- Ctrl key mask. -- **KEY_MASK_CMD** = **268435456** --- CMD Key Mask +- **KEY_MASK_CMD** = **268435456** --- Cmd key mask. -- **KEY_MASK_KPAD** = **536870912** --- Keypad Key Mask +- **KEY_MASK_KPAD** = **536870912** --- Keypad key mask. -- **KEY_MASK_GROUP_SWITCH** = **1073741824** --- Group Switch Key Mask +- **KEY_MASK_GROUP_SWITCH** = **1073741824** --- Group Switch key mask. .. _enum_@GlobalScope_ButtonList: @@ -1196,33 +1196,33 @@ enum **KeyModifierMask**: enum **ButtonList**: -- **BUTTON_LEFT** = **1** --- Left Mouse Button +- **BUTTON_LEFT** = **1** --- Left mouse button. -- **BUTTON_RIGHT** = **2** --- Right Mouse Button +- **BUTTON_RIGHT** = **2** --- Right mouse button. -- **BUTTON_MIDDLE** = **3** --- Middle Mouse Button +- **BUTTON_MIDDLE** = **3** --- Middle mouse button. -- **BUTTON_XBUTTON1** = **8** --- Extra Mouse Button 1 +- **BUTTON_XBUTTON1** = **8** --- Extra mouse button 1 (only present on some mice). -- **BUTTON_XBUTTON2** = **9** --- Extra Mouse Button 2 +- **BUTTON_XBUTTON2** = **9** --- Extra mouse button 2 (only present on some mice). -- **BUTTON_WHEEL_UP** = **4** --- Mouse wheel up +- **BUTTON_WHEEL_UP** = **4** --- Mouse wheel up. -- **BUTTON_WHEEL_DOWN** = **5** --- Mouse wheel down +- **BUTTON_WHEEL_DOWN** = **5** --- Mouse wheel down. -- **BUTTON_WHEEL_LEFT** = **6** --- Mouse wheel left button +- **BUTTON_WHEEL_LEFT** = **6** --- Mouse wheel left button (only present on some mice). -- **BUTTON_WHEEL_RIGHT** = **7** --- Mouse wheel right button +- **BUTTON_WHEEL_RIGHT** = **7** --- Mouse wheel right button (only present on some mice). -- **BUTTON_MASK_LEFT** = **1** --- Left Mouse Button Mask +- **BUTTON_MASK_LEFT** = **1** --- Left mouse button mask. -- **BUTTON_MASK_RIGHT** = **2** --- Right Mouse Button Mask +- **BUTTON_MASK_RIGHT** = **2** --- Right mouse button mask. -- **BUTTON_MASK_MIDDLE** = **4** --- Middle Mouse Button Mask +- **BUTTON_MASK_MIDDLE** = **4** --- Middle mouse button mask. -- **BUTTON_MASK_XBUTTON1** = **128** --- Extra Mouse Button 1 Mask +- **BUTTON_MASK_XBUTTON1** = **128** --- Extra mouse button 1 mask. -- **BUTTON_MASK_XBUTTON2** = **256** --- Extra Mouse Button 2 Mask +- **BUTTON_MASK_XBUTTON2** = **256** --- Extra mouse button 2 mask. .. _enum_@GlobalScope_JoystickList: @@ -1366,143 +1366,143 @@ enum **ButtonList**: enum **JoystickList**: -- **JOY_BUTTON_0** = **0** --- Joypad Button 0 +- **JOY_BUTTON_0** = **0** --- Gamepad button 0. -- **JOY_BUTTON_1** = **1** --- Joypad Button 1 +- **JOY_BUTTON_1** = **1** --- Gamepad button 1. -- **JOY_BUTTON_2** = **2** --- Joypad Button 2 +- **JOY_BUTTON_2** = **2** --- Gamepad button 2. -- **JOY_BUTTON_3** = **3** --- Joypad Button 3 +- **JOY_BUTTON_3** = **3** --- Gamepad button 3. -- **JOY_BUTTON_4** = **4** --- Joypad Button 4 +- **JOY_BUTTON_4** = **4** --- Gamepad button 4. -- **JOY_BUTTON_5** = **5** --- Joypad Button 5 +- **JOY_BUTTON_5** = **5** --- Gamepad button 5. -- **JOY_BUTTON_6** = **6** --- Joypad Button 6 +- **JOY_BUTTON_6** = **6** --- Gamepad button 6. -- **JOY_BUTTON_7** = **7** --- Joypad Button 7 +- **JOY_BUTTON_7** = **7** --- Gamepad button 7. -- **JOY_BUTTON_8** = **8** --- Joypad Button 8 +- **JOY_BUTTON_8** = **8** --- Gamepad button 8. -- **JOY_BUTTON_9** = **9** --- Joypad Button 9 +- **JOY_BUTTON_9** = **9** --- Gamepad button 9. -- **JOY_BUTTON_10** = **10** --- Joypad Button 10 +- **JOY_BUTTON_10** = **10** --- Gamepad button 10. -- **JOY_BUTTON_11** = **11** --- Joypad Button 11 +- **JOY_BUTTON_11** = **11** --- Gamepad button 11. -- **JOY_BUTTON_12** = **12** --- Joypad Button 12 +- **JOY_BUTTON_12** = **12** --- Gamepad button 12. -- **JOY_BUTTON_13** = **13** --- Joypad Button 13 +- **JOY_BUTTON_13** = **13** --- Gamepad button 13. -- **JOY_BUTTON_14** = **14** --- Joypad Button 14 +- **JOY_BUTTON_14** = **14** --- Gamepad button 14. -- **JOY_BUTTON_15** = **15** --- Joypad Button 15 +- **JOY_BUTTON_15** = **15** --- Gamepad button 15. -- **JOY_BUTTON_MAX** = **16** --- Joypad Button 16 +- **JOY_BUTTON_MAX** = **16** --- Represents the maximum number of joystick buttons supported. -- **JOY_SONY_CIRCLE** = **1** --- DUALSHOCK circle button +- **JOY_SONY_CIRCLE** = **1** --- DualShock circle button. -- **JOY_SONY_X** = **0** --- DUALSHOCK X button +- **JOY_SONY_X** = **0** --- DualShock X button. -- **JOY_SONY_SQUARE** = **2** --- DUALSHOCK square button +- **JOY_SONY_SQUARE** = **2** --- DualShock square button. -- **JOY_SONY_TRIANGLE** = **3** --- DUALSHOCK triangle button +- **JOY_SONY_TRIANGLE** = **3** --- DualShock triangle button. -- **JOY_XBOX_B** = **1** --- XBOX controller B button +- **JOY_XBOX_B** = **1** --- Xbox controller B button. -- **JOY_XBOX_A** = **0** --- XBOX controller A button +- **JOY_XBOX_A** = **0** --- Xbox controller A button. -- **JOY_XBOX_X** = **2** --- XBOX controller X button +- **JOY_XBOX_X** = **2** --- Xbox controller X button. -- **JOY_XBOX_Y** = **3** --- XBOX controller Y button +- **JOY_XBOX_Y** = **3** --- Xbox controller Y button. -- **JOY_DS_A** = **1** --- DualShock controller A button +- **JOY_DS_A** = **1** --- DualShock controller A button. -- **JOY_DS_B** = **0** --- DualShock controller B button +- **JOY_DS_B** = **0** --- DualShock controller B button. -- **JOY_DS_X** = **3** --- DualShock controller X button +- **JOY_DS_X** = **3** --- DualShock controller X button. -- **JOY_DS_Y** = **2** --- DualShock controller Y button +- **JOY_DS_Y** = **2** --- DualShock controller Y button. -- **JOY_VR_GRIP** = **2** --- Grip (side) buttons on a VR controller +- **JOY_VR_GRIP** = **2** --- Grip (side) buttons on a VR controller. -- **JOY_VR_PAD** = **14** --- Push down on the touchpad or main joystick on a VR controller +- **JOY_VR_PAD** = **14** --- Push down on the touchpad or main joystick on a VR controller. -- **JOY_VR_TRIGGER** = **15** --- Trigger on a VR controller +- **JOY_VR_TRIGGER** = **15** --- Trigger on a VR controller. -- **JOY_OCULUS_AX** = **7** --- A button on the right Oculus Touch controller, X button on the left controller (also when used in OpenVR) +- **JOY_OCULUS_AX** = **7** --- A button on the right Oculus Touch controller, X button on the left controller (also when used in OpenVR). -- **JOY_OCULUS_BY** = **1** --- B button on the right Oculus Touch controller, Y button on the left controller (also when used in OpenVR) +- **JOY_OCULUS_BY** = **1** --- B button on the right Oculus Touch controller, Y button on the left controller (also when used in OpenVR). - **JOY_OCULUS_MENU** = **3** --- Menu button on either Oculus Touch controller. -- **JOY_OPENVR_MENU** = **1** --- Menu button in OpenVR (Except when Oculus Touch controllers are used) +- **JOY_OPENVR_MENU** = **1** --- Menu button in OpenVR (Except when Oculus Touch controllers are used). -- **JOY_SELECT** = **10** --- Joypad Button Select +- **JOY_SELECT** = **10** --- Gamepad button Select. -- **JOY_START** = **11** --- Joypad Button Start +- **JOY_START** = **11** --- Gamepad button Start. -- **JOY_DPAD_UP** = **12** --- Joypad DPad Up +- **JOY_DPAD_UP** = **12** --- Gamepad DPad up. -- **JOY_DPAD_DOWN** = **13** --- Joypad DPad Down +- **JOY_DPAD_DOWN** = **13** --- Gamepad DPad down. -- **JOY_DPAD_LEFT** = **14** --- Joypad DPad Left +- **JOY_DPAD_LEFT** = **14** --- Gamepad DPad left. -- **JOY_DPAD_RIGHT** = **15** --- Joypad DPad Right +- **JOY_DPAD_RIGHT** = **15** --- Gamepad DPad right. -- **JOY_L** = **4** --- Joypad Left Shoulder Button +- **JOY_L** = **4** --- Gamepad left Shoulder button. -- **JOY_L2** = **6** --- Joypad Left Trigger +- **JOY_L2** = **6** --- Gamepad left trigger. -- **JOY_L3** = **8** --- Joypad Left Stick Click +- **JOY_L3** = **8** --- Gamepad left stick click. -- **JOY_R** = **5** --- Joypad Right Shoulder Button +- **JOY_R** = **5** --- Gamepad right Shoulder button. -- **JOY_R2** = **7** --- Joypad Right Trigger +- **JOY_R2** = **7** --- Gamepad right trigger. -- **JOY_R3** = **9** --- Joypad Right Stick Click +- **JOY_R3** = **9** --- Gamepad right stick click. -- **JOY_AXIS_0** = **0** --- Joypad Left Stick Horizontal Axis +- **JOY_AXIS_0** = **0** --- Gamepad left stick horizontal axis. -- **JOY_AXIS_1** = **1** --- Joypad Left Stick Vertical Axis +- **JOY_AXIS_1** = **1** --- Gamepad left stick vertical axis. -- **JOY_AXIS_2** = **2** --- Joypad Right Stick Horizontal Axis +- **JOY_AXIS_2** = **2** --- Gamepad right stick horizontal axis. -- **JOY_AXIS_3** = **3** --- Joypad Right Stick Vertical Axis +- **JOY_AXIS_3** = **3** --- Gamepad right stick vertical axis. - **JOY_AXIS_4** = **4** - **JOY_AXIS_5** = **5** -- **JOY_AXIS_6** = **6** --- Joypad Left Trigger Analog Axis +- **JOY_AXIS_6** = **6** --- Gamepad left trigger analog axis. -- **JOY_AXIS_7** = **7** --- Joypad Right Trigger Analog Axis +- **JOY_AXIS_7** = **7** --- Gamepad right trigger analog axis. - **JOY_AXIS_8** = **8** - **JOY_AXIS_9** = **9** -- **JOY_AXIS_MAX** = **10** +- **JOY_AXIS_MAX** = **10** --- Represents the maximum number of joystick axes supported. -- **JOY_ANALOG_LX** = **0** --- Joypad Left Stick Horizontal Axis +- **JOY_ANALOG_LX** = **0** --- Gamepad left stick horizontal axis. -- **JOY_ANALOG_LY** = **1** --- Joypad Left Stick Vertical Axis +- **JOY_ANALOG_LY** = **1** --- Gamepad left stick vertical axis. -- **JOY_ANALOG_RX** = **2** --- Joypad Right Stick Horizontal Axis +- **JOY_ANALOG_RX** = **2** --- Gamepad right stick horizontal axis. -- **JOY_ANALOG_RY** = **3** --- Joypad Right Stick Vertical Axis +- **JOY_ANALOG_RY** = **3** --- Gamepad right stick vertical axis. -- **JOY_ANALOG_L2** = **6** --- Joypad Left Analog Trigger +- **JOY_ANALOG_L2** = **6** --- Gamepad left analog trigger. -- **JOY_ANALOG_R2** = **7** --- Joypad Right Analog Trigger +- **JOY_ANALOG_R2** = **7** --- Gamepad right analog trigger. -- **JOY_VR_ANALOG_TRIGGER** = **2** --- VR Controller Analog Trigger +- **JOY_VR_ANALOG_TRIGGER** = **2** --- VR Controller analog trigger. -- **JOY_VR_ANALOG_GRIP** = **4** --- VR Controller Analog Grip (side buttons) +- **JOY_VR_ANALOG_GRIP** = **4** --- VR Controller analog grip (side buttons). -- **JOY_OPENVR_TOUCHPADX** = **0** --- OpenVR touchpad X axis (Joystick axis on Oculus Touch and Windows MR controllers) +- **JOY_OPENVR_TOUCHPADX** = **0** --- OpenVR touchpad X axis (Joystick axis on Oculus Touch and Windows MR controllers). -- **JOY_OPENVR_TOUCHPADY** = **1** --- OpenVR touchpad Y axis (Joystick axis on Oculus Touch and Windows MR controllers) +- **JOY_OPENVR_TOUCHPADY** = **1** --- OpenVR touchpad Y axis (Joystick axis on Oculus Touch and Windows MR controllers). .. _enum_@GlobalScope_MidiMessageList: @@ -1580,8 +1580,6 @@ enum **MidiMessageList**: .. _class_@GlobalScope_constant_ERR_CANT_CREATE: -.. _class_@GlobalScope_constant_ERR_PARSE_ERROR: - .. _class_@GlobalScope_constant_ERR_QUERY_FAILED: .. _class_@GlobalScope_constant_ERR_ALREADY_IN_USE: @@ -1590,8 +1588,16 @@ enum **MidiMessageList**: .. _class_@GlobalScope_constant_ERR_TIMEOUT: +.. _class_@GlobalScope_constant_ERR_CANT_CONNECT: + +.. _class_@GlobalScope_constant_ERR_CANT_RESOLVE: + +.. _class_@GlobalScope_constant_ERR_CONNECTION_ERROR: + .. _class_@GlobalScope_constant_ERR_CANT_ACQUIRE_RESOURCE: +.. _class_@GlobalScope_constant_ERR_CANT_FORK: + .. _class_@GlobalScope_constant_ERR_INVALID_DATA: .. _class_@GlobalScope_constant_ERR_INVALID_PARAMETER: @@ -1614,95 +1620,132 @@ enum **MidiMessageList**: .. _class_@GlobalScope_constant_ERR_CYCLIC_LINK: +.. _class_@GlobalScope_constant_ERR_INVALID_DECLARATION: + +.. _class_@GlobalScope_constant_ERR_DUPLICATE_SYMBOL: + +.. _class_@GlobalScope_constant_ERR_PARSE_ERROR: + .. _class_@GlobalScope_constant_ERR_BUSY: +.. _class_@GlobalScope_constant_ERR_SKIP: + .. _class_@GlobalScope_constant_ERR_HELP: .. _class_@GlobalScope_constant_ERR_BUG: +.. _class_@GlobalScope_constant_ERR_PRINTER_ON_FIRE: + enum **Error**: -- **OK** = **0** --- Functions that return Error return OK when no error occurred. Most functions don't return errors and/or just print errors to STDOUT. +- **OK** = **0** --- Methods that return :ref:`Error` return :ref:`OK` when no error occurred. Note that many functions don't return an error code but will print error messages to standard output. + +Since :ref:`OK` has value 0, and all other failure codes are positive integers, it can also be used in boolean checks, e.g.: + +:: + + var err = method_that_returns_error() + if (err != OK): + print("Failure!) + # Or, equivalent: + if (err): + print("Still failing!) - **FAILED** = **1** --- Generic error. -- **ERR_UNAVAILABLE** = **2** --- Unavailable error +- **ERR_UNAVAILABLE** = **2** --- Unavailable error. -- **ERR_UNCONFIGURED** = **3** --- Unconfigured error +- **ERR_UNCONFIGURED** = **3** --- Unconfigured error. -- **ERR_UNAUTHORIZED** = **4** --- Unauthorized error +- **ERR_UNAUTHORIZED** = **4** --- Unauthorized error. -- **ERR_PARAMETER_RANGE_ERROR** = **5** --- Parameter range error +- **ERR_PARAMETER_RANGE_ERROR** = **5** --- Parameter range error. -- **ERR_OUT_OF_MEMORY** = **6** --- Out of memory (OOM) error +- **ERR_OUT_OF_MEMORY** = **6** --- Out of memory (OOM) error. -- **ERR_FILE_NOT_FOUND** = **7** --- File: Not found error +- **ERR_FILE_NOT_FOUND** = **7** --- File: Not found error. -- **ERR_FILE_BAD_DRIVE** = **8** --- File: Bad drive error +- **ERR_FILE_BAD_DRIVE** = **8** --- File: Bad drive error. -- **ERR_FILE_BAD_PATH** = **9** --- File: Bad path error +- **ERR_FILE_BAD_PATH** = **9** --- File: Bad path error. -- **ERR_FILE_NO_PERMISSION** = **10** --- File: No permission error +- **ERR_FILE_NO_PERMISSION** = **10** --- File: No permission error. -- **ERR_FILE_ALREADY_IN_USE** = **11** --- File: Already in use error +- **ERR_FILE_ALREADY_IN_USE** = **11** --- File: Already in use error. -- **ERR_FILE_CANT_OPEN** = **12** --- File: Can't open error +- **ERR_FILE_CANT_OPEN** = **12** --- File: Can't open error. -- **ERR_FILE_CANT_WRITE** = **13** --- File: Can't write error +- **ERR_FILE_CANT_WRITE** = **13** --- File: Can't write error. -- **ERR_FILE_CANT_READ** = **14** --- File: Can't read error +- **ERR_FILE_CANT_READ** = **14** --- File: Can't read error. -- **ERR_FILE_UNRECOGNIZED** = **15** --- File: Unrecognized error +- **ERR_FILE_UNRECOGNIZED** = **15** --- File: Unrecognized error. -- **ERR_FILE_CORRUPT** = **16** --- File: Corrupt error +- **ERR_FILE_CORRUPT** = **16** --- File: Corrupt error. -- **ERR_FILE_MISSING_DEPENDENCIES** = **17** --- File: Missing dependencies error +- **ERR_FILE_MISSING_DEPENDENCIES** = **17** --- File: Missing dependencies error. -- **ERR_FILE_EOF** = **18** --- File: End of file (EOF) error +- **ERR_FILE_EOF** = **18** --- File: End of file (EOF) error. -- **ERR_CANT_OPEN** = **19** --- Can't open error +- **ERR_CANT_OPEN** = **19** --- Can't open error. -- **ERR_CANT_CREATE** = **20** --- Can't create error +- **ERR_CANT_CREATE** = **20** --- Can't create error. -- **ERR_PARSE_ERROR** = **43** --- Parse error +- **ERR_QUERY_FAILED** = **21** --- Query failed error. -- **ERR_QUERY_FAILED** = **21** --- Query failed error +- **ERR_ALREADY_IN_USE** = **22** --- Already in use error. -- **ERR_ALREADY_IN_USE** = **22** --- Already in use error +- **ERR_LOCKED** = **23** --- Locked error. -- **ERR_LOCKED** = **23** --- Locked error +- **ERR_TIMEOUT** = **24** --- Timeout error. -- **ERR_TIMEOUT** = **24** --- Timeout error +- **ERR_CANT_CONNECT** = **25** --- Can't connect error. -- **ERR_CANT_ACQUIRE_RESOURCE** = **28** --- Can't acquire resource error +- **ERR_CANT_RESOLVE** = **26** --- Can't resolve error. -- **ERR_INVALID_DATA** = **30** --- Invalid data error +- **ERR_CONNECTION_ERROR** = **27** --- Connection error. -- **ERR_INVALID_PARAMETER** = **31** --- Invalid parameter error +- **ERR_CANT_ACQUIRE_RESOURCE** = **28** --- Can't acquire resource error. -- **ERR_ALREADY_EXISTS** = **32** --- Already exists error +- **ERR_CANT_FORK** = **29** --- Can't fork process error. -- **ERR_DOES_NOT_EXIST** = **33** --- Does not exist error +- **ERR_INVALID_DATA** = **30** --- Invalid data error. -- **ERR_DATABASE_CANT_READ** = **34** --- Database: Read error +- **ERR_INVALID_PARAMETER** = **31** --- Invalid parameter error. -- **ERR_DATABASE_CANT_WRITE** = **35** --- Database: Write error +- **ERR_ALREADY_EXISTS** = **32** --- Already exists error. -- **ERR_COMPILATION_FAILED** = **36** --- Compilation failed error +- **ERR_DOES_NOT_EXIST** = **33** --- Does not exist error. -- **ERR_METHOD_NOT_FOUND** = **37** --- Method not found error +- **ERR_DATABASE_CANT_READ** = **34** --- Database: Read error. -- **ERR_LINK_FAILED** = **38** --- Linking failed error +- **ERR_DATABASE_CANT_WRITE** = **35** --- Database: Write error. -- **ERR_SCRIPT_FAILED** = **39** --- Script failed error +- **ERR_COMPILATION_FAILED** = **36** --- Compilation failed error. -- **ERR_CYCLIC_LINK** = **40** --- Cycling link (import cycle) error +- **ERR_METHOD_NOT_FOUND** = **37** --- Method not found error. -- **ERR_BUSY** = **44** --- Busy error +- **ERR_LINK_FAILED** = **38** --- Linking failed error. -- **ERR_HELP** = **46** --- Help error +- **ERR_SCRIPT_FAILED** = **39** --- Script failed error. -- **ERR_BUG** = **47** --- Bug error +- **ERR_CYCLIC_LINK** = **40** --- Cycling link (import cycle) error. + +- **ERR_INVALID_DECLARATION** = **41** --- Invalid declaration error. + +- **ERR_DUPLICATE_SYMBOL** = **42** --- Duplicate symbol error. + +- **ERR_PARSE_ERROR** = **43** --- Parse error. + +- **ERR_BUSY** = **44** --- Busy error. + +- **ERR_SKIP** = **45** --- Skip error. + +- **ERR_HELP** = **46** --- Help error. + +- **ERR_BUG** = **47** --- Bug error. + +- **ERR_PRINTER_ON_FIRE** = **48** --- Printer on fire error. (This is an easter egg, no engine methods return this error code.) .. _enum_@GlobalScope_PropertyHint: @@ -1752,13 +1795,13 @@ enum **Error**: enum **PropertyHint**: -- **PROPERTY_HINT_NONE** = **0** --- No hint for edited property. +- **PROPERTY_HINT_NONE** = **0** --- No hint for the 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_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_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_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** @@ -1766,7 +1809,7 @@ enum **PropertyHint**: - **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_FLAGS** = **8** --- Property hint for a bitmask description. For example, for bits 0, 1, 2, 3 and 5, the hint could be something like ``"Bit0,Bit1,Bit2,Bit3,,Bit5"``. This is only valid for integer properties. - **PROPERTY_HINT_LAYERS_2D_RENDER** = **9** @@ -1776,15 +1819,15 @@ enum **PropertyHint**: - **PROPERTY_HINT_LAYERS_3D_PHYSICS** = **12** -- **PROPERTY_HINT_FILE** = **13** --- 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_FILE** = **13** --- String property is a file, will pop up a file dialog when edited. Hint string can be a set of wildcards like ``"*.doc"``. -- **PROPERTY_HINT_DIR** = **14** --- String property is a directory (so pop up a file dialog when edited). +- **PROPERTY_HINT_DIR** = **14** --- String property is a directory, will pop up a file dialog when edited. - **PROPERTY_HINT_GLOBAL_FILE** = **15** - **PROPERTY_HINT_GLOBAL_DIR** = **16** -- **PROPERTY_HINT_RESOURCE_TYPE** = **17** --- String property is a resource, so open the resource popup menu when edited. +- **PROPERTY_HINT_RESOURCE_TYPE** = **17** --- String property is a resource, will open the resource popup menu when edited. - **PROPERTY_HINT_MULTILINE_TEXT** = **18** @@ -1880,21 +1923,21 @@ enum **PropertyUsageFlags**: enum **MethodFlags**: -- **METHOD_FLAG_NORMAL** = **1** --- Flag for normal method +- **METHOD_FLAG_NORMAL** = **1** --- Flag for a normal method. -- **METHOD_FLAG_EDITOR** = **2** --- Flag for editor method +- **METHOD_FLAG_EDITOR** = **2** --- Flag for an editor method. - **METHOD_FLAG_NOSCRIPT** = **4** -- **METHOD_FLAG_CONST** = **8** --- Flag for constant method +- **METHOD_FLAG_CONST** = **8** --- Flag for a constant method. - **METHOD_FLAG_REVERSE** = **16** -- **METHOD_FLAG_VIRTUAL** = **32** --- Flag for virtual method +- **METHOD_FLAG_VIRTUAL** = **32** --- Flag for a virtual method. -- **METHOD_FLAG_FROM_SCRIPT** = **64** --- Flag for method from script +- **METHOD_FLAG_FROM_SCRIPT** = **64** --- Flag for a method from a script. -- **METHOD_FLAGS_DEFAULT** = **1** --- Default method flags +- **METHOD_FLAGS_DEFAULT** = **1** --- Default method flags. .. _enum_@GlobalScope_Variant.Type: @@ -1956,7 +1999,7 @@ enum **MethodFlags**: enum **Variant.Type**: -- **TYPE_NIL** = **0** --- Variable is of type nil (only applied for null). +- **TYPE_NIL** = **0** --- Variable is of type nil (only applied for ``null``). - **TYPE_BOOL** = **1** --- Variable is of type :ref:`bool`. @@ -2010,7 +2053,7 @@ enum **Variant.Type**: - **TYPE_COLOR_ARRAY** = **26** --- Variable is of type :ref:`PoolColorArray`. -- **TYPE_MAX** = **27** --- Marker for end of type constants. +- **TYPE_MAX** = **27** --- Represents the size of the :ref:`Variant.Type` enum. .. _enum_@GlobalScope_Variant.Operator: @@ -2118,19 +2161,19 @@ enum **Variant.Operator**: - **OP_IN** = **24** -- **OP_MAX** = **25** +- **OP_MAX** = **25** --- Represents the size of the :ref:`Variant.Operator` enum. Constants --------- .. _class_@GlobalScope_constant_SPKEY: -- **SPKEY** = **16777216** --- Scancodes with this bit applied are non printable. +- **SPKEY** = **16777216** --- Scancodes with this bit applied are non-printable. 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. +Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc. Singletons are also documented here, since they can be accessed from anywhere. @@ -2141,135 +2184,137 @@ Property Descriptions - :ref:`ARVRServer` **ARVRServer** -:ref:`ARVRServer` singleton +The :ref:`ARVRServer` singleton. .. _class_@GlobalScope_property_AudioServer: - :ref:`AudioServer` **AudioServer** -:ref:`AudioServer` singleton +The :ref:`AudioServer` singleton. .. _class_@GlobalScope_property_CameraServer: - :ref:`CameraServer` **CameraServer** -:ref:`CameraServer` singleton +The :ref:`CameraServer` singleton. .. _class_@GlobalScope_property_ClassDB: - :ref:`ClassDB` **ClassDB** -:ref:`ClassDB` singleton +The :ref:`ClassDB` singleton. .. _class_@GlobalScope_property_Engine: - :ref:`Engine` **Engine** -:ref:`Engine` singleton +The :ref:`Engine` singleton. .. _class_@GlobalScope_property_Geometry: - :ref:`Geometry` **Geometry** -:ref:`Geometry` singleton +The :ref:`Geometry` singleton. .. _class_@GlobalScope_property_IP: - :ref:`IP` **IP** -:ref:`IP` singleton +The :ref:`IP` singleton. .. _class_@GlobalScope_property_Input: - :ref:`Input` **Input** -:ref:`Input` singleton +The :ref:`Input` singleton. .. _class_@GlobalScope_property_InputMap: - :ref:`InputMap` **InputMap** -:ref:`InputMap` singleton +The :ref:`InputMap` singleton. .. _class_@GlobalScope_property_JSON: - :ref:`JSON` **JSON** -:ref:`JSON` singleton +The :ref:`JSON` singleton. .. _class_@GlobalScope_property_JavaScript: - :ref:`JavaScript` **JavaScript** -:ref:`JavaScript` singleton +The :ref:`JavaScript` singleton. .. _class_@GlobalScope_property_Marshalls: - :ref:`Reference` **Marshalls** -:ref:`Marshalls` singleton +The :ref:`Marshalls` singleton. .. _class_@GlobalScope_property_NavigationMeshGenerator: - :ref:`EditorNavigationMeshGenerator` **NavigationMeshGenerator** +The :ref:`EditorNavigationMeshGenerator` singleton. + .. _class_@GlobalScope_property_OS: - :ref:`OS` **OS** -:ref:`OS` singleton +The :ref:`OS` singleton. .. _class_@GlobalScope_property_Performance: - :ref:`Performance` **Performance** -:ref:`Performance` singleton +The :ref:`Performance` singleton. .. _class_@GlobalScope_property_Physics2DServer: - :ref:`Physics2DServer` **Physics2DServer** -:ref:`Physics2DServer` singleton +The :ref:`Physics2DServer` singleton. .. _class_@GlobalScope_property_PhysicsServer: - :ref:`PhysicsServer` **PhysicsServer** -:ref:`PhysicsServer` singleton +The :ref:`PhysicsServer` singleton. .. _class_@GlobalScope_property_ProjectSettings: - :ref:`ProjectSettings` **ProjectSettings** -:ref:`ProjectSettings` singleton +The :ref:`ProjectSettings` singleton. .. _class_@GlobalScope_property_ResourceLoader: - :ref:`ResourceLoader` **ResourceLoader** -:ref:`ResourceLoader` singleton +The :ref:`ResourceLoader` singleton. .. _class_@GlobalScope_property_ResourceSaver: - :ref:`ResourceSaver` **ResourceSaver** -:ref:`ResourceSaver` singleton +The :ref:`ResourceSaver` singleton. .. _class_@GlobalScope_property_TranslationServer: - :ref:`TranslationServer` **TranslationServer** -:ref:`TranslationServer` singleton +The :ref:`TranslationServer` singleton. .. _class_@GlobalScope_property_VisualScriptEditor: - :ref:`VisualScriptEditor` **VisualScriptEditor** -:ref:`VisualScriptEditor` singleton +The :ref:`VisualScriptEditor` singleton. .. _class_@GlobalScope_property_VisualServer: - :ref:`VisualServer` **VisualServer** -:ref:`VisualServer` singleton +The :ref:`VisualServer` singleton. diff --git a/classes/class_acceptdialog.rst b/classes/class_acceptdialog.rst index da793dc67..0e529295d 100644 --- a/classes/class_acceptdialog.rst +++ b/classes/class_acceptdialog.rst @@ -91,7 +91,7 @@ Sets autowrapping for the text in the dialog. If ``true``, the dialog is hidden when the OK button is pressed. You can set it to ``false`` if you want to do e.g. input validation when receiving the :ref:`confirmed` signal, and handle hiding the dialog in your own logic. Default value: ``true``. -Note: Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example :ref:`FileDialog` defaults to ``false``, and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such this property can't be used in :ref:`FileDialog` to disable hiding the dialog when pressing OK. +**Note:** Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example :ref:`FileDialog` defaults to ``false``, and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such, this property can't be used in :ref:`FileDialog` to disable hiding the dialog when pressing OK. .. _class_AcceptDialog_property_dialog_text: @@ -112,15 +112,15 @@ Method Descriptions - :ref:`Button` **add_button** **(** :ref:`String` text, :ref:`bool` right=false, :ref:`String` action="" **)** -Adds a button with label *text* and a custom *action* to the dialog and returns the created button. *action* will be passed to the :ref:`custom_action` signal when pressed. +Adds a button with label ``text`` and a custom ``action`` to the dialog and returns the created button. ``action`` will be passed to the :ref:`custom_action` signal when pressed. -If ``true``, *right* will place the button to the right of any sibling buttons. Default value: ``false``. +If ``true``, ``right`` will place the button to the right of any sibling buttons. Default value: ``false``. .. _class_AcceptDialog_method_add_cancel: - :ref:`Button` **add_cancel** **(** :ref:`String` name **)** -Adds a button with label *name* and a cancel action to the dialog and returns the created button. +Adds a button with label ``name`` and a cancel action to the dialog and returns the created button. .. _class_AcceptDialog_method_get_label: @@ -132,7 +132,7 @@ Returns the label used for built-in text. - :ref:`Button` **get_ok** **(** **)** -Returns the OK Button. +Returns the OK :ref:`Button` instance. .. _class_AcceptDialog_method_register_text_enter: diff --git a/classes/class_animatedsprite.rst b/classes/class_animatedsprite.rst index 1050cb297..46978807f 100644 --- a/classes/class_animatedsprite.rst +++ b/classes/class_animatedsprite.rst @@ -182,17 +182,17 @@ Method Descriptions - :ref:`bool` **is_playing** **(** **)** const -Returns ``true`` if an animation if currently being played. +Returns ``true`` if an animation is currently being played. .. _class_AnimatedSprite_method_play: - void **play** **(** :ref:`String` anim="", :ref:`bool` backwards=false **)** -Play the animation set in parameter. If no parameter is provided, the current animation is played. Property ``backwards`` plays the animation in reverse if set to ``true``. +Plays the animation named ``anim``. If no ``anim`` is provided, the current animation is played. If ``backwards`` is ``true``, the animation will be played in reverse. .. _class_AnimatedSprite_method_stop: - void **stop** **(** **)** -Stop the current animation (does not reset the frame counter). +Stops the current animation (does not reset the frame counter). diff --git a/classes/class_animatedsprite3d.rst b/classes/class_animatedsprite3d.rst index 704b02509..c0cad8d42 100644 --- a/classes/class_animatedsprite3d.rst +++ b/classes/class_animatedsprite3d.rst @@ -106,17 +106,17 @@ Method Descriptions - :ref:`bool` **is_playing** **(** **)** const -Returns ``true`` if an animation if currently being played. +Returns ``true`` if an animation is currently being played. .. _class_AnimatedSprite3D_method_play: - void **play** **(** :ref:`String` anim="" **)** -Play the animation set in parameter. If no parameter is provided, the current animation is played. +Plays the animation named ``anim``. If no ``anim`` is provided, the current animation is played. .. _class_AnimatedSprite3D_method_stop: - void **stop** **(** **)** -Stop the current animation (does not reset the frame counter). +Stops the current animation (does not reset the frame counter). diff --git a/classes/class_animation.rst b/classes/class_animation.rst index 2da57fb18..e3cd490b6 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -176,7 +176,7 @@ enum **TrackType**: - **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_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. @@ -257,7 +257,9 @@ Property Descriptions | *Getter* | get_length() | +----------+-------------------+ -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. +The total length of the animation (in seconds). + +**Note:** 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_property_loop: @@ -290,7 +292,7 @@ Method Descriptions - :ref:`int` **add_track** **(** :ref:`TrackType` type, :ref:`int` at_position=-1 **)** -Add a track to the Animation. The track type must be specified as any of the values in the TYPE\_\* enumeration. +Adds a track to the Animation. .. _class_Animation_method_animation_track_get_key_animation: @@ -410,13 +412,13 @@ Returns the arguments values to be called on a method track for a given key in a - void **remove_track** **(** :ref:`int` idx **)** -Remove a track by specifying the track index. +Removes a track by specifying the track index. .. _class_Animation_method_track_find_key: - :ref:`int` **track_find_key** **(** :ref:`int` idx, :ref:`float` time, :ref:`bool` exact=false **)** const -Find the key index by time in a given track. Optionally, only find it if the exact time is given. +Finds the key index by time in a given track. Optionally, only find it if the exact time is given. .. _class_Animation_method_track_get_interpolation_loop_wrap: @@ -428,7 +430,7 @@ Returns ``true`` if the track at ``idx`` wraps the interpolation loop. Default v - :ref:`InterpolationType` **track_get_interpolation_type** **(** :ref:`int` idx **)** const -Returns the interpolation type of a given track, from the INTERPOLATION\_\* enum. +Returns the interpolation type of a given track. .. _class_Animation_method_track_get_key_count: @@ -446,7 +448,7 @@ Returns the time at which the key is located. - :ref:`float` **track_get_key_transition** **(** :ref:`int` idx, :ref:`int` key_idx **)** const -Returns the transition curve (easing) for a specific key (see built-in math function "ease"). +Returns the transition curve (easing) for a specific key (see the built-in math function :ref:`@GDScript.ease`). .. _class_Animation_method_track_get_key_value: @@ -458,13 +460,13 @@ Returns the value of a given key in a given track. - :ref:`NodePath` **track_get_path** **(** :ref:`int` idx **)** const -Get the path of a track. for more information on the path format, see :ref:`track_set_path` +Gets the path of a track. For more information on the path format, see :ref:`track_set_path`. .. _class_Animation_method_track_get_type: - :ref:`TrackType` **track_get_type** **(** :ref:`int` idx **)** const -Get the type of a track. +Gets the type of a track. .. _class_Animation_method_track_insert_key: @@ -488,7 +490,7 @@ Returns ``true`` if the given track is imported. Else, return ``false``. - void **track_move_down** **(** :ref:`int` idx **)** -Move a track down. +Moves a track down. .. _class_Animation_method_track_move_to: @@ -500,19 +502,19 @@ Changes the index position of track ``idx`` to the one defined in ``to_idx``. - void **track_move_up** **(** :ref:`int` idx **)** -Move a track up. +Moves a track up. .. _class_Animation_method_track_remove_key: - void **track_remove_key** **(** :ref:`int` idx, :ref:`int` key_idx **)** -Remove a key by index in a given track. +Removes a key by index in a given track. .. _class_Animation_method_track_remove_key_at_position: - void **track_remove_key_at_position** **(** :ref:`int` idx, :ref:`float` position **)** -Remove a key by position (seconds) in a given track. +Removes a key by position (seconds) in a given track. .. _class_Animation_method_track_set_enabled: @@ -524,7 +526,7 @@ Enables/disables the given track. Tracks are enabled by default. - void **track_set_imported** **(** :ref:`int` idx, :ref:`bool` imported **)** -Set the given track as imported or not. +Sets the given track as imported or not. .. _class_Animation_method_track_set_interpolation_loop_wrap: @@ -536,33 +538,33 @@ If ``true``, the track at ``idx`` wraps the interpolation loop. - void **track_set_interpolation_type** **(** :ref:`int` idx, :ref:`InterpolationType` interpolation **)** -Set the interpolation type of a given track, from the INTERPOLATION\_\* enum. +Sets the interpolation type of a given track. .. _class_Animation_method_track_set_key_time: - void **track_set_key_time** **(** :ref:`int` idx, :ref:`int` key_idx, :ref:`float` time **)** -Set the time of an existing key. +Sets the time of an existing key. .. _class_Animation_method_track_set_key_transition: - void **track_set_key_transition** **(** :ref:`int` idx, :ref:`int` key_idx, :ref:`float` transition **)** -Set the transition curve (easing) for a specific key (see built-in math function "ease"). +Sets the transition curve (easing) for a specific key (see the built-in math function :ref:`@GDScript.ease`). .. _class_Animation_method_track_set_key_value: - void **track_set_key_value** **(** :ref:`int` idx, :ref:`int` key, :ref:`Variant` value **)** -Set the value of an existing key. +Sets the value of an existing key. .. _class_Animation_method_track_set_path: - void **track_set_path** **(** :ref:`int` idx, :ref:`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 ":". +Sets 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". +For example, ``"character/skeleton:ankle"`` or ``"character/mesh:transform/local"``. .. _class_Animation_method_track_swap: @@ -598,5 +600,5 @@ Returns the update mode of a value track. - void **value_track_set_update_mode** **(** :ref:`int` idx, :ref:`UpdateMode` mode **)** -Set the update mode (UPDATE\_\*) of a value track. +Sets the update mode (``UPDATE_*``) of a value track. diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index 346652f67..6c54b5d95 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -107,7 +107,7 @@ enum **FilterAction**: Description ----------- -Base resource for :ref:`AnimationTree` nodes. In general it's not used directly but you can create custom ones with custom blending formulas. +Base resource for :ref:`AnimationTree` nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas. Inherit this when creating nodes mainly for use in :ref:`AnimationNodeBlendTree`, otherwise :ref:`AnimationRootNode` should be used instead. @@ -133,7 +133,7 @@ Method Descriptions - void **add_input** **(** :ref:`String` name **)** -Add an input to the node. This is only useful for nodes created for use in an :ref:`AnimationNodeBlendTree` +Adds an input to the node. This is only useful for nodes created for use in an :ref:`AnimationNodeBlendTree` .. _class_AnimationNode_method_blend_animation: @@ -157,19 +157,19 @@ Blend another animaiton node (in case this node contains children animation node - :ref:`String` **get_caption** **(** **)** virtual -Get the text caption for this node (used by some editors) +Gets the text caption for this node (used by some editors). .. _class_AnimationNode_method_get_child_by_name: - :ref:`Object` **get_child_by_name** **(** :ref:`String` name **)** virtual -Get the a child node by index (used by editors inheriting from :ref:`AnimationRootNode`). +Gets a child node by index (used by editors inheriting from :ref:`AnimationRootNode`). .. _class_AnimationNode_method_get_child_nodes: - :ref:`Dictionary` **get_child_nodes** **(** **)** virtual -Get all children nodes, in order as a name:node dictionary. Only useful when inheriting :ref:`AnimationRootNode`. +Gets all children nodes in order as a ``name: node`` dictionary. Only useful when inheriting :ref:`AnimationRootNode`. .. _class_AnimationNode_method_get_input_count: @@ -181,25 +181,25 @@ Amount of inputs in this node, only useful for nodes that go into :ref:`Animatio - :ref:`String` **get_input_name** **(** :ref:`int` input **)** -Get the name of an input by index. +Gets the name of an input by index. .. _class_AnimationNode_method_get_parameter: - :ref:`Variant` **get_parameter** **(** :ref:`String` name **)** const -Get the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. +Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. .. _class_AnimationNode_method_get_parameter_default_value: - :ref:`Variant` **get_parameter_default_value** **(** :ref:`String` name **)** virtual -Get the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. +Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. .. _class_AnimationNode_method_get_parameter_list: - :ref:`Array` **get_parameter_list** **(** **)** virtual -Get the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to :ref:`Object.get_property_list`. +Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to :ref:`Object.get_property_list`. .. _class_AnimationNode_method_has_filter: @@ -229,17 +229,17 @@ This function returns the time left for the current animation to finish (if unsu - void **remove_input** **(** :ref:`int` index **)** -Remove an input, call this only when inactive. +Removes an input, call this only when inactive. .. _class_AnimationNode_method_set_filter_path: - void **set_filter_path** **(** :ref:`NodePath` path, :ref:`bool` enable **)** -Add/Remove a path for the filter. +Adds or removes a path for the filter. .. _class_AnimationNode_method_set_parameter: - void **set_parameter** **(** :ref:`String` name, :ref:`Variant` value **)** -Set a custom parameter. These are used as local storage, because resources can be reused across the tree or scenes. +Sets a custom parameter. These are used as local storage, because resources can be reused across the tree or scenes. diff --git a/classes/class_animationnodeblendspace1d.rst b/classes/class_animationnodeblendspace1d.rst index a47ace85b..6aa412884 100644 --- a/classes/class_animationnodeblendspace1d.rst +++ b/classes/class_animationnodeblendspace1d.rst @@ -117,7 +117,7 @@ Method Descriptions - void **add_blend_point** **(** :ref:`AnimationRootNode` node, :ref:`float` pos, :ref:`int` at_index=-1 **)** -Add a new point that represents a ``node`` on the virtual axis at a given position set by ``pos``. You can insert it at a specific index using the ``at_index`` argument. If you use the default value for ``at_index`` , the point is inserted at the end of the blend points array. +Adds a new point that represents a ``node`` on the virtual axis at a given position set by ``pos``. You can insert it at a specific index using the ``at_index`` argument. If you use the default value for ``at_index`` , the point is inserted at the end of the blend points array. .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_count: diff --git a/classes/class_animationnodeblendspace2d.rst b/classes/class_animationnodeblendspace2d.rst index a5854de59..e5a275683 100644 --- a/classes/class_animationnodeblendspace2d.rst +++ b/classes/class_animationnodeblendspace2d.rst @@ -193,7 +193,7 @@ Method Descriptions - void **add_blend_point** **(** :ref:`AnimationRootNode` node, :ref:`Vector2` pos, :ref:`int` at_index=-1 **)** -Add a new point that represents a ``node`` at the position set by ``pos``. You can insert it at a specific index using the ``at_index`` argument. If you use the default value for ``at_index`` , the point is inserted at the end of the blend points array. +Adds a new point that represents a ``node`` at the position set by ``pos``. You can insert it at a specific index using the ``at_index`` argument. If you use the default value for ``at_index`` , the point is inserted at the end of the blend points array. .. _class_AnimationNodeBlendSpace2D_method_add_triangle: diff --git a/classes/class_animationnodestatemachine.rst b/classes/class_animationnodestatemachine.rst index 8d7fd8f85..f01e9823d 100644 --- a/classes/class_animationnodestatemachine.rst +++ b/classes/class_animationnodestatemachine.rst @@ -68,7 +68,9 @@ Methods Description ----------- -Contains multiple nodes representing animation states, connected in a graph. Nodes transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the AnimationNodeStateMachinePlayback object from the :ref:`AnimationTree` node to control it programatically. Example: +Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the AnimationNodeStateMachinePlayback object from the :ref:`AnimationTree` node to control it programmatically. + +**Example:** :: diff --git a/classes/class_animationnodestatemachineplayback.rst b/classes/class_animationnodestatemachineplayback.rst index 95bde2a7d..9df1ce5b6 100644 --- a/classes/class_animationnodestatemachineplayback.rst +++ b/classes/class_animationnodestatemachineplayback.rst @@ -36,7 +36,9 @@ Methods Description ----------- -Allows control of :ref:`AnimationTree` state machines created with :ref:`AnimationNodeStateMachine`. Retrieve with ``$AnimationTree.get("parameters/playback")``. Example: +Allows control of :ref:`AnimationTree` state machines created with :ref:`AnimationNodeStateMachine`. Retrieve with ``$AnimationTree.get("parameters/playback")``. + +**Example:** :: diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index 1126074f5..b48ee526d 100644 --- a/classes/class_animationnodestatemachinetransition.rst +++ b/classes/class_animationnodestatemachinetransition.rst @@ -88,7 +88,7 @@ Turn on auto advance when this condition is set. The provided name will become a | *Getter* | has_auto_advance() | +----------+-------------------------+ -Turn on the transition automatically when this state is reached. This works best with ``SWITCH_MODE_AT_END``. +Turn on the transition automatically when this state is reached. This works best with :ref:`SWITCH_MODE_AT_END`. .. _class_AnimationNodeStateMachineTransition_property_disabled: diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index f4e93d8dc..1c949f902 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -134,7 +134,7 @@ enum **AnimationProcessMode**: - **ANIMATION_PROCESS_IDLE** = **1** --- Process animation during the idle process. -- **ANIMATION_PROCESS_MANUAL** = **2** --- Do not process animation. Use the 'advance' method to process the animation manually. +- **ANIMATION_PROCESS_MANUAL** = **2** --- Do not process animation. Use :ref:`advance` to process the animation manually. .. _enum_AnimationPlayer_AnimationMethodCallMode: @@ -151,7 +151,7 @@ enum **AnimationMethodCallMode**: Description ----------- -An animation player is used for general purpose playback of :ref:`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 different channels. +An animation player is used for general-purpose playback of :ref:`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 different channels. Tutorials --------- @@ -229,7 +229,7 @@ The position (in seconds) of the currently playing animation. | *Getter* | get_method_call_mode() | +----------+-----------------------------+ -The call mode to use for Call Method tracks. Default value: ``ANIMATION_METHOD_CALL_DEFERRED``. +The call mode to use for Call Method tracks. Default value: :ref:`ANIMATION_METHOD_CALL_DEFERRED`. .. _class_AnimationPlayer_property_playback_active: @@ -265,7 +265,7 @@ The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 p | *Getter* | get_animation_process_mode() | +----------+-----------------------------------+ -The process notification in which to update animations. Default value: ``ANIMATION_PROCESS_IDLE``. +The process notification in which to update animations. Default value: :ref:`ANIMATION_PROCESS_IDLE`. .. _class_AnimationPlayer_property_playback_speed: @@ -277,7 +277,7 @@ The process notification in which to update animations. Default value: ``ANIMATI | *Getter* | get_speed_scale() | +----------+------------------------+ -The speed scaling ratio. For instance, if this value is 1 then the animation plays at normal speed. If it's 0.5 then it plays at half speed. If it's 2 then it plays at double speed. Default value: ``1``. +The speed scaling ratio. For instance, if this value is 1, then the animation plays at normal speed. If it's 0.5, then it plays at half speed. If it's 2, then it plays at double speed. Default value: ``1``. .. _class_AnimationPlayer_property_root_node: @@ -322,7 +322,7 @@ Triggers the ``anim_to`` animation when the ``anim_from`` animation completes. - void **clear_caches** **(** **)** -``AnimationPlayer`` caches animated nodes. It may not notice if a node disappears, so clear_caches forces it to update the cache again. +``AnimationPlayer`` caches animated nodes. It may not notice if a node disappears; :ref:`clear_caches` forces it to update the cache again. .. _class_AnimationPlayer_method_clear_queue: @@ -352,13 +352,13 @@ Returns the list of stored animation names. - :ref:`float` **get_blend_time** **(** :ref:`String` anim_from, :ref:`String` anim_to **)** const -Get the blend time (in seconds) between two animations, referenced by their names. +Gets the blend time (in seconds) between two animations, referenced by their names. .. _class_AnimationPlayer_method_get_playing_speed: - :ref:`float` **get_playing_speed** **(** **)** const -Get the actual playing speed of current animation or 0 if not playing. This speed is the ``playback_speed`` property multiplied by ``custom_speed`` argument specified when calling the ``play`` method. +Gets the actual playing speed of current animation or 0 if not playing. This speed is the ``playback_speed`` property multiplied by ``custom_speed`` argument specified when calling the ``play`` method. .. _class_AnimationPlayer_method_get_queue: @@ -380,53 +380,53 @@ Returns ``true`` if playing an animation. - void **play** **(** :ref:`String` name="", :ref:`float` custom_blend=-1, :ref:`float` custom_speed=1.0, :ref:`bool` from_end=false **)** -Play the animation with key ``name``. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being ``true`` can play the animation backwards. +Plays the animation with key ``name``. Custom speed and blend times can be set. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards. -If the animation has been paused by ``stop(true)`` it will be resumed. Calling ``play()`` without arguments will also resume the animation. +If the animation has been paused by :ref:`stop`, it will be resumed. Calling :ref:`play` without arguments will also resume the animation. .. _class_AnimationPlayer_method_play_backwards: - void **play_backwards** **(** :ref:`String` name="", :ref:`float` custom_blend=-1 **)** -Play the animation with key ``name`` in reverse. +Plays the animation with key ``name`` in reverse. -If the animation has been paused by ``stop(true)`` it will be resumed backwards. Calling ``play_backwards()`` without arguments will also resume the animation backwards. +If the animation has been paused by ``stop(true)``, it will be resumed backwards. Calling ``play_backwards()`` without arguments will also resume the animation backwards. .. _class_AnimationPlayer_method_queue: - void **queue** **(** :ref:`String` name **)** -Queue an animation for playback once the current one is done. +Queues an animation for playback once the current one is done. .. _class_AnimationPlayer_method_remove_animation: - void **remove_animation** **(** :ref:`String` name **)** -Remove the animation with key ``name``. +Removes the animation with key ``name``. .. _class_AnimationPlayer_method_rename_animation: - void **rename_animation** **(** :ref:`String` name, :ref:`String` newname **)** -Rename an existing animation with key ``name`` to ``newname``. +Renames an existing animation with key ``name`` to ``newname``. .. _class_AnimationPlayer_method_seek: - void **seek** **(** :ref:`float` seconds, :ref:`bool` update=false **)** -Seek the animation to the ``seconds`` point in time (in seconds). If ``update`` is ``true``, the animation updates too, otherwise it updates at process time. Events between the current frame and ``seconds`` are skipped. +Seeks the animation to the ``seconds`` point in time (in seconds). If ``update`` is ``true``, the animation updates too, otherwise it updates at process time. Events between the current frame and ``seconds`` are skipped. .. _class_AnimationPlayer_method_set_blend_time: - void **set_blend_time** **(** :ref:`String` anim_from, :ref:`String` anim_to, :ref:`float` sec **)** -Specify a blend time (in seconds) between two animations, referenced by their names. +Specifies a blend time (in seconds) between two animations, referenced by their names. .. _class_AnimationPlayer_method_stop: - void **stop** **(** :ref:`bool` reset=true **)** -Stop the currently playing animation. If ``reset`` is ``true``, the animation position is reset to ``0`` and the playback speed is reset to ``1.0``. +Stops the currently playing animation. If ``reset`` is ``true``, the animation position is reset to ``0`` and the playback speed is reset to ``1.0``. -If ``reset`` is ``false``, then calling ``play()`` without arguments or ``play("same_as_before")`` will resume the animation. Works the same for the ``play_backwards()`` method. +If ``reset`` is ``false``, then calling :ref:`play` without arguments or ``play("same_as_before")`` will resume the animation. Works the same for the :ref:`play_backwards`. diff --git a/classes/class_animationtreeplayer.rst b/classes/class_animationtreeplayer.rst index 09c45e5c7..f279d6a45 100644 --- a/classes/class_animationtreeplayer.rst +++ b/classes/class_animationtreeplayer.rst @@ -267,7 +267,7 @@ Once set, Animation nodes can be added to the AnimationTreePlayer. | *Getter* | get_animation_process_mode() | +----------+-----------------------------------+ -The thread in which to update animations. Default value: ``ANIMATION_PROCESS_IDLE``. +The thread in which to update animations. Default value: :ref:`ANIMATION_PROCESS_IDLE`. Method Descriptions ------------------- @@ -420,7 +420,7 @@ Returns mix amount of a Mix node given its name. Sets mix amount of a Mix node given its name and value. -A Mix node adds input b to input a by a the amount given by ratio. +A Mix node adds input b to input a by the amount given by ratio. .. _class_AnimationTreePlayer_method_node_exists: @@ -450,7 +450,7 @@ Returns position of a node in the graph given its name. - :ref:`NodeType` **node_get_type** **(** :ref:`String` id **)** const -Get the node type, will return from NODE\_\* enum. +Gets the node type, will return from ``NODE_*`` enum. .. _class_AnimationTreePlayer_method_node_rename: @@ -586,7 +586,7 @@ If applied after a blend or mix, affects all input animations to that blend or m - void **timeseek_node_seek** **(** :ref:`String` id, :ref:`float` seconds **)** -Sets the time seek value of the TimeSeek node with name ``id`` to ``seconds`` +Sets the time seek value of the TimeSeek node with name ``id`` to ``seconds``. This functions as a seek in the :ref:`Animation` or the blend or mix of :ref:`Animation`\ s input in it. diff --git a/classes/class_area.rst b/classes/class_area.rst index 4f3421bd4..641b39ae7 100644 --- a/classes/class_area.rst +++ b/classes/class_area.rst @@ -14,7 +14,7 @@ Area Brief Description ----------------- -General purpose area node for detection and 3D physics influence. +General-purpose area node for detection and 3D physics influence. Properties ---------- @@ -266,7 +266,7 @@ The falloff factor for point gravity. The greater the value, the faster gravity | *Getter* | is_gravity_a_point() | +----------+-----------------------------+ -If ``true``, gravity is calculated from a point (set via :ref:`gravity_vec`). Also see :ref:`space_override`. Default value: ``false``. +If ``true``, gravity is calculated from a point (set via :ref:`gravity_vec`). See also :ref:`space_override`. Default value: ``false``. .. _class_Area_property_gravity_vec: @@ -419,13 +419,17 @@ Returns a list of intersecting :ref:`PhysicsBody`\ s. For per - :ref:`bool` **overlaps_area** **(** :ref:`Node` area **)** const -If ``true``, the given area overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. +If ``true``, the given area overlaps the Area. + +**Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. .. _class_Area_method_overlaps_body: - :ref:`bool` **overlaps_body** **(** :ref:`Node` body **)** const -If ``true``, the given physics body overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. +If ``true``, the given physics body overlaps the Area. + +**Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. The ``body`` argument can either be a :ref:`PhysicsBody` or a :ref:`GridMap` instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index 12d1b426a..8a24efbcd 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -258,7 +258,7 @@ The falloff factor for point gravity. The greater the value, the faster gravity | *Getter* | is_gravity_a_point() | +----------+-----------------------------+ -If ``true``, gravity is calculated from a point (set via :ref:`gravity_vec`). Also see :ref:`space_override`. Default value: ``false``. +If ``true``, gravity is calculated from a point (set via :ref:`gravity_vec`). See also :ref:`space_override`. Default value: ``false``. .. _class_Area2D_property_gravity_vec: @@ -363,13 +363,17 @@ Returns a list of intersecting :ref:`PhysicsBody2D`\ s. For - :ref:`bool` **overlaps_area** **(** :ref:`Node` area **)** const -If ``true``, the given area overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. +If ``true``, the given area overlaps the Area2D. + +**Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. .. _class_Area2D_method_overlaps_body: - :ref:`bool` **overlaps_body** **(** :ref:`Node` body **)** const -If ``true``, the given physics body overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. +If ``true``, the given physics body overlaps the Area2D. + +**Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. The ``body`` argument can either be a :ref:`PhysicsBody2D` or a :ref:`TileMap` instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). diff --git a/classes/class_array.rst b/classes/class_array.rst index af5dad741..748fa5ac9 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -94,7 +94,9 @@ Methods Description ----------- -Generic array which can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.). Example: +Generic array which can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.). + +**Example:** :: @@ -156,19 +158,23 @@ Returns the last element of the array if the array is not empty. - :ref:`int` **bsearch** **(** :ref:`Variant` value, :ref:`bool` before=True **)** -Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a before specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. Note that calling bsearch on an unsorted array results in unexpected behavior. +Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. + +**Note:** Calling :ref:`bsearch` on an unsorted array results in unexpected behavior. .. _class_Array_method_bsearch_custom: - :ref:`int` **bsearch_custom** **(** :ref:`Variant` value, :ref:`Object` obj, :ref:`String` func, :ref:`bool` before=True **)** -Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a before specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return ``true`` if the first argument is less than the second, and return ``false`` otherwise. Note that calling bsearch on an unsorted array results in unexpected behavior. +Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return ``true`` if the first argument is less than the second, and return ``false`` otherwise. + +**Note:** Calling :ref:`bsearch` on an unsorted array results in unexpected behavior. .. _class_Array_method_clear: - void **clear** **(** **)** -Clears the array (resizes to 0). +Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. .. _class_Array_method_count: @@ -291,7 +297,7 @@ Removes an element from the array by index. - void **resize** **(** :ref:`int` size **)** -Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null. +Resizes 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_method_rfind: @@ -315,7 +321,9 @@ Returns the number of elements in the array. - void **sort** **(** **)** -Sorts the array. Note: strings are sorted in alphabetical, not natural order. +Sorts the array. + +**Note:** strings are sorted in alphabetical, not natural order. .. _class_Array_method_sort_custom: diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index 00ab4c075..009a9976a 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -109,7 +109,7 @@ enum **ArrayType**: For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line. -- **ARRAY_MAX** = **9** +- **ARRAY_MAX** = **9** --- Represents the size of the :ref:`ArrayType` enum. .. _enum_ArrayMesh_ArrayFormat: @@ -217,7 +217,7 @@ Method Descriptions - void **add_blend_shape** **(** :ref:`String` name **)** -Add name for a blend shape that will be added with :ref:`add_surface_from_arrays`. Must be called before surface is added. +Adds name for a blend shape that will be added with :ref:`add_surface_from_arrays`. Must be called before surface is added. .. _class_ArrayMesh_method_add_surface_from_arrays: @@ -227,7 +227,7 @@ Creates a new surface. Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. See :ref:`Mesh` for details. (As a note, when using indices, it is recommended to only use points, lines or triangles). :ref:`Mesh.get_surface_count` will become the ``surf_idx`` for this new surface. -The ``arrays`` argument is an array of arrays. See :ref:`ArrayType` for the values used in this array. For example, ``arrays[0]`` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for ``ARRAY_INDEX`` if it is used. +The ``arrays`` argument is an array of arrays. See :ref:`ArrayType` for the values used in this array. For example, ``arrays[0]`` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for :ref:`ARRAY_INDEX` if it is used. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices. @@ -237,7 +237,7 @@ Godot uses clockwise winding order for front faces of triangle primitive modes. - void **clear_blend_shapes** **(** **)** -Remove all blend shapes from this ``ArrayMesh``. +Removes all blend shapes from this ``ArrayMesh``. .. _class_ArrayMesh_method_get_blend_shape_count: @@ -267,7 +267,7 @@ Will regenerate normal maps for the ``ArrayMesh``. - :ref:`int` **surface_find_by_name** **(** :ref:`String` name **)** const -Returns the index of the first surface with this name held within this ``ArrayMesh``. If none are found -1 is returned. +Returns the index of the first surface with this name held within this ``ArrayMesh``. If none are found, -1 is returned. .. _class_ArrayMesh_method_surface_get_array_index_len: @@ -291,7 +291,7 @@ Returns the format mask of the requested surface (see :ref:`add_surface_from_arr - :ref:`String` **surface_get_name** **(** :ref:`int` surf_idx **)** const -Get the name assigned to this surface. +Gets the name assigned to this surface. .. _class_ArrayMesh_method_surface_get_primitive_type: @@ -303,17 +303,19 @@ Returns the primitive type of the requested surface (see :ref:`add_surface_from_ - void **surface_remove** **(** :ref:`int` surf_idx **)** -Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down. +Removes a surface at position ``surf_idx``, shifting greater surfaces one ``surf_idx`` slot down. .. _class_ArrayMesh_method_surface_set_name: - void **surface_set_name** **(** :ref:`int` surf_idx, :ref:`String` name **)** -Set a name for a given surface. +Sets a name for a given surface. .. _class_ArrayMesh_method_surface_update_region: - void **surface_update_region** **(** :ref:`int` surf_idx, :ref:`int` offset, :ref:`PoolByteArray` data **)** -Updates a specified region of mesh arrays on GPU. Warning: only use if you know what you are doing. You can easily cause crashes by calling this function with improper arguments. +Updates a specified region of mesh arrays on the GPU. + +**Warning:** Only use if you know what you are doing. You can easily cause crashes by calling this function with improper arguments. diff --git a/classes/class_arvranchor.rst b/classes/class_arvranchor.rst index b214d445f..f01290691 100644 --- a/classes/class_arvranchor.rst +++ b/classes/class_arvranchor.rst @@ -14,7 +14,7 @@ ARVRAnchor Brief Description ----------------- -Anchor point in AR Space. +An anchor point in AR space. Properties ---------- @@ -45,14 +45,14 @@ Signals - **mesh_updated** **(** :ref:`Mesh` mesh **)** -Emitted when the mesh associated with the anchor changes or when one becomes available. This is especially important for topology that is constantly being mesh_updated. +Emitted when the mesh associated with the anchor changes or when one becomes available. This is especially important for topology that is constantly being ``mesh_updated``. Description ----------- The ARVR Anchor point is a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them. -This node is mapped to one of the anchors through its unique id. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the id and the nodes will simply remain on 0,0,0 until a plane is recognised. +This node is mapped to one of the anchors through its unique ID. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the ID; the nodes will simply remain on 0,0,0 until a plane is recognized. Keep in mind that, as long as plane detection is enabled, the size, placing and orientation of an anchor will be updated as the detection logic learns more about the real world out there especially if only part of the surface is in view. @@ -69,7 +69,7 @@ Property Descriptions | *Getter* | get_anchor_id() | +----------+----------------------+ -The anchor's id. You can set this before the anchor itself exists. The first anchor gets an id of ``1``, the second an id of ``2``, etc. When anchors get removed, the engine can then assign the corresponding id to new anchors. The most common situation where anchors 'disappear' is when the AR server identifies that two anchors represent different parts of the same plane and merges them. +The anchor's ID. You can set this before the anchor itself exists. The first anchor gets an ID of ``1``, the second an ID of ``2``, etc. When anchors get removed, the engine can then assign the corresponding ID to new anchors. The most common situation where anchors "disappear" is when the AR server identifies that two anchors represent different parts of the same plane and merges them. Method Descriptions ------------------- @@ -84,13 +84,13 @@ Returns the name given to this anchor. - :ref:`bool` **get_is_active** **(** **)** const -Returns ``true`` if the anchor is being tracked and ``false`` if no anchor with this id is currently known. +Returns ``true`` if the anchor is being tracked and ``false`` if no anchor with this ID is currently known. .. _class_ARVRAnchor_method_get_mesh: - :ref:`Mesh` **get_mesh** **(** **)** const -If provided by the ARVR Interface this returns a mesh object for the anchor. For an anchor this can be a shape related to the object being tracked or it can be a mesh that provides topology related to the anchor and can be used to create shadows/reflections on surfaces or for generating collision shapes. +If provided by the ARVR Interface, this returns a mesh object for the anchor. For an anchor, this can be a shape related to the object being tracked or it can be a mesh that provides topology related to the anchor and can be used to create shadows/reflections on surfaces or for generating collision shapes. .. _class_ARVRAnchor_method_get_plane: diff --git a/classes/class_arvrcontroller.rst b/classes/class_arvrcontroller.rst index 74cb286ec..5e4948ab1 100644 --- a/classes/class_arvrcontroller.rst +++ b/classes/class_arvrcontroller.rst @@ -14,7 +14,7 @@ ARVRController Brief Description ----------------- -A spatial node representing a spatially tracked controller. +A spatial node representing a spatially-tracked controller. Properties ---------- @@ -70,9 +70,9 @@ Description This is a helper spatial node that is linked to the tracking of controllers. It also offers several handy passthroughs to the state of buttons and such on the controllers. -Controllers are linked by their id. You can create controller nodes before the controllers are available. Say your game always uses two controllers (one for each hand) you can predefine the controllers with id 1 and 2 and they will become active as soon as the controllers are identified. If you expect additional controllers to be used, you should react to the signals and add ARVRController nodes to your scene. +Controllers are linked by their ID. You can create controller nodes before the controllers are available. If your game always uses two controllers (one for each hand), you can predefine the controllers with ID 1 and 2; they will become active as soon as the controllers are identified. If you expect additional controllers to be used, you should react to the signals and add ARVRController nodes to your scene. -The position of the controller node is automatically updated by the ARVR Server. This makes this node ideal to add child nodes to visualise the controller. +The position of the controller node is automatically updated by the :ref:`ARVRServer`. This makes this node ideal to add child nodes to visualize the controller. Property Descriptions --------------------- @@ -87,13 +87,13 @@ Property Descriptions | *Getter* | get_controller_id() | +----------+--------------------------+ -The controller's id. +The controller's ID. -A controller id of 0 is unbound and will always result in an inactive node. Controller id 1 is reserved for the first controller that identifies itself as the left hand controller and id 2 is reserved for the first controller that identifies itself as the right hand controller. +A controller ID of 0 is unbound and will always result in an inactive node. Controller ID 1 is reserved for the first controller that identifies itself as the left-hand controller and ID 2 is reserved for the first controller that identifies itself as the right-hand controller. -For any other controller that the :ref:`ARVRServer` detects, we continue with controller id 3. +For any other controller that the :ref:`ARVRServer` detects, we continue with controller ID 3. -When a controller is turned off, its slot is freed. This ensures controllers will keep the same id even when controllers with lower ids are turned off. +When a controller is turned off, its slot is freed. This ensures controllers will keep the same ID even when controllers with lower IDs are turned off. .. _class_ARVRController_property_rumble: @@ -120,7 +120,7 @@ If active, returns the name of the associated controller if provided by the AR/V - :ref:`TrackerHand` **get_hand** **(** **)** const -Returns the hand holding this controller, if known. See TRACKER\_\* constants in :ref:`ARVRPositionalTracker`. +Returns the hand holding this controller, if known. See ``TRACKER_*`` constants in :ref:`ARVRPositionalTracker`. .. _class_ARVRController_method_get_is_active: @@ -138,13 +138,13 @@ Returns the value of the given axis for things like triggers, touchpads, etc. th - :ref:`int` **get_joystick_id** **(** **)** const -Returns the ID of the joystick object bound to this. Every controller tracked by the ARVR Server that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry. +Returns the ID of the joystick object bound to this. Every controller tracked by the :ref:`ARVRServer` that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry. .. _class_ARVRController_method_get_mesh: - :ref:`Mesh` **get_mesh** **(** **)** const -If provided by the ARVR Interface this returns a mesh associated with the controller. This can be used to visualise the controller. +If provided by the :ref:`ARVRInterface`, this returns a mesh associated with the controller. This can be used to visualize the controller. .. _class_ARVRController_method_is_button_pressed: diff --git a/classes/class_arvrinterface.rst b/classes/class_arvrinterface.rst index ef641f4d3..428ebd91e 100644 --- a/classes/class_arvrinterface.rst +++ b/classes/class_arvrinterface.rst @@ -16,7 +16,7 @@ ARVRInterface Brief Description ----------------- -Base class for ARVR interface implementation. +Base class for an AR/VR interface implementation. Properties ---------- @@ -75,7 +75,7 @@ enum **Capabilities**: - **ARVR_AR** = **4** --- This interface support AR (video background and real world tracking). -- **ARVR_EXTERNAL** = **8** --- This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of get_render_targetsize. Using a separate viewport node frees up the main viewport for other purposes. +- **ARVR_EXTERNAL** = **8** --- This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of :ref:`get_render_targetsize`). Using a separate viewport node frees up the main viewport for other purposes. .. _enum_ARVRInterface_Eyes: @@ -109,9 +109,9 @@ enum **Tracking_status**: - **ARVR_NORMAL_TRACKING** = **0** --- Tracking is behaving as expected. -- **ARVR_EXCESSIVE_MOTION** = **1** --- Tracking is hindered by excessive motion, player is moving faster then tracking can keep up. +- **ARVR_EXCESSIVE_MOTION** = **1** --- Tracking is hindered by excessive motion, player is moving faster than tracking can keep up. -- **ARVR_INSUFFICIENT_FEATURES** = **2** --- Tracking is hindered by insufficient features, it's too dark (for camera based tracking), player is blocked, etc. +- **ARVR_INSUFFICIENT_FEATURES** = **2** --- Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc. - **ARVR_UNKNOWN_TRACKING** = **3** --- We don't know the status of the tracking or this interface does not provide feedback. @@ -122,7 +122,7 @@ Description This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass ARVRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform. -Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through ARVRServer. +Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through :ref:`ARVRServer`. Property Descriptions --------------------- @@ -170,7 +170,7 @@ Method Descriptions - :ref:`int` **get_camera_feed_id** **(** **)** -If this is an AR interface that requires displaying a camera feed as the background, this method returns the feed id in the :ref:`CameraServer` for this interface. +If this is an AR interface that requires displaying a camera feed as the background, this method returns the feed ID in the :ref:`CameraServer` for this interface. .. _class_ARVRInterface_method_get_capabilities: @@ -204,11 +204,11 @@ Call this to initialize this interface. The first interface that is initialized After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence. -Note that you must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR. +**Note:** You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR. -If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively you can add a separate viewport node to your scene and enable AR/VR on that viewport and it will be used to output to the HMD leaving you free to do anything you like in the main window such as using a separate camera as a spectator camera or render out something completely different. +If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport and it will be used to output to the HMD leaving you free to do anything you like in the main window such as using a separate camera as a spectator camera or render out something completely different. -While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However at this point in time only one interface can render to an HMD. +While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD. .. _class_ARVRInterface_method_is_stereo: diff --git a/classes/class_arvrinterfacegdnative.rst b/classes/class_arvrinterfacegdnative.rst index 168c2a1c9..45e2c0bd6 100644 --- a/classes/class_arvrinterfacegdnative.rst +++ b/classes/class_arvrinterfacegdnative.rst @@ -14,10 +14,10 @@ ARVRInterfaceGDNative Brief Description ----------------- -GDNative wrapper for an ARVR interface +GDNative wrapper for an ARVR interface. Description ----------- -This is a wrapper class for GDNative implementations of the ARVR interface. To use a GDNative ARVR interface simply instantiate this object and set your GDNative library containing the ARVR interface implementation. +This is a wrapper class for GDNative implementations of the ARVR interface. To use a GDNative ARVR interface, simply instantiate this object and set your GDNative library containing the ARVR interface implementation. diff --git a/classes/class_arvrorigin.rst b/classes/class_arvrorigin.rst index 68ef7a8b0..d07b658dd 100644 --- a/classes/class_arvrorigin.rst +++ b/classes/class_arvrorigin.rst @@ -14,7 +14,7 @@ ARVROrigin Brief Description ----------------- -Our origin point in AR/VR. +The origin point in AR/VR. Properties ---------- @@ -32,7 +32,7 @@ There should be only one of these nodes in your scene and you must have one. All It is the position of this node that you update when your character needs to move through your game world while we're not moving in the real world. Movement in the real world is always in relation to this origin point. -So say that your character is driving a car, the ARVROrigin node should be a child node of this car. If you implement a teleport system to move your character, you change the position of this node. Etc. +For example, if your character is driving a car, the ARVROrigin node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node. Property Descriptions --------------------- @@ -47,7 +47,7 @@ Property Descriptions | *Getter* | get_world_scale() | +----------+------------------------+ -Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world. +Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter. -Note that this method is a passthrough to the :ref:`ARVRServer` itself. +**Note:** This method is a passthrough to the :ref:`ARVRServer` itself. diff --git a/classes/class_arvrpositionaltracker.rst b/classes/class_arvrpositionaltracker.rst index 4192bfa3a..a6b524c4e 100644 --- a/classes/class_arvrpositionaltracker.rst +++ b/classes/class_arvrpositionaltracker.rst @@ -14,7 +14,7 @@ ARVRPositionalTracker Brief Description ----------------- -A tracked object +A tracked object. Properties ---------- @@ -70,11 +70,11 @@ enum **TrackerHand**: Description ----------- -An instance of this object represents a device that is tracked such as a controller or anchor point. HMDs aren't represented here as they are fully handled internally. +An instance of this object represents a device that is tracked, such as a controller or anchor point. HMDs aren't represented here as they are handled internally. -As controllers are turned on and the AR/VR interface detects them instances of this object are automatically added to this list of active tracking objects accessible through the ARVRServer +As controllers are turned on and the AR/VR interface detects them, instances of this object are automatically added to this list of active tracking objects accessible through the :ref:`ARVRServer`. -The ARVRController and ARVRAnchor both consume objects of this type and should be the objects you use in game. The positional trackers are just the under the hood objects that make this all work and are mostly exposed so GDNative based interfaces can interact with them. +The :ref:`ARVRController` and :ref:`ARVRAnchor` both consume objects of this type and should be used in your project. The positional trackers are just under-the-hood objects that make this all work. These are mostly exposed so that GDNative-based interfaces can interact with them. Property Descriptions --------------------- @@ -98,13 +98,13 @@ Method Descriptions - :ref:`TrackerHand` **get_hand** **(** **)** const -Returns the hand holding this tracker, if known. See TRACKER\_\* constants. +Returns the hand holding this tracker, if known. See ``TRACKER_*`` constants. .. _class_ARVRPositionalTracker_method_get_joy_id: - :ref:`int` **get_joy_id** **(** **)** const -If this is a controller that is being tracked the controller will also be represented by a joystick entry with this id. +If this is a controller that is being tracked, the controller will also be represented by a joystick entry with this ID. .. _class_ARVRPositionalTracker_method_get_mesh: diff --git a/classes/class_arvrserver.rst b/classes/class_arvrserver.rst index e433b1d03..efd9c95a6 100644 --- a/classes/class_arvrserver.rst +++ b/classes/class_arvrserver.rst @@ -14,7 +14,7 @@ ARVRServer Brief Description ----------------- -This is our AR/VR Server. +The AR/VR server. Properties ---------- @@ -61,25 +61,25 @@ Signals - **interface_added** **(** :ref:`String` interface_name **)** -Signal send when a new interface has been added. +Emitted when a new interface has been added. .. _class_ARVRServer_signal_interface_removed: - **interface_removed** **(** :ref:`String` interface_name **)** -Signal send when an interface is removed. +Emitted when an interface is removed. .. _class_ARVRServer_signal_tracker_added: - **tracker_added** **(** :ref:`String` tracker_name, :ref:`int` type, :ref:`int` id **)** -Signal send when a new tracker has been added. If you don't use a fixed number of controllers or if you're using ARVRAnchors for an AR solution it is important to react to this signal and add the appropriate ARVRController or ARVRAnchor node related to this new tracker. +Emitted when a new tracker has been added. If you don't use a fixed number of controllers or if you're using :ref:`ARVRAnchor`\ s for an AR solution, it is important to react to this signal to add the appropriate :ref:`ARVRController` or :ref:`ARVRAnchor` nodes related to this new tracker. .. _class_ARVRServer_signal_tracker_removed: - **tracker_removed** **(** :ref:`String` tracker_name, :ref:`int` type, :ref:`int` id **)** -Signal send when a tracker is removed, you should remove any ARVRController or ARVRAnchor points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one). +Emitted when a tracker is removed. You should remove any :ref:`ARVRController` or :ref:`ARVRAnchor` points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one). Enumerations ------------ @@ -100,11 +100,11 @@ Enumerations enum **TrackerType**: -- **TRACKER_CONTROLLER** = **1** --- Our tracker tracks the location of a controller. +- **TRACKER_CONTROLLER** = **1** --- The tracker tracks the location of a controller. -- **TRACKER_BASESTATION** = **2** --- Our tracker tracks the location of a base station. +- **TRACKER_BASESTATION** = **2** --- The tracker tracks the location of a base station. -- **TRACKER_ANCHOR** = **4** --- Our tracker tracks the location and size of an AR anchor. +- **TRACKER_ANCHOR** = **4** --- The tracker tracks the location and size of an AR anchor. - **TRACKER_ANY_KNOWN** = **127** --- Used internally to filter trackers of any known type. @@ -131,7 +131,7 @@ enum **RotationMode**: Description ----------- -The AR/VR Server is the heart of our AR/VR solution and handles all the processing. +The AR/VR server is the heart of our AR/VR solution and handles all the processing. Property Descriptions --------------------- @@ -156,7 +156,7 @@ Property Descriptions | *Getter* | get_world_scale() | +----------+------------------------+ -Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world. +Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter. Method Descriptions ------------------- @@ -165,23 +165,23 @@ Method Descriptions - void **center_on_hmd** **(** :ref:`RotationMode` rotation_mode, :ref:`bool` keep_height **)** -This is a really important function to understand correctly. AR and VR platforms all handle positioning slightly differently. +This is an important function to understand correctly. AR and VR platforms all handle positioning slightly differently. -For platforms that do not offer spatial tracking our origin point (0,0,0) is the location of our HMD but you have little control over the direction the player is facing in the real world. +For platforms that do not offer spatial tracking, our origin point (0,0,0) is the location of our HMD, but you have little control over the direction the player is facing in the real world. -For platforms that do offer spatial tracking our origin point depends very much on the system. For OpenVR our origin point is usually the center of the tracking space, on the ground. For other platforms its often the location of the tracking camera. +For platforms that do offer spatial tracking, our origin point depends very much on the system. For OpenVR, our origin point is usually the center of the tracking space, on the ground. For other platforms, it's often the location of the tracking camera. -This method allows you to center our tracker on the location of the HMD, it will take the current location of the HMD and use that to adjust all our tracking data in essence realigning the real world to your players current position in your game world. +This method allows you to center your tracker on the location of the HMD. It will take the current location of the HMD and use that to adjust all your tracking data; in essence, realigning the real world to your player's current position in the game world. -For this method to produce usable results tracking information should be available and this often takes a few frames after starting your game. +For this method to produce usable results, tracking information must be available. This often takes a few frames after starting your game. -You should call this method after a few seconds have passed, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, and when implementing a teleport mechanism. +You should call this method after a few seconds have passed. For instance, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism. .. _class_ARVRServer_method_find_interface: - :ref:`ARVRInterface` **find_interface** **(** :ref:`String` name **)** const -Find an interface by its name. Say that you're making a game that uses specific capabilities of an AR/VR platform you can find the interface for that platform by name and initialize it. +Finds an interface by its name. For instance, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it. .. _class_ARVRServer_method_get_hmd_transform: @@ -193,19 +193,19 @@ Returns the primary interface's transformation. - :ref:`ARVRInterface` **get_interface** **(** :ref:`int` idx **)** const -Get the interface registered at a given index in our list of interfaces. +Gets the interface registered at a given index in our list of interfaces. .. _class_ARVRServer_method_get_interface_count: - :ref:`int` **get_interface_count** **(** **)** const -Get the number of interfaces currently registered with the AR/VR server. If your game supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try an initialize each interface and use the first one that returns ``true``. +Gets the number of interfaces currently registered with the AR/VR server. If your project supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try to initialize each interface and use the first one that returns ``true``. .. _class_ARVRServer_method_get_interfaces: - :ref:`Array` **get_interfaces** **(** **)** const -Returns a list of available interfaces with both id and name of the interface. +Returns a list of available interfaces the ID and name of each interface. .. _class_ARVRServer_method_get_last_commit_usec: @@ -223,17 +223,17 @@ Returns a list of available interfaces with both id and name of the interface. - :ref:`Transform` **get_reference_frame** **(** **)** const -Gets our reference frame transform, mostly used internally and exposed for GDNative build interfaces. +Gets the reference frame transform. Mostly used internally and exposed for GDNative build interfaces. .. _class_ARVRServer_method_get_tracker: - :ref:`ARVRPositionalTracker` **get_tracker** **(** :ref:`int` idx **)** const -Get the positional tracker at the given ID. +Gets the positional tracker at the given ID. .. _class_ARVRServer_method_get_tracker_count: - :ref:`int` **get_tracker_count** **(** **)** const -Get the number of trackers currently registered. +Gets the number of trackers currently registered. diff --git a/classes/class_astar.rst b/classes/class_astar.rst index b6278b30a..70483fc54 100644 --- a/classes/class_astar.rst +++ b/classes/class_astar.rst @@ -98,7 +98,7 @@ Adds a new point at the given position with the given identifier. The algorithm var as = AStar.new() as.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with weight_scale 4 and id 1 -If there already exists a point for the given id, its position and weight scale are updated to the given values. +If there already exists a point for the given ``id``, its position and weight scale are updated to the given values. .. _class_AStar_method_are_points_connected: @@ -135,13 +135,13 @@ Deletes the segment between the given points. - :ref:`int` **get_available_point_id** **(** **)** const -Returns the next available point id with no point associated to it. +Returns the next available point ID with no point associated to it. .. _class_AStar_method_get_closest_point: - :ref:`int` **get_closest_point** **(** :ref:`Vector3` to_position **)** const -Returns the id of the closest point to ``to_position``. Returns -1 if there are no points in the points pool. +Returns the ID of the closest point to ``to_position``. Returns -1 if there are no points in the points pool. .. _class_AStar_method_get_closest_position_in_segment: @@ -155,7 +155,7 @@ Returns the closest position to ``to_position`` that resides inside a segment be as.add_point(1, Vector3(0, 0, 0)) as.add_point(2, Vector3(0, 5, 0)) as.connect_points(1, 2) - var res = as.get_closest_position_in_segment(Vector3(3, 3, 0)) # returns (0, 3, 0) + var res = as.get_closest_position_in_segment(Vector3(3, 3, 0)) # Returns (0, 3, 0) The result is in the segment that goes from ``y = 0`` to ``y = 5``. It's the closest position in the segment to the given point. @@ -163,13 +163,13 @@ The result is in the segment that goes from ``y = 0`` to ``y = 5``. It's the clo - :ref:`PoolIntArray` **get_id_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** -Returns an array with the ids of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. +Returns an array with the IDs of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. :: var as = AStar.new() as.add_point(1, Vector3(0, 0, 0)) - as.add_point(2, Vector3(0, 1, 0), 1) # default weight is 1 + as.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1 as.add_point(3, Vector3(1, 1, 0)) as.add_point(4, Vector3(2, 0, 0)) @@ -179,7 +179,7 @@ Returns an array with the ids of the points that form the path found by AStar be as.connect_points(1, 4, false) as.connect_points(5, 4, false) - var res = as.get_id_path(1, 3) # returns [1, 2, 3] + var res = as.get_id_path(1, 3) # Returns [1, 2, 3] If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. @@ -187,7 +187,7 @@ If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` - :ref:`PoolIntArray` **get_point_connections** **(** :ref:`int` id **)** -Returns an array with the ids of the points that form the connect with the given point. +Returns an array with the IDs of the points that form the connection with the given point. :: @@ -200,7 +200,7 @@ Returns an array with the ids of the points that form the connect with the given as.connect_points(1, 2, true) as.connect_points(1, 3, true) - var neighbors = as.get_point_connections(1) # returns [2, 3] + var neighbors = as.get_point_connections(1) # Returns [2, 3] .. _class_AStar_method_get_point_path: @@ -212,13 +212,13 @@ Returns an array with the points that are in the path found by AStar between the - :ref:`Vector3` **get_point_position** **(** :ref:`int` id **)** const -Returns the position of the point associated with the given id. +Returns the position of the point associated with the given ``id``. .. _class_AStar_method_get_point_weight_scale: - :ref:`float` **get_point_weight_scale** **(** :ref:`int` id **)** const -Returns the weight scale of the point associated with the given id. +Returns the weight scale of the point associated with the given ``id``. .. _class_AStar_method_get_points: @@ -230,7 +230,7 @@ Returns an array of all points. - :ref:`bool` **has_point** **(** :ref:`int` id **)** const -Returns whether a point associated with the given id exists. +Returns whether a point associated with the given ``id`` exists. .. _class_AStar_method_is_point_disabled: @@ -242,7 +242,7 @@ Returns whether a point is disabled or not for pathfinding. By default, all poin - void **remove_point** **(** :ref:`int` id **)** -Removes the point associated with the given id from the points pool. +Removes the point associated with the given ``id`` from the points pool. .. _class_AStar_method_set_point_disabled: @@ -254,11 +254,11 @@ Disables or enables the specified point for pathfinding. Useful for making a tem - void **set_point_position** **(** :ref:`int` id, :ref:`Vector3` position **)** -Sets the position for the point with the given id. +Sets the ``position`` for the point with the given ``id``. .. _class_AStar_method_set_point_weight_scale: - void **set_point_weight_scale** **(** :ref:`int` id, :ref:`float` weight_scale **)** -Sets the ``weight_scale`` for the point with the given id. +Sets the ``weight_scale`` for the point with the given ``id``. diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index 6d6c0873c..84590b69c 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -80,7 +80,7 @@ Adds a new point at the given position with the given identifier. The algorithm var as = AStar2D.new() as.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with weight_scale 4 and id 1 -If there already exists a point for the given id, its position and weight scale are updated to the given values. +If there already exists a point for the given ``id``, its position and weight scale are updated to the given values. .. _class_AStar2D_method_are_points_connected: @@ -117,13 +117,13 @@ Deletes the segment between the given points. - :ref:`int` **get_available_point_id** **(** **)** const -Returns the next available point id with no point associated to it. +Returns the next available point ID with no point associated to it. .. _class_AStar2D_method_get_closest_point: - :ref:`int` **get_closest_point** **(** :ref:`Vector2` to_position **)** const -Returns the id of the closest point to ``to_position``. Returns -1 if there are no points in the points pool. +Returns the ID of the closest point to ``to_position``. Returns -1 if there are no points in the points pool. .. _class_AStar2D_method_get_closest_position_in_segment: @@ -137,7 +137,7 @@ Returns the closest position to ``to_position`` that resides inside a segment be as.add_point(1, Vector2(0, 0)) as.add_point(2, Vector2(0, 5)) as.connect_points(1, 2) - var res = as.get_closest_position_in_segment(Vector2(3, 3)) # returns (0, 3) + var res = as.get_closest_position_in_segment(Vector2(3, 3)) # Returns (0, 3) The result is in the segment that goes from ``y = 0`` to ``y = 5``. It's the closest position in the segment to the given point. @@ -145,13 +145,13 @@ The result is in the segment that goes from ``y = 0`` to ``y = 5``. It's the clo - :ref:`PoolIntArray` **get_id_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** -Returns an array with the ids of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. +Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. :: var as = AStar2D.new() as.add_point(1, Vector2(0, 0)) - as.add_point(2, Vector2(0, 1), 1) # default weight is 1 + as.add_point(2, Vector2(0, 1), 1) # Default weight is 1 as.add_point(3, Vector2(1, 1)) as.add_point(4, Vector2(2, 0)) @@ -161,7 +161,7 @@ Returns an array with the ids of the points that form the path found by AStar2D as.connect_points(1, 4, false) as.connect_points(5, 4, false) - var res = as.get_id_path(1, 3) # returns [1, 2, 3] + var res = as.get_id_path(1, 3) # Returns [1, 2, 3] If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. @@ -169,7 +169,7 @@ If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` - :ref:`PoolIntArray` **get_point_connections** **(** :ref:`int` id **)** -Returns an array with the ids of the points that form the connect with the given point. +Returns an array with the IDs of the points that form the connection with the given point. :: @@ -182,7 +182,7 @@ Returns an array with the ids of the points that form the connect with the given as.connect_points(1, 2, true) as.connect_points(1, 3, true) - var neighbors = as.get_point_connections(1) # returns [2, 3] + var neighbors = as.get_point_connections(1) # Returns [2, 3] .. _class_AStar2D_method_get_point_path: @@ -194,13 +194,13 @@ Returns an array with the points that are in the path found by AStar2D between t - :ref:`Vector2` **get_point_position** **(** :ref:`int` id **)** const -Returns the position of the point associated with the given id. +Returns the position of the point associated with the given ``id``. .. _class_AStar2D_method_get_point_weight_scale: - :ref:`float` **get_point_weight_scale** **(** :ref:`int` id **)** const -Returns the weight scale of the point associated with the given id. +Returns the weight scale of the point associated with the given ``id``. .. _class_AStar2D_method_get_points: @@ -212,7 +212,7 @@ Returns an array of all points. - :ref:`bool` **has_point** **(** :ref:`int` id **)** const -Returns whether a point associated with the given id exists. +Returns whether a point associated with the given ``id`` exists. .. _class_AStar2D_method_is_point_disabled: @@ -224,7 +224,7 @@ Returns whether a point is disabled or not for pathfinding. By default, all poin - void **remove_point** **(** :ref:`int` id **)** -Removes the point associated with the given id from the points pool. +Removes the point associated with the given ``id`` from the points pool. .. _class_AStar2D_method_set_point_disabled: @@ -236,11 +236,11 @@ Disables or enables the specified point for pathfinding. Useful for making a tem - void **set_point_position** **(** :ref:`int` id, :ref:`Vector2` position **)** -Sets the position for the point with the given id. +Sets the ``position`` for the point with the given ``id``. .. _class_AStar2D_method_set_point_weight_scale: - void **set_point_weight_scale** **(** :ref:`int` id, :ref:`float` weight_scale **)** -Sets the ``weight_scale`` for the point with the given id. +Sets the ``weight_scale`` for the point with the given ``id``. diff --git a/classes/class_atlastexture.rst b/classes/class_atlastexture.rst index 8ffa94c2b..66a23fbdc 100644 --- a/classes/class_atlastexture.rst +++ b/classes/class_atlastexture.rst @@ -73,7 +73,7 @@ If ``true``, clips the area outside of the region to avoid bleeding of the surro | *Getter* | get_margin() | +----------+-------------------+ -The margin around the region. The :ref:`Rect2`'s 'size' parameter ('w' and 'h' in the editor) resizes the texture so it fits within the margin. +The margin around the region. The :ref:`Rect2`'s :ref:`Rect2.size` parameter ("w" and "h" in the editor) resizes the texture so it fits within the margin. .. _class_AtlasTexture_property_region: diff --git a/classes/class_audiobuslayout.rst b/classes/class_audiobuslayout.rst index ab1679936..6775165d3 100644 --- a/classes/class_audiobuslayout.rst +++ b/classes/class_audiobuslayout.rst @@ -14,7 +14,7 @@ AudioBusLayout Brief Description ----------------- -Stores information about the audiobusses. +Stores information about the audio buses. Description ----------- diff --git a/classes/class_audioeffect.rst b/classes/class_audioeffect.rst index 72dc679fc..ac9400b1c 100644 --- a/classes/class_audioeffect.rst +++ b/classes/class_audioeffect.rst @@ -16,7 +16,7 @@ AudioEffect Brief Description ----------------- -Audio Effect For Audio. +Audio effect for audio. Description ----------- diff --git a/classes/class_audioeffectamplify.rst b/classes/class_audioeffectamplify.rst index 188218732..3be615aa6 100644 --- a/classes/class_audioeffectamplify.rst +++ b/classes/class_audioeffectamplify.rst @@ -14,7 +14,7 @@ AudioEffectAmplify Brief Description ----------------- -Adds a Amplify audio effect to an Audio bus. +Adds an amplifying audio effect to an audio bus. Increases or decreases the volume of the selected audio bus. @@ -43,5 +43,5 @@ Property Descriptions | *Getter* | get_volume_db() | +----------+----------------------+ -Amount of amplification. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. Default value: ``0``. +Amount of amplification in decibels. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. Default value: ``0``. diff --git a/classes/class_audioeffectbandlimitfilter.rst b/classes/class_audioeffectbandlimitfilter.rst index b9dcb56a8..0d002e0ea 100644 --- a/classes/class_audioeffectbandlimitfilter.rst +++ b/classes/class_audioeffectbandlimitfilter.rst @@ -14,7 +14,7 @@ AudioEffectBandLimitFilter Brief Description ----------------- -Adds a band limit filter to the Audio Bus. +Adds a band limit filter to the audio bus. Description ----------- diff --git a/classes/class_audioeffectbandpassfilter.rst b/classes/class_audioeffectbandpassfilter.rst index 3ec331750..3021e8ab7 100644 --- a/classes/class_audioeffectbandpassfilter.rst +++ b/classes/class_audioeffectbandpassfilter.rst @@ -14,7 +14,7 @@ AudioEffectBandPassFilter Brief Description ----------------- -Adds a band pass filter to the Audio Bus. +Adds a band pass filter to the audio bus. Description ----------- diff --git a/classes/class_audioeffectcompressor.rst b/classes/class_audioeffectcompressor.rst index e7f4c3851..c49b97684 100644 --- a/classes/class_audioeffectcompressor.rst +++ b/classes/class_audioeffectcompressor.rst @@ -14,7 +14,7 @@ AudioEffectCompressor Brief Description ----------------- -Adds a Compressor audio effect to an Audio bus. +Adds a compressor audio effect to an audio bus. Reduces sounds that exceed a certain threshold level, smooths out the dynamics and increases the overall volume. @@ -44,11 +44,11 @@ Dynamic range compressor reduces the level of the sound when the amplitude goes Compressor has many uses in the mix: -- In the Master bus to compress the whole output (Although a :ref:`AudioEffectLimiter` is probably better) +- In the Master bus to compress the whole output (although an :ref:`AudioEffectLimiter` is probably better). - In voice channels to ensure they sound as balanced as possible. -- Sidechained. Sidechained, which can reduce the sound level sidechained with another audio bus for threshold detection.. This technique is very common in video game mixing to download the level of Music/SFX while voices are being heard. +- Sidechained. This can reduce the sound level sidechained with another audio bus for threshold detection. This technique is common in video game mixing to the level of music and SFX while voices are being heard. - Accentuates transients by using a wider attack, making effects sound more punchy. @@ -65,7 +65,7 @@ Property Descriptions | *Getter* | get_attack_us() | +----------+----------------------+ -Compressor's reaction time when the signal exceeds the threshold. Value can range from 20 to 2000. Default value: ``20ms``. +Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000. Default value: ``20us``. .. _class_AudioEffectCompressor_property_gain: @@ -101,7 +101,7 @@ Balance between original signal and effect signal. Value can range from 0 (total | *Getter* | get_ratio() | +----------+------------------+ -Amount of compression applied to the audio once it passes the threshold level. The higher the ratio the more the loud parts of the audio will be compressed. Value can range from 1 to 48. Default value: ``4``. +Amount of compression applied to the audio once it passes the threshold level. The higher the ratio, the more the loud parts of the audio will be compressed. Value can range from 1 to 48. Default value: ``4``. .. _class_AudioEffectCompressor_property_release_ms: @@ -113,7 +113,7 @@ Amount of compression applied to the audio once it passes the threshold level. T | *Getter* | get_release_ms() | +----------+-----------------------+ -Compressor's delay time to stop reducing the signal after the signal level falls below the threshold. Value can range from 20 to 2000. Default value: ``250ms``. +Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000. Default value: ``250ms``. .. _class_AudioEffectCompressor_property_sidechain: diff --git a/classes/class_audioeffectdelay.rst b/classes/class_audioeffectdelay.rst index 1b9ff7c94..3ea6585c3 100644 --- a/classes/class_audioeffectdelay.rst +++ b/classes/class_audioeffectdelay.rst @@ -14,7 +14,7 @@ AudioEffectDelay Brief Description ----------------- -Adds a Delay audio effect to an Audio bus. Plays input signal back after a period of time. +Adds a delay audio effect to an audio bus. Plays input signal back after a period of time. Two tap delay and feedback options. @@ -115,7 +115,7 @@ Sound level for ``tap1``. Default value: ``-6 dB``. | *Getter* | get_feedback_lowpass() | +----------+-----------------------------+ -Low-pass filter for feedback. Frequencies below the Low Cut value are filtered out of the source signal. Default value: ``16000``. +Low-pass filter for feedback, in Hz. Frequencies below this value are filtered out of the source signal. Default value: ``16000``. .. _class_AudioEffectDelay_property_tap1/active: @@ -139,7 +139,7 @@ If ``true``, ``tap1`` will be enabled. Default value: ``true``. | *Getter* | get_tap1_delay_ms() | +----------+--------------------------+ -**Tap1** delay time in milliseconds. Default value: ``250ms``. +``tap1`` delay time in milliseconds. Default value: ``250ms``. .. _class_AudioEffectDelay_property_tap1/level_db: diff --git a/classes/class_audioeffectdistortion.rst b/classes/class_audioeffectdistortion.rst index 9d1599611..0f8239a07 100644 --- a/classes/class_audioeffectdistortion.rst +++ b/classes/class_audioeffectdistortion.rst @@ -14,7 +14,7 @@ AudioEffectDistortion Brief Description ----------------- -Adds a Distortion audio effect to an Audio bus. +Adds a distortion audio effect to an Audio bus. Modify the sound to make it dirty. @@ -63,7 +63,7 @@ enum **Mode**: Description ----------- -Modify the sound and make it dirty. Different types are available : clip, tan, lofi (bit crushing), overdrive, or waveshape. +Modify the sound and make it dirty. Different types are available: clip, tan, lo-fi (bit crushing), overdrive, or waveshape. By distorting the waveform the frequency content change, which will often make the sound "crunchy" or "abrasive". For games, it can simulate sound coming from some saturated device or speaker very efficiently. @@ -92,7 +92,7 @@ Distortion power. Value can range from 0 to 1. Default value: ``0``. | *Getter* | get_keep_hf_hz() | +----------+-----------------------+ -High-pass filter. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000. Default value: ``16000``. +High-pass filter, in Hz. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000. Default value: ``16000``. .. _class_AudioEffectDistortion_property_mode: @@ -104,7 +104,7 @@ High-pass filter. Frequencies higher than this value will not be affected by the | *Getter* | get_mode() | +----------+-----------------+ -Distortion type. Default value: ``MODE_CLIP``. +Distortion type. Default value: :ref:`MODE_CLIP`. .. _class_AudioEffectDistortion_property_post_gain: diff --git a/classes/class_audioeffecteq.rst b/classes/class_audioeffecteq.rst index d5883d046..5d41f17da 100644 --- a/classes/class_audioeffecteq.rst +++ b/classes/class_audioeffecteq.rst @@ -34,7 +34,7 @@ Methods Description ----------- -AudioEffectEQ gives you control over frequencies. Use it to compensate for existing deficiencies in audio. AudioEffectEQ are very useful on the Master Bus to completely master a mix and give it character. They are also very useful when a game is run on a mobile device, to adjust the mix to that kind of speakers (it can be added but disabled when headphones are plugged). +AudioEffectEQ gives you control over frequencies. Use it to compensate for existing deficiencies in audio. AudioEffectEQs are useful on the Master bus to completely master a mix and give it more character. They are also useful when a game is run on a mobile device, to adjust the mix to that kind of speakers (it can be added but disabled when headphones are plugged). Method Descriptions ------------------- diff --git a/classes/class_audioeffecteq10.rst b/classes/class_audioeffecteq10.rst index 27862cd14..6527660f8 100644 --- a/classes/class_audioeffecteq10.rst +++ b/classes/class_audioeffecteq10.rst @@ -21,27 +21,27 @@ Each frequency can be modulated between -60/+24 dB. Description ----------- -Frequency bands : +Frequency bands: -Band 1 : 31 Hz +Band 1: 31 Hz -Band 2 : 62 Hz +Band 2: 62 Hz -Band 3 : 125 Hz +Band 3: 125 Hz -Band 4 : 250 Hz +Band 4: 250 Hz -Band 5 : 500 Hz +Band 5: 500 Hz -Band 6 : 1000 Hz +Band 6: 1000 Hz -Band 7 : 2000 Hz +Band 7: 2000 Hz -Band 8 : 4000 Hz +Band 8: 4000 Hz -Band 9 : 8000 Hz +Band 9: 8000 Hz -Band 10 : 16000 Hz +Band 10: 16000 Hz See also :ref:`AudioEffectEQ`, :ref:`AudioEffectEQ6`, :ref:`AudioEffectEQ21`. diff --git a/classes/class_audioeffecteq21.rst b/classes/class_audioeffecteq21.rst index 073f494bc..d2dd4b873 100644 --- a/classes/class_audioeffecteq21.rst +++ b/classes/class_audioeffecteq21.rst @@ -21,49 +21,49 @@ Each frequency can be modulated between -60/+24 dB. Description ----------- -Frequency bands : +Frequency bands: -Band 1 : 22 Hz +Band 1: 22 Hz -Band 2 : 32 Hz +Band 2: 32 Hz -Band 3 : 44 Hz +Band 3: 44 Hz -Band 4 : 63 Hz +Band 4: 63 Hz -Band 5 : 90 Hz +Band 5: 90 Hz -Band 6 : 125 Hz +Band 6: 125 Hz -Band 7 : 175 Hz +Band 7: 175 Hz -Band 8 : 250 Hz +Band 8: 250 Hz -Band 9 : 350 Hz +Band 9: 350 Hz -Band 10 : 500 Hz +Band 10: 500 Hz -Band 11 : 700 Hz +Band 11: 700 Hz -Band 12 : 1000 Hz +Band 12: 1000 Hz -Band 13 : 1400 Hz +Band 13: 1400 Hz -Band 14 : 2000 Hz +Band 14: 2000 Hz -Band 15 : 2800 Hz +Band 15: 2800 Hz -Band 16 : 4000 Hz +Band 16: 4000 Hz -Band 17 : 5600 Hz +Band 17: 5600 Hz -Band 18 : 8000 Hz +Band 18: 8000 Hz -Band 19 : 11000 Hz +Band 19: 11000 Hz -Band 20 : 16000 Hz +Band 20: 16000 Hz -Band 21 : 22000 Hz +Band 21: 22000 Hz See also :ref:`AudioEffectEQ`, :ref:`AudioEffectEQ6`, :ref:`AudioEffectEQ10`. diff --git a/classes/class_audioeffecteq6.rst b/classes/class_audioeffecteq6.rst index 9796b0128..ef80c324c 100644 --- a/classes/class_audioeffecteq6.rst +++ b/classes/class_audioeffecteq6.rst @@ -21,19 +21,19 @@ Each frequency can be modulated between -60/+24 dB. Description ----------- -Frequency bands : +Frequency bands: -Band 1 : 32 Hz +Band 1: 32 Hz -Band 2 : 100 Hz +Band 2: 100 Hz -Band 3 : 320 Hz +Band 3: 320 Hz -Band 4 : 1000 Hz +Band 4: 1000 Hz -Band 5 : 3200 Hz +Band 5: 3200 Hz -Band 6 : 10000 Hz +Band 6: 10000 Hz See also :ref:`AudioEffectEQ`, :ref:`AudioEffectEQ10`, :ref:`AudioEffectEQ21`. diff --git a/classes/class_audioeffectfilter.rst b/classes/class_audioeffectfilter.rst index 1ef0dc0c2..a881b7d84 100644 --- a/classes/class_audioeffectfilter.rst +++ b/classes/class_audioeffectfilter.rst @@ -16,7 +16,7 @@ AudioEffectFilter Brief Description ----------------- -Adds a filter to the Audio Bus. +Adds a filter to the audio bus. Properties ---------- @@ -72,7 +72,7 @@ Property Descriptions | *Getter* | get_cutoff() | +----------+-------------------+ -Threshold frequency for the filter. +Threshold frequency for the filter, in Hz. .. _class_AudioEffectFilter_property_db: diff --git a/classes/class_audioeffecthighpassfilter.rst b/classes/class_audioeffecthighpassfilter.rst index d0ef18ca5..65c8af0db 100644 --- a/classes/class_audioeffecthighpassfilter.rst +++ b/classes/class_audioeffecthighpassfilter.rst @@ -14,7 +14,7 @@ AudioEffectHighPassFilter Brief Description ----------------- -Adds a high pass filter to the Audio Bus. +Adds a high-pass filter to the Audio Bus. Description ----------- diff --git a/classes/class_audioeffectlimiter.rst b/classes/class_audioeffectlimiter.rst index 3b508d97f..85375eff2 100644 --- a/classes/class_audioeffectlimiter.rst +++ b/classes/class_audioeffectlimiter.rst @@ -14,7 +14,7 @@ AudioEffectLimiter Brief Description ----------------- -Adds a soft clip Limiter audio effect to an Audio bus. +Adds a soft-clip limiter audio effect to an Audio bus. Properties ---------- @@ -32,7 +32,7 @@ Properties Description ----------- -A limiter is similar to a compressor, but it's less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master Bus is always recommended to reduce the effects of clipping. +A limiter is similar to a compressor, but it's less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master bus is always recommended to reduce the effects of clipping. Soft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded. @@ -49,7 +49,7 @@ Property Descriptions | *Getter* | get_ceiling_db() | +----------+-----------------------+ -The waveform's maximum allowed value. Value can range from -20 to -0.1. Default value: ``-0.1dB``. +The waveform's maximum allowed value, in decibels. Value can range from -20 to -0.1. Default value: ``-0.1dB``. .. _class_AudioEffectLimiter_property_soft_clip_db: @@ -61,7 +61,7 @@ The waveform's maximum allowed value. Value can range from -20 to -0.1. Default | *Getter* | get_soft_clip_db() | +----------+-------------------------+ -Applies a gain to the limited waves. Value can range from 0 to 6. Default value: ``2dB``. +Applies a gain to the limited waves, in decibels. Value can range from 0 to 6. Default value: ``2dB``. .. _class_AudioEffectLimiter_property_soft_clip_ratio: @@ -83,5 +83,5 @@ Applies a gain to the limited waves. Value can range from 0 to 6. Default value: | *Getter* | get_threshold_db() | +----------+-------------------------+ -Threshold from which the limiter begins to be active. Value can range from -30 to 0. Default value: ``0dB``. +Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0. Default value: ``0dB``. diff --git a/classes/class_audioeffectlowpassfilter.rst b/classes/class_audioeffectlowpassfilter.rst index 701ee2cb2..b7cec2f2c 100644 --- a/classes/class_audioeffectlowpassfilter.rst +++ b/classes/class_audioeffectlowpassfilter.rst @@ -14,7 +14,7 @@ AudioEffectLowPassFilter Brief Description ----------------- -Adds a low pass filter to the Audio Bus. +Adds a low-pass filter to the Audio bus. Description ----------- diff --git a/classes/class_audioeffectnotchfilter.rst b/classes/class_audioeffectnotchfilter.rst index 58fcd4251..08cbf1060 100644 --- a/classes/class_audioeffectnotchfilter.rst +++ b/classes/class_audioeffectnotchfilter.rst @@ -14,7 +14,7 @@ AudioEffectNotchFilter Brief Description ----------------- -Adds a notch filter to the Audio Bus. +Adds a notch filter to the Audio bus. Description ----------- diff --git a/classes/class_audioeffectpanner.rst b/classes/class_audioeffectpanner.rst index 73a590ed3..fcf527698 100644 --- a/classes/class_audioeffectpanner.rst +++ b/classes/class_audioeffectpanner.rst @@ -14,7 +14,7 @@ AudioEffectPanner Brief Description ----------------- -Adds a Panner audio effect to an Audio bus. Pans sound left or right. +Adds a panner audio effect to an Audio bus. Pans sound left or right. Properties ---------- diff --git a/classes/class_audioeffectphaser.rst b/classes/class_audioeffectphaser.rst index d72e0f9e0..d0ca0334e 100644 --- a/classes/class_audioeffectphaser.rst +++ b/classes/class_audioeffectphaser.rst @@ -14,7 +14,7 @@ AudioEffectPhaser Brief Description ----------------- -Adds a Phaser audio effect to an Audio bus. +Adds a phaser audio effect to an Audio bus. Combines the original signal with a copy that is slightly out of phase with the original. @@ -36,7 +36,7 @@ Properties Description ----------- -Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a Low Frequency Oscillator. +Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a low-frequency oscillator. Property Descriptions --------------------- @@ -75,7 +75,7 @@ Output percent of modified sound. Value can range from 0.1 to 0.9. Default value | *Getter* | get_range_max_hz() | +----------+-------------------------+ -Determines the maximum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: ``1600hz``. +Determines the maximum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000. Default value: ``1600hz``. .. _class_AudioEffectPhaser_property_range_min_hz: @@ -87,7 +87,7 @@ Determines the maximum frequency affected by the LFO modulations. Value can rang | *Getter* | get_range_min_hz() | +----------+-------------------------+ -Determines the minimum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: ``440hz``. +Determines the minimum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000. Default value: ``440hz``. .. _class_AudioEffectPhaser_property_rate_hz: @@ -99,5 +99,5 @@ Determines the minimum frequency affected by the LFO modulations. Value can rang | *Getter* | get_rate_hz() | +----------+--------------------+ -Adjusts the rate at which the effect sweeps up and down across the frequency range. +Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range. diff --git a/classes/class_audioeffectpitchshift.rst b/classes/class_audioeffectpitchshift.rst index 54e4f46a8..062225e20 100644 --- a/classes/class_audioeffectpitchshift.rst +++ b/classes/class_audioeffectpitchshift.rst @@ -14,7 +14,7 @@ AudioEffectPitchShift Brief Description ----------------- -Adds a Pitch shift audio effect to an Audio bus. +Adds a pitch-shifting audio effect to an Audio bus. Raises or lowers the pitch of original sound. @@ -58,7 +58,7 @@ enum **FFT_Size**: - **FFT_SIZE_4096** = **4** -- **FFT_SIZE_MAX** = **5** +- **FFT_SIZE_MAX** = **5** --- Represents the size of the :ref:`FFT_Size` enum. Description ----------- diff --git a/classes/class_audioeffectreverb.rst b/classes/class_audioeffectreverb.rst index 0419315be..12dd18758 100644 --- a/classes/class_audioeffectreverb.rst +++ b/classes/class_audioeffectreverb.rst @@ -14,7 +14,7 @@ AudioEffectReverb Brief Description ----------------- -Adds a Reverb audio effect to an Audio bus. +Adds a reverberation audio effect to an Audio bus. Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces. @@ -105,7 +105,7 @@ Output percent of predelay. Value can range from 0 to 1. Default value: ``1``. | *Getter* | get_predelay_msec() | +----------+--------------------------+ -Time between the original signal and the early reflections of the reverb signal. Default value: ``150ms``. +Time between the original signal and the early reflections of the reverb signal, in milliseconds. Default value: ``150ms``. .. _class_AudioEffectReverb_property_room_size: diff --git a/classes/class_audioeffectspectrumanalyzer.rst b/classes/class_audioeffectspectrumanalyzer.rst index 3b4934473..e14ad9137 100644 --- a/classes/class_audioeffectspectrumanalyzer.rst +++ b/classes/class_audioeffectspectrumanalyzer.rst @@ -56,7 +56,7 @@ enum **FFT_Size**: - **FFT_SIZE_4096** = **4** -- **FFT_SIZE_MAX** = **5** +- **FFT_SIZE_MAX** = **5** --- Represents the size of the :ref:`FFT_Size` enum. Property Descriptions --------------------- diff --git a/classes/class_audioeffectspectrumanalyzerinstance.rst b/classes/class_audioeffectspectrumanalyzerinstance.rst index 2ec509710..4f8a7222d 100644 --- a/classes/class_audioeffectspectrumanalyzerinstance.rst +++ b/classes/class_audioeffectspectrumanalyzerinstance.rst @@ -34,9 +34,9 @@ Enumerations enum **MagnitudeMode**: -- **MAGNITUDE_AVERAGE** = **0** +- **MAGNITUDE_AVERAGE** = **0** --- Use the average value as magnitude. -- **MAGNITUDE_MAX** = **1** +- **MAGNITUDE_MAX** = **1** --- Use the maximum value as magnitude. Method Descriptions ------------------- diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index 499000ee3..424c9ef39 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -14,7 +14,7 @@ AudioServer Brief Description ----------------- -Server interface for low level audio access. +Server interface for low-level audio access. Methods ------- @@ -144,7 +144,7 @@ enum **SpeakerMode**: 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. +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. Tutorials --------- @@ -396,5 +396,5 @@ Swaps the position of two effects in bus ``bus_idx``. - void **unlock** **(** **)** -Unlocks the audiodriver's main loop. After locking it always unlock it. +Unlocks the audio driver's main loop. (After locking it, you should always unlock it.) diff --git a/classes/class_audiostreamplayback.rst b/classes/class_audiostreamplayback.rst index 47eb69160..829f391ad 100644 --- a/classes/class_audiostreamplayback.rst +++ b/classes/class_audiostreamplayback.rst @@ -21,5 +21,5 @@ Meta class for playing back audio. Description ----------- -Can play, loop, pause a scroll through Audio. See :ref:`AudioStream` and :ref:`AudioStreamOGGVorbis` for usage. +Can play, loop, pause a scroll through audio. See :ref:`AudioStream` and :ref:`AudioStreamOGGVorbis` for usage. diff --git a/classes/class_audiostreamplayer.rst b/classes/class_audiostreamplayer.rst index 63b4524e8..f3178a5ae 100644 --- a/classes/class_audiostreamplayer.rst +++ b/classes/class_audiostreamplayer.rst @@ -14,7 +14,7 @@ AudioStreamPlayer Brief Description ----------------- -Plays back audio. +Plays back audio non-positionally. Properties ---------- @@ -83,7 +83,7 @@ enum **MixTarget**: Description ----------- -Plays background audio. +Plays an audio stream non-positionally. Tutorials --------- @@ -202,7 +202,7 @@ Returns the position in the :ref:`AudioStream` in seconds. - void **play** **(** :ref:`float` from_position=0.0 **)** -Plays the audio from the given position 'from_position', in seconds. +Plays the audio from the given ``from_position``, in seconds. .. _class_AudioStreamPlayer_method_seek: diff --git a/classes/class_audiostreamplayer2d.rst b/classes/class_audiostreamplayer2d.rst index 8e4dd051f..c9a0aef7f 100644 --- a/classes/class_audiostreamplayer2d.rst +++ b/classes/class_audiostreamplayer2d.rst @@ -211,7 +211,7 @@ Returns the position in the :ref:`AudioStream`. - void **play** **(** :ref:`float` from_position=0.0 **)** -Plays the audio from the given position 'from_position', in seconds. +Plays the audio from the given position ``from_position``, in seconds. .. _class_AudioStreamPlayer2D_method_seek: diff --git a/classes/class_audiostreamplayer3d.rst b/classes/class_audiostreamplayer3d.rst index 4325bd673..44473be8a 100644 --- a/classes/class_audiostreamplayer3d.rst +++ b/classes/class_audiostreamplayer3d.rst @@ -81,7 +81,7 @@ Signals - **finished** **(** **)** -Fires when the audio stops playing. +Emitted when the audio stops playing. Enumerations ------------ @@ -265,7 +265,7 @@ If ``true``, the audio should be dampened according to the direction of the soun | *Getter* | get_emission_angle_filter_attenuation_db() | +----------+-------------------------------------------------+ -dampens audio if camera is outside of 'emission_angle_degrees' and 'emission_angle_enabled' is set by this factor, in dB. +Dampens audio if camera is outside of :ref:`emission_angle_degrees` and :ref:`emission_angle_enabled` is set by this factor, in dB. .. _class_AudioStreamPlayer3D_property_max_db: @@ -289,7 +289,7 @@ Sets the absolute maximum of the soundlevel, in dB. | *Getter* | get_max_distance() | +----------+-------------------------+ -Sets the distance from which the 'out_of_range_mode' takes effect. Has no effect if set to 0. +Sets the distance from which the :ref:`out_of_range_mode` takes effect. Has no effect if set to 0. .. _class_AudioStreamPlayer3D_property_out_of_range_mode: @@ -301,7 +301,7 @@ Sets the distance from which the 'out_of_range_mode' takes effect. Has no effect | *Getter* | get_out_of_range_mode() | +----------+------------------------------+ -Decides if audio should pause when source is outside of 'max_distance' range. +Decides if audio should pause when source is outside of :ref:`max_distance` range. .. _class_AudioStreamPlayer3D_property_pitch_scale: @@ -388,7 +388,7 @@ Returns the position in the :ref:`AudioStream`. - void **play** **(** :ref:`float` from_position=0.0 **)** -Plays the audio from the given position 'from_position', in seconds. +Plays the audio from the given position ``from_position``, in seconds. .. _class_AudioStreamPlayer3D_method_seek: diff --git a/classes/class_audiostreamrandompitch.rst b/classes/class_audiostreamrandompitch.rst index c614441a6..6a7ad791e 100644 --- a/classes/class_audiostreamrandompitch.rst +++ b/classes/class_audiostreamrandompitch.rst @@ -14,7 +14,7 @@ AudioStreamRandomPitch Brief Description ----------------- -Plays audio with random pitch tweaking. +Plays audio with random pitch shifting. Properties ---------- diff --git a/classes/class_audiostreamsample.rst b/classes/class_audiostreamsample.rst index 0fe6de9ba..bee1ac882 100644 --- a/classes/class_audiostreamsample.rst +++ b/classes/class_audiostreamsample.rst @@ -14,7 +14,7 @@ AudioStreamSample Brief Description ----------------- -Stores audio data loaded from ``.wav`` files. +Stores audio data loaded from WAV files. Properties ---------- @@ -55,11 +55,11 @@ Enumerations enum **Format**: -- **FORMAT_8_BITS** = **0** --- Audio codec 8 bit. +- **FORMAT_8_BITS** = **0** --- 8-bit audio codec. -- **FORMAT_16_BITS** = **1** --- Audio codec 16 bit. +- **FORMAT_16_BITS** = **1** --- 16-bit audio codec. -- **FORMAT_IMA_ADPCM** = **2** --- Audio codec IMA ADPCM. +- **FORMAT_IMA_ADPCM** = **2** --- Audio is compressed using IMA ADPCM. .. _enum_AudioStreamSample_LoopMode: @@ -75,18 +75,18 @@ enum **LoopMode**: - **LOOP_DISABLED** = **0** --- Audio does not loop. -- **LOOP_FORWARD** = **1** --- Audio loops the data between loop_begin and loop_end playing forward only. +- **LOOP_FORWARD** = **1** --- Audio loops the data between :ref:`loop_begin` and :ref:`loop_end` playing forward only. -- **LOOP_PING_PONG** = **2** --- Audio loops the data between loop_begin and loop_end playing back and forth. +- **LOOP_PING_PONG** = **2** --- Audio loops the data between :ref:`loop_begin` and :ref:`loop_end` playing back and forth. -- **LOOP_BACKWARD** = **3** --- Audio loops the data between loop_begin and loop_end playing backward only. +- **LOOP_BACKWARD** = **3** --- Audio loops the data between :ref:`loop_begin` and :ref:`loop_end` playing backward only. Description ----------- -AudioStreamSample stores sound samples loaded from ``.wav`` files. To play the stored sound use an :ref:`AudioStreamPlayer` (for background music) or :ref:`AudioStreamPlayer2D`/:ref:`AudioStreamPlayer3D` (for positional audio). The sound can be looped. +AudioStreamSample stores sound samples loaded from WAV files. To play the stored sound, use an :ref:`AudioStreamPlayer` (for non-positional audio) or :ref:`AudioStreamPlayer2D`/:ref:`AudioStreamPlayer3D` (for positional audio). The sound can be looped. -This class can also be used to store dynamically generated PCM audio data. +This class can also be used to store dynamically-generated PCM audio data. Property Descriptions --------------------- @@ -113,7 +113,7 @@ Contains the audio data in bytes. | *Getter* | get_format() | +----------+-------------------+ -Audio format. See FORMAT\_\* constants for values. +Audio format. See ``FORMAT_*`` constants for values. .. _class_AudioStreamSample_property_loop_begin: @@ -149,7 +149,7 @@ Loop end in bytes. | *Getter* | get_loop_mode() | +----------+----------------------+ -Loop mode. See LOOP\_\* constants for values. +Loop mode. See ``LOOP_*`` constants for values. .. _class_AudioStreamSample_property_mix_rate: @@ -184,5 +184,5 @@ Method Descriptions Saves the AudioStreamSample as a WAV file to ``path``. Samples with IMA ADPCM format can't be saved. -Note that a ``.wav`` extension is automatically appended to ``path`` if it is missing. +**Note:** A ``.wav`` extension is automatically appended to ``path`` if it is missing. diff --git a/classes/class_backbuffercopy.rst b/classes/class_backbuffercopy.rst index 0d831a2ff..54ce0ccf2 100644 --- a/classes/class_backbuffercopy.rst +++ b/classes/class_backbuffercopy.rst @@ -47,7 +47,7 @@ enum **CopyMode**: Description ----------- -Node for back-buffering the currently displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Use ``SCREEN_TEXTURE`` in the ``texture()`` function to access the buffer. +Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Use ``SCREEN_TEXTURE`` in the ``texture()`` function to access the buffer. Property Descriptions --------------------- @@ -62,7 +62,7 @@ Property Descriptions | *Getter* | get_copy_mode() | +----------+----------------------+ -Buffer mode. See ``COPY_MODE_*`` constants. +Buffer mode. See :ref:`CopyMode` constants. .. _class_BackBufferCopy_property_rect: @@ -74,5 +74,5 @@ Buffer mode. See ``COPY_MODE_*`` constants. | *Getter* | get_rect() | +----------+-----------------+ -The area covered by the BackBufferCopy. Only used if ``copy_mode`` is ``COPY_MODE_RECT``. +The area covered by the BackBufferCopy. Only used if :ref:`copy_mode` is :ref:`COPY_MODE_RECT`. diff --git a/classes/class_bakedlightmap.rst b/classes/class_bakedlightmap.rst index ef61c4924..a7d11bd9f 100644 --- a/classes/class_bakedlightmap.rst +++ b/classes/class_bakedlightmap.rst @@ -63,11 +63,11 @@ Enumerations enum **BakeQuality**: -- **BAKE_QUALITY_LOW** = **0** --- Lowest bake quality mode. Fastest to calculate. +- **BAKE_QUALITY_LOW** = **0** --- The lowest bake quality mode. Fastest to calculate. -- **BAKE_QUALITY_MEDIUM** = **1** --- Default bake quality mode. +- **BAKE_QUALITY_MEDIUM** = **1** --- The default bake quality mode. -- **BAKE_QUALITY_HIGH** = **2** --- Highest bake quality mode. Takes longer to calculate. +- **BAKE_QUALITY_HIGH** = **2** --- The highest bake quality mode. Takes longer to calculate. .. _enum_BakedLightmap_BakeMode: @@ -150,7 +150,7 @@ Grid subdivision size for lightmapper calculation. Default value of ``0.25`` wil | *Getter* | get_extents() | +----------+--------------------+ -Size of affected area. +The size of the affected area. .. _class_BakedLightmap_property_bake_hdr: @@ -162,7 +162,7 @@ Size of affected area. | *Getter* | is_hdr() | +----------+----------------+ -If ``true``, lightmap can capture light values greater than ``1.0``. Turning this off will result in a smaller lightmap. Default value:``false``. +If ``true``, the lightmap can capture light values greater than ``1.0``. Turning this off will result in a smaller file size. Default value: ``false``. .. _class_BakedLightmap_property_bake_mode: @@ -220,7 +220,7 @@ Grid size used for real-time capture information on dynamic objects. Cannot be l | *Getter* | get_image_path() | +----------+-----------------------+ -Location where lightmaps will be saved. +The location where lightmaps will be saved. .. _class_BakedLightmap_property_light_data: diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index 2f5b7d5ba..78d7b26b3 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -75,13 +75,13 @@ Emitted when the button stops being held down. - **pressed** **(** **)** -This signal is emitted every time the button is toggled or pressed (i.e. activated, so on ``button_down`` if "Click on press" is active and on ``button_up`` otherwise). +Emitted when the button is toggled or pressed. This is on :ref:`button_down` if :ref:`action_mode` is :ref:`ACTION_MODE_BUTTON_PRESS` and on :ref:`button_up` otherwise. .. _class_BaseButton_signal_toggled: - **toggled** **(** :ref:`bool` button_pressed **)** -This signal is emitted when the button was just toggled between pressed and normal states (only if toggle_mode is active). The new state is contained in the *button_pressed* argument. +Emitted when the button was just toggled between pressed and normal states (only if :ref:`toggle_mode` is active). The new state is contained in the ``button_pressed`` argument. Enumerations ------------ @@ -140,7 +140,7 @@ Property Descriptions | *Getter* | get_action_mode() | +----------+------------------------+ -Determines when the button is considered clicked, one of the ACTION_MODE\_\* constants. +Determines when the button is considered clicked, one of the ``ACTION_MODE_*`` constants. .. _class_BaseButton_property_button_mask: @@ -271,7 +271,7 @@ Called when the button is toggled (only if toggle_mode is active). - :ref:`DrawMode` **get_draw_mode** **(** **)** const -Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW\_\* enum. +Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the ``DRAW_*`` enum. .. _class_BaseButton_method_is_hovered: diff --git a/classes/class_basis.rst b/classes/class_basis.rst index 5509cb799..3241180d6 100644 --- a/classes/class_basis.rst +++ b/classes/class_basis.rst @@ -12,7 +12,7 @@ Basis Brief Description ----------------- -3x3 matrix datatype. +3×3 matrix datatype. Properties ---------- @@ -75,7 +75,7 @@ Methods Description ----------- -3x3 matrix used for 3D rotation and scale. Contains 3 vector fields x,y and z as its columns, which can be interpreted as the local basis vectors of a transformation. Can also be accessed as array of 3D vectors. These vectors are orthogonal to each other, but are not necessarily normalized (due to scaling). Almost always used as orthogonal basis for a :ref:`Transform`. +3×3 matrix used for 3D rotation and scale. Contains 3 vector fields X, Y and Z as its columns, which can be interpreted as the local basis vectors of a transformation. Can also be accessed as array of 3D vectors. These vectors are orthogonal to each other, but are not necessarily normalized (due to scaling). Almost always used as an orthogonal basis for a :ref:`Transform`. For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S). @@ -91,19 +91,19 @@ Property Descriptions - :ref:`Vector3` **x** -The basis matrix's x vector. +The basis matrix's X vector. .. _class_Basis_property_y: - :ref:`Vector3` **y** -The basis matrix's y vector. +The basis matrix's Y vector. .. _class_Basis_property_z: - :ref:`Vector3` **z** -The basis matrix's z vector. +The basis matrix's Z vector. Method Descriptions ------------------- @@ -116,7 +116,7 @@ Create a rotation matrix from the given quaternion. - :ref:`Basis` **Basis** **(** :ref:`Vector3` from **)** -Create a rotation matrix (in the YXZ convention: first Z, then X, and Y last) from the specified Euler angles, given in the vector format as (X-angle, Y-angle, Z-angle). +Create a rotation matrix (in the YXZ convention: first Z, then X, and Y last) from the specified Euler angles, given in the vector format as (X angle, Y angle, Z angle). - :ref:`Basis` **Basis** **(** :ref:`Vector3` axis, :ref:`float` phi **)** @@ -136,7 +136,7 @@ Returns the determinant of the matrix. - :ref:`Vector3` **get_euler** **(** **)** -Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the YXZ convention: first Z, then X, and Y last). Returned vector contains the rotation angles in the format (X-angle, Y-angle, Z-angle). +Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the YXZ convention: first Z, then X, and Y last). Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). .. _class_Basis_method_get_orthogonal_index: @@ -192,19 +192,19 @@ Assuming that the matrix is a proper rotation matrix, slerp performs a spherical - :ref:`float` **tdotx** **(** :ref:`Vector3` with **)** -Transposed dot product with the x axis of the matrix. +Transposed dot product with the X axis of the matrix. .. _class_Basis_method_tdoty: - :ref:`float` **tdoty** **(** :ref:`Vector3` with **)** -Transposed dot product with the y axis of the matrix. +Transposed dot product with the Y axis of the matrix. .. _class_Basis_method_tdotz: - :ref:`float` **tdotz** **(** :ref:`Vector3` with **)** -Transposed dot product with the z axis of the matrix. +Transposed dot product with the Z axis of the matrix. .. _class_Basis_method_transposed: @@ -222,5 +222,7 @@ Returns a vector transformed (multiplied) by the matrix. - :ref:`Vector3` **xform_inv** **(** :ref:`Vector3` v **)** -Returns a vector transformed (multiplied) by the transposed matrix. Note that this results in a multiplication by the inverse of the matrix only if it represents a rotation-reflection. +Returns a vector transformed (multiplied) by the transposed matrix. + +**Note:** This results in a multiplication by the inverse of the matrix only if it represents a rotation-reflection. diff --git a/classes/class_bitmapfont.rst b/classes/class_bitmapfont.rst index 85bd6fdf1..5ec58c708 100644 --- a/classes/class_bitmapfont.rst +++ b/classes/class_bitmapfont.rst @@ -115,7 +115,7 @@ Method Descriptions - void **add_char** **(** :ref:`int` character, :ref:`int` texture, :ref:`Rect2` rect, :ref:`Vector2` align=Vector2( 0, 0 ), :ref:`float` advance=-1 **)** -Adds 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. +Adds 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_BitmapFont_method_add_kerning_pair: diff --git a/classes/class_bool.rst b/classes/class_bool.rst index 750d10bb6..649bed6c0 100644 --- a/classes/class_bool.rst +++ b/classes/class_bool.rst @@ -12,7 +12,7 @@ bool Brief Description ----------------- -Boolean built-in type +Boolean built-in type. Methods ------- @@ -41,9 +41,9 @@ Cast an :ref:`int` value to a boolean value, this method will return - :ref:`bool` **bool** **(** :ref:`float` from **)** -Cast a :ref:`float` value to a boolean value, this method will return ``true`` if called with a floating point value different to 0 and ``false`` in other case. +Cast a :ref:`float` value to a boolean value, this method will return ``true`` if called with a floating-point value different to 0 and ``false`` in other case. - :ref:`bool` **bool** **(** :ref:`String` from **)** -Cast a :ref:`String` value to a boolean value, this method will return ``true`` if called with a non empty string and ``false`` in other case. Examples: ``bool('False')`` returns ``true``, ``bool('')`` returns ``false``. +Cast a :ref:`String` value to a boolean value, this method will return ``true`` if called with a non-empty string and ``false`` in other case. Examples: ``bool("False")`` returns ``true``, ``bool("")`` returns ``false``. diff --git a/classes/class_boxcontainer.rst b/classes/class_boxcontainer.rst index 3eb01d95a..44655200e 100644 --- a/classes/class_boxcontainer.rst +++ b/classes/class_boxcontainer.rst @@ -69,7 +69,7 @@ Property Descriptions | *Getter* | get_alignment() | +----------+----------------------+ -The alignment of the container's children (must be one of ALIGN_BEGIN, ALIGN_CENTER, or ALIGN_END). +The alignment of the container's children (must be one of :ref:`ALIGN_BEGIN`, :ref:`ALIGN_CENTER` or :ref:`ALIGN_END`). Method Descriptions ------------------- @@ -78,5 +78,5 @@ Method Descriptions - void **add_spacer** **(** :ref:`bool` begin **)** -Adds a control to the box as a spacer. If ``true``, *begin* will insert the spacer control in front of other children. +Adds a control to the box as a spacer. If ``true``, ``begin`` will insert the spacer control in front of other children. diff --git a/classes/class_boxshape.rst b/classes/class_boxshape.rst index fe3f18448..15f89eb4d 100644 --- a/classes/class_boxshape.rst +++ b/classes/class_boxshape.rst @@ -41,5 +41,5 @@ Property Descriptions | *Getter* | get_extents() | +----------+--------------------+ -The shape's half extents. +The box's half extents. The width, height and depth of this shape is twice the half extents. diff --git a/classes/class_button.rst b/classes/class_button.rst index e17e379ec..de6cc6381 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -97,7 +97,7 @@ Property Descriptions | *Getter* | get_text_align() | +----------+-----------------------+ -Text alignment policy for the button's text, use one of the ALIGN\_\* constants. +Text alignment policy for the button's text, use one of the ``ALIGN_*`` constants. .. _class_Button_property_clip_text: diff --git a/classes/class_camera.rst b/classes/class_camera.rst index 15c8bbb6b..81c555bac 100644 --- a/classes/class_camera.rst +++ b/classes/class_camera.rst @@ -99,11 +99,11 @@ Enumerations enum **Projection**: -- **PROJECTION_PERSPECTIVE** = **0** --- Perspective Projection (object's size on the screen becomes smaller when far away). +- **PROJECTION_PERSPECTIVE** = **0** --- Perspective projection. Objects on the screen becomes smaller when they are far away. -- **PROJECTION_ORTHOGONAL** = **1** --- Orthogonal Projection (objects remain the same size on the screen no matter how far away they are; also known as orthographic projection). +- **PROJECTION_ORTHOGONAL** = **1** --- Orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. -- **PROJECTION_FRUSTUM** = **2** +- **PROJECTION_FRUSTUM** = **2** --- Frustum projection. This mode allows adjusting :ref:`frustum_offset` to create "tilted frustum" effects. .. _enum_Camera_KeepAspect: @@ -113,9 +113,9 @@ enum **Projection**: enum **KeepAspect**: -- **KEEP_WIDTH** = **0** --- Preserves the horizontal aspect ratio. +- **KEEP_WIDTH** = **0** --- Preserves the horizontal aspect ratio; also known as Vert- scaling. This is usually the best option for projects running in portrait mode, as taller aspect ratios will benefit from a wider vertical FOV. -- **KEEP_HEIGHT** = **1** --- Preserves the vertical aspect ratio. +- **KEEP_HEIGHT** = **1** --- Preserves the vertical aspect ratio; also known as Hor+ scaling. This is usually the best option for projects running in landscape mode, as wider aspect ratios will automatically benefit from a wider horizontal FOV. .. _enum_Camera_DopplerTracking: @@ -127,16 +127,16 @@ enum **KeepAspect**: enum **DopplerTracking**: -- **DOPPLER_TRACKING_DISABLED** = **0** --- Disable Doppler effect simulation (default). +- **DOPPLER_TRACKING_DISABLED** = **0** --- Disables Doppler effect simulation (default). -- **DOPPLER_TRACKING_IDLE_STEP** = **1** --- Simulate Doppler effect by tracking positions of objects that are changed in ``_process``. Changes in the relative velocity of this Camera compared to those objects affect how Audio is perceived (changing the Audio's ``pitch shift``). +- **DOPPLER_TRACKING_IDLE_STEP** = **1** --- Simulate Doppler effect by tracking positions of objects that are changed in ``_process``. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's ``pitch shift``). -- **DOPPLER_TRACKING_PHYSICS_STEP** = **2** --- Simulate Doppler effect by tracking positions of objects that are changed in ``_physics_process``. Changes in the relative velocity of this Camera compared to those objects affect how Audio is perceived (changing the Audio's ``pitch shift``). +- **DOPPLER_TRACKING_PHYSICS_STEP** = **2** --- Simulate Doppler effect by tracking positions of objects that are changed in ``_physics_process``. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's ``pitch shift``). Description ----------- -Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest :ref:`Viewport` node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the Camera will register in the global viewport. In other words, a Camera just provides *3D* display capabilities to a :ref:`Viewport`, and, without one, a scene registered in that :ref:`Viewport` (or higher viewports) can't be displayed. +Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest :ref:`Viewport` node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a :ref:`Viewport`, and, without one, a scene registered in that :ref:`Viewport` (or higher viewports) can't be displayed. Property Descriptions --------------------- @@ -163,7 +163,7 @@ The culling mask that describes which 3D render layers are rendered by this came | *Getter* | is_current() | +----------+--------------------+ -If ``true``, the ancestor :ref:`Viewport` is currently using this Camera. Default value: ``false``. +If ``true``, the ancestor :ref:`Viewport` is currently using this camera. Default value: ``false``. .. _class_Camera_property_doppler_tracking: @@ -175,7 +175,7 @@ If ``true``, the ancestor :ref:`Viewport` is currently using thi | *Getter* | get_doppler_tracking() | +----------+-----------------------------+ -If not ``DOPPLER_TRACKING_DISABLED`` this Camera will simulate the Doppler effect for objects changed in particular ``_process`` methods. Default value: ``DOPPLER_TRACKING_DISABLED``. +If not :ref:`DOPPLER_TRACKING_DISABLED`, this camera will simulate the Doppler effect for objects changed in particular ``_process`` methods. See :ref:`DopplerTracking` for possible values. Default value: :ref:`DOPPLER_TRACKING_DISABLED`. .. _class_Camera_property_environment: @@ -187,7 +187,7 @@ If not ``DOPPLER_TRACKING_DISABLED`` this Camera will simulate the Doppler effec | *Getter* | get_environment() | +----------+------------------------+ -The :ref:`Environment` to use for this Camera. +The :ref:`Environment` to use for this camera. .. _class_Camera_property_far: @@ -199,7 +199,7 @@ The :ref:`Environment` to use for this Camera. | *Getter* | get_zfar() | +----------+-----------------+ -The distance to the far culling boundary for this Camera relative to its local z-axis. +The distance to the far culling boundary for this camera relative to its local Z axis. .. _class_Camera_property_fov: @@ -233,7 +233,7 @@ The camera's field of view angle (in degrees). Only applicable in perspective mo | *Getter* | get_h_offset() | +----------+---------------------+ -The horizontal (X) offset of the Camera viewport. +The horizontal (X) offset of the camera viewport. .. _class_Camera_property_keep_aspect: @@ -245,7 +245,7 @@ The horizontal (X) offset of the Camera viewport. | *Getter* | get_keep_aspect_mode() | +----------+-----------------------------+ -The axis to lock during :ref:`fov`/:ref:`size` adjustments. Can be either ``KEEP_WIDTH`` or ``KEEP_HEIGHT``. +The axis to lock during :ref:`fov`/:ref:`size` adjustments. Can be either :ref:`KEEP_WIDTH` or :ref:`KEEP_HEIGHT`. .. _class_Camera_property_near: @@ -257,7 +257,7 @@ The axis to lock during :ref:`fov`/:ref:`size` mode, objects' Z distance from the camera's local space scales their perceived size. .. _class_Camera_property_size: @@ -293,7 +293,7 @@ The camera's size measured as 1/2 the width or height. Only applicable in orthog | *Getter* | get_v_offset() | +----------+---------------------+ -The vertical (Y) offset of the Camera viewport. +The vertical (Y) offset of the camera viewport. Method Descriptions ------------------- @@ -302,7 +302,7 @@ Method Descriptions - void **clear_current** **(** :ref:`bool` enable_next=true **)** -If this is the current Camera, remove it from being current. If ``enable_next`` is ``true``, request to make the next Camera current, if any. +If this is the current camera, remove it from being current. If ``enable_next`` is ``true``, request to make the next camera current, if any. .. _class_Camera_method_get_camera_rid: @@ -314,7 +314,7 @@ Returns the camera's RID from the :ref:`VisualServer`. - :ref:`Transform` **get_camera_transform** **(** **)** const -Gets the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the :ref:`Node` transform. +Gets the camera transform. Subclassed cameras such as :ref:`InterpolatedCamera` may provide different transforms than the :ref:`Node` transform. .. _class_Camera_method_get_cull_mask_bit: @@ -328,13 +328,15 @@ Gets the camera transform. Subclassed cameras (such as CharacterCamera) may prov - :ref:`bool` **is_position_behind** **(** :ref:`Vector3` world_point **)** const -Returns ``true`` if the given position is behind the Camera. Note that a position which returns ``false`` may still be outside the Camera's field of view. +Returns ``true`` if the given position is behind the camera. + +**Note:** A position which returns ``false`` may still be outside the camera's field of view. .. _class_Camera_method_make_current: - void **make_current** **(** **)** -Makes this camera the current Camera for the :ref:`Viewport` (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added. +Makes this camera the current camera for the :ref:`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_method_project_local_ray_normal: @@ -372,13 +374,13 @@ Returns a 3D position in worldspace, that is the result of projecting a point on - void **set_orthogonal** **(** :ref:`float` size, :ref:`float` z_near, :ref:`float` z_far **)** -Sets 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) +Sets 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_method_set_perspective: - void **set_perspective** **(** :ref:`float` fov, :ref:`float` z_near, :ref:`float` z_far **)** -Sets 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. +Sets the camera projection to perspective mode, by specifying a ``fov`` angle in degrees (FOV means Field of View), and the ``near`` and ``far`` clip planes in world-space units. .. _class_Camera_method_unproject_position: diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index 3290ce597..01743ae38 100644 --- a/classes/class_camera2d.rst +++ b/classes/class_camera2d.rst @@ -120,9 +120,9 @@ enum **Camera2DProcessMode**: 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` based nodes. +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`-based nodes. -This node is intended to be a simple helper to 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` and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in :ref:`Viewport`. +This node is intended to be a simple helper to get things going quickly and it may happen that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from :ref:`Node2D` and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in :ref:`Viewport`. Property Descriptions --------------------- @@ -159,7 +159,7 @@ If ``true``, the camera is the active camera for the current scene. Only one cam | *Getter* | get_custom_viewport() | +----------+----------------------------+ -The custom :ref:`Viewport` node attached to the ``Camera2D``. If null or not a :ref:`Viewport`, uses the default viewport instead. +The custom :ref:`Viewport` node attached to the ``Camera2D``. If ``null`` or not a :ref:`Viewport`, uses the default viewport instead. .. _class_Camera2D_property_drag_margin_bottom: @@ -243,7 +243,7 @@ If ``true``, the camera only moves when reaching the vertical drag margins. If ` | *Getter* | is_margin_drawing_enabled() | +----------+-----------------------------------+ -If ``true``, draws the camera's drag margin rectangle in the editor. Default value: ``false`` +If ``true``, draws the camera's drag margin rectangle in the editor. Default value: ``false``. .. _class_Camera2D_property_editor_draw_limits: @@ -255,7 +255,7 @@ If ``true``, draws the camera's drag margin rectangle in the editor. Default val | *Getter* | is_limit_drawing_enabled() | +----------+----------------------------------+ -If ``true``, draws the camera's limits rectangle in the editor. Default value: ``true`` +If ``true``, draws the camera's limits rectangle in the editor. Default value: ``true``. .. _class_Camera2D_property_editor_draw_screen: @@ -267,7 +267,7 @@ If ``true``, draws the camera's limits rectangle in the editor. Default value: ` | *Getter* | is_screen_drawing_enabled() | +----------+-----------------------------------+ -If ``true``, draws the camera's screen rectangle in the editor. Default value: ``false`` +If ``true``, draws the camera's screen rectangle in the editor. Default value: ``false``. .. _class_Camera2D_property_limit_bottom: @@ -315,7 +315,7 @@ Right scroll limit in pixels. The camera stops moving when reaching this value. | *Getter* | is_limit_smoothing_enabled() | +----------+------------------------------------+ -If ``true``, the camera smoothly stops when reaches its limits. Default value: ``false`` +If ``true``, the camera smoothly stops when reaches its limits. Default value: ``false``. .. _class_Camera2D_property_limit_top: @@ -351,7 +351,7 @@ The camera's offset, useful for looking around or camera shake animations. | *Getter* | get_h_offset() | +----------+---------------------+ -The horizontal offset of the camera, relative to the drag margins. Default value: ``0`` +The horizontal offset of the camera, relative to the drag margins. Default value: ``0``. .. _class_Camera2D_property_offset_v: @@ -363,7 +363,7 @@ The horizontal offset of the camera, relative to the drag margins. Default value | *Getter* | get_v_offset() | +----------+---------------------+ -The vertical offset of the camera, relative to the drag margins. Default value: ``0`` +The vertical offset of the camera, relative to the drag margins. Default value: ``0``. .. _class_Camera2D_property_process_mode: @@ -385,7 +385,7 @@ The vertical offset of the camera, relative to the drag margins. Default value: | *Getter* | is_rotating() | +----------+---------------------+ -If ``true``, the camera rotates with the target. Default value: ``false`` +If ``true``, the camera rotates with the target. Default value: ``false``. .. _class_Camera2D_property_smoothing_enabled: @@ -397,7 +397,7 @@ If ``true``, the camera rotates with the target. Default value: ``false`` | *Getter* | is_follow_smoothing_enabled() | +----------+------------------------------------+ -If ``true``, the camera smoothly moves towards the target at :ref:`smoothing_speed`. Default value: ``false`` +If ``true``, the camera smoothly moves towards the target at :ref:`smoothing_speed`. Default value: ``false``. .. _class_Camera2D_property_smoothing_speed: @@ -409,7 +409,7 @@ If ``true``, the camera smoothly moves towards the target at :ref:`smoothing_spe | *Getter* | get_follow_smoothing() | +----------+-----------------------------+ -Speed in pixels per second of the camera's smoothing effect when :ref:`smoothing_enabled` is ``true`` +Speed in pixels per second of the camera's smoothing effect when :ref:`smoothing_enabled` is ``true``. .. _class_Camera2D_property_zoom: @@ -421,7 +421,7 @@ Speed in pixels per second of the camera's smoothing effect when :ref:`smoothing | *Getter* | get_zoom() | +----------+-----------------+ -The camera's zoom relative to the viewport. Values larger than ``Vector2(1, 1)`` zoom out and smaller values zoom in. For an example, use ``Vector2(0.5, 0.5)`` for a 2x zoom in, and ``Vector2(4, 4)`` for a 4x zoom out. +The camera's zoom relative to the viewport. Values larger than ``Vector2(1, 1)`` zoom out and smaller values zoom in. For an example, use ``Vector2(0.5, 0.5)`` for a 2× zoom-in, and ``Vector2(4, 4)`` for a 4× zoom-out. Method Descriptions ------------------- @@ -430,7 +430,7 @@ Method Descriptions - void **align** **(** **)** -Align the camera to the tracked node +Aligns the camera to the tracked node. .. _class_Camera2D_method_clear_current: @@ -442,7 +442,7 @@ Removes any ``Camera2D`` from the ancestor :ref:`Viewport`'s int - void **force_update_scroll** **(** **)** -Force the camera to update scroll immediately. +Forces the camera to update scroll immediately. .. _class_Camera2D_method_get_camera_position: @@ -460,13 +460,13 @@ Returns the location of the ``Camera2D``'s screen-center, relative to the origin - void **make_current** **(** **)** -Make this the current 2D camera for the scene (viewport and layer), in case there's many cameras in the scene. +Make this the current 2D camera for the scene (viewport and layer), in case there are many cameras in the scene. .. _class_Camera2D_method_reset_smoothing: - void **reset_smoothing** **(** **)** -Set the camera's position immediately to its current smoothing destination. +Sets the camera's position immediately to its current smoothing destination. This has no effect if smoothing is disabled. diff --git a/classes/class_camerafeed.rst b/classes/class_camerafeed.rst index 59d1e5df9..f6d80107e 100644 --- a/classes/class_camerafeed.rst +++ b/classes/class_camerafeed.rst @@ -73,14 +73,14 @@ enum **FeedPosition**: - **FEED_FRONT** = **1** --- Camera is mounted at the front of the device. -- **FEED_BACK** = **2** --- Camera is moutned at the back of the device. +- **FEED_BACK** = **2** --- Camera is mounted at the back of the device. Description ----------- -A camera feed gives you access to a single physical camera attached to your device. +A camera feed gives you access to a single physical camera attached to your device. When enabled, Godot will start capturing frames from the camera which can then be used. -When enabled Godot will start capturing frames from the camera which can then be used. Do note that many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background. +**Note:** Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background. Property Descriptions --------------------- @@ -112,13 +112,13 @@ Method Descriptions - :ref:`int` **get_id** **(** **)** const -Get unique id for this feed +Gets the unique ID for this feed. .. _class_CameraFeed_method_get_name: - :ref:`String` **get_name** **(** **)** const -Get name of the camera +Gets the camera's name. .. _class_CameraFeed_method_get_position: diff --git a/classes/class_cameraserver.rst b/classes/class_cameraserver.rst index 07e173e43..5ad866a43 100644 --- a/classes/class_cameraserver.rst +++ b/classes/class_cameraserver.rst @@ -14,7 +14,7 @@ CameraServer Brief Description ----------------- -Our camera server keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone. +The CameraServer keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone. Methods ------- diff --git a/classes/class_cameratexture.rst b/classes/class_cameratexture.rst index 0bd08f413..716b8b45c 100644 --- a/classes/class_cameratexture.rst +++ b/classes/class_cameratexture.rst @@ -14,7 +14,9 @@ CameraTexture Brief Description ----------------- -This texture gives access to the camera texture provided by a :ref:`CameraFeed`. Note that many cameras supply YCbCr images which need to be converted in a shader. +This texture gives access to the camera texture provided by a :ref:`CameraFeed`. + +**Note:** Many cameras supply YCbCr images which need to be converted in a shader. Properties ---------- @@ -40,7 +42,7 @@ Property Descriptions | *Getter* | get_camera_feed_id() | +----------+---------------------------+ -Id of the :ref:`CameraFeed` for which we want to display the image. +The ID of the :ref:`CameraFeed` for which we want to display the image. .. _class_CameraTexture_property_camera_is_active: diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 2de73c562..060b99af2 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -190,7 +190,7 @@ enum **BlendMode**: - **BLEND_MODE_PREMULT_ALPHA** = **4** --- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value. -- **BLEND_MODE_DISABLED** = **5** --- Disable blending mode. Colors including alpha are written as-is. Only applicable for render targets with a transparent background. No lighting will be applied. +- **BLEND_MODE_DISABLED** = **5** --- Disables blending mode. Colors including alpha are written as-is. Only applicable for render targets with a transparent background. No lighting will be applied. Constants --------- @@ -473,55 +473,55 @@ Returns the canvas item RID used by :ref:`VisualServer` for - :ref:`Transform2D` **get_canvas_transform** **(** **)** const -Get the transform matrix of this item's canvas. +Gets the transform matrix of this item's canvas. .. _class_CanvasItem_method_get_global_mouse_position: - :ref:`Vector2` **get_global_mouse_position** **(** **)** const -Get the global position of the mouse. +Gets the global position of the mouse. .. _class_CanvasItem_method_get_global_transform: - :ref:`Transform2D` **get_global_transform** **(** **)** const -Get the global transform matrix of this item. +Gets the global transform matrix of this item. .. _class_CanvasItem_method_get_global_transform_with_canvas: - :ref:`Transform2D` **get_global_transform_with_canvas** **(** **)** const -Get the global transform matrix of this item in relation to the canvas. +Gets the global transform matrix of this item in relation to the canvas. .. _class_CanvasItem_method_get_local_mouse_position: - :ref:`Vector2` **get_local_mouse_position** **(** **)** const -Get the mouse position relative to this item's position. +Gets the mouse position relative to this item's position. .. _class_CanvasItem_method_get_transform: - :ref:`Transform2D` **get_transform** **(** **)** const -Get the transform matrix of this item. +Gets the transform matrix of this item. .. _class_CanvasItem_method_get_viewport_rect: - :ref:`Rect2` **get_viewport_rect** **(** **)** const -Get the viewport's boundaries as a :ref:`Rect2`. +Gets the viewport's boundaries as a :ref:`Rect2`. .. _class_CanvasItem_method_get_viewport_transform: - :ref:`Transform2D` **get_viewport_transform** **(** **)** const -Get this item's transform in relation to the viewport. +Gets this item's transform in relation to the viewport. .. _class_CanvasItem_method_get_world_2d: - :ref:`World2D` **get_world_2d** **(** **)** const -Get the :ref:`World2D` where this item is in. +Gets the :ref:`World2D` where this item is in. .. _class_CanvasItem_method_hide: diff --git a/classes/class_canvaslayer.rst b/classes/class_canvaslayer.rst index 906134762..dfe93b4b1 100644 --- a/classes/class_canvaslayer.rst +++ b/classes/class_canvaslayer.rst @@ -73,7 +73,7 @@ Property Descriptions | *Getter* | get_custom_viewport() | +----------+----------------------------+ -The custom :ref:`Viewport` node assigned to the ``CanvasLayer``. If null, uses the default viewport instead. +The custom :ref:`Viewport` node assigned to the ``CanvasLayer``. If ``null``, uses the default viewport instead. .. _class_CanvasLayer_property_follow_viewport_enable: diff --git a/classes/class_canvasmodulate.rst b/classes/class_canvasmodulate.rst index dd0b74957..55fd85e2e 100644 --- a/classes/class_canvasmodulate.rst +++ b/classes/class_canvasmodulate.rst @@ -26,7 +26,7 @@ Properties Description ----------- -``CanvasModulate`` tints the canvas elements using its assigned ``color``. +``CanvasModulate`` tints the canvas elements using its assigned :ref:`color`. Property Descriptions --------------------- diff --git a/classes/class_centercontainer.rst b/classes/class_centercontainer.rst index 320bec636..0f5f55bff 100644 --- a/classes/class_centercontainer.rst +++ b/classes/class_centercontainer.rst @@ -26,7 +26,7 @@ Properties Description ----------- -CenterContainer Keeps children controls centered. This container keeps all children to their minimum size, in the center. +CenterContainer keeps children controls centered. This container keeps all children to their minimum size, in the center. Property Descriptions --------------------- diff --git a/classes/class_checkbox.rst b/classes/class_checkbox.rst index 332f4f5bd..252416ca0 100644 --- a/classes/class_checkbox.rst +++ b/classes/class_checkbox.rst @@ -60,5 +60,5 @@ Theme Properties Description ----------- -A checkbox allows the user to make a binary choice (choosing only one of two possible options), for example Answer 'yes' or 'no'. +A checkbox allows the user to make a binary choice (choosing only one of two possible options). diff --git a/classes/class_classdb.rst b/classes/class_classdb.rst index 7c63e829f..af358ff08 100644 --- a/classes/class_classdb.rst +++ b/classes/class_classdb.rst @@ -73,13 +73,13 @@ Method Descriptions - :ref:`bool` **can_instance** **(** :ref:`String` class **)** const -Returns ``true`` if you can instance objects from the specified 'class', ``false`` in other case. +Returns ``true`` if you can instance objects from the specified ``class``, ``false`` in other case. .. _class_ClassDB_method_class_exists: - :ref:`bool` **class_exists** **(** :ref:`String` class **)** const -Returns whether the specified 'class' is available or not. +Returns whether the specified ``class`` is available or not. .. _class_ClassDB_method_class_get_category: @@ -91,67 +91,67 @@ Returns a category associated with the class for use in documentation and the As - :ref:`int` **class_get_integer_constant** **(** :ref:`String` class, :ref:`String` name **)** const -Returns the value of the integer constant 'name' of 'class' or its ancestry. Always returns 0 when the constant could not be found. +Returns the value of the integer constant ``name`` of ``class`` or its ancestry. Always returns 0 when the constant could not be found. .. _class_ClassDB_method_class_get_integer_constant_list: - :ref:`PoolStringArray` **class_get_integer_constant_list** **(** :ref:`String` class, :ref:`bool` no_inheritance=false **)** const -Returns an array with the names all the integer constants of 'class' or its ancestry. +Returns an array with the names all the integer constants of ``class`` or its ancestry. .. _class_ClassDB_method_class_get_method_list: - :ref:`Array` **class_get_method_list** **(** :ref:`String` class, :ref:`bool` no_inheritance=false **)** const -Returns an array with all the methods of 'class' or its ancestry if 'no_inheritance' is ``false``. Every element of the array is a :ref:`Dictionary` with the following keys: args, default_args, flags, id, name, return: (class_name, hint, hint_string, name, type, usage). +Returns an array with all the methods of ``class`` or its ancestry if ``no_inheritance`` is ``false``. Every element of the array is a :ref:`Dictionary` with the following keys: ``args``, ``default_args``, ``flags``, ``id``, ``name``, ``return: (class_name, hint, hint_string, name, type, usage)``. .. _class_ClassDB_method_class_get_property: - :ref:`Variant` **class_get_property** **(** :ref:`Object` object, :ref:`String` property **)** const -Returns the value of 'property' of 'class' or its ancestry. +Returns the value of ``property`` of ``class`` or its ancestry. .. _class_ClassDB_method_class_get_property_list: - :ref:`Array` **class_get_property_list** **(** :ref:`String` class, :ref:`bool` no_inheritance=false **)** const -Returns an array with all the properties of 'class' or its ancestry if 'no_inheritance' is ``false``. +Returns an array with all the properties of ``class`` or its ancestry if ``no_inheritance`` is ``false``. .. _class_ClassDB_method_class_get_signal: - :ref:`Dictionary` **class_get_signal** **(** :ref:`String` class, :ref:`String` signal **)** const -Returns the 'signal' data of 'class' or its ancestry. The returned value is a :ref:`Dictionary` with the following keys: args, default_args, flags, id, name, return: (class_name, hint, hint_string, name, type, usage). +Returns the ``signal`` data of ``class`` or its ancestry. The returned value is a :ref:`Dictionary` with the following keys: ``args``, ``default_args``, ``flags``, ``id``, ``name``, ``return: (class_name, hint, hint_string, name, type, usage)``. .. _class_ClassDB_method_class_get_signal_list: - :ref:`Array` **class_get_signal_list** **(** :ref:`String` class, :ref:`bool` no_inheritance=false **)** const -Returns an array with all the signals of 'class' or its ancestry if 'no_inheritance' is ``false``. Every element of the array is a :ref:`Dictionary` as described in :ref:`class_get_signal`. +Returns an array with all the signals of ``class`` or its ancestry if ``no_inheritance`` is ``false``. Every element of the array is a :ref:`Dictionary` as described in :ref:`class_get_signal`. .. _class_ClassDB_method_class_has_integer_constant: - :ref:`bool` **class_has_integer_constant** **(** :ref:`String` class, :ref:`String` name **)** const -Returns whether 'class' or its ancestry has an integer constant called 'name' or not. +Returns whether ``class`` or its ancestry has an integer constant called ``name`` or not. .. _class_ClassDB_method_class_has_method: - :ref:`bool` **class_has_method** **(** :ref:`String` class, :ref:`String` method, :ref:`bool` no_inheritance=false **)** const -Returns whether 'class' (or its ancestry if 'no_inheritance' is false) has a method called 'method' or not. +Returns whether ``class`` (or its ancestry if ``no_inheritance`` is false) has a method called ``method`` or not. .. _class_ClassDB_method_class_has_signal: - :ref:`bool` **class_has_signal** **(** :ref:`String` class, :ref:`String` signal **)** const -Returns whether 'class' or its ancestry has a signal called 'signal' or not. +Returns whether ``class`` or its ancestry has a signal called ``signal`` or not. .. _class_ClassDB_method_class_set_property: - :ref:`Error` **class_set_property** **(** :ref:`Object` object, :ref:`String` property, :ref:`Variant` value **)** const -Sets 'property' value of 'class' to 'value'. +Sets ``property`` value of ``class`` to ``value``. .. _class_ClassDB_method_get_class_list: @@ -163,19 +163,19 @@ Returns the names of all the classes available. - :ref:`PoolStringArray` **get_inheriters_from_class** **(** :ref:`String` class **)** const -Returns the names of all the classes that directly or indirectly inherit from 'class'. +Returns the names of all the classes that directly or indirectly inherit from ``class``. .. _class_ClassDB_method_get_parent_class: - :ref:`String` **get_parent_class** **(** :ref:`String` class **)** const -Returns the parent class of 'class'. +Returns the parent class of ``class``. .. _class_ClassDB_method_instance: - :ref:`Variant` **instance** **(** :ref:`String` class **)** const -Creates an instance of 'class'. +Creates an instance of ``class``. .. _class_ClassDB_method_is_class_enabled: @@ -187,5 +187,5 @@ Returns whether this class is enabled or not. - :ref:`bool` **is_parent_class** **(** :ref:`String` class, :ref:`String` inherits **)** const -Returns whether 'inherits' is an ancestor of 'class' or not. +Returns whether ``inherits`` is an ancestor of ``class`` or not. diff --git a/classes/class_collisionpolygon.rst b/classes/class_collisionpolygon.rst index 538b08307..02170c461 100644 --- a/classes/class_collisionpolygon.rst +++ b/classes/class_collisionpolygon.rst @@ -30,7 +30,7 @@ Properties Description ----------- -Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at runtime. Creates a :ref:`Shape` for gameplay. Properties modified during gameplay will have no effect. +Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates a :ref:`Shape` for gameplay. Properties modified during gameplay will have no effect. Property Descriptions --------------------- @@ -69,5 +69,7 @@ If ``true``, no collision will be produced. | *Getter* | get_polygon() | +----------+--------------------+ -Array of vertices which define the polygon. Note that the returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the ``polygon`` member. +Array of vertices which define the polygon. + +**Note:** The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the ``polygon`` member. diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst index b8339dbd4..9c46ca840 100644 --- a/classes/class_collisionpolygon2d.rst +++ b/classes/class_collisionpolygon2d.rst @@ -64,7 +64,7 @@ Property Descriptions | *Getter* | get_build_mode() | +----------+-----------------------+ -Collision build mode. Use one of the ``BUILD_*`` constants. Default value: ``BUILD_SOLIDS``. +Collision build mode. Use one of the ``BUILD_*`` constants. Default value: :ref:`BUILD_SOLIDS`. .. _class_CollisionPolygon2D_property_disabled: diff --git a/classes/class_color.rst b/classes/class_color.rst index dd14d50ef..bd2b5b627 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -674,7 +674,7 @@ Constants Description ----------- -A color is represented by 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 properties (such as :ref:`CanvasItem.modulate`) may accept values > 1. +A color is represented by 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 properties (such as :ref:`CanvasItem.modulate`) may accept values greater than 1. You can also create a color from standardized color names by using :ref:`@GDScript.ColorN`. @@ -759,9 +759,9 @@ Constructs a color from an HTML hexadecimal color string in ARGB or RGB format. :: # Each of the following creates the same color RGBA(178, 217, 10, 255) - var c1 = Color("#ffb2d90a") # ARGB format with '#' + var c1 = Color("#ffb2d90a") # ARGB format with "#" var c2 = Color("ffb2d90a") # ARGB format - var c3 = Color("#b2d90a") # RGB format with '#' + var c3 = Color("#b2d90a") # RGB format with "#" var c4 = Color("b2d90a") # RGB format - :ref:`Color` **Color** **(** :ref:`int` from **)** @@ -843,7 +843,7 @@ The gray value is calculated as ``(r + g + b) / 3``. :: var c = Color(0.2, 0.45, 0.82) - var gray = c.gray() # a value of 0.466667 + var gray = c.gray() # A value of 0.466667 .. _class_Color_method_inverted: @@ -854,7 +854,7 @@ Returns the inverted color ``(1 - r, 1 - g, 1 - b, a)``. :: var c = Color(0.3, 0.4, 0.9) - var inverted_color = c.inverted() # a color of an RGBA(178, 153, 26, 255) + var inverted_color = c.inverted() # A color of an RGBA(178, 153, 26, 255) .. _class_Color_method_lightened: @@ -877,7 +877,7 @@ Returns the linear interpolation with another color. The interpolation factor `` var c1 = Color(1.0, 0.0, 0.0) var c2 = Color(0.0, 1.0, 0.0) - var li_c = c1.linear_interpolate(c2, 0.5) # a color of an RGBA(128, 128, 0, 255) + var li_c = c1.linear_interpolate(c2, 0.5) # A color of an RGBA(128, 128, 0, 255) .. _class_Color_method_to_abgr32: @@ -934,8 +934,8 @@ Setting ``with_alpha`` to ``false`` excludes alpha from the hexadecimal string. :: var c = Color(1, 1, 1, 0.5) - var s1 = c.to_html() # Results "7fffffff" - var s2 = c.to_html(false) # Results 'ffffff' + var s1 = c.to_html() # Returns "7fffffff" + var s2 = c.to_html(false) # Returns "ffffff" .. _class_Color_method_to_rgba32: diff --git a/classes/class_colorpicker.rst b/classes/class_colorpicker.rst index fba3992b0..46248376b 100644 --- a/classes/class_colorpicker.rst +++ b/classes/class_colorpicker.rst @@ -146,7 +146,7 @@ If ``true``, shows an alpha channel slider (transparency). | *Getter* | is_hsv_mode() | +----------+---------------------+ -If ``true``, allows to edit color with Hue/Saturation/Value sliders. +If ``true``, allows editing the color with Hue/Saturation/Value sliders. **Note:** Cannot be enabled if raw mode is on. @@ -182,7 +182,7 @@ If ``true``, allows to edit color with Hue/Saturation/Value sliders. If ``true``, allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR). -**Note:** Cannot be enabled if hsv mode is on. +**Note:** Cannot be enabled if HSV mode is on. Method Descriptions ------------------- @@ -191,13 +191,15 @@ Method Descriptions - void **add_preset** **(** :ref:`Color` color **)** -Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them. Note: the presets list is only for *this* color picker. +Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them. + +**Note:** the presets list is only for *this* color picker. .. _class_ColorPicker_method_erase_preset: - void **erase_preset** **(** :ref:`Color` color **)** -Remove the given color from the list of color presets of this color picker. +Removes the given color from the list of color presets of this color picker. .. _class_ColorPicker_method_get_presets: diff --git a/classes/class_concavepolygonshape.rst b/classes/class_concavepolygonshape.rst index 6886ca37b..578337d78 100644 --- a/classes/class_concavepolygonshape.rst +++ b/classes/class_concavepolygonshape.rst @@ -43,5 +43,5 @@ Returns the faces (an array of triangles). - void **set_faces** **(** :ref:`PoolVector3Array` faces **)** -Set the faces (an array of triangles). +Sets the faces (an array of triangles). diff --git a/classes/class_concavepolygonshape2d.rst b/classes/class_concavepolygonshape2d.rst index bc562b77d..7e345105b 100644 --- a/classes/class_concavepolygonshape2d.rst +++ b/classes/class_concavepolygonshape2d.rst @@ -26,7 +26,7 @@ Properties 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 :ref:`RigidBody2D` 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. +Concave polygon 2D shape resource for physics. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for :ref:`RigidBody2D` 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` and a ``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. diff --git a/classes/class_conetwistjoint.rst b/classes/class_conetwistjoint.rst index 329e5ad26..616b6cb59 100644 --- a/classes/class_conetwistjoint.rst +++ b/classes/class_conetwistjoint.rst @@ -52,11 +52,11 @@ enum **Param**: - **PARAM_SWING_SPAN** = **0** --- Swing is rotation from side to side, around the axis perpendicular to the twist axis. -The swing span defines, how much rotation will not get corrected allong the swing axis. +The swing span defines, how much rotation will not get corrected along the swing axis. Could be defined as looseness in the ``ConeTwistJoint``. -If below 0.05, this behaviour is locked. Default value: ``PI/4``. +If below 0.05, this behavior is locked. Default value: ``PI/4``. - **PARAM_TWIST_SPAN** = **1** --- Twist is the rotation around the twist axis, this value defined how far the joint can twist. @@ -70,14 +70,14 @@ The higher, the faster. - **PARAM_RELAXATION** = **4** --- Defines, how fast the swing- and twist-speed-difference on both sides gets synced. -- **PARAM_MAX** = **5** --- End flag of PARAM\_\* constants, used internally. +- **PARAM_MAX** = **5** --- Represents the size of the :ref:`Param` enum. Description ----------- The joint can rotate the bodies across an axis defined by the local x-axes of the :ref:`Joint`. -The twist axis is initiated as the x-axis of the :ref:`Joint`. +The twist axis is initiated as the X axis of the :ref:`Joint`. Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint in the local space of the two Bodies. @@ -128,11 +128,11 @@ The ease with which the joint starts to twist. If it's too low, it takes more fo Swing is rotation from side to side, around the axis perpendicular to the twist axis. -The swing span defines, how much rotation will not get corrected allong the swing axis. +The swing span defines, how much rotation will not get corrected along the swing axis. Could be defined as looseness in the ``ConeTwistJoint``. -If below 0.05, this behaviour is locked. Default value: ``PI/4``. +If below 0.05, this behavior is locked. Default value: ``PI/4``. .. _class_ConeTwistJoint_property_twist_span: diff --git a/classes/class_configfile.rst b/classes/class_configfile.rst index 07e030767..b2165d3bc 100644 --- a/classes/class_configfile.rst +++ b/classes/class_configfile.rst @@ -34,8 +34,16 @@ Methods +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`load_encrypted` **(** :ref:`String` path, :ref:`PoolByteArray` key **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`load_encrypted_pass` **(** :ref:`String` path, :ref:`String` pass **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`save` **(** :ref:`String` path **)** | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`save_encrypted` **(** :ref:`String` path, :ref:`PoolByteArray` key **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`save_encrypted_pass` **(** :ref:`String` path, :ref:`String` pass **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_value` **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` value **)** | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -59,7 +67,7 @@ The following example shows how to parse an INI-style file from the system, read var config = ConfigFile.new() var err = config.load("user://settings.cfg") - if err == OK: # if not, something went wrong with the file loading + if err == OK: # If not, something went wrong with the file loading # Look for the display/width pair, and default to 1024 if missing var screen_width = config.get_value("display", "width", 1024) # Store a variable if and only if it hasn't been defined yet @@ -113,13 +121,29 @@ Returns ``true`` if the specified section-key pair exists. - :ref:`Error` **load** **(** :ref:`String` path **)** -Loads the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object which the method was called on. Returns one of the ``OK``, ``FAILED`` or ``ERR_*`` constants listed in :ref:`@GlobalScope`. If the load was successful, the return value is ``OK``. +Loads the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object which the method was called on. Returns one of the :ref:`@GlobalScope.OK`, :ref:`@GlobalScope.FAILED` or ``ERR_*`` constants listed in :ref:`@GlobalScope`. If the load was successful, the return value is :ref:`@GlobalScope.OK`. + +.. _class_ConfigFile_method_load_encrypted: + +- :ref:`Error` **load_encrypted** **(** :ref:`String` path, :ref:`PoolByteArray` key **)** + +.. _class_ConfigFile_method_load_encrypted_pass: + +- :ref:`Error` **load_encrypted_pass** **(** :ref:`String` path, :ref:`String` pass **)** .. _class_ConfigFile_method_save: - :ref:`Error` **save** **(** :ref:`String` path **)** -Saves the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure. Returns one of the ``OK``, ``FAILED`` or ``ERR_*`` constants listed in :ref:`@GlobalScope`. If the load was successful, the return value is ``OK``. +Saves the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure. Returns one of the :ref:`@GlobalScope.OK`, :ref:`@GlobalScope.FAILED` or ``ERR_*`` constants listed in :ref:`@GlobalScope`. If the load was successful, the return value is :ref:`@GlobalScope.OK`. + +.. _class_ConfigFile_method_save_encrypted: + +- :ref:`Error` **save_encrypted** **(** :ref:`String` path, :ref:`PoolByteArray` key **)** + +.. _class_ConfigFile_method_save_encrypted_pass: + +- :ref:`Error` **save_encrypted_pass** **(** :ref:`String` path, :ref:`String` pass **)** .. _class_ConfigFile_method_set_value: diff --git a/classes/class_control.rst b/classes/class_control.rst index 66eedbc65..88011314e 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -352,19 +352,19 @@ enum **CursorShape**: - **CURSOR_FORBIDDEN** = **8** --- Show the system's forbidden mouse cursor when the user hovers the node. Often a crossed circle. -- **CURSOR_VSIZE** = **9** --- Show the system's vertical resize mouse cursor when the user hovers the node. A double headed vertical arrow. It tells the user they can resize the window or the panel vertically. +- **CURSOR_VSIZE** = **9** --- Show the system's vertical resize mouse cursor when the user hovers the node. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically. -- **CURSOR_HSIZE** = **10** --- Show the system's horizontal resize mouse cursor when the user hovers the node. A double headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. +- **CURSOR_HSIZE** = **10** --- Show the system's horizontal resize mouse cursor when the user hovers the node. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. -- **CURSOR_BDIAGSIZE** = **11** --- Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. +- **CURSOR_BDIAGSIZE** = **11** --- Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. -- **CURSOR_FDIAGSIZE** = **12** --- Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double headed arrow that goes from the top left to the bottom right, the opposite of ``CURSOR_BDIAGSIZE``. It tells the user they can resize the window or the panel both horizontally and vertically. +- **CURSOR_FDIAGSIZE** = **12** --- Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of :ref:`CURSOR_BDIAGSIZE`. It tells the user they can resize the window or the panel both horizontally and vertically. - **CURSOR_MOVE** = **13** --- Show the system's move mouse cursor when the user hovers the node. It shows 2 double-headed arrows at a 90 degree angle. It tells the user they can move a UI element freely. -- **CURSOR_VSPLIT** = **14** --- Show the system's vertical split mouse cursor when the user hovers the node. On Windows, it's the same as ``CURSOR_VSIZE``. +- **CURSOR_VSPLIT** = **14** --- Show the system's vertical split mouse cursor when the user hovers the node. On Windows, it's the same as :ref:`CURSOR_VSIZE`. -- **CURSOR_HSPLIT** = **15** --- Show the system's horizontal split mouse cursor when the user hovers the node. On Windows, it's the same as ``CURSOR_HSIZE``. +- **CURSOR_HSPLIT** = **15** --- Show the system's horizontal split mouse cursor when the user hovers the node. On Windows, it's the same as :ref:`CURSOR_HSIZE`. - **CURSOR_HELP** = **16** --- Show the system's help mouse cursor when the user hovers the node, a question mark. @@ -434,7 +434,7 @@ enum **LayoutPreset**: - **PRESET_HCENTER_WIDE** = **14** --- Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with :ref:`set_anchors_preset`. -- **PRESET_WIDE** = **15** --- Snap all 4 anchors to the respective corners of the parent control. Set all 4 margins to 0 after you applied this preset and the ``Control`` will fit its parent control. This is equivalent to to the "Full Rect" layout option in the editor. Use with :ref:`set_anchors_preset`. +- **PRESET_WIDE** = **15** --- Snap all 4 anchors to the respective corners of the parent control. Set all 4 margins to 0 after you applied this preset and the ``Control`` will fit its parent control. This is equivalent to the "Full Rect" layout option in the editor. Use with :ref:`set_anchors_preset`. .. _enum_Control_LayoutPresetMode: @@ -490,11 +490,11 @@ enum **SizeFlags**: enum **MouseFilter**: -- **MOUSE_FILTER_STOP** = **0** --- The control will receive mouse button input events through :ref:`_gui_input` if clicked on. And the control will receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. These events are automatically marked as handled and they will not propagate further to other controls. This also results in blocking signals in other controls. +- **MOUSE_FILTER_STOP** = **0** --- The control will receive mouse button input events through :ref:`_gui_input` if clicked on. And the control will receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. - **MOUSE_FILTER_PASS** = **1** --- The control will receive mouse button input events through :ref:`_gui_input` if clicked on. And the control will receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. Even if no control handled it at all, the event will still be handled automatically, so unhandled input will not be fired. -- **MOUSE_FILTER_IGNORE** = **2** --- The control will not receive mouse button input events through :ref:`_gui_input`. Also the control will not receive the :ref:`mouse_entered` nor :ref:`mouse_exited` signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. +- **MOUSE_FILTER_IGNORE** = **2** --- The control will not receive mouse button input events through :ref:`_gui_input`. The control will also not receive the :ref:`mouse_entered` nor :ref:`mouse_exited` signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. .. _enum_Control_GrowDirection: @@ -566,7 +566,7 @@ Constants Description ----------- -Base class for all User Interface or *UI* related nodes. ``Control`` features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change. +Base class for all UI-related nodes. ``Control`` features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change. For more information on Godot's UI system, anchors, margins, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from ``Control`` and :ref:`Container` nodes. @@ -576,7 +576,7 @@ Godot sends input events to the scene's root node first, by calling :ref:`Node._ Only one ``Control`` node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call :ref:`grab_focus`. ``Control`` nodes lose focus when another node grabs it, or if you hide the node in focus. -Set :ref:`mouse_filter` to :ref:`MOUSE_FILTER_IGNORE` to tell a ``Control`` node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. +Sets :ref:`mouse_filter` to :ref:`MOUSE_FILTER_IGNORE` to tell a ``Control`` node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. :ref:`Theme` resources change the Control's appearance. If you change the :ref:`Theme` on a ``Control`` node, it affects all of its children. To override some of the theme's parameters, call one of the ``add_*_override`` methods, like :ref:`add_font_override`. You can override the theme with the inspector. @@ -598,7 +598,7 @@ Property Descriptions | *Getter* | get_anchor() | +----------+--------------+ -Anchors the bottom edge of the node to the origin, the center, or the end of its parent control. It changes how the bottom margin updates when the node moves or changes size. You can use one of the ``ANCHOR_*`` constants for convenience. Default value: ``ANCHOR_BEGIN``. +Anchors the bottom edge of the node to the origin, the center, or the end of its parent control. It changes how the bottom margin updates when the node moves or changes size. You can use one of the ``ANCHOR_*`` constants for convenience. Default value: :ref:`ANCHOR_BEGIN`. .. _class_Control_property_anchor_left: @@ -608,7 +608,7 @@ Anchors the bottom edge of the node to the origin, the center, or the end of its | *Getter* | get_anchor() | +----------+--------------+ -Anchors the left edge of the node to the origin, the center or the end of its parent control. It changes how the left margin updates when the node moves or changes size. You can use one of the ``ANCHOR_*`` constants for convenience.Default value: ``ANCHOR_BEGIN``. +Anchors the left edge of the node to the origin, the center or the end of its parent control. It changes how the left margin updates when the node moves or changes size. You can use one of the ``ANCHOR_*`` constants for convenience.Default value: :ref:`ANCHOR_BEGIN`. .. _class_Control_property_anchor_right: @@ -618,7 +618,7 @@ Anchors the left edge of the node to the origin, the center or the end of its pa | *Getter* | get_anchor() | +----------+--------------+ -Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right margin updates when the node moves or changes size. You can use one of the ``ANCHOR_*`` constants for convenience. Default value: ``ANCHOR_BEGIN``. +Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right margin updates when the node moves or changes size. You can use one of the ``ANCHOR_*`` constants for convenience. Default value: :ref:`ANCHOR_BEGIN`. .. _class_Control_property_anchor_top: @@ -628,7 +628,7 @@ Anchors the right edge of the node to the origin, the center or the end of its p | *Getter* | get_anchor() | +----------+--------------+ -Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top margin updates when the node moves or changes size. You can use one of the ``ANCHOR_*`` constants for convenience. Default value: ``ANCHOR_BEGIN``. +Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top margin updates when the node moves or changes size. You can use one of the ``ANCHOR_*`` constants for convenience. Default value: :ref:`ANCHOR_BEGIN`. .. _class_Control_property_focus_mode: @@ -946,7 +946,7 @@ Tells the parent :ref:`Container` nodes how they should resize | *Getter* | get_stretch_ratio() | +----------+--------------------------+ -If the node and at least one of its neighbours uses the ``SIZE_EXPAND`` size flag, the parent :ref:`Container` will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbour a ratio of 1, this node will take two thirds of the available space. +If the node and at least one of its neighbours uses the :ref:`SIZE_EXPAND` size flag, the parent :ref:`Container` will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbour a ratio of 1, this node will take two thirds of the available space. .. _class_Control_property_size_flags_vertical: @@ -1052,9 +1052,9 @@ This method should only be used to test the data. Process the data in :ref:`drop extends Control func can_drop_data(position, data): - # check position if it is relevant to you - # otherwise just check data - return typeof(data) == TYPE_DICTIONARY and data.has('expected') + # Check position if it is relevant to you + # Otherwise, just check data + return typeof(data) == TYPE_DICTIONARY and data.has("expected") .. _class_Control_method_drop_data: @@ -1067,10 +1067,10 @@ Godot calls this method to pass you the ``data`` from a control's :ref:`get_drag extends ColorRect func can_drop_data(position, data): - return typeof(data) == TYPE_DICTIONARY and data.has('color') + return typeof(data) == TYPE_DICTIONARY and data.has("color") func drop_data(position, data): - color = data['color'] + color = data["color"] .. _class_Control_method_force_drag: @@ -1108,7 +1108,7 @@ Returns the mouse cursor shape the control displays on mouse hover. See :ref:`Cu - :ref:`Object` **get_drag_data** **(** :ref:`Vector2` position **)** virtual -Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns null if there is no data to drag. Controls that want to receive drop data should implement :ref:`can_drop_data` and :ref:`drop_data`. ``position`` is local to this control. Drag may be forced with :ref:`force_drag`. +Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns ``null`` if there is no data to drag. Controls that want to receive drop data should implement :ref:`can_drop_data` and :ref:`drop_data`. ``position`` is local to this control. Drag may be forced with :ref:`force_drag`. A preview that will follow the mouse that should represent the data can be set with :ref:`set_drag_preview`. A good time to set the preview is in this method. diff --git a/classes/class_convexpolygonshape2d.rst b/classes/class_convexpolygonshape2d.rst index 4c536e0f2..99a1f7134 100644 --- a/classes/class_convexpolygonshape2d.rst +++ b/classes/class_convexpolygonshape2d.rst @@ -14,7 +14,7 @@ ConvexPolygonShape2D Brief Description ----------------- -Convex Polygon Shape for 2D physics. +Convex polygon shape for 2D physics. Properties ---------- @@ -33,7 +33,7 @@ Methods 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). +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 ``ConvexPolygonShape2D`` and a :ref:`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. diff --git a/classes/class_cpuparticles.rst b/classes/class_cpuparticles.rst index d326ca66d..cada23dad 100644 --- a/classes/class_cpuparticles.rst +++ b/classes/class_cpuparticles.rst @@ -563,7 +563,7 @@ The rectangle's extents if :ref:`emission_shape` for values. Default value: :ref:`EMISSION_SHAPE_POINT`. +Particles will be emitted inside this region. See :ref:`EmissionShape` for possible values. Default value: :ref:`EMISSION_SHAPE_POINT`. .. _class_CPUParticles_property_emission_sphere_radius: @@ -623,7 +623,7 @@ The particle system's frame rate is fixed to a value. For instance, changing the | *Getter* | get_particle_flag() | +----------+--------------------------+ -Align y-axis of particle with the direction of its velocity. +Align Y axis of particle with the direction of its velocity. .. _class_CPUParticles_property_flag_disable_z: @@ -647,7 +647,7 @@ If ``true``, particles will not move on the z axis. Default value: ``false``. | *Getter* | get_particle_flag() | +----------+--------------------------+ -If ``true``, particles rotate around y-axis by :ref:`angle`. +If ``true``, particles rotate around Y axis by :ref:`angle`. .. _class_CPUParticles_property_flatness: @@ -671,7 +671,7 @@ Amount of :ref:`spread` in Y/Z plane. A valu | *Getter* | get_fractional_delta() | +----------+-----------------------------+ -If ``true``, results in fractional delta calculation which has a smoother particles display effect. Default value: ``true`` +If ``true``, results in fractional delta calculation which has a smoother particles display effect. Default value: ``true``. .. _class_CPUParticles_property_gravity: diff --git a/classes/class_cpuparticles2d.rst b/classes/class_cpuparticles2d.rst index 0ab1dfa76..c6b6a58ef 100644 --- a/classes/class_cpuparticles2d.rst +++ b/classes/class_cpuparticles2d.rst @@ -562,7 +562,7 @@ The rectangle's extents if :ref:`emission_shape` for values. Default value: :ref:`EMISSION_SHAPE_POINT`. +Particles will be emitted inside this region. See :ref:`EmissionShape` for possible values. Default value: :ref:`EMISSION_SHAPE_POINT`. .. _class_CPUParticles2D_property_emission_sphere_radius: @@ -622,7 +622,7 @@ The particle system's frame rate is fixed to a value. For instance, changing the | *Getter* | get_particle_flag() | +----------+--------------------------+ -Align y-axis of particle with the direction of its velocity. +Align Y axis of particle with the direction of its velocity. .. _class_CPUParticles2D_property_flatness: @@ -644,7 +644,7 @@ Align y-axis of particle with the direction of its velocity. | *Getter* | get_fractional_delta() | +----------+-----------------------------+ -If ``true``, results in fractional delta calculation which has a smoother particles display effect. Default value: ``true`` +If ``true``, results in fractional delta calculation which has a smoother particles display effect. Default value: ``true``. .. _class_CPUParticles2D_property_gravity: @@ -1004,7 +1004,7 @@ Tangential acceleration randomness ratio. Default value: ``0``. | *Getter* | get_texture() | +----------+--------------------+ -Particle texture. If ``null`` particles will be squares. +Particle texture. If ``null``, particles will be squares. Method Descriptions ------------------- diff --git a/classes/class_cubemap.rst b/classes/class_cubemap.rst index 17e2d8719..da411de9c 100644 --- a/classes/class_cubemap.rst +++ b/classes/class_cubemap.rst @@ -14,7 +14,7 @@ CubeMap Brief Description ----------------- -A CubeMap is a 6 sided 3D texture. +A CubeMap is a 6-sided 3D texture. Properties ---------- diff --git a/classes/class_cubemesh.rst b/classes/class_cubemesh.rst index 6192388fc..f5a36fa98 100644 --- a/classes/class_cubemesh.rst +++ b/classes/class_cubemesh.rst @@ -61,7 +61,7 @@ Size of the cuboid mesh. Defaults to (2, 2, 2). | *Getter* | get_subdivide_depth() | +----------+----------------------------+ -Number of extra edge loops inserted along the z-axis. Defaults to 0. +Number of extra edge loops inserted along the Z axis. Defaults to 0. .. _class_CubeMesh_property_subdivide_height: @@ -73,7 +73,7 @@ Number of extra edge loops inserted along the z-axis. Defaults to 0. | *Getter* | get_subdivide_height() | +----------+-----------------------------+ -Number of extra edge loops inserted along the y-axis. Defaults to 0. +Number of extra edge loops inserted along the Y axis. Defaults to 0. .. _class_CubeMesh_property_subdivide_width: @@ -85,5 +85,5 @@ Number of extra edge loops inserted along the y-axis. Defaults to 0. | *Getter* | get_subdivide_width() | +----------+----------------------------+ -Number of extra edge loops inserted along the x-axis. Defaults to 0. +Number of extra edge loops inserted along the X axis. Defaults to 0. diff --git a/classes/class_curve.rst b/classes/class_curve.rst index 11fd19a0f..4ffab0f46 100644 --- a/classes/class_curve.rst +++ b/classes/class_curve.rst @@ -101,7 +101,7 @@ enum **TangentMode**: Description ----------- -A curve that can be saved and re-used for other objects. By default it ranges between ``0`` and ``1`` on the y-axis and positions points relative to the ``0.5`` y-position. +A curve that can be saved and re-used for other objects. By default, it ranges between ``0`` and ``1`` on the Y axis and positions points relative to the ``0.5`` Y position. Property Descriptions --------------------- @@ -149,7 +149,7 @@ Method Descriptions - :ref:`int` **add_point** **(** :ref:`Vector2` position, :ref:`float` left_tangent=0, :ref:`float` right_tangent=0, :ref:`TangentMode` left_mode=0, :ref:`TangentMode` right_mode=0 **)** -Adds a point to the curve. For each side, if the ``*_mode`` is ``TANGENT_LINEAR``, the ``*_tangent`` angle (in degrees) uses the slope of the curve halfway to the adjacent point. Allows custom assignments to the ``*_tangent`` angle if ``*_mode`` is set to ``TANGENT_FREE``. +Adds a point to the curve. For each side, if the ``*_mode`` is :ref:`TANGENT_LINEAR`, the ``*_tangent`` angle (in degrees) uses the slope of the curve halfway to the adjacent point. Allows custom assignments to the ``*_tangent`` angle if ``*_mode`` is set to :ref:`TANGENT_FREE`. .. _class_Curve_method_bake: @@ -179,7 +179,7 @@ Returns the number of points describing the curve. - :ref:`TangentMode` **get_point_left_mode** **(** :ref:`int` index **)** const -Returns the left ``TangentMode`` for the point at ``index``. +Returns the left :ref:`TangentMode` for the point at ``index``. .. _class_Curve_method_get_point_left_tangent: @@ -197,7 +197,7 @@ Returns the curve coordinates for the point at ``index``. - :ref:`TangentMode` **get_point_right_mode** **(** :ref:`int` index **)** const -Returns the right ``TangentMode`` for the point at ``index``. +Returns the right :ref:`TangentMode` for the point at ``index``. .. _class_Curve_method_get_point_right_tangent: @@ -209,13 +209,13 @@ Returns the right tangent angle (in degrees) for the point at ``index``. - :ref:`float` **interpolate** **(** :ref:`float` offset **)** const -Returns the y value for the point that would exist at x-position ``offset`` along the curve. +Returns the Y value for the point that would exist at the X position ``offset`` along the curve. .. _class_Curve_method_interpolate_baked: - :ref:`float` **interpolate_baked** **(** :ref:`float` offset **)** -Returns the y value for the point that would exist at x-position ``offset`` along the curve using the baked cache. Bakes the curve's points if not already baked. +Returns the Y value for the point that would exist at the X position ``offset`` along the curve using the baked cache. Bakes the curve's points if not already baked. .. _class_Curve_method_remove_point: @@ -227,7 +227,7 @@ Removes the point at ``index`` from the curve. - void **set_point_left_mode** **(** :ref:`int` index, :ref:`TangentMode` mode **)** -Sets the left ``TangentMode`` for the point at ``index`` to ``mode``. +Sets the left :ref:`TangentMode` for the point at ``index`` to ``mode``. .. _class_Curve_method_set_point_left_tangent: @@ -239,13 +239,13 @@ Sets the left tangent angle for the point at ``index`` to ``tangent``. - :ref:`int` **set_point_offset** **(** :ref:`int` index, :ref:`float` offset **)** -Sets the offset from ``0.5`` +Sets the offset from ``0.5``. .. _class_Curve_method_set_point_right_mode: - void **set_point_right_mode** **(** :ref:`int` index, :ref:`TangentMode` mode **)** -Sets the right ``TangentMode`` for the point at ``index`` to ``mode``. +Sets the right :ref:`TangentMode` for the point at ``index`` to ``mode``. .. _class_Curve_method_set_point_right_tangent: diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index 8fd27e6d0..5e357f82f 100644 --- a/classes/class_curve2d.rst +++ b/classes/class_curve2d.rst @@ -14,7 +14,7 @@ Curve2D Brief Description ----------------- -Describes a Bezier curve in 2D space. +Describes a Bézier curve in 2D space. Properties ---------- @@ -67,9 +67,9 @@ Methods Description ----------- -This class describes a Bezier curve in 2D space. It is mainly used to give a shape to a :ref:`Path2D`, but can be manually sampled for other purposes. +This class describes a Bézier curve in 2D space. It is mainly used to give a shape to a :ref:`Path2D`, but can be manually sampled for other purposes. -It keeps a cache of precalculated points along the curve, to speed further calculations up. +It keeps a cache of precalculated points along the curve, to speed up further calculations. Property Descriptions --------------------- @@ -93,7 +93,7 @@ Method Descriptions - void **add_point** **(** :ref:`Vector2` position, :ref:`Vector2` in=Vector2( 0, 0 ), :ref:`Vector2` out=Vector2( 0, 0 ), :ref:`int` at_position=-1 **)** -Adds a point to a curve, at ``position``, with control points ``in`` and ``out``. +Adds a point to a curve at ``position``, with control points ``in`` and ``out``. If ``at_position`` is given, the point is inserted before the point number ``at_position``, moving that point (and every point after) after the inserted point. If ``at_position`` is not given, or is an illegal value (``at_position <0`` or ``at_position >= [method get_point_count]``), the point will be appended at the end of the point list. diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index 40bfec5b2..8e7fe02a4 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -14,7 +14,7 @@ Curve3D Brief Description ----------------- -Describes a Bezier curve in 3D space. +Describes a Bézier curve in 3D space. Properties ---------- @@ -79,9 +79,9 @@ Methods Description ----------- -This class describes a Bezier curve in 3D space. It is mainly used to give a shape to a :ref:`Path`, but can be manually sampled for other purposes. +This class describes a Bézier curve in 3D space. It is mainly used to give a shape to a :ref:`Path`, but can be manually sampled for other purposes. -It keeps a cache of precalculated points along the curve, to speed further calculations up. +It keeps a cache of precalculated points along the curve, to speed up further calculations. Property Descriptions --------------------- @@ -108,7 +108,7 @@ The distance in meters between two adjacent cached points. Changing it forces th | *Getter* | is_up_vector_enabled() | +----------+------------------------------+ -If ``true``, the curve will bake up vectors used for orientation. This is used when a :ref:`PathFollow.rotation_mode` is set to ``ROTATION_ORIENTED``, see :ref:`PathFollow` for details. Changing it forces the cache to be recomputed. +If ``true``, the curve will bake up vectors used for orientation. This is used when :ref:`PathFollow.rotation_mode` is set to :ref:`PathFollow.ROTATION_ORIENTED`. Changing it forces the cache to be recomputed. Method Descriptions ------------------- @@ -117,7 +117,7 @@ Method Descriptions - void **add_point** **(** :ref:`Vector3` position, :ref:`Vector3` in=Vector3( 0, 0, 0 ), :ref:`Vector3` out=Vector3( 0, 0, 0 ), :ref:`int` at_position=-1 **)** -Adds a point to a curve, at ``position``, with control points ``in`` and ``out``. +Adds a point to a curve at ``position``, with control points ``in`` and ``out``. If ``at_position`` is given, the point is inserted before the point number ``at_position``, moving that point (and every point after) after the inserted point. If ``at_position`` is not given, or is an illegal value (``at_position <0`` or ``at_position >= [method get_point_count]``), the point will be appended at the end of the point list. diff --git a/classes/class_dampedspringjoint2d.rst b/classes/class_dampedspringjoint2d.rst index d248c97a5..1121503d6 100644 --- a/classes/class_dampedspringjoint2d.rst +++ b/classes/class_dampedspringjoint2d.rst @@ -47,7 +47,7 @@ Property Descriptions | *Getter* | get_damping() | +----------+--------------------+ -The spring joint's damping ratio. A value between ``0`` and ``1``. When the two bodies move into different directions the system tries to align them to the spring axis again. A high ``damping`` value forces the attached bodies to align faster. Default value: ``1`` +The spring joint's damping ratio. A value between ``0`` and ``1``. When the two bodies move into different directions the system tries to align them to the spring axis again. A high ``damping`` value forces the attached bodies to align faster. Default value: ``1``. .. _class_DampedSpringJoint2D_property_length: @@ -59,7 +59,7 @@ The spring joint's damping ratio. A value between ``0`` and ``1``. When the two | *Getter* | get_length() | +----------+-------------------+ -The spring joint's maximum length. The two attached bodies cannot stretch it past this value. Default value: ``50`` +The spring joint's maximum length. The two attached bodies cannot stretch it past this value. Default value: ``50``. .. _class_DampedSpringJoint2D_property_rest_length: @@ -71,7 +71,7 @@ The spring joint's maximum length. The two attached bodies cannot stretch it pas | *Getter* | get_rest_length() | +----------+------------------------+ -When the bodies attached to the spring joint move they stretch or squash it. The joint always tries to resize towards this length. Default value: ``0`` +When the bodies attached to the spring joint move they stretch or squash it. The joint always tries to resize towards this length. Default value: ``0``. .. _class_DampedSpringJoint2D_property_stiffness: @@ -83,5 +83,5 @@ When the bodies attached to the spring joint move they stretch or squash it. The | *Getter* | get_stiffness() | +----------+----------------------+ -The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. Default value: ``20`` +The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. Default value: ``20``. diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index ab6c06a6a..48051eac1 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -91,13 +91,13 @@ Returns ``true`` if the dictionary is empty. - :ref:`bool` **erase** **(** :ref:`Variant` key **)** -Erase a dictionary key/value pair by key. Returns ``true`` if the given key was present in the dictionary, ``false`` otherwise. Do not erase elements while iterating over the dictionary. +Erase a dictionary key/value pair by key. Returns ``true`` if the given key was present in the dictionary, ``false`` otherwise. Does not erase elements while iterating over the dictionary. .. _class_Dictionary_method_get: - :ref:`Variant` **get** **(** :ref:`Variant` key, :ref:`Variant` default=Null **)** -Returns the current value for the specified key in the ``Dictionary``. If the key does not exist, the method returns the value of the optional default argument, or Null if it is omitted. +Returns the current value for the specified key in the ``Dictionary``. If the key does not exist, the method returns the value of the optional default argument, or ``null`` if it is omitted. .. _class_Dictionary_method_has: diff --git a/classes/class_directionallight.rst b/classes/class_directionallight.rst index 21688d3ea..8735037ea 100644 --- a/classes/class_directionallight.rst +++ b/classes/class_directionallight.rst @@ -73,7 +73,7 @@ enum **ShadowDepthRange**: Description ----------- -A directional light is a type of :ref:`Light` node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored. Only the basis is used do determine light direction. +A directional light is a type of :ref:`Light` node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored. Only the basis is used to determine light direction. Tutorials --------- @@ -93,7 +93,7 @@ Property Descriptions | *Getter* | get_param() | +----------+------------------+ -Amount of extra bias for shadow splits that are far away. If self shadowing occurs only on the splits far away, this value can fix them. +Amount of extra bias for shadow splits that are far away. If self-shadowing occurs only on the splits far away, increasing this value can fix them. .. _class_DirectionalLight_property_directional_shadow_blend_splits: @@ -105,7 +105,7 @@ Amount of extra bias for shadow splits that are far away. If self shadowing occu | *Getter* | is_blend_splits_enabled() | +----------+---------------------------+ -If ``true``, shadow detail is sacrificed in exchange for smoother transitions between splits. Default value:``false``. +If ``true``, shadow detail is sacrificed in exchange for smoother transitions between splits. Default value: ``false``. .. _class_DirectionalLight_property_directional_shadow_depth_range: @@ -165,7 +165,7 @@ Can be used to fix special cases of self shadowing when objects are perpendicula | *Getter* | get_param() | +----------+------------------+ -The distance from camera to shadow split 1. Relative to :ref:`directional_shadow_max_distance`. Only used when :ref:`directional_shadow_mode` is one of the ``SHADOW_PARALLEL_*_SPLITS`` constants. +The distance from camera to shadow split 1. Relative to :ref:`directional_shadow_max_distance`. Only used when :ref:`directional_shadow_mode` is ``SHADOW_PARALLEL_2_SPLITS`` or ``SHADOW_PARALLEL_4_SPLITS``. .. _class_DirectionalLight_property_directional_shadow_split_2: @@ -177,7 +177,7 @@ The distance from camera to shadow split 1. Relative to :ref:`directional_shadow | *Getter* | get_param() | +----------+------------------+ -The distance from shadow split 1 to split 2. Relative to :ref:`directional_shadow_max_distance`. Only used when :ref:`directional_shadow_mode` is ``SHADOW_PARALLEL_3_SPLITS`` or ``SHADOW_PARALLEL_4_SPLITS``. +The distance from shadow split 1 to split 2. Relative to :ref:`directional_shadow_max_distance`. Only used when :ref:`directional_shadow_mode` is ``SHADOW_PARALLEL_2_SPLITS`` or ``SHADOW_PARALLEL_4_SPLITS``. .. _class_DirectionalLight_property_directional_shadow_split_3: diff --git a/classes/class_directory.rst b/classes/class_directory.rst index 15ae5eedf..c07eec703 100644 --- a/classes/class_directory.rst +++ b/classes/class_directory.rst @@ -92,17 +92,17 @@ Method Descriptions - :ref:`Error` **change_dir** **(** :ref:`String` todir **)** -Change the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. ``newdir`` or ``../newdir``), or an absolute path (e.g. ``/tmp/newdir`` or ``res://somedir/newdir``). +Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. ``newdir`` or ``../newdir``), or an absolute path (e.g. ``/tmp/newdir`` or ``res://somedir/newdir``). -The method returns one of the error code constants defined in :ref:`@GlobalScope` (OK or ERR\_\*). +The method returns one of the error code constants defined in :ref:`@GlobalScope` (``OK`` or ``ERR_*``). .. _class_Directory_method_copy: - :ref:`Error` **copy** **(** :ref:`String` from, :ref:`String` to **)** -Copy the *from* file to the *to* destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. +Copies the ``from`` file to the ``to`` destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. -Returns one of the error code constants defined in :ref:`@GlobalScope` (OK, FAILED or ERR\_\*). +Returns one of the error code constants defined in :ref:`@GlobalScope` (``OK``, ``FAILED`` or ``ERR_*``). .. _class_Directory_method_current_is_dir: @@ -138,13 +138,13 @@ Returns the currently opened directory's drive index. See :ref:`get_drive` **get_drive** **(** :ref:`int` idx **)** -On Windows, return the name of the drive (partition) passed as an argument (e.g. ``C:``). On other platforms, or if the requested drive does not existed, the method returns an empty String. +On Windows, returns the name of the drive (partition) passed as an argument (e.g. ``C:``). On other platforms, or if the requested drive does not existed, the method returns an empty String. .. _class_Directory_method_get_drive_count: - :ref:`int` **get_drive_count** **(** **)** -On Windows, return the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0. +On Windows, returns the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0. .. _class_Directory_method_get_next: @@ -158,13 +158,13 @@ The name of the file or directory is returned (and not its full path). Once the - :ref:`int` **get_space_left** **(** **)** -On Unix desktop systems, return the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1. +On UNIX desktop systems, returns the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1. .. _class_Directory_method_list_dir_begin: - :ref:`Error` **list_dir_begin** **(** :ref:`bool` skip_navigational=false, :ref:`bool` skip_hidden=false **)** -Initialise the stream used to list all files and directories using the :ref:`get_next` function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with :ref:`list_dir_end`. +Initializes the stream used to list all files and directories using the :ref:`get_next` function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with :ref:`list_dir_end`. If you pass ``skip_navigational``, then ``.`` and ``..`` would be filtered out. @@ -174,45 +174,45 @@ If you pass ``skip_hidden``, then hidden files would be filtered out. - void **list_dir_end** **(** **)** -Close the current stream opened with :ref:`list_dir_begin` (whether it has been fully processed with :ref:`get_next` or not does not matter). +Closes the current stream opened with :ref:`list_dir_begin` (whether it has been fully processed with :ref:`get_next` or not does not matter). .. _class_Directory_method_make_dir: - :ref:`Error` **make_dir** **(** :ref:`String` path **)** -Create a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see :ref:`make_dir_recursive`). +Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see :ref:`make_dir_recursive`). -The method returns one of the error code constants defined in :ref:`@GlobalScope` (OK, FAILED or ERR\_\*). +The method returns one of the error code constants defined in :ref:`@GlobalScope` (``OK``, ``FAILED`` or ``ERR_*``). .. _class_Directory_method_make_dir_recursive: - :ref:`Error` **make_dir_recursive** **(** :ref:`String` path **)** -Create a target directory and all necessary intermediate directories in its path, by calling :ref:`make_dir` recursively. The argument can be relative to the current directory, or an absolute path. +Creates a target directory and all necessary intermediate directories in its path, by calling :ref:`make_dir` recursively. The argument can be relative to the current directory, or an absolute path. -Returns one of the error code constants defined in :ref:`@GlobalScope` (OK, FAILED or ERR\_\*). +Returns one of the error code constants defined in :ref:`@GlobalScope` (``0K``, ``FAILED`` or ``ERR_*``). .. _class_Directory_method_open: - :ref:`Error` **open** **(** :ref:`String` path **)** -Open an existing directory of the filesystem. The *path* argument can be within the project tree (``res://folder``), the user directory (``user://folder``) or an absolute path of the user filesystem (e.g. ``/tmp/folder`` or ``C:\tmp\folder``). +Opens an existing directory of the filesystem. The ``path`` argument can be within the project tree (``res://folder``), the user directory (``user://folder``) or an absolute path of the user filesystem (e.g. ``/tmp/folder`` or ``C:\tmp\folder``). -The method returns one of the error code constants defined in :ref:`@GlobalScope` (OK or ERR\_\*). +The method returns one of the error code constants defined in :ref:`@GlobalScope` (``OK`` or ``ERR_*``). .. _class_Directory_method_remove: - :ref:`Error` **remove** **(** :ref:`String` path **)** -Delete the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. +Deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. -Returns one of the error code constants defined in :ref:`@GlobalScope` (OK or FAILED). +Returns one of the error code constants defined in :ref:`@GlobalScope` (``OK`` or ``FAILED``). .. _class_Directory_method_rename: - :ref:`Error` **rename** **(** :ref:`String` from, :ref:`String` to **)** -Rename (move) the *from* file to the *to* destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. +Renames (move) the ``from`` file to the ``to`` destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. -Returns one of the error code constants defined in :ref:`@GlobalScope` (OK or FAILED). +Returns one of the error code constants defined in :ref:`@GlobalScope` (``OK`` or ``FAILED``). diff --git a/classes/class_dynamicfontdata.rst b/classes/class_dynamicfontdata.rst index ee970e169..4f6f38c5a 100644 --- a/classes/class_dynamicfontdata.rst +++ b/classes/class_dynamicfontdata.rst @@ -40,7 +40,7 @@ Enumerations enum **Hinting**: -- **HINTING_NONE** = **0** --- Disable font hinting (smoother but less crisp). +- **HINTING_NONE** = **0** --- Disables font hinting (smoother but less crisp). - **HINTING_LIGHT** = **1** --- Use the light font hinting mode. diff --git a/classes/class_editorfeatureprofile.rst b/classes/class_editorfeatureprofile.rst index fd3ec9fa1..1ddaecd49 100644 --- a/classes/class_editorfeatureprofile.rst +++ b/classes/class_editorfeatureprofile.rst @@ -80,7 +80,7 @@ enum **Feature**: - **FEATURE_FILESYSTEM_DOCK** = **6** -- **FEATURE_MAX** = **7** +- **FEATURE_MAX** = **7** --- Represents the size of the :ref:`Feature` enum. Method Descriptions ------------------- diff --git a/classes/class_editorfiledialog.rst b/classes/class_editorfiledialog.rst index 2f8604f73..29874f9ab 100644 --- a/classes/class_editorfiledialog.rst +++ b/classes/class_editorfiledialog.rst @@ -211,7 +211,7 @@ The view format in which the ``EditorFileDialog`` displays resources to the user | *Getter* | get_mode() | +----------+-----------------+ -The purpose of the ``EditorFileDialog``. Changes allowed behaviors. +The purpose of the ``EditorFileDialog``, which defines the allowed behaviors. .. _class_EditorFileDialog_property_show_hidden_files: @@ -234,7 +234,7 @@ Method Descriptions Adds a comma-delimited file extension filter option to the ``EditorFileDialog`` with an optional semi-colon-delimited label. -Example: "\*.tscn, \*.scn; Scenes", results in filter text "Scenes (\*.tscn, \*.scn)". +For example, ``"*.tscn, *.scn; Scenes"`` results in filter text "Scenes (\*.tscn, \*.scn)". .. _class_EditorFileDialog_method_clear_filters: diff --git a/classes/class_editorfilesystem.rst b/classes/class_editorfilesystem.rst index 1fbc4d9f1..6bdd43962 100644 --- a/classes/class_editorfilesystem.rst +++ b/classes/class_editorfilesystem.rst @@ -76,13 +76,13 @@ Method Descriptions - :ref:`String` **get_file_type** **(** :ref:`String` path **)** const -Get the type of the file, given the full path. +Gets the type of the file, given the full path. .. _class_EditorFileSystem_method_get_filesystem: - :ref:`EditorFileSystemDirectory` **get_filesystem** **(** **)** -Get the root directory object. +Gets the root directory object. .. _class_EditorFileSystem_method_get_filesystem_path: diff --git a/classes/class_editorfilesystemdirectory.rst b/classes/class_editorfilesystemdirectory.rst index 442ed5942..182d4b546 100644 --- a/classes/class_editorfilesystemdirectory.rst +++ b/classes/class_editorfilesystemdirectory.rst @@ -117,7 +117,7 @@ Returns the name of this directory. - :ref:`EditorFileSystemDirectory` **get_parent** **(** **)** -Returns the parent directory for this directory or null if called on a directory at ``res://`` or ``user://``. +Returns the parent directory for this directory or ``null`` if called on a directory at ``res://`` or ``user://``. .. _class_EditorFileSystemDirectory_method_get_path: diff --git a/classes/class_editorimportplugin.rst b/classes/class_editorimportplugin.rst index 892381b9f..415af889e 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -7,7 +7,7 @@ EditorImportPlugin ================== -**Inherits:** :ref:`Reference` **<** :ref:`Object` +**Inherits:** :ref:`ResourceImporter` **<** :ref:`Reference` **<** :ref:`Object` **Category:** Core @@ -50,7 +50,7 @@ Description EditorImportPlugins provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. Register your :ref:`EditorPlugin` with :ref:`EditorPlugin.add_import_plugin`. -EditorImportPlugins work by associating with specific file extensions and a resource type. See :ref:`get_recognized_extensions` and :ref:`get_resource_type`). They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the ``.import`` directory. +EditorImportPlugins work by associating with specific file extensions and a resource type. See :ref:`get_recognized_extensions` and :ref:`get_resource_type`. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the ``.import`` directory. Below is an example EditorImportPlugin that imports a :ref:`Mesh` from a file with the extension ".special" or ".spec": @@ -89,7 +89,7 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr return FAILED var mesh = Mesh.new() - # Fill the Mesh with data read in 'file', left as exercise to the reader + # Fill the Mesh with data read in "file", left as an exercise to the reader var filename = save_path + "." + get_save_extension() ResourceSaver.save(filename, mesh) @@ -107,19 +107,19 @@ Method Descriptions - :ref:`Array` **get_import_options** **(** :ref:`int` preset **)** virtual -Get the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: ``name``, ``default_value``, ``property_hint`` (optional), ``hint_string`` (optional), ``usage`` (optional). +Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: ``name``, ``default_value``, ``property_hint`` (optional), ``hint_string`` (optional), ``usage`` (optional). .. _class_EditorImportPlugin_method_get_import_order: - :ref:`int` **get_import_order** **(** **)** virtual -Get the order of this importer to be run when importing resources. Higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported. +Gets the order of this importer to be run when importing resources. Higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported. .. _class_EditorImportPlugin_method_get_importer_name: - :ref:`String` **get_importer_name** **(** **)** virtual -Get the unique name of the importer. +Gets the unique name of the importer. .. _class_EditorImportPlugin_method_get_option_visibility: @@ -129,43 +129,43 @@ Get the unique name of the importer. - :ref:`int` **get_preset_count** **(** **)** virtual -Get the number of initial presets defined by the plugin. Use :ref:`get_import_options` to get the default options for the preset and :ref:`get_preset_name` to get the name of the preset. +Gets the number of initial presets defined by the plugin. Use :ref:`get_import_options` to get the default options for the preset and :ref:`get_preset_name` to get the name of the preset. .. _class_EditorImportPlugin_method_get_preset_name: - :ref:`String` **get_preset_name** **(** :ref:`int` preset **)** virtual -Get the name of the options preset at this index. +Gets the name of the options preset at this index. .. _class_EditorImportPlugin_method_get_priority: - :ref:`float` **get_priority** **(** **)** virtual -Get the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. Default value is 1.0. +Gets the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. Default value is 1.0. .. _class_EditorImportPlugin_method_get_recognized_extensions: - :ref:`Array` **get_recognized_extensions** **(** **)** virtual -Get the list of file extensions to associate with this loader (case insensitive). e.g. ``["obj"]``. +Gets the list of file extensions to associate with this loader (case-insensitive). e.g. ``["obj"]``. .. _class_EditorImportPlugin_method_get_resource_type: - :ref:`String` **get_resource_type** **(** **)** virtual -Get the Godot resource type associated with this loader. e.g. ``"Mesh"`` or ``"Animation"``. +Gets the Godot resource type associated with this loader. e.g. ``"Mesh"`` or ``"Animation"``. .. _class_EditorImportPlugin_method_get_save_extension: - :ref:`String` **get_save_extension** **(** **)** virtual -Get the extension used to save this resource in the ``.import`` directory. +Gets the extension used to save this resource in the ``.import`` directory. .. _class_EditorImportPlugin_method_get_visible_name: - :ref:`String` **get_visible_name** **(** **)** virtual -Get the name to display in the import window. +Gets the name to display in the import window. .. _class_EditorImportPlugin_method_import: diff --git a/classes/class_editorinspectorplugin.rst b/classes/class_editorinspectorplugin.rst index cc743f960..d69f80f29 100644 --- a/classes/class_editorinspectorplugin.rst +++ b/classes/class_editorinspectorplugin.rst @@ -61,19 +61,19 @@ Method Descriptions - void **add_custom_control** **(** :ref:`Control` control **)** -Add a custom control, not necessarily a property editor. +Adds a custom control, not necessarily a property editor. .. _class_EditorInspectorPlugin_method_add_property_editor: - void **add_property_editor** **(** :ref:`String` property, :ref:`Control` editor **)** -Add a property editor, this must inherit :ref:`EditorProperty`. +Adds a property editor, this must inherit :ref:`EditorProperty`. .. _class_EditorInspectorPlugin_method_add_property_editor_for_multiple_properties: - void **add_property_editor_for_multiple_properties** **(** :ref:`String` label, :ref:`PoolStringArray` properties, :ref:`Control` editor **)** -Add am editor that allows modifying multiple properties, this must inherit :ref:`EditorProperty`. +Adds an editor that allows modifying multiple properties, this must inherit :ref:`EditorProperty`. .. _class_EditorInspectorPlugin_method_can_handle: diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index 6379a0800..c8c901b42 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -173,7 +173,7 @@ Reloads the scene at the given path. - :ref:`Error` **save_scene** **(** **)** -Saves the scene. Returns either OK or ERR_CANT_CREATE. See :ref:`@GlobalScope` constants. +Saves the scene. Returns either ``OK`` or ``ERR_CANT_CREATE`` (see :ref:`@GlobalScope` constants). .. _class_EditorInterface_method_save_scene_as: diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index bb926a43f..fed713f88 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -134,7 +134,7 @@ Signals - **main_screen_changed** **(** :ref:`String` screen_name **)** -Emitted when user changes the workspace (2D, 3D, Script, AssetLib). Also works with custom screens defined by plugins. +Emitted when user changes the workspace (**2D**, **3D**, **Script**, **AssetLib**). Also works with custom screens defined by plugins. .. _class_EditorPlugin_signal_resource_saved: @@ -144,7 +144,7 @@ Emitted when user changes the workspace (2D, 3D, Script, AssetLib). Also works w - **scene_changed** **(** :ref:`Node` scene_root **)** -Emitted when the scene is changed in the editor. The argument will return the root node of the scene that has just become active. If this scene is new and empty, the argument will be null. +Emitted when the scene is changed in the editor. The argument will return the root node of the scene that has just become active. If this scene is new and empty, the argument will be ``null``. .. _class_EditorPlugin_signal_scene_closed: @@ -245,12 +245,12 @@ enum **DockSlot**: - **DOCK_SLOT_RIGHT_BR** = **7** -- **DOCK_SLOT_MAX** = **8** +- **DOCK_SLOT_MAX** = **8** --- Represents the size of the :ref:`DockSlot` enum. Description ----------- -Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. Also see :ref:`EditorScript` to add functions to the editor. +Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. See also :ref:`EditorScript` to add functions to the editor. Tutorials --------- @@ -264,19 +264,19 @@ Method Descriptions - void **add_autoload_singleton** **(** :ref:`String` name, :ref:`String` path **)** -Add a script at ``path`` to the Autoload list as ``name``. +Adds a script at ``path`` to the Autoload list as ``name``. .. _class_EditorPlugin_method_add_control_to_bottom_panel: - :ref:`ToolButton` **add_control_to_bottom_panel** **(** :ref:`Control` control, :ref:`String` title **)** -Add a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_bottom_panel` and free it with ``queue_free()``. +Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_bottom_panel` and free it with ``queue_free()``. .. _class_EditorPlugin_method_add_control_to_container: - void **add_control_to_container** **(** :ref:`CustomControlContainer` container, :ref:`Control` control **)** -Add a custom control to a container (see CONTAINER\_\* enum). There are many locations where custom controls can be added in the editor UI. +Adds a custom control to a container (see ``CONTAINER_*`` enum). There are many locations where custom controls can be added in the editor UI. Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it). @@ -286,7 +286,7 @@ When your plugin is deactivated, make sure to remove your custom control with :r - void **add_control_to_dock** **(** :ref:`DockSlot` slot, :ref:`Control` control **)** -Add the control to a specific dock slot (see DOCK\_\* enum for options). +Adds the control to a specific dock slot (see ``DOCK_*`` enum for options). If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions. @@ -296,11 +296,11 @@ When your plugin is deactivated, make sure to remove your custom control with :r - void **add_custom_type** **(** :ref:`String` type, :ref:`String` base, :ref:`Script` script, :ref:`Texture` icon **)** -Add a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. +Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. When given node or resource is selected, the base type will be instanced (ie, "Spatial", "Control", "Resource"), then the script will be loaded and set to this object. -You can use the virtual method :ref:`handles` to check if your custom object is being edited by checking the script or using 'is' keyword. +You can use the virtual method :ref:`handles` to check if your custom object is being edited by checking the script or using the ``is`` keyword. During run-time, this will be a simple object with a script so this function does not need to be called then. @@ -328,7 +328,7 @@ During run-time, this will be a simple object with a script so this function doe - void **add_tool_menu_item** **(** :ref:`String` name, :ref:`Object` handler, :ref:`String` callback, :ref:`Variant` ud=null **)** -Add a custom menu to 'Project > Tools' as ``name`` that calls ``callback`` on an instance of ``handler`` with a parameter ``ud`` when user activates it. +Adds a custom menu to **Project > Tools** as ``name`` that calls ``callback`` on an instance of ``handler`` with a parameter ``ud`` when user activates it. .. _class_EditorPlugin_method_add_tool_submenu_item: @@ -406,7 +406,7 @@ Also note that the edited scene must have a root node. - :ref:`PoolStringArray` **get_breakpoints** **(** **)** virtual -This is for editors that edit script based objects. You can return a list of breakpoints in the format (script:line), for example: res://path_to_script.gd:25 +This is for editors that edit script-based objects. You can return a list of breakpoints in the format (``script:line``), for example: ``res://path_to_script.gd:25``. .. _class_EditorPlugin_method_get_editor_interface: @@ -426,25 +426,27 @@ Returns the :ref:`EditorInterface` object that gives you - :ref:`ScriptCreateDialog` **get_script_create_dialog** **(** **)** -Gets the Editor's dialogue used for making scripts. Note that users can configure it before use. +Gets the Editor's dialogue used for making scripts. + +**Note:** Users can configure it before use. .. _class_EditorPlugin_method_get_state: - :ref:`Dictionary` **get_state** **(** **)** virtual -Get the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). +Gets the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). .. _class_EditorPlugin_method_get_undo_redo: - :ref:`UndoRedo` **get_undo_redo** **(** **)** -Get the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it. +Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it. .. _class_EditorPlugin_method_get_window_layout: - void **get_window_layout** **(** :ref:`ConfigFile` layout **)** virtual -Get the GUI layout of the plugin. This is used to save the project's editor layout when :ref:`queue_save_layout` is called or the editor layout was changed(For example changing the position of a dock). +Gets the GUI layout of the plugin. This is used to save the project's editor layout when :ref:`queue_save_layout` is called or the editor layout was changed(For example changing the position of a dock). .. _class_EditorPlugin_method_handles: @@ -456,7 +458,7 @@ Implement this function if your plugin edits a specific type of object (Resource - :ref:`bool` **has_main_screen** **(** **)** virtual -Returns ``true`` if this is a main screen editor plugin (it goes in the workspaces selector together with '2D', '3D', and 'Script'). +Returns ``true`` if this is a main screen editor plugin (it goes in the workspace selector together with **2D**, **3D**, **Script** and **AssetLib**). .. _class_EditorPlugin_method_hide_bottom_panel: @@ -484,31 +486,31 @@ Queue save the project's editor layout. - void **remove_autoload_singleton** **(** :ref:`String` name **)** -Remove an Autoload ``name`` from the list. +Removes an Autoload ``name`` from the list. .. _class_EditorPlugin_method_remove_control_from_bottom_panel: - void **remove_control_from_bottom_panel** **(** :ref:`Control` control **)** -Remove the control from the bottom panel. You have to manually ``queue_free()`` the control. +Removes the control from the bottom panel. You have to manually ``queue_free()`` the control. .. _class_EditorPlugin_method_remove_control_from_container: - void **remove_control_from_container** **(** :ref:`CustomControlContainer` container, :ref:`Control` control **)** -Remove the control from the specified container. You have to manually ``queue_free()`` the control. +Removes the control from the specified container. You have to manually ``queue_free()`` the control. .. _class_EditorPlugin_method_remove_control_from_docks: - void **remove_control_from_docks** **(** :ref:`Control` control **)** -Remove the control from the dock. You have to manually ``queue_free()`` the control. +Removes the control from the dock. You have to manually ``queue_free()`` the control. .. _class_EditorPlugin_method_remove_custom_type: - void **remove_custom_type** **(** :ref:`String` type **)** -Remove a custom type added by :ref:`add_custom_type` +Removes a custom type added by :ref:`add_custom_type`. .. _class_EditorPlugin_method_remove_export_plugin: @@ -534,7 +536,7 @@ Remove a custom type added by :ref:`add_custom_type` name **)** -Removes a menu ``name`` from 'Project > Tools'. +Removes a menu ``name`` from **Project > Tools**. .. _class_EditorPlugin_method_save_external_data: diff --git a/classes/class_editorproperty.rst b/classes/class_editorproperty.rst index 170e3f8e1..c33eb8447 100644 --- a/classes/class_editorproperty.rst +++ b/classes/class_editorproperty.rst @@ -14,7 +14,7 @@ EditorProperty Brief Description ----------------- -Custom control to edit properties for adding into the inspector +Custom control to edit properties for adding into the inspector. Properties ---------- @@ -59,13 +59,13 @@ Signals - **multiple_properties_changed** **(** :ref:`PoolStringArray` properties, :ref:`Array` value **)** -Emit yourself if you want multiple properties modified at the same time. Do not use if added via :ref:`EditorInspectorPlugin.parse_property` +Emit it if you want multiple properties modified at the same time. Do not use if added via :ref:`EditorInspectorPlugin.parse_property`. .. _class_EditorProperty_signal_object_id_selected: - **object_id_selected** **(** :ref:`String` property, :ref:`int` id **)** -Used by sub-inspectors. Emit if what was selected was an Object ID. +Used by sub-inspectors. Emit it if what was selected was an Object ID. .. _class_EditorProperty_signal_property_changed: @@ -77,19 +77,19 @@ Do not emit this manually, use the :ref:`emit_changed` property, :ref:`String` bool **)** -Used internally, when a property was checked. +Emitted when a property was checked. Used internally. .. _class_EditorProperty_signal_property_keyed: - **property_keyed** **(** :ref:`String` property **)** -Emit if you want to add this value as an animation key (check keying being enabled first). +Emit it if you want to add this value as an animation key (check for keying being enabled first). .. _class_EditorProperty_signal_property_keyed_with_value: - **property_keyed_with_value** **(** :ref:`String` property, :ref:`Nil` value **)** -Emit if you want to key a property with a single value. +Emit it if you want to key a property with a single value. .. _class_EditorProperty_signal_resource_selected: @@ -101,7 +101,7 @@ If you want a sub-resource to be edited, emit this signal with the resource. - **selected** **(** :ref:`String` path, :ref:`int` focusable_idx **)** -Internal, used when selected. +Emitted when selected. Used internally. Description ----------- @@ -157,7 +157,7 @@ Used by the inspector, when the property must draw with error color. | *Getter* | is_keying() | +----------+-------------------+ -Used by the inspector, when the property can add keys for animation/ +Used by the inspector, when the property can add keys for animation. .. _class_EditorProperty_property_label: @@ -169,7 +169,7 @@ Used by the inspector, when the property can add keys for animation/ | *Getter* | get_label() | +----------+------------------+ -Set this property to change the label (if you want to show one) +Sets this property to change the label (if you want to show one). .. _class_EditorProperty_property_read_only: @@ -196,19 +196,19 @@ If any of the controls added can gain keyboard focus, add it here. This ensures - void **emit_changed** **(** :ref:`String` property, :ref:`Variant` value, :ref:`String` field="", :ref:`bool` changing=false **)** -If one (or many properties) changed, this must be called. "Field" is used in case your editor can modify fields separately (as an example, Vector3.x). The "changing" argument avoids the editor requesting this property to be refreshed (leave as false if unsure). +If one or several properties have changed, this must be called. ``field`` is used in case your editor can modify fields separately (as an example, Vector3.x). The ``changing`` argument avoids the editor requesting this property to be refreshed (leave as ``false`` if unsure). .. _class_EditorProperty_method_get_edited_object: - :ref:`Object` **get_edited_object** **(** **)** -Get the edited object. +Gets the edited object. .. _class_EditorProperty_method_get_edited_property: - :ref:`String` **get_edited_property** **(** **)** -Get the edited property. If your editor is for a single property (added via :ref:`EditorInspectorPlugin.parse_property`), then this will return it.. +Gets the edited property. If your editor is for a single property (added via :ref:`EditorInspectorPlugin.parse_property`), then this will return the property. .. _class_EditorProperty_method_get_tooltip_text: @@ -220,7 +220,7 @@ Override if you want to allow a custom tooltip over your property. - void **set_bottom_editor** **(** :ref:`Control` editor **)** -Add controls with this function if you want them on the bottom (below the label). +Adds controls with this function if you want them on the bottom (below the label). .. _class_EditorProperty_method_update_property: diff --git a/classes/class_editorresourcepreview.rst b/classes/class_editorresourcepreview.rst index cbc4ff417..43b4d556c 100644 --- a/classes/class_editorresourcepreview.rst +++ b/classes/class_editorresourcepreview.rst @@ -38,7 +38,7 @@ Signals - **preview_invalidated** **(** :ref:`String` path **)** -If a preview was invalidated (changed) this signal will emit (using the path of the preview) +Emitted if a preview was invalidated (changed). ``path`` corresponds to the path of the preview. Description ----------- @@ -58,7 +58,7 @@ Create an own, custom preview generator. - void **check_for_invalidation** **(** :ref:`String` path **)** -Check if the resource changed, if so it will be invalidated and the corresponding signal emitted. +Check if the resource changed, if so, it will be invalidated and the corresponding signal emitted. .. _class_EditorResourcePreview_method_queue_edited_resource_preview: @@ -76,5 +76,5 @@ Queue a resource file for preview (using a path). Once the preview is ready, you - void **remove_preview_generator** **(** :ref:`EditorResourcePreviewGenerator` generator **)** -Remove a custom preview generator. +Removes a custom preview generator. diff --git a/classes/class_editorresourcepreviewgenerator.rst b/classes/class_editorresourcepreviewgenerator.rst index 064496df2..1df015efe 100644 --- a/classes/class_editorresourcepreviewgenerator.rst +++ b/classes/class_editorresourcepreviewgenerator.rst @@ -34,7 +34,7 @@ Methods Description ----------- -Custom code to generate previews. Please check "file_dialog/thumbnail_size" in EditorSettings to find out the right size to do previews at. +Custom code to generate previews. Please check ``file_dialog/thumbnail_size`` in :ref:`EditorSettings` to find out the right size to do previews at. Method Descriptions ------------------- @@ -43,9 +43,9 @@ Method Descriptions - :ref:`bool` **can_generate_small_preview** **(** **)** virtual -If this function returns true the generator will call :ref:`generate` or :ref:`generate_from_path` for small previews too. +If this function returns ``true``, the generator will call :ref:`generate` or :ref:`generate_from_path` for small previews as well. -By default it returns false. +By default, it returns ``false``. .. _class_EditorResourcePreviewGenerator_method_generate: @@ -71,13 +71,13 @@ Care must be taken because this function is always called from a thread (not the - :ref:`bool` **generate_small_preview_automatically** **(** **)** virtual -If this function returns true the generator will automatically generate the small previews from the normal preview texture generated by the methods :ref:`generate` or :ref:`generate_from_path`. +If this function returns ``true``, the generator will automatically generate the small previews from the normal preview texture generated by the methods :ref:`generate` or :ref:`generate_from_path`. -By default it returns false. +By default, it returns ``false``. .. _class_EditorResourcePreviewGenerator_method_handles: - :ref:`bool` **handles** **(** :ref:`String` type **)** virtual -Returns if your generator supports this resource type. +Returns ``true`` if your generator supports the resource of type ``type``. diff --git a/classes/class_editorsceneimporterassimp.rst b/classes/class_editorsceneimporterassimp.rst index 5c7f94e3c..5f0366f30 100644 --- a/classes/class_editorsceneimporterassimp.rst +++ b/classes/class_editorsceneimporterassimp.rst @@ -14,33 +14,33 @@ EditorSceneImporterAssimp Brief Description ----------------- -This is a multi-format 3d asset importer. +Multi-format 3D asset importer based on `Assimp `_. Description ----------- -This is a multi-format 3d asset importer. +This is a multi-format 3D asset importer based on `Assimp `_. See `this page `_ for a full list of supported formats. -Use these FBX export settings from Autodesk Maya. +If exporting a FBX scene from Autodesk Maya, use these FBX export settings: :: - * Smoothing Groups - * Smooth Mesh - * Triangluate (For mesh with blendshapes) - * Bake Animation - * Resample All - * Deformed Models - * Skins - * Blend Shapes - * Curve Filters - * Constant Key Reducer - * Auto Tangents Only - * DO NOT CHECK Constraints (Will Break File) - * Can check Embed Media (Embeds textures into FBX file to import) - -- Note: When importing embed media, texture and mesh will be a un-alterable file. - -- Reimport of fbx with updated texture is need if texture is updated. - * Units: Centimeters - * Up Axis: Y - * Binary format in FBX 2017 + - Smoothing Groups + - Smooth Mesh + - Triangluate (for meshes with blend shapes) + - Bake Animation + - Resample All + - Deformed Models + - Skins + - Blend Shapes + - Curve Filters + - Constant Key Reducer + - Auto Tangents Only + - *Do not check* Constraints (as it will break the file) + - Can check Embed Media (embeds textures into the exported FBX file) + - Note that when importing embedded media, the texture and mesh will be a single immutable file. + - You will have to re-export then re-import the FBX if the texture has changed. + - Units: Centimeters + - Up Axis: Y + - Binary format in FBX 2017 diff --git a/classes/class_editorscenepostimport.rst b/classes/class_editorscenepostimport.rst index e4e6d7190..89e19e410 100644 --- a/classes/class_editorscenepostimport.rst +++ b/classes/class_editorscenepostimport.rst @@ -14,7 +14,7 @@ EditorScenePostImport Brief Description ----------------- -Post process scenes after import +Post-processes scenes after import. Methods ------- @@ -30,22 +30,22 @@ Methods Description ----------- -Imported scenes can be automatically modified right after import by setting their *Custom Script* Import property to a ``tool`` script that inherits from this class. +Imported scenes can be automatically modified right after import by setting their **Custom Script** Import property to a ``tool`` script that inherits from this class. The :ref:`post_import` callback receives the imported scene's root node and returns the modified version of the scene. Usage example: :: - tool # needed so it runs in editor + tool # Needed so it runs in editor extends EditorScenePostImport # This sample changes all node names # Called right after the scene is imported and gets the root node func post_import(scene): - # change all node names to "modified_[oldnodename]" + # Change all node names to "modified_[oldnodename]" iterate(scene) - return scene # remember to return the imported scene + return scene # Remember to return the imported scene func iterate(node): if node != null: @@ -77,5 +77,5 @@ Returns the resource folder the imported scene file is located in. - :ref:`Object` **post_import** **(** :ref:`Object` scene **)** virtual -Gets called after the scene got imported and has to return the modified version of the scene. +Called after the scene was imported. This method must return the modified version of the scene. diff --git a/classes/class_editorscript.rst b/classes/class_editorscript.rst index 06ae4d5ff..a0280d89f 100644 --- a/classes/class_editorscript.rst +++ b/classes/class_editorscript.rst @@ -32,9 +32,11 @@ Methods Description ----------- -Scripts extending this class and implementing its ``_run()`` method can be executed from the Script Editor's ``File -> Run`` menu option (or by pressing ``CTRL+Shift+X``) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using :ref:`EditorPlugin`\ s instead. Note that extending scripts need to have ``tool mode`` enabled. +Scripts extending this class and implementing its :ref:`_run` method can be executed from the Script Editor's **File > Run** menu option (or by pressing ``Ctrl+Shift+X``) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using :ref:`EditorPlugin`\ s instead. -Example script: +**Note:** Extending scripts need to have ``tool mode`` enabled. + +**Example script:** :: @@ -44,7 +46,7 @@ Example script: func _run(): print("Hello from the Godot Editor!") -Note that the script is run in the Editor context, which means the output is visible in the console window started with the Editor (STDOUT) instead of the usual Godot *Output* dock. +**Note:** The script is run in the Editor context, which means the output is visible in the console window started with the Editor (stdout) instead of the usual Godot **Output** dock. Method Descriptions ------------------- @@ -53,7 +55,7 @@ Method Descriptions - void **_run** **(** **)** virtual -This method is executed by the Editor when ``File -> Run`` is used. +This method is executed by the Editor when **File > Run** is used. .. _class_EditorScript_method_add_root_node: @@ -61,7 +63,7 @@ This method is executed by the Editor when ``File -> Run`` is used. Adds ``node`` as a child of the root node in the editor context. -WARNING: The implementation of this method is currently disabled. +**Warning:** The implementation of this method is currently disabled. .. _class_EditorScript_method_get_editor_interface: diff --git a/classes/class_editorselection.rst b/classes/class_editorselection.rst index 211d27b7f..b1a117a42 100644 --- a/classes/class_editorselection.rst +++ b/classes/class_editorselection.rst @@ -52,7 +52,7 @@ Method Descriptions - void **add_node** **(** :ref:`Node` node **)** -Add a node to the selection. +Adds a node to the selection. .. _class_EditorSelection_method_clear: @@ -64,17 +64,17 @@ Clear the selection. - :ref:`Array` **get_selected_nodes** **(** **)** -Get the list of selected nodes. +Gets the list of selected nodes. .. _class_EditorSelection_method_get_transformable_selected_nodes: - :ref:`Array` **get_transformable_selected_nodes** **(** **)** -Get the list of selected nodes, optimized for transform operations (ie, moving them, rotating, etc). This list avoids situations where a node is selected and also chid/grandchild. +Gets the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc). This list avoids situations where a node is selected and also child/grandchild. .. _class_EditorSelection_method_remove_node: - void **remove_node** **(** :ref:`Node` node **)** -Remove a node from the selection. +Removes a node from the selection. diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 1233209e2..bcbfc9cda 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -63,7 +63,7 @@ Signals Description ----------- -Object that holds the project-independent editor settings. These settings are generally visible in the Editor Settings menu. +Object that holds the project-independent editor settings. These settings are generally visible in the **Editor > Editor Settings** menu. Accessing the settings is done by using the regular :ref:`Object` API, such as: @@ -80,9 +80,9 @@ Method Descriptions - void **add_property_info** **(** :ref:`Dictionary` info **)** -Add a custom property info to a property. The dictionary must contain: name::ref:`String`\ (the name of the property) and type::ref:`int`\ (see TYPE\_\* in :ref:`@GlobalScope`), and optionally hint::ref:`int`\ (see PROPERTY_HINT\_\* in :ref:`@GlobalScope`), hint_string::ref:`String`. +Adds a custom property info to a property. The dictionary must contain: name::ref:`String`\ (the name of the property) and type::ref:`int`\ (see ``TYPE_*`` in :ref:`@GlobalScope`), and optionally hint::ref:`int`\ (see ``PROPERTY_HINT_*`` in :ref:`@GlobalScope`), hint_string::ref:`String`. -Example: +**Example:** :: @@ -107,7 +107,7 @@ Erase a given setting (pass full property path). - :ref:`PoolStringArray` **get_favorites** **(** **)** const -Get the list of favorite files and directories for this project. +Gets the list of favorite files and directories for this project. .. _class_EditorSettings_method_get_project_metadata: @@ -117,13 +117,13 @@ Get the list of favorite files and directories for this project. - :ref:`String` **get_project_settings_dir** **(** **)** const -Get the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved. +Gets the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved. .. _class_EditorSettings_method_get_recent_dirs: - :ref:`PoolStringArray` **get_recent_dirs** **(** **)** const -Get the list of recently visited folders in the file dialog for this project. +Gets the list of recently visited folders in the file dialog for this project. .. _class_EditorSettings_method_get_setting: @@ -133,11 +133,11 @@ Get the list of recently visited folders in the file dialog for this project. - :ref:`String` **get_settings_dir** **(** **)** const -Get the global settings path for the engine. Inside this path you can find some standard paths such as: +Gets the global settings path for the engine. Inside this path, you can find some standard paths such as: -settings/tmp - used for temporary storage of files +``settings/tmp`` - Used for temporary storage of files -settings/templates - where export templates are located +``settings/templates`` - Where export templates are located .. _class_EditorSettings_method_has_setting: @@ -155,7 +155,7 @@ settings/templates - where export templates are located - void **set_favorites** **(** :ref:`PoolStringArray` dirs **)** -Set the list of favorite files and directories for this project. +Sets the list of favorite files and directories for this project. .. _class_EditorSettings_method_set_initial_value: @@ -169,7 +169,7 @@ Set the list of favorite files and directories for this project. - void **set_recent_dirs** **(** :ref:`PoolStringArray` dirs **)** -Set the list of recently visited folders in the file dialog for this project. +Sets the list of recently visited folders in the file dialog for this project. .. _class_EditorSettings_method_set_setting: diff --git a/classes/class_editorspatialgizmo.rst b/classes/class_editorspatialgizmo.rst index 9a0b8dfb1..0e7bf0ae1 100644 --- a/classes/class_editorspatialgizmo.rst +++ b/classes/class_editorspatialgizmo.rst @@ -71,13 +71,13 @@ Method Descriptions - void **add_collision_triangles** **(** :ref:`TriangleMesh` triangles **)** -Add collision triangles to the gizmo for picking. A :ref:`TriangleMesh` can be generated from a regular :ref:`Mesh` too. Call this function during :ref:`redraw`. +Adds collision triangles to the gizmo for picking. A :ref:`TriangleMesh` can be generated from a regular :ref:`Mesh` too. Call this function during :ref:`redraw`. .. _class_EditorSpatialGizmo_method_add_handles: - void **add_handles** **(** :ref:`PoolVector3Array` handles, :ref:`Material` material, :ref:`bool` billboard=false, :ref:`bool` secondary=false **)** -Add a list of handles (points) which can be used to deform the object being edited. +Adds a list of handles (points) which can be used to deform the object being edited. There are virtual functions which will be called upon editing of these handles. Call this function during :ref:`redraw`. @@ -85,7 +85,7 @@ There are virtual functions which will be called upon editing of these handles. - void **add_lines** **(** :ref:`PoolVector3Array` lines, :ref:`Material` material, :ref:`bool` billboard=false **)** -Add lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during :ref:`redraw`. +Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during :ref:`redraw`. .. _class_EditorSpatialGizmo_method_add_mesh: @@ -95,7 +95,7 @@ Add lines to the gizmo (as sets of 2 points), with a given material. The lines a - void **add_unscaled_billboard** **(** :ref:`Material` material, :ref:`float` default_scale=1 **)** -Add an unscaled billboard for visualization. Call this function during :ref:`redraw`. +Adds an unscaled billboard for visualization. Call this function during :ref:`redraw`. .. _class_EditorSpatialGizmo_method_clear: @@ -107,13 +107,13 @@ Add an unscaled billboard for visualization. Call this function during :ref:`red Commit a handle being edited (handles must have been previously added by :ref:`add_handles`). -If the cancel parameter is ``true``, an option to restore the edited value to the original is provided. +If the ``cancel`` parameter is ``true``, an option to restore the edited value to the original is provided. .. _class_EditorSpatialGizmo_method_get_handle_name: - :ref:`String` **get_handle_name** **(** :ref:`int` index **)** virtual -Get the name of an edited handle (handles must have been previously added by :ref:`add_handles`). +Gets the name of an edited handle (handles must have been previously added by :ref:`add_handles`). Handles can be named for reference to the user when editing. @@ -121,7 +121,7 @@ Handles can be named for reference to the user when editing. - :ref:`Variant` **get_handle_value** **(** :ref:`int` index **)** virtual -Get actual value of a handle. This value can be anything and used for eventually undoing the motion when calling :ref:`commit_handle`. +Gets actual value of a handle. This value can be anything and used for eventually undoing the motion when calling :ref:`commit_handle`. .. _class_EditorSpatialGizmo_method_get_plugin: @@ -139,7 +139,7 @@ Returns the Spatial node associated with this gizmo. - :ref:`bool` **is_handle_highlighted** **(** :ref:`int` index **)** virtual -Get whether a handle is highlighted or not. +Gets whether a handle is highlighted or not. .. _class_EditorSpatialGizmo_method_redraw: diff --git a/classes/class_editorspatialgizmoplugin.rst b/classes/class_editorspatialgizmoplugin.rst index 725b9ad10..ebb525a6d 100644 --- a/classes/class_editorspatialgizmoplugin.rst +++ b/classes/class_editorspatialgizmoplugin.rst @@ -120,13 +120,13 @@ Override this method to provide gizmo's handle names. Called for this plugin's a - :ref:`Variant` **get_handle_value** **(** :ref:`EditorSpatialGizmo` gizmo, :ref:`int` index **)** virtual -Get actual value of a handle from gizmo. Called for this plugin's active gizmos. +Gets actual value of a handle from gizmo. Called for this plugin's active gizmos. .. _class_EditorSpatialGizmoPlugin_method_get_material: - :ref:`SpatialMaterial` **get_material** **(** :ref:`String` name, :ref:`EditorSpatialGizmo` gizmo **)** -Get material from the internal list of materials. If an :ref:`EditorSpatialGizmo` is provided it will try to get the corresponding variant (selected and/or editable). +Gets material from the internal list of materials. If an :ref:`EditorSpatialGizmo` is provided, it will try to get the corresponding variant (selected and/or editable). .. _class_EditorSpatialGizmoPlugin_method_get_name: @@ -148,7 +148,7 @@ Override this method to define which Spatial nodes have a gizmo from this plugin - :ref:`bool` **is_handle_highlighted** **(** :ref:`EditorSpatialGizmo` gizmo, :ref:`int` index **)** virtual -Get whether a handle is highlighted or not. Called for this plugin's active gizmos. +Gets whether a handle is highlighted or not. Called for this plugin's active gizmos. .. _class_EditorSpatialGizmoPlugin_method_is_selectable_when_hidden: diff --git a/classes/class_encodedobjectasid.rst b/classes/class_encodedobjectasid.rst index aa0c4cc59..0a98a3596 100644 --- a/classes/class_encodedobjectasid.rst +++ b/classes/class_encodedobjectasid.rst @@ -14,25 +14,34 @@ EncodedObjectAsID Brief Description ----------------- +Holds a reference to an :ref:`Object`'s instance ID. +Properties +---------- -Methods -------- ++-----------------------+--------------------------------------------------------------+ +| :ref:`int` | :ref:`object_id` | ++-----------------------+--------------------------------------------------------------+ -+-----------------------+---------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_object_id` **(** **)** const | -+-----------------------+---------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_object_id` **(** :ref:`int` id **)** | -+-----------------------+---------------------------------------------------------------------------------------------------------+ +Description +----------- -Method Descriptions -------------------- +Utility class which holds a reference to the internal identifier of an :ref:`Object` instance, as given by :ref:`Object.get_instance_id`. This ID can then be used to retrieve the object instance with :ref:`@GDScript.instance_from_id`. -.. _class_EncodedObjectAsID_method_get_object_id: +This class is used internally by the editor inspector and script debugger, but can also be used in plugins to pass and display objects as their IDs. -- :ref:`int` **get_object_id** **(** **)** const +Property Descriptions +--------------------- -.. _class_EncodedObjectAsID_method_set_object_id: +.. _class_EncodedObjectAsID_property_object_id: -- void **set_object_id** **(** :ref:`int` id **)** +- :ref:`int` **object_id** + ++----------+----------------------+ +| *Setter* | set_object_id(value) | ++----------+----------------------+ +| *Getter* | get_object_id() | ++----------+----------------------+ + +The :ref:`Object` identifier stored in this ``EncodedObjectAsID`` instance. The object instance can be retrieved with :ref:`@GDScript.instance_from_id`. diff --git a/classes/class_engine.rst b/classes/class_engine.rst index 7c7bb4b7b..89b8d176b 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -63,7 +63,7 @@ Methods Description ----------- -The ``Engine`` class allows you to query and modify the game's run-time parameters, such as frames per second, time scale, and others. +The ``Engine`` class allows you to query and modify the project's run-time parameters, such as frames per second, time scale, and others. Property Descriptions --------------------- @@ -135,13 +135,13 @@ Method Descriptions Returns engine author information in a Dictionary. -"lead_developers" - Array of Strings, lead developer names +``lead_developers`` - Array of Strings, lead developer names -"founders" - Array of Strings, founder names +``founders`` - Array of Strings, founder names -"project_managers" - Array of Strings, project manager names +``project_managers`` - Array of Strings, project manager names -"developers" - Array of Strings, developer names +``developers`` - Array of Strings, developer names .. _class_Engine_method_get_copyright_info: @@ -149,9 +149,9 @@ Returns engine author information in a Dictionary. Returns an Array of copyright information Dictionaries. -"name" - String, component name +``name`` - String, component name -"parts" - Array of Dictionaries {"files", "copyright", "license"} describing subsections of the component +``parts`` - Array of Dictionaries {``files``, ``copyright``, ``license``} describing subsections of the component .. _class_Engine_method_get_donor_info: @@ -159,7 +159,7 @@ Returns an Array of copyright information Dictionaries. Returns a Dictionary of Arrays of donor names. -{"platinum_sponsors", "gold_sponsors", "mini_sponsors", "gold_donors", "silver_donors", "bronze_donors"} +{``platinum_sponsors``, ``gold_sponsors``, ``mini_sponsors``, ``gold_donors``, ``silver_donors``, ``bronze_donors``} .. _class_Engine_method_get_frames_drawn: @@ -207,7 +207,7 @@ Returns the current engine version information in a Dictionary. ``patch`` - Holds the patch version number as an int -``hex`` - Holds the full version number encoded as an hexadecimal int with one byte (2 places) per number (see example below) +``hex`` - Holds the full version number encoded as a hexadecimal int with one byte (2 places) per number (see example below) ``status`` - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String @@ -219,14 +219,14 @@ Returns the current engine version information in a Dictionary. ``string`` - ``major`` + ``minor`` + ``patch`` + ``status`` + ``build`` in a single String -The ``hex`` value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be ``0x03010C``. Note that it's still an int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for easy version comparisons from code: +The ``hex`` value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be ``0x03010C``. **Note:** It's still an int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for easy version comparisons from code: :: if Engine.get_version_info().hex >= 0x030200: - # do things specific to version 3.2 or later + # Do things specific to version 3.2 or later else: - # do things specific to versions before 3.2 + # Do things specific to versions before 3.2 .. _class_Engine_method_has_singleton: diff --git a/classes/class_environment.rst b/classes/class_environment.rst index 5f298c870..4aa3f6d0d 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -226,7 +226,7 @@ enum **BGMode**: - **BG_CAMERA_FEED** = **6** --- Display a camera feed in the background. -- **BG_MAX** = **7** --- Helper constant keeping track of the enum's size, has no direct usage in API calls. +- **BG_MAX** = **7** --- Represents the size of the :ref:`BGMode` enum. .. _enum_Environment_GlowBlendMode: @@ -244,7 +244,7 @@ enum **GlowBlendMode**: - **GLOW_BLEND_MODE_SCREEN** = **1** --- Screen glow blending mode. Increases brightness, used frequently with bloom. -- **GLOW_BLEND_MODE_SOFTLIGHT** = **2** --- Softlight glow blending mode. Modifies contrast, exposes shadows and highlights, vivid bloom. +- **GLOW_BLEND_MODE_SOFTLIGHT** = **2** --- Soft light glow blending mode. Modifies contrast, exposes shadows and highlights, vivid bloom. - **GLOW_BLEND_MODE_REPLACE** = **3** --- Replace glow blending mode. Replaces all pixels' color by the glow value. @@ -262,7 +262,7 @@ enum **ToneMapper**: - **TONE_MAPPER_LINEAR** = **0** --- Linear tonemapper operator. Reads the linear data and performs an exposure adjustment. -- **TONE_MAPPER_REINHARDT** = **1** --- Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: color = color / (1 + color). +- **TONE_MAPPER_REINHARDT** = **1** --- Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: ``color = color / (1 + color)``. - **TONE_MAPPER_FILMIC** = **2** --- Filmic tonemapper operator. @@ -325,13 +325,11 @@ Description Resource for environment nodes (like :ref:`WorldEnvironment`) that define multiple environment operations (such as background :ref:`Sky` or :ref:`Color`, ambient light, fog, depth-of-field...). These parameters affect the final render of the scene. The order of these operations is: -- DOF Blur +- Depth of Field Blur -- Motion Blur +- Glow -- Bloom - -- Tonemap (auto exposure) +- Tonemap (Auto Exposure) - Adjustments diff --git a/classes/class_expression.rst b/classes/class_expression.rst index 17d35a246..667247b11 100644 --- a/classes/class_expression.rst +++ b/classes/class_expression.rst @@ -81,7 +81,7 @@ Returns ``true`` if :ref:`execute` has failed. - :ref:`Error` **parse** **(** :ref:`String` expression, :ref:`PoolStringArray` input_names=PoolStringArray( ) **)** -Parses the expression and returns a :ref:`Error`. +Parses the expression and returns an :ref:`Error` code. You can optionally specify names of variables that may appear in the expression with ``input_names``, so that you can bind them when it gets executed. diff --git a/classes/class_file.rst b/classes/class_file.rst index cdc44e9dd..6c24d7225 100644 --- a/classes/class_file.rst +++ b/classes/class_file.rst @@ -151,13 +151,13 @@ enum **ModeFlags**: enum **CompressionMode**: -- **COMPRESSION_FASTLZ** = **0** --- Uses the FastLZ compression method. +- **COMPRESSION_FASTLZ** = **0** --- Uses the `FastLZ `_ compression method. -- **COMPRESSION_DEFLATE** = **1** --- Uses the Deflate compression method. +- **COMPRESSION_DEFLATE** = **1** --- Uses the `DEFLATE `_ compression method. -- **COMPRESSION_ZSTD** = **2** --- Uses the Zstd compression method. +- **COMPRESSION_ZSTD** = **2** --- Uses the `Zstandard `_ compression method. -- **COMPRESSION_GZIP** = **3** --- Uses the gzip compression method. +- **COMPRESSION_GZIP** = **3** --- Uses the `gzip `_ compression method. Description ----------- @@ -199,9 +199,9 @@ Property Descriptions | *Getter* | get_endian_swap() | +----------+------------------------+ -If ``true``, the file's endianness is swapped. Use this if you're dealing with files written in big endian machines. +If ``true``, the file's endianness is swapped. Use this if you're dealing with files written on big-endian machines. -Note that this is about the file format, not CPU type. This is always reset to ``false`` whenever you open the file. +**Note:** This is about the file format, not CPU type. This is always reset to ``false`` whenever you open the file. Method Descriptions ------------------- @@ -216,7 +216,9 @@ Closes the currently opened file. - :ref:`bool` **eof_reached** **(** **)** const -Returns ``true`` if the file cursor has read past the end of the file. Note that this function will still return ``false`` while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low level file access works in all operating systems. There is always :ref:`get_len` and :ref:`get_position` to implement a custom logic. +Returns ``true`` if the file cursor has read past the end of the file. + +**Note:** This function will still return ``false`` while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low-level file access works in all operating systems. There is always :ref:`get_len` and :ref:`get_position` to implement a custom logic. .. _class_File_method_file_exists: @@ -224,7 +226,7 @@ Returns ``true`` if the file cursor has read past the end of the file. Note that Returns ``true`` if the file exists in the given path. -Note that many resources types are imported (e.g. textures or sound files), and that their source asset will not be included in the exported game, as only the imported version is used (in the ``res://.import`` folder). To check for the existence of such resources while taking into account the remapping to their imported location, use :ref:`ResourceLoader.exists`. Typically, using ``File.file_exists`` on an imported resource would work while you are developing in the editor (the source asset is present in ``res://``, but fail when exported). +**Note:** Many resources types are imported (e.g. textures or sound files), and that their source asset will not be included in the exported game, as only the imported version is used (in the ``res://.import`` folder). To check for the existence of such resources while taking into account the remapping to their imported location, use :ref:`ResourceLoader.exists`. Typically, using ``File.file_exists`` on an imported resource would work while you are developing in the editor (the source asset is present in ``res://``, but fail when exported). .. _class_File_method_get_16: @@ -268,7 +270,7 @@ Returns next ``len`` bytes of the file as a :ref:`PoolByteArray` **get_csv_line** **(** :ref:`String` delim="," **)** const -Returns the next value of the file in CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma), it should be one character long. +Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter ``delim`` to use other than the default ``","`` (comma). This delimiter must be one-character long. Text is interpreted as being UTF-8 encoded. @@ -276,7 +278,7 @@ Text is interpreted as being UTF-8 encoded. - :ref:`float` **get_double** **(** **)** const -Returns the next 64 bits from the file as a floating point number. +Returns the next 64 bits from the file as a floating-point number. .. _class_File_method_get_error: @@ -288,7 +290,7 @@ Returns the last error that happened when trying to perform operations. Compare - :ref:`float` **get_float** **(** **)** const -Returns the next 32 bits from the file as a floating point number. +Returns the next 32 bits from the file as a floating-point number. .. _class_File_method_get_len: @@ -346,7 +348,7 @@ Returns the file cursor's position. - :ref:`float` **get_real** **(** **)** const -Returns the next bits from the file as a floating point number. +Returns the next bits from the file as a floating-point number. .. _class_File_method_get_sha256: @@ -358,9 +360,9 @@ Returns a SHA-256 :ref:`String` representing the file at the given - :ref:`Variant` **get_var** **(** :ref:`bool` allow_objects=false **)** const -Returns the next :ref:`Variant` value from the file. When ``allow_objects`` is ``true`` decoding objects is allowed. +Returns the next :ref:`Variant` value from the file. If ``allow_objects`` is ``true``, decoding objects is allowed. -**WARNING:** Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). +**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. .. _class_File_method_is_open: @@ -378,7 +380,7 @@ Opens the file for writing or reading, depending on the flags. - :ref:`Error` **open_compressed** **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`CompressionMode` compression_mode=0 **)** -Opens a compressed file for reading or writing. Use :ref:`CompressionMode` constants to set ``compression_mode``. +Opens a compressed file for reading or writing. .. _class_File_method_open_encrypted: @@ -396,13 +398,15 @@ Opens an encrypted file in write or read mode. You need to pass a password to en - void **seek** **(** :ref:`int` position **)** -Change the file reading/writing cursor to the specified position (in bytes from the beginning of the file). +Changes the file reading/writing cursor to the specified position (in bytes from the beginning of the file). .. _class_File_method_seek_end: - void **seek_end** **(** :ref:`int` position=0 **)** -Changes the file reading/writing cursor to the specified position (in bytes from the end of the file). Note that this is an offset, so you should use negative numbers or the cursor will be at the end of the file. +Changes the file reading/writing cursor to the specified position (in bytes from the end of the file). + +**Note:** This is an offset, so you should use negative numbers or the cursor will be at the end of the file. .. _class_File_method_store_16: @@ -438,7 +442,7 @@ Stores the given array of bytes in the file. - void **store_csv_line** **(** :ref:`PoolStringArray` values, :ref:`String` delim="," **)** -Store the given :ref:`PoolStringArray` in the file as a line formatted in the CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma), it should be one character long. +Store the given :ref:`PoolStringArray` in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter ``delim`` to use other than the default ``","`` (comma). This delimiter must be one-character long. Text will be encoded as UTF-8. @@ -446,13 +450,13 @@ Text will be encoded as UTF-8. - void **store_double** **(** :ref:`float` value **)** -Stores a floating point number as 64 bits in the file. +Stores a floating-point number as 64 bits in the file. .. _class_File_method_store_float: - void **store_float** **(** :ref:`float` value **)** -Stores a floating point number as 32 bits in the file. +Stores a floating-point number as 32 bits in the file. .. _class_File_method_store_line: @@ -474,7 +478,7 @@ Text will be encoded as UTF-8. - void **store_real** **(** :ref:`float` value **)** -Stores a floating point number in the file. +Stores a floating-point number in the file. .. _class_File_method_store_string: @@ -488,5 +492,5 @@ Text will be encoded as UTF-8. - void **store_var** **(** :ref:`Variant` value, :ref:`bool` full_objects=false **)** -Stores any Variant value in the file. When ``full_objects`` is ``true`` encoding objects is allowed (and can potentially include code). +Stores any Variant value in the file. If ``full_objects`` is ``true``, encoding objects is allowed (and can potentially include code). diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index 24f13b529..8b78bde22 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -76,19 +76,19 @@ Signals - **dir_selected** **(** :ref:`String` dir **)** -Event emitted when the user selects a directory. +Emitted when the user selects a directory. .. _class_FileDialog_signal_file_selected: - **file_selected** **(** :ref:`String` path **)** -Event emitted when the user selects a file (double clicks it or presses the OK button). +Emitted when the user selects a file by double-clicking it or pressing the **OK** button. .. _class_FileDialog_signal_files_selected: - **files_selected** **(** :ref:`PoolStringArray` paths **)** -Event emitted when the user selects multiple files. +Emitted when the user selects multiple files. Enumerations ------------ @@ -107,13 +107,13 @@ Enumerations enum **Mode**: -- **MODE_OPEN_FILE** = **0** --- The dialog allows the selection of one, and only one file. +- **MODE_OPEN_FILE** = **0** --- The dialog allows selecting one, and only one file. -- **MODE_OPEN_FILES** = **1** --- The dialog allows the selection of multiple files. +- **MODE_OPEN_FILES** = **1** --- The dialog allows selecting multiple files. -- **MODE_OPEN_DIR** = **2** --- The dialog functions as a folder selector, disallowing the selection of any file. +- **MODE_OPEN_DIR** = **2** --- The dialog only allows selecting a directory, disallowing the selection of any file. -- **MODE_OPEN_ANY** = **3** --- The dialog allows the selection of a file or a directory. +- **MODE_OPEN_ANY** = **3** --- The dialog allows selecting one file or directory. - **MODE_SAVE_FILE** = **4** --- The dialog will warn when a file exists. @@ -127,11 +127,11 @@ enum **Mode**: enum **Access**: -- **ACCESS_RESOURCES** = **0** --- The dialog allows the selection of file and directory. +- **ACCESS_RESOURCES** = **0** --- The dialog only allows accessing files under the :ref:`Resource` path (``res://``). -- **ACCESS_USERDATA** = **1** --- The dialog allows access files under :ref:`Resource` path(res://) . +- **ACCESS_USERDATA** = **1** --- The dialog only allows accessing files under user data path (``user://``). -- **ACCESS_FILESYSTEM** = **2** --- The dialog allows access files in whole file system. +- **ACCESS_FILESYSTEM** = **2** --- The dialog allows accessing files on the whole file system. Description ----------- @@ -199,7 +199,7 @@ The currently selected file path of the file dialog. | *Getter* | get_filters() | +----------+--------------------+ -Set file type filters. This example shows only .png and .gd files ``set_filters(PoolStringArray(["*.png ; PNG Images","*.gd ; GD Script"]))``. +The available file type filters. For example, this shows only ``.png`` and ``.gd`` files: ``set_filters(PoolStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))``. .. _class_FileDialog_property_mode: @@ -211,7 +211,7 @@ Set file type filters. This example shows only .png and .gd files ``set_filters( | *Getter* | get_mode() | +----------+-----------------+ -Set dialog to open or save mode, changes selection behavior. See enum ``Mode`` constants. +The dialog's open or save mode, which affects the selection behavior. See enum ``Mode`` constants. .. _class_FileDialog_property_mode_overrides_title: @@ -223,7 +223,7 @@ Set dialog to open or save mode, changes selection behavior. See enum ``Mode`` c | *Getter* | is_mode_overriding_title() | +----------+---------------------------------+ -If ``true``, changing the ``Mode`` property will set the window title accordingly (e.g. setting mode to ``MODE_OPEN_FILE`` will change the window title to "Open a File"). +If ``true``, changing the ``Mode`` property will set the window title accordingly (e.g. setting mode to :ref:`MODE_OPEN_FILE` will change the window title to "Open a File"). .. _class_FileDialog_property_show_hidden_files: @@ -244,7 +244,7 @@ Method Descriptions - void **add_filter** **(** :ref:`String` filter **)** -Add a custom filter. Example: ``add_filter("*.png ; PNG Images")`` +Adds ``filter`` as a custom filter; ``filter`` should be of the form ``"filename.extension ; Description"``. For example, ``"*.png ; PNG Images"``. .. _class_FileDialog_method_clear_filters: diff --git a/classes/class_float.rst b/classes/class_float.rst index 6f1f43508..0486c4909 100644 --- a/classes/class_float.rst +++ b/classes/class_float.rst @@ -37,13 +37,13 @@ Method Descriptions - :ref:`float` **float** **(** :ref:`bool` from **)** -Cast a :ref:`bool` value to a floating point value, ``float(true)`` will be equal to 1.0 and ``float(false)`` will be equal to 0.0. +Cast a :ref:`bool` value to a floating-point value, ``float(true)`` will be equal to 1.0 and ``float(false)`` will be equal to 0.0. - :ref:`float` **float** **(** :ref:`int` from **)** -Cast an :ref:`int` value to a floating point value, ``float(1)`` will be equal to 1.0. +Cast an :ref:`int` value to a floating-point value, ``float(1)`` will be equal to 1.0. - :ref:`float` **float** **(** :ref:`String` from **)** -Cast a :ref:`String` value to a floating point value. This method accepts float value strings like ``"1.23"`` and exponential notation strings for its parameter so calling ``float("1e3")`` will return 1000.0 and calling ``float("1e-3")`` will return 0.001. +Cast a :ref:`String` value to a floating-point value. This method accepts float value strings like ``"1.23"`` and exponential notation strings for its parameter so calling ``float("1e3")`` will return 1000.0 and calling ``float("1e-3")`` will return 0.001. diff --git a/classes/class_font.rst b/classes/class_font.rst index 56084c132..663534fe6 100644 --- a/classes/class_font.rst +++ b/classes/class_font.rst @@ -46,7 +46,7 @@ Methods Description ----------- -Font contains a 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. +Font contains a 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. Method Descriptions ------------------- @@ -55,13 +55,13 @@ Method Descriptions - void **draw** **(** :ref:`RID` canvas_item, :ref:`Vector2` position, :ref:`String` string, :ref:`Color` modulate=Color( 1, 1, 1, 1 ), :ref:`int` clip_w=-1, :ref:`Color` outline_modulate=Color( 1, 1, 1, 1 ) **)** const -Draw "string" into a canvas item using the font at a given position, with "modulate" color, and optionally clipping the width. "position" specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. +Draw ``string`` into a canvas item using the font at a given position, with ``modulate`` color, and optionally clipping the width. ``position`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. .. _class_Font_method_draw_char: - :ref:`float` **draw_char** **(** :ref:`RID` canvas_item, :ref:`Vector2` position, :ref:`int` char, :ref:`int` next=-1, :ref:`Color` modulate=Color( 1, 1, 1, 1 ), :ref:`bool` outline=false **)** const -Draw character "char" into a canvas item using the font at a given position, with "modulate" color, and optionally kerning if "next" is passed. clipping the width. "position" specifies the 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. +Draw character ``char`` into a canvas item using the font at a given position, with ``modulate`` color, and optionally kerning if ``next`` is passed. clipping the width. ``position`` specifies the 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_method_get_ascent: diff --git a/classes/class_generic6dofjoint.rst b/classes/class_generic6dofjoint.rst index 434b3cd7d..674d3027f 100644 --- a/classes/class_generic6dofjoint.rst +++ b/classes/class_generic6dofjoint.rst @@ -14,7 +14,7 @@ Generic6DOFJoint Brief Description ----------------- -The generic 6 degrees of freedom joint can implement a variety of joint-types by locking certain axes' rotation or translation. +The generic 6-degrees-of-freedom joint can implement a variety of joint types by locking certain axes' rotation or translation. Properties ---------- @@ -236,9 +236,9 @@ enum **Param**: - **PARAM_LINEAR_UPPER_LIMIT** = **1** --- The maximum difference between the pivot points' axes. -- **PARAM_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor applied to the movement across the axes The lower, the slower the movement. +- **PARAM_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor applied to the movement across the axes. The lower, the slower the movement. -- **PARAM_LINEAR_RESTITUTION** = **3** --- The amount of restitution on the axes movement The lower, the more momentum gets lost. +- **PARAM_LINEAR_RESTITUTION** = **3** --- The amount of restitution on the axes' movement. The lower, the more momentum gets lost. - **PARAM_LINEAR_DAMPING** = **4** --- The amount of damping that happens at the linear motion across the axes. @@ -264,7 +264,7 @@ enum **Param**: - **PARAM_ANGULAR_MOTOR_FORCE_LIMIT** = **18** --- Maximum acceleration for the motor at the axes. -- **PARAM_MAX** = **22** --- End flag of PARAM\_\* constants, used internally. +- **PARAM_MAX** = **22** --- Represents the size of the :ref:`Param` enum. .. _enum_Generic6DOFJoint_Flag: @@ -284,19 +284,19 @@ enum **Param**: enum **Flag**: -- **FLAG_ENABLE_LINEAR_LIMIT** = **0** --- If ``set`` there is linear motion possible within the given limits. +- **FLAG_ENABLE_LINEAR_LIMIT** = **0** --- If enabled, linear motion is possible within the given limits. -- **FLAG_ENABLE_ANGULAR_LIMIT** = **1** --- If ``set`` there is rotational motion possible. +- **FLAG_ENABLE_ANGULAR_LIMIT** = **1** --- If enabled, rotational motion is possible within the given limits. - **FLAG_ENABLE_LINEAR_SPRING** = **3** - **FLAG_ENABLE_ANGULAR_SPRING** = **2** -- **FLAG_ENABLE_MOTOR** = **4** --- If ``set`` there is a rotational motor across these axes. +- **FLAG_ENABLE_MOTOR** = **4** --- If enabled, there is a rotational motor across these axes. -- **FLAG_ENABLE_LINEAR_MOTOR** = **5** +- **FLAG_ENABLE_LINEAR_MOTOR** = **5** --- If enabled, there is a linear motor across these axes. -- **FLAG_MAX** = **6** --- End flag of FLAG\_\* constants, used internally. +- **FLAG_MAX** = **6** --- Represents the size of the :ref:`Flag` enum. Description ----------- @@ -316,7 +316,7 @@ Property Descriptions | *Getter* | get_param_x() | +----------+--------------------+ -The amount of rotational damping across the x-axis. +The amount of rotational damping across the X axis. The lower, the longer an impulse from one side takes to travel to the other side. @@ -330,7 +330,7 @@ The lower, the longer an impulse from one side takes to travel to the other side | *Getter* | get_flag_x() | +----------+-------------------+ -If ``true``, rotation across the x-axis is limited. +If ``true``, rotation across the X axis is limited. .. _class_Generic6DOFJoint_property_angular_limit_x/erp: @@ -342,7 +342,7 @@ If ``true``, rotation across the x-axis is limited. | *Getter* | get_param_x() | +----------+--------------------+ -When rotating across x-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. +When rotating across the X axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. .. _class_Generic6DOFJoint_property_angular_limit_x/force_limit: @@ -354,13 +354,13 @@ When rotating across x-axis, this error tolerance factor defines how much the co | *Getter* | get_param_x() | +----------+--------------------+ -The maximum amount of force that can occur, when rotating around x-axis. +The maximum amount of force that can occur, when rotating around the X axis. .. _class_Generic6DOFJoint_property_angular_limit_x/lower_angle: - :ref:`float` **angular_limit_x/lower_angle** -The minimum rotation in negative direction to break loose and rotate around the x-axis. +The minimum rotation in negative direction to break loose and rotate around the X axis. .. _class_Generic6DOFJoint_property_angular_limit_x/restitution: @@ -372,7 +372,7 @@ The minimum rotation in negative direction to break loose and rotate around the | *Getter* | get_param_x() | +----------+--------------------+ -The amount of rotational restitution across the x-axis. The lower, the more restitution occurs. +The amount of rotational restitution across the X axis. The lower, the more restitution occurs. .. _class_Generic6DOFJoint_property_angular_limit_x/softness: @@ -384,13 +384,13 @@ The amount of rotational restitution across the x-axis. The lower, the more rest | *Getter* | get_param_x() | +----------+--------------------+ -The speed of all rotations across the x-axis. +The speed of all rotations across the X axis. .. _class_Generic6DOFJoint_property_angular_limit_x/upper_angle: - :ref:`float` **angular_limit_x/upper_angle** -The minimum rotation in positive direction to break loose and rotate around the x-axis. +The minimum rotation in positive direction to break loose and rotate around the X axis. .. _class_Generic6DOFJoint_property_angular_limit_y/damping: @@ -402,7 +402,7 @@ The minimum rotation in positive direction to break loose and rotate around the | *Getter* | get_param_y() | +----------+--------------------+ -The amount of rotational damping across the y-axis. The lower, the more dampening occurs. +The amount of rotational damping across the Y axis. The lower, the more dampening occurs. .. _class_Generic6DOFJoint_property_angular_limit_y/enabled: @@ -414,7 +414,7 @@ The amount of rotational damping across the y-axis. The lower, the more dampenin | *Getter* | get_flag_y() | +----------+-------------------+ -If ``true``, rotation across the y-axis is limited. +If ``true``, rotation across the Y axis is limited. .. _class_Generic6DOFJoint_property_angular_limit_y/erp: @@ -426,7 +426,7 @@ If ``true``, rotation across the y-axis is limited. | *Getter* | get_param_y() | +----------+--------------------+ -When rotating across y-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. +When rotating across the Y axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. .. _class_Generic6DOFJoint_property_angular_limit_y/force_limit: @@ -438,13 +438,13 @@ When rotating across y-axis, this error tolerance factor defines how much the co | *Getter* | get_param_y() | +----------+--------------------+ -The maximum amount of force that can occur, when rotating around y-axis. +The maximum amount of force that can occur, when rotating around the Y axis. .. _class_Generic6DOFJoint_property_angular_limit_y/lower_angle: - :ref:`float` **angular_limit_y/lower_angle** -The minimum rotation in negative direction to break loose and rotate around the y-axis. +The minimum rotation in negative direction to break loose and rotate around the Y axis. .. _class_Generic6DOFJoint_property_angular_limit_y/restitution: @@ -456,7 +456,7 @@ The minimum rotation in negative direction to break loose and rotate around the | *Getter* | get_param_y() | +----------+--------------------+ -The amount of rotational restitution across the y-axis. The lower, the more restitution occurs. +The amount of rotational restitution across the Y axis. The lower, the more restitution occurs. .. _class_Generic6DOFJoint_property_angular_limit_y/softness: @@ -468,13 +468,13 @@ The amount of rotational restitution across the y-axis. The lower, the more rest | *Getter* | get_param_y() | +----------+--------------------+ -The speed of all rotations across the y-axis. +The speed of all rotations across the Y axis. .. _class_Generic6DOFJoint_property_angular_limit_y/upper_angle: - :ref:`float` **angular_limit_y/upper_angle** -The minimum rotation in positive direction to break loose and rotate around the y-axis. +The minimum rotation in positive direction to break loose and rotate around the Y axis. .. _class_Generic6DOFJoint_property_angular_limit_z/damping: @@ -486,7 +486,7 @@ The minimum rotation in positive direction to break loose and rotate around the | *Getter* | get_param_z() | +----------+--------------------+ -The amount of rotational damping across the z-axis. The lower, the more dampening occurs. +The amount of rotational damping across the Z axis. The lower, the more dampening occurs. .. _class_Generic6DOFJoint_property_angular_limit_z/enabled: @@ -498,7 +498,7 @@ The amount of rotational damping across the z-axis. The lower, the more dampenin | *Getter* | get_flag_z() | +----------+-------------------+ -If ``true``, rotation across the z-axis is limited. +If ``true``, rotation across the Z axis is limited. .. _class_Generic6DOFJoint_property_angular_limit_z/erp: @@ -510,7 +510,7 @@ If ``true``, rotation across the z-axis is limited. | *Getter* | get_param_z() | +----------+--------------------+ -When rotating across z-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. +When rotating across the Z axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. .. _class_Generic6DOFJoint_property_angular_limit_z/force_limit: @@ -522,13 +522,13 @@ When rotating across z-axis, this error tolerance factor defines how much the co | *Getter* | get_param_z() | +----------+--------------------+ -The maximum amount of force that can occur, when rotating around z-axis. +The maximum amount of force that can occur, when rotating around the Z axis. .. _class_Generic6DOFJoint_property_angular_limit_z/lower_angle: - :ref:`float` **angular_limit_z/lower_angle** -The minimum rotation in negative direction to break loose and rotate around the z-axis. +The minimum rotation in negative direction to break loose and rotate around the Z axis. .. _class_Generic6DOFJoint_property_angular_limit_z/restitution: @@ -540,7 +540,7 @@ The minimum rotation in negative direction to break loose and rotate around the | *Getter* | get_param_z() | +----------+--------------------+ -The amount of rotational restitution across the z-axis. The lower, the more restitution occurs. +The amount of rotational restitution across the Z axis. The lower, the more restitution occurs. .. _class_Generic6DOFJoint_property_angular_limit_z/softness: @@ -552,13 +552,13 @@ The amount of rotational restitution across the z-axis. The lower, the more rest | *Getter* | get_param_z() | +----------+--------------------+ -The speed of all rotations across the z-axis. +The speed of all rotations across the Z axis. .. _class_Generic6DOFJoint_property_angular_limit_z/upper_angle: - :ref:`float` **angular_limit_z/upper_angle** -The minimum rotation in positive direction to break loose and rotate around the z-axis. +The minimum rotation in positive direction to break loose and rotate around the Z axis. .. _class_Generic6DOFJoint_property_angular_motor_x/enabled: @@ -570,7 +570,7 @@ The minimum rotation in positive direction to break loose and rotate around the | *Getter* | get_flag_x() | +----------+-------------------+ -If ``true``, a rotating motor at the x-axis is enabled. +If ``true``, a rotating motor at the X axis is enabled. .. _class_Generic6DOFJoint_property_angular_motor_x/force_limit: @@ -582,7 +582,7 @@ If ``true``, a rotating motor at the x-axis is enabled. | *Getter* | get_param_x() | +----------+--------------------+ -Maximum acceleration for the motor at the x-axis. +Maximum acceleration for the motor at the X axis. .. _class_Generic6DOFJoint_property_angular_motor_x/target_velocity: @@ -594,7 +594,7 @@ Maximum acceleration for the motor at the x-axis. | *Getter* | get_param_x() | +----------+--------------------+ -Target speed for the motor at the x-axis. +Target speed for the motor at the X axis. .. _class_Generic6DOFJoint_property_angular_motor_y/enabled: @@ -606,7 +606,7 @@ Target speed for the motor at the x-axis. | *Getter* | get_flag_y() | +----------+-------------------+ -If ``true``, a rotating motor at the y-axis is enabled. +If ``true``, a rotating motor at the Y axis is enabled. .. _class_Generic6DOFJoint_property_angular_motor_y/force_limit: @@ -618,7 +618,7 @@ If ``true``, a rotating motor at the y-axis is enabled. | *Getter* | get_param_y() | +----------+--------------------+ -Maximum acceleration for the motor at the y-axis. +Maximum acceleration for the motor at the Y axis. .. _class_Generic6DOFJoint_property_angular_motor_y/target_velocity: @@ -630,7 +630,7 @@ Maximum acceleration for the motor at the y-axis. | *Getter* | get_param_y() | +----------+--------------------+ -Target speed for the motor at the y-axis. +Target speed for the motor at the Y axis. .. _class_Generic6DOFJoint_property_angular_motor_z/enabled: @@ -642,7 +642,7 @@ Target speed for the motor at the y-axis. | *Getter* | get_flag_z() | +----------+-------------------+ -If ``true``, a rotating motor at the z-axis is enabled. +If ``true``, a rotating motor at the Z axis is enabled. .. _class_Generic6DOFJoint_property_angular_motor_z/force_limit: @@ -654,7 +654,7 @@ If ``true``, a rotating motor at the z-axis is enabled. | *Getter* | get_param_z() | +----------+--------------------+ -Maximum acceleration for the motor at the z-axis. +Maximum acceleration for the motor at the Z axis. .. _class_Generic6DOFJoint_property_angular_motor_z/target_velocity: @@ -666,7 +666,7 @@ Maximum acceleration for the motor at the z-axis. | *Getter* | get_param_z() | +----------+--------------------+ -Target speed for the motor at the z-axis. +Target speed for the motor at the Z axis. .. _class_Generic6DOFJoint_property_angular_spring_x/damping: @@ -798,7 +798,7 @@ Target speed for the motor at the z-axis. | *Getter* | get_param_x() | +----------+--------------------+ -The amount of damping that happens at the x-motion. +The amount of damping that happens at the X motion. .. _class_Generic6DOFJoint_property_linear_limit_x/enabled: @@ -810,7 +810,7 @@ The amount of damping that happens at the x-motion. | *Getter* | get_flag_x() | +----------+-------------------+ -If ``true``, the linear motion across the x-axis is limited. +If ``true``, the linear motion across the X axis is limited. .. _class_Generic6DOFJoint_property_linear_limit_x/lower_distance: @@ -822,7 +822,7 @@ If ``true``, the linear motion across the x-axis is limited. | *Getter* | get_param_x() | +----------+--------------------+ -The minimum difference between the pivot points' x-axis. +The minimum difference between the pivot points' X axis. .. _class_Generic6DOFJoint_property_linear_limit_x/restitution: @@ -834,7 +834,7 @@ The minimum difference between the pivot points' x-axis. | *Getter* | get_param_x() | +----------+--------------------+ -The amount of restitution on the x-axis movement The lower, the more momentum gets lost. +The amount of restitution on the X axis movement. The lower, the more momentum gets lost. .. _class_Generic6DOFJoint_property_linear_limit_x/softness: @@ -846,7 +846,7 @@ The amount of restitution on the x-axis movement The lower, the more momentum ge | *Getter* | get_param_x() | +----------+--------------------+ -A factor applied to the movement across the x-axis The lower, the slower the movement. +A factor applied to the movement across the X axis. The lower, the slower the movement. .. _class_Generic6DOFJoint_property_linear_limit_x/upper_distance: @@ -858,7 +858,7 @@ A factor applied to the movement across the x-axis The lower, the slower the mov | *Getter* | get_param_x() | +----------+--------------------+ -The maximum difference between the pivot points' x-axis. +The maximum difference between the pivot points' X axis. .. _class_Generic6DOFJoint_property_linear_limit_y/damping: @@ -870,7 +870,7 @@ The maximum difference between the pivot points' x-axis. | *Getter* | get_param_y() | +----------+--------------------+ -The amount of damping that happens at the y-motion. +The amount of damping that happens at the Y motion. .. _class_Generic6DOFJoint_property_linear_limit_y/enabled: @@ -882,7 +882,7 @@ The amount of damping that happens at the y-motion. | *Getter* | get_flag_y() | +----------+-------------------+ -If ``true``, the linear motion across the y-axis is limited. +If ``true``, the linear motion across the Y axis is limited. .. _class_Generic6DOFJoint_property_linear_limit_y/lower_distance: @@ -894,7 +894,7 @@ If ``true``, the linear motion across the y-axis is limited. | *Getter* | get_param_y() | +----------+--------------------+ -The minimum difference between the pivot points' y-axis. +The minimum difference between the pivot points' Y axis. .. _class_Generic6DOFJoint_property_linear_limit_y/restitution: @@ -906,7 +906,7 @@ The minimum difference between the pivot points' y-axis. | *Getter* | get_param_y() | +----------+--------------------+ -The amount of restitution on the y-axis movement The lower, the more momentum gets lost. +The amount of restitution on the Y axis movement. The lower, the more momentum gets lost. .. _class_Generic6DOFJoint_property_linear_limit_y/softness: @@ -918,7 +918,7 @@ The amount of restitution on the y-axis movement The lower, the more momentum ge | *Getter* | get_param_y() | +----------+--------------------+ -A factor applied to the movement across the y-axis The lower, the slower the movement. +A factor applied to the movement across the Y axis. The lower, the slower the movement. .. _class_Generic6DOFJoint_property_linear_limit_y/upper_distance: @@ -930,7 +930,7 @@ A factor applied to the movement across the y-axis The lower, the slower the mov | *Getter* | get_param_y() | +----------+--------------------+ -The maximum difference between the pivot points' y-axis. +The maximum difference between the pivot points' Y axis. .. _class_Generic6DOFJoint_property_linear_limit_z/damping: @@ -942,7 +942,7 @@ The maximum difference between the pivot points' y-axis. | *Getter* | get_param_z() | +----------+--------------------+ -The amount of damping that happens at the z-motion. +The amount of damping that happens at the Z motion. .. _class_Generic6DOFJoint_property_linear_limit_z/enabled: @@ -954,7 +954,7 @@ The amount of damping that happens at the z-motion. | *Getter* | get_flag_z() | +----------+-------------------+ -If ``true``, the linear motion across the z-axis is limited. +If ``true``, the linear motion across the Z axis is limited. .. _class_Generic6DOFJoint_property_linear_limit_z/lower_distance: @@ -966,7 +966,7 @@ If ``true``, the linear motion across the z-axis is limited. | *Getter* | get_param_z() | +----------+--------------------+ -The minimum difference between the pivot points' z-axis. +The minimum difference between the pivot points' Z axis. .. _class_Generic6DOFJoint_property_linear_limit_z/restitution: @@ -978,7 +978,7 @@ The minimum difference between the pivot points' z-axis. | *Getter* | get_param_z() | +----------+--------------------+ -The amount of restitution on the z-axis movement The lower, the more momentum gets lost. +The amount of restitution on the Z axis movement. The lower, the more momentum gets lost. .. _class_Generic6DOFJoint_property_linear_limit_z/softness: @@ -990,7 +990,7 @@ The amount of restitution on the z-axis movement The lower, the more momentum ge | *Getter* | get_param_z() | +----------+--------------------+ -A factor applied to the movement across the z-axis The lower, the slower the movement. +A factor applied to the movement across the Z axis. The lower, the slower the movement. .. _class_Generic6DOFJoint_property_linear_limit_z/upper_distance: @@ -1002,7 +1002,7 @@ A factor applied to the movement across the z-axis The lower, the slower the mov | *Getter* | get_param_z() | +----------+--------------------+ -The maximum difference between the pivot points' z-axis. +The maximum difference between the pivot points' Z axis. .. _class_Generic6DOFJoint_property_linear_motor_x/enabled: @@ -1014,7 +1014,7 @@ The maximum difference between the pivot points' z-axis. | *Getter* | get_flag_x() | +----------+-------------------+ -If ``true``, then there is a linear motor on the x-axis. It will attempt to reach the target velocity while staying within the force limits. +If ``true``, then there is a linear motor on the X axis. It will attempt to reach the target velocity while staying within the force limits. .. _class_Generic6DOFJoint_property_linear_motor_x/force_limit: @@ -1026,7 +1026,7 @@ If ``true``, then there is a linear motor on the x-axis. It will attempt to reac | *Getter* | get_param_x() | +----------+--------------------+ -The maximum force the linear motor can apply on the x-axis while trying to reach the target velocity. +The maximum force the linear motor can apply on the X axis while trying to reach the target velocity. .. _class_Generic6DOFJoint_property_linear_motor_x/target_velocity: @@ -1038,7 +1038,7 @@ The maximum force the linear motor can apply on the x-axis while trying to reach | *Getter* | get_param_x() | +----------+--------------------+ -The speed that the linear motor will attempt to reach on the x-axis. +The speed that the linear motor will attempt to reach on the X axis. .. _class_Generic6DOFJoint_property_linear_motor_y/enabled: @@ -1050,7 +1050,7 @@ The speed that the linear motor will attempt to reach on the x-axis. | *Getter* | get_flag_y() | +----------+-------------------+ -If ``true``, then there is a linear motor on the y-axis. It will attempt to reach the target velocity while staying within the force limits. +If ``true``, then there is a linear motor on the Y axis. It will attempt to reach the target velocity while staying within the force limits. .. _class_Generic6DOFJoint_property_linear_motor_y/force_limit: @@ -1062,7 +1062,7 @@ If ``true``, then there is a linear motor on the y-axis. It will attempt to reac | *Getter* | get_param_y() | +----------+--------------------+ -The maximum force the linear motor can apply on the y-axis while trying to reach the target velocity. +The maximum force the linear motor can apply on the Y axis while trying to reach the target velocity. .. _class_Generic6DOFJoint_property_linear_motor_y/target_velocity: @@ -1074,7 +1074,7 @@ The maximum force the linear motor can apply on the y-axis while trying to reach | *Getter* | get_param_y() | +----------+--------------------+ -The speed that the linear motor will attempt to reach on the y-axis. +The speed that the linear motor will attempt to reach on the Y axis. .. _class_Generic6DOFJoint_property_linear_motor_z/enabled: @@ -1086,7 +1086,7 @@ The speed that the linear motor will attempt to reach on the y-axis. | *Getter* | get_flag_z() | +----------+-------------------+ -If ``true``, then there is a linear motor on the z-axis. It will attempt to reach the target velocity while staying within the force limits. +If ``true``, then there is a linear motor on the Z axis. It will attempt to reach the target velocity while staying within the force limits. .. _class_Generic6DOFJoint_property_linear_motor_z/force_limit: @@ -1098,7 +1098,7 @@ If ``true``, then there is a linear motor on the z-axis. It will attempt to reac | *Getter* | get_param_z() | +----------+--------------------+ -The maximum force the linear motor can apply on the z-axis while trying to reach the target velocity. +The maximum force the linear motor can apply on the Z axis while trying to reach the target velocity. .. _class_Generic6DOFJoint_property_linear_motor_z/target_velocity: @@ -1110,7 +1110,7 @@ The maximum force the linear motor can apply on the z-axis while trying to reach | *Getter* | get_param_z() | +----------+--------------------+ -The speed that the linear motor will attempt to reach on the z-axis. +The speed that the linear motor will attempt to reach on the Z axis. .. _class_Generic6DOFJoint_property_linear_spring_x/damping: diff --git a/classes/class_geometry.rst b/classes/class_geometry.rst index 249a5d93b..fe22d58c3 100644 --- a/classes/class_geometry.rst +++ b/classes/class_geometry.rst @@ -54,6 +54,8 @@ Methods +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`intersect_polyline_with_polygon_2d` **(** :ref:`PoolVector2Array` polyline, :ref:`PoolVector2Array` polygon **)** | +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_point_in_polygon` **(** :ref:`Vector2` point, :ref:`PoolVector2Array` polygon **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_polygon_clockwise` **(** :ref:`PoolVector2Array` polygon **)** | +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`line_intersects_line_2d` **(** :ref:`Vector2` from_a, :ref:`Vector2` dir_a, :ref:`Vector2` from_b, :ref:`Vector2` dir_b **)** | @@ -126,7 +128,7 @@ enum **PolyJoinType**: - **JOIN_ROUND** = **1** --- While flattened paths can never perfectly trace an arc, they are approximated by a series of arc chords. -- **JOIN_MITER** = **2** --- There's a necessary limit to mitered joins since offsetting edges that join at very acute angles will produce excessively long and narrow 'spikes'. For any given edge join, when miter offsetting would exceed that maximum distance, 'square' joining is applied. +- **JOIN_MITER** = **2** --- There's a necessary limit to mitered joins since offsetting edges that join at very acute angles will produce excessively long and narrow "spikes". For any given edge join, when miter offsetting would exceed that maximum distance, "square" joining is applied. .. _enum_Geometry_PolyEndType: @@ -183,7 +185,7 @@ Clips the polygon defined by the points in ``points`` against the ``plane`` and - :ref:`Array` **clip_polygons_2d** **(** :ref:`PoolVector2Array` polygon_a, :ref:`PoolVector2Array` polygon_b **)** -Clips ``polygon_a`` against ``polygon_b`` and returns an array of clipped polygons. This performs ``OPERATION_DIFFERENCE`` between polygons. Returns an empty array if ``polygon_b`` completely overlaps ``polygon_a``. +Clips ``polygon_a`` against ``polygon_b`` and returns an array of clipped polygons. This performs :ref:`OPERATION_DIFFERENCE` between polygons. Returns an empty array if ``polygon_b`` completely overlaps ``polygon_a``. If ``polygon_b`` is enclosed by ``polygon_a``, returns an outer polygon (boundary) and inner polygon (hole) which could be distiguished by calling :ref:`is_polygon_clockwise`. @@ -191,19 +193,19 @@ If ``polygon_b`` is enclosed by ``polygon_a``, returns an outer polygon (boundar - :ref:`Array` **clip_polyline_with_polygon_2d** **(** :ref:`PoolVector2Array` polyline, :ref:`PoolVector2Array` polygon **)** -Clips ``polyline`` against ``polygon`` and returns an array of clipped polylines. This performs ``OPERATION_DIFFERENCE`` between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape. +Clips ``polyline`` against ``polygon`` and returns an array of clipped polylines. This performs :ref:`OPERATION_DIFFERENCE` between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape. .. _class_Geometry_method_convex_hull_2d: - :ref:`PoolVector2Array` **convex_hull_2d** **(** :ref:`PoolVector2Array` points **)** -Given an array of :ref:`Vector2`\ s, returns the convex hull as a list of points in counter-clockwise order. The last point is the same as the first one. +Given an array of :ref:`Vector2`\ s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one. .. _class_Geometry_method_exclude_polygons_2d: - :ref:`Array` **exclude_polygons_2d** **(** :ref:`PoolVector2Array` polygon_a, :ref:`PoolVector2Array` polygon_b **)** -Mutually excludes common area defined by intersection of ``polygon_a`` and ``polygon_b`` (see :ref:`intersect_polygons_2d`) and returns an array of excluded polygons. This performs ``OPERATION_XOR`` between polygons. In other words, returns all but common area between polygons. +Mutually excludes common area defined by intersection of ``polygon_a`` and ``polygon_b`` (see :ref:`intersect_polygons_2d`) and returns an array of excluded polygons. This performs :ref:`OPERATION_XOR` between polygons. In other words, returns all but common area between polygons. The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distiguished by calling :ref:`is_polygon_clockwise`. @@ -251,15 +253,21 @@ Given the two 2d segments (``p1``, ``p2``) and (``q1``, ``q2``), finds those two - :ref:`Array` **intersect_polygons_2d** **(** :ref:`PoolVector2Array` polygon_a, :ref:`PoolVector2Array` polygon_b **)** -Intersects ``polygon_a`` with ``polygon_b`` and returns an array of intersected polygons. This performs ``OPERATION_INTERSECTION`` between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs. +Intersects ``polygon_a`` with ``polygon_b`` and returns an array of intersected polygons. This performs :ref:`OPERATION_INTERSECTION` between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs. -The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distiguished by calling :ref:`is_polygon_clockwise`. +The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling :ref:`is_polygon_clockwise`. .. _class_Geometry_method_intersect_polyline_with_polygon_2d: - :ref:`Array` **intersect_polyline_with_polygon_2d** **(** :ref:`PoolVector2Array` polyline, :ref:`PoolVector2Array` polygon **)** -Intersects ``polyline`` with ``polygon`` and returns an array of intersected polylines. This performs ``OPERATION_INTERSECTION`` between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape. +Intersects ``polyline`` with ``polygon`` and returns an array of intersected polylines. This performs :ref:`OPERATION_INTERSECTION` between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape. + +.. _class_Geometry_method_is_point_in_polygon: + +- :ref:`bool` **is_point_in_polygon** **(** :ref:`Vector2` point, :ref:`PoolVector2Array` polygon **)** + +Returns ``true`` if ``point`` is inside ``polygon`` or if it's located exactly *on* polygon's boundary, otherwise returns ``false``. .. _class_Geometry_method_is_polygon_clockwise: @@ -271,7 +279,9 @@ Returns ``true`` if ``polygon``'s vertices are ordered in clockwise order, other - :ref:`Variant` **line_intersects_line_2d** **(** :ref:`Vector2` from_a, :ref:`Vector2` dir_a, :ref:`Vector2` from_b, :ref:`Vector2` dir_b **)** -Checks if the two lines (``from_a``, ``dir_a``) and (``from_b``, ``dir_b``) intersect. If yes, return the point of intersection as :ref:`Vector2`. If no intersection takes place, returns an empty :ref:`Variant`. Note that the lines are specified using direction vectors, not end points. +Checks if the two lines (``from_a``, ``dir_a``) and (``from_b``, ``dir_b``) intersect. If yes, return the point of intersection as :ref:`Vector2`. If no intersection takes place, returns an empty :ref:`Variant`. + +**Note:** The lines are specified using direction vectors, not end points. .. _class_Geometry_method_make_atlas: @@ -283,9 +293,9 @@ Given an array of :ref:`Vector2`\ s representing tiles, builds an - :ref:`Array` **merge_polygons_2d** **(** :ref:`PoolVector2Array` polygon_a, :ref:`PoolVector2Array` polygon_b **)** -Merges (combines) ``polygon_a`` and ``polygon_b`` and returns an array of merged polygons. This performs ``OPERATION_UNION`` between polygons. +Merges (combines) ``polygon_a`` and ``polygon_b`` and returns an array of merged polygons. This performs :ref:`OPERATION_UNION` between polygons. -The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distiguished by calling :ref:`is_polygon_clockwise`. +The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling :ref:`is_polygon_clockwise`. .. _class_Geometry_method_offset_polygon_2d: @@ -295,7 +305,7 @@ Inflates or deflates ``polygon`` by ``delta`` units (pixels). If ``delta`` is po Each polygon's vertices will be rounded as determined by ``join_type``, see :ref:`PolyJoinType`. -The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distiguished by calling :ref:`is_polygon_clockwise`. +The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling :ref:`is_polygon_clockwise`. .. _class_Geometry_method_offset_polyline_2d: @@ -307,7 +317,7 @@ Each polygon's vertices will be rounded as determined by ``join_type``, see :ref Each polygon's endpoints will be rounded as determined by ``end_type``, see :ref:`PolyEndType`. -The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distiguished by calling :ref:`is_polygon_clockwise`. +The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling :ref:`is_polygon_clockwise`. .. _class_Geometry_method_point_is_inside_triangle: @@ -361,9 +371,9 @@ Tests if the segment (``from``, ``to``) intersects the triangle ``a``, ``b``, `` - :ref:`PoolVector2Array` **transform_points_2d** **(** :ref:`PoolVector2Array` points, :ref:`Transform2D` transform **)** -Transforms an array of points by ``transform`` and returns the result. +Transforms an array of points by ``transform`` and returns the result. -Can be useful in conjuction with performing polygon boolean operations in CSG manner, see :ref:`merge_polygons_2d`, :ref:`clip_polygons_2d`, :ref:`intersect_polygons_2d`, :ref:`exclude_polygons_2d`. +Can be useful in conjunction with performing polygon boolean operations in a CSG-like manner, see :ref:`merge_polygons_2d`, :ref:`clip_polygons_2d`, :ref:`intersect_polygons_2d`, :ref:`exclude_polygons_2d`. .. _class_Geometry_method_triangulate_delaunay_2d: diff --git a/classes/class_geometryinstance.rst b/classes/class_geometryinstance.rst index b10d03042..87bdc06b8 100644 --- a/classes/class_geometryinstance.rst +++ b/classes/class_geometryinstance.rst @@ -16,7 +16,7 @@ GeometryInstance Brief Description ----------------- -Base node for geometry based visual instances. +Base node for geometry-based visual instances. Properties ---------- @@ -79,20 +79,22 @@ In other words: The actual mesh will not be visible, only the shadows casted fro .. _class_GeometryInstance_constant_FLAG_USE_BAKED_LIGHT: +.. _class_GeometryInstance_constant_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE: + .. _class_GeometryInstance_constant_FLAG_MAX: enum **Flags**: - **FLAG_USE_BAKED_LIGHT** = **0** --- Will allow the GeometryInstance to be used when baking lights using a :ref:`GIProbe` and/or any other form of baked lighting. -Added documentation for GeometryInstance and VisualInstance +- **FLAG_DRAW_NEXT_FRAME_IF_VISIBLE** = **1** --- Unused in this class, exposed for consistency with :ref:`InstanceFlags`. -- **FLAG_MAX** = **2** +- **FLAG_MAX** = **2** --- Represents the size of the :ref:`Flags` enum. Description ----------- -Base node for geometry based visual instances. Shares some common functionality like visibility and custom materials. +Base node for geometry-based visual instances. Shares some common functionality like visibility and custom materials. Property Descriptions --------------------- @@ -107,7 +109,7 @@ Property Descriptions | *Getter* | get_cast_shadows_setting() | +----------+---------------------------------+ -The selected shadow casting flag. See SHADOW_CASTING_SETTING\_\* constants for values. +The selected shadow casting flag. See :ref:`ShadowCastingSetting` for possible values. .. _class_GeometryInstance_property_extra_cull_margin: @@ -181,7 +183,7 @@ The GeometryInstance's min LOD margin. The material override for the whole geometry. -If there is a material in material_override, it will be used instead of any material set in any material slot of the mesh. +If there is a material in ``material_override``, it will be used instead of any material set in any material slot of the mesh. .. _class_GeometryInstance_property_use_in_baked_light: @@ -202,5 +204,5 @@ Method Descriptions - void **set_custom_aabb** **(** :ref:`AABB` aabb **)** -Overrides the bounding box of this node with a custom one. To remove it, set an AABB with all fields set to zero. +Overrides the bounding box of this node with a custom one. To remove it, set an :ref:`AABB` with all fields set to zero. diff --git a/classes/class_giprobe.rst b/classes/class_giprobe.rst index 18378cec3..0b2df7dac 100644 --- a/classes/class_giprobe.rst +++ b/classes/class_giprobe.rst @@ -75,7 +75,7 @@ enum **Subdiv**: - **SUBDIV_512** = **3** -- **SUBDIV_MAX** = **4** +- **SUBDIV_MAX** = **4** --- Represents the size of the :ref:`Subdiv` enum. Tutorials --------- diff --git a/classes/class_gradient.rst b/classes/class_gradient.rst index c49e099f5..d325d2b87 100644 --- a/classes/class_gradient.rst +++ b/classes/class_gradient.rst @@ -14,7 +14,7 @@ Gradient Brief Description ----------------- -Color interpolator node. +A color interpolator resource which can be used to generate colors between user-defined color points. Properties ---------- @@ -49,7 +49,7 @@ Methods Description ----------- -Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color 3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset 0 and the other (white) at the ramp higher offset 1. +Given a set of colors, this resource will interpolate them in order. This means that if you have color 1, color 2 and color 3, the ramp will interpolate from color 1 to color 2 and from color 2 to color 3. The ramp will initially have 2 colors (black and white), one (black) at ramp lower offset 0 and the other (white) at the ramp higher offset 1. Property Descriptions --------------------- @@ -85,47 +85,47 @@ Method Descriptions - void **add_point** **(** :ref:`float` offset, :ref:`Color` color **)** -Adds the specified color to the end of the ramp, with the specified offset +Adds the specified color to the end of the ramp, with the specified offset. .. _class_Gradient_method_get_color: - :ref:`Color` **get_color** **(** :ref:`int` point **)** const -Returns the color of the ramp color at index *point* +Returns the color of the ramp color at index ``point``. .. _class_Gradient_method_get_offset: - :ref:`float` **get_offset** **(** :ref:`int` point **)** const -Returns the offset of the ramp color at index *point* +Returns the offset of the ramp color at index ``point``. .. _class_Gradient_method_get_point_count: - :ref:`int` **get_point_count** **(** **)** const -Returns the number of colors in the ramp +Returns the number of colors in the ramp. .. _class_Gradient_method_interpolate: - :ref:`Color` **interpolate** **(** :ref:`float` offset **)** -Returns the interpolated color specified by *offset* +Returns the interpolated color specified by ``offset``. .. _class_Gradient_method_remove_point: - void **remove_point** **(** :ref:`int` offset **)** -Removes the color at the index *offset* +Removes the color at the index ``offset``. .. _class_Gradient_method_set_color: - void **set_color** **(** :ref:`int` point, :ref:`Color` color **)** -Sets the color of the ramp color at index *point* +Sets the color of the ramp color at index ``point``. .. _class_Gradient_method_set_offset: - void **set_offset** **(** :ref:`int` point, :ref:`float` offset **)** -Sets the offset for the ramp color at index *point* +Sets the offset for the ramp color at index ``point``. diff --git a/classes/class_gradienttexture.rst b/classes/class_gradienttexture.rst index 48d212f67..802e49ebc 100644 --- a/classes/class_gradienttexture.rst +++ b/classes/class_gradienttexture.rst @@ -14,7 +14,7 @@ GradientTexture Brief Description ----------------- -Gradient filled texture. +Gradient-filled texture. Properties ---------- @@ -28,7 +28,7 @@ Properties Description ----------- -Uses a :ref:`Gradient` to fill the texture data, the gradient will be filled from left to right using colors obtained from the gradient, this means that the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see :ref:`width`). +GradientTexture uses a :ref:`Gradient` to fill the texture data. The gradient will be filled from left to right using colors obtained from the gradient. This means the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see :ref:`width`). Property Descriptions --------------------- diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index d67251fd0..ada47b52e 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -110,16 +110,24 @@ Signal sent at the beginning of a GraphNode movement. Signal sent at the end of a GraphNode movement. +.. _class_GraphEdit_signal_connection_from_empty: + +- **connection_from_empty** **(** :ref:`String` to, :ref:`int` to_slot, :ref:`Vector2` release_position **)** + +Signal sent when user dragging connection from input port into empty space of the graph. + .. _class_GraphEdit_signal_connection_request: - **connection_request** **(** :ref:`String` from, :ref:`int` from_slot, :ref:`String` to, :ref:`int` to_slot **)** -Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be created. +Signal sent to the GraphEdit when the connection between the ``from_slot`` slot of the ``from`` GraphNode and the ``to_slot`` slot of the ``to`` GraphNode is attempted to be created. .. _class_GraphEdit_signal_connection_to_empty: - **connection_to_empty** **(** :ref:`String` from, :ref:`int` from_slot, :ref:`Vector2` release_position **)** +Signal sent when user dragging connection from output port into empty space of the graph. + .. _class_GraphEdit_signal_delete_nodes_request: - **delete_nodes_request** **(** **)** @@ -130,13 +138,13 @@ Signal sent when a GraphNode is attempted to be removed from the GraphEdit. - **disconnection_request** **(** :ref:`String` from, :ref:`int` from_slot, :ref:`String` to, :ref:`int` to_slot **)** -Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be removed. +Emitted to the GraphEdit when the connection between ``from_slot`` slot of ``from`` GraphNode and ``to_slot`` slot of ``to`` GraphNode is attempted to be removed. .. _class_GraphEdit_signal_duplicate_nodes_request: - **duplicate_nodes_request** **(** **)** -Signal sent when a GraphNode is attempted to be duplicated in the GraphEdit. +Emitted when a GraphNode is attempted to be duplicated in the GraphEdit. .. _class_GraphEdit_signal_node_selected: @@ -148,7 +156,7 @@ Emitted when a GraphNode is selected. - **popup_request** **(** :ref:`Vector2` position **)** -Signal sent when a popup is requested. Happens on right-clicking in the GraphEdit. 'p_position' is the position of the mouse pointer when the signal is sent. +Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. ``position`` is the position of the mouse pointer when the signal is sent. .. _class_GraphEdit_signal_scroll_offset_changed: @@ -157,9 +165,9 @@ Signal sent when a popup is requested. Happens on right-clicking in the GraphEdi Description ----------- -GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNodes slots is disabled by default. +GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNode slots is disabled by default. -It is greatly advised to enable low processor usage mode (see :ref:`OS.low_processor_usage_mode`) when using GraphEdits. +It is greatly advised to enable low-processor usage mode (see :ref:`OS.low_processor_usage_mode`) when using GraphEdits. Property Descriptions --------------------- @@ -249,25 +257,25 @@ Makes possible to disconnect nodes when dragging from the slot at the right if i - void **clear_connections** **(** **)** -Remove all connections between nodes. +Removes all connections between nodes. .. _class_GraphEdit_method_connect_node: - :ref:`Error` **connect_node** **(** :ref:`String` from, :ref:`int` from_port, :ref:`String` to, :ref:`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. +Create a connection between the ``from_port`` slot of the ``from`` GraphNode and the ``to_port`` slot of the ``to`` GraphNode. If the connection already exists, no connection is created. .. _class_GraphEdit_method_disconnect_node: - void **disconnect_node** **(** :ref:`String` from, :ref:`int` from_port, :ref:`String` to, :ref:`int` to_port **)** -Remove the connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode, if connection exists. +Removes the connection between the ``from_port`` slot of the ``from`` GraphNode and the ``to_port`` slot of the ``to`` GraphNode. If the connection does not exist, no connection is removed. .. _class_GraphEdit_method_get_connection_list: - :ref:`Array` **get_connection_list** **(** **)** const -Returns an Array containing the list of connections. A connection consists in a structure of the form {from_port: 0, from: "GraphNode name 0", to_port: 1, to: "GraphNode name 1" } +Returns an Array containing the list of connections. A connection consists in a structure of the form ``{ from_port: 0, from: "GraphNode name 0", to_port: 1, to: "GraphNode name 1" }``. .. _class_GraphEdit_method_get_zoom_hbox: @@ -277,7 +285,7 @@ Returns an Array containing the list of connections. A connection consists in a - :ref:`bool` **is_node_connected** **(** :ref:`String` from, :ref:`int` from_port, :ref:`String` to, :ref:`int` to_port **)** -Returns ``true`` if the 'from_port' slot of 'from' GraphNode is connected to the 'to_port' slot of 'to' GraphNode. +Returns ``true`` if the ``from_port`` slot of the ``from`` GraphNode is connected to the ``to_port`` slot of the ``to`` GraphNode. .. _class_GraphEdit_method_is_valid_connection_type: diff --git a/classes/class_graphnode.rst b/classes/class_graphnode.rst index adf6cfccc..a9d6a834b 100644 --- a/classes/class_graphnode.rst +++ b/classes/class_graphnode.rst @@ -168,7 +168,7 @@ enum **Overlay**: 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. +A GraphNode is a container defined by a title. It can have one 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. Property Descriptions --------------------- @@ -193,7 +193,9 @@ Property Descriptions | *Getter* | get_offset() | +----------+-------------------+ -The offset of the GraphNode, relative to the scroll offset of the :ref:`GraphEdit`. Note that you cannot use position directly, as :ref:`GraphEdit` is a :ref:`Container`. +The offset of the GraphNode, relative to the scroll offset of the :ref:`GraphEdit`. + +**Note:** You cannot use position directly, as :ref:`GraphEdit` is a :ref:`Container`. .. _class_GraphNode_property_overlay: @@ -252,19 +254,19 @@ Method Descriptions - void **clear_all_slots** **(** **)** -Disable all input and output slots of the GraphNode. +Disables all input and output slots of the GraphNode. .. _class_GraphNode_method_clear_slot: - void **clear_slot** **(** :ref:`int` idx **)** -Disable input and output slot whose index is 'idx'. +Disables input and output slot whose index is ``idx``. .. _class_GraphNode_method_get_connection_input_color: - :ref:`Color` **get_connection_input_color** **(** :ref:`int` idx **)** -Returns the color of the input connection 'idx'. +Returns the color of the input connection ``idx``. .. _class_GraphNode_method_get_connection_input_count: @@ -276,19 +278,19 @@ Returns the number of enabled input slots (connections) to the GraphNode. - :ref:`Vector2` **get_connection_input_position** **(** :ref:`int` idx **)** -Returns the position of the input connection 'idx'. +Returns the position of the input connection ``idx``. .. _class_GraphNode_method_get_connection_input_type: - :ref:`int` **get_connection_input_type** **(** :ref:`int` idx **)** -Returns the type of the input connection 'idx'. +Returns the type of the input connection ``idx``. .. _class_GraphNode_method_get_connection_output_color: - :ref:`Color` **get_connection_output_color** **(** :ref:`int` idx **)** -Returns the color of the output connection 'idx'. +Returns the color of the output connection ``idx``. .. _class_GraphNode_method_get_connection_output_count: @@ -300,49 +302,49 @@ Returns the number of enabled output slots (connections) of the GraphNode. - :ref:`Vector2` **get_connection_output_position** **(** :ref:`int` idx **)** -Returns the position of the output connection 'idx'. +Returns the position of the output connection ``idx``. .. _class_GraphNode_method_get_connection_output_type: - :ref:`int` **get_connection_output_type** **(** :ref:`int` idx **)** -Returns the type of the output connection 'idx'. +Returns the type of the output connection ``idx``. .. _class_GraphNode_method_get_slot_color_left: - :ref:`Color` **get_slot_color_left** **(** :ref:`int` idx **)** const -Returns the color set to 'idx' left (input) slot. +Returns the color set to ``idx`` left (input) slot. .. _class_GraphNode_method_get_slot_color_right: - :ref:`Color` **get_slot_color_right** **(** :ref:`int` idx **)** const -Returns the color set to 'idx' right (output) slot. +Returns the color set to ``idx`` right (output) slot. .. _class_GraphNode_method_get_slot_type_left: - :ref:`int` **get_slot_type_left** **(** :ref:`int` idx **)** const -Returns the (integer) type of left (input) 'idx' slot. +Returns the (integer) type of left (input) ``idx`` slot. .. _class_GraphNode_method_get_slot_type_right: - :ref:`int` **get_slot_type_right** **(** :ref:`int` idx **)** const -Returns the (integer) type of right (output) 'idx' slot. +Returns the (integer) type of right (output) ``idx`` slot. .. _class_GraphNode_method_is_slot_enabled_left: - :ref:`bool` **is_slot_enabled_left** **(** :ref:`int` idx **)** const -Returns ``true`` if left (input) slot 'idx' is enabled, ``false`` otherwise. +Returns ``true`` if left (input) slot ``idx`` is enabled, ``false`` otherwise. .. _class_GraphNode_method_is_slot_enabled_right: - :ref:`bool` **is_slot_enabled_right** **(** :ref:`int` idx **)** const -Returns ``true`` if right (output) slot 'idx' is enabled, ``false`` otherwise. +Returns ``true`` if right (output) slot ``idx`` is enabled, ``false`` otherwise. .. _class_GraphNode_method_set_slot: diff --git a/classes/class_gridcontainer.rst b/classes/class_gridcontainer.rst index fb5362be8..682b80f8b 100644 --- a/classes/class_gridcontainer.rst +++ b/classes/class_gridcontainer.rst @@ -35,7 +35,7 @@ Theme Properties Description ----------- -Grid container will arrange its children in a grid like structure, the grid columns are specified using the :ref:`columns` property and the number of rows will be equal to the number of children in the container divided by the number of columns, for example: if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container. +Grid container will arrange its children in a grid like structure, the grid columns are specified using the :ref:`columns` property and the number of rows will be equal to the number of children in the container divided by the number of columns. For example, if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container. Property Descriptions --------------------- diff --git a/classes/class_gridmap.rst b/classes/class_gridmap.rst index 8b8b41d1e..54f8e74c7 100644 --- a/classes/class_gridmap.rst +++ b/classes/class_gridmap.rst @@ -267,13 +267,13 @@ The orientation of the cell at the grid-based X, Y and Z coordinates. -1 is retu - :ref:`Array` **get_meshes** **(** **)** -Array of :ref:`Transform` and :ref:`Mesh` references corresponding to the non empty cells in the grid. The transforms are specified in world space. +Array of :ref:`Transform` and :ref:`Mesh` references corresponding to the non-empty cells in the grid. The transforms are specified in world space. .. _class_GridMap_method_get_used_cells: - :ref:`Array` **get_used_cells** **(** **)** const -Array of :ref:`Vector3` with the non empty cell coordinates in the grid map. +Array of :ref:`Vector3` with the non-empty cell coordinates in the grid map. .. _class_GridMap_method_make_baked_meshes: diff --git a/classes/class_groovejoint2d.rst b/classes/class_groovejoint2d.rst index 08887aba5..e4bfb11bb 100644 --- a/classes/class_groovejoint2d.rst +++ b/classes/class_groovejoint2d.rst @@ -43,7 +43,7 @@ Property Descriptions | *Getter* | get_initial_offset() | +----------+---------------------------+ -The body B's initial anchor position defined by the joint's origin and a local offset :ref:`initial_offset` along the joint's y axis (along the groove). Default value: ``25`` +The body B's initial anchor position defined by the joint's origin and a local offset :ref:`initial_offset` along the joint's Y axis (along the groove). Default value: ``25``. .. _class_GrooveJoint2D_property_length: @@ -55,5 +55,5 @@ The body B's initial anchor position defined by the joint's origin and a local o | *Getter* | get_length() | +----------+-------------------+ -The groove's length. The groove is from the joint's origin towards :ref:`length` along the joint's local y axis. Default value: ``50`` +The groove's length. The groove is from the joint's origin towards :ref:`length` along the joint's local Y axis. Default value: ``50``. diff --git a/classes/class_hingejoint.rst b/classes/class_hingejoint.rst index 9595dd73b..dc79345cc 100644 --- a/classes/class_hingejoint.rst +++ b/classes/class_hingejoint.rst @@ -68,9 +68,9 @@ enum **Param**: - **PARAM_BIAS** = **0** --- The speed with which the two bodies get pulled together when they move in different directions. -- **PARAM_LIMIT_UPPER** = **1** --- The maximum rotation. only active if :ref:`angular_limit/enable` is ``true``. +- **PARAM_LIMIT_UPPER** = **1** --- The maximum rotation. Only active if :ref:`angular_limit/enable` is ``true``. -- **PARAM_LIMIT_LOWER** = **2** --- The minimum rotation. only active if :ref:`angular_limit/enable` is ``true``. +- **PARAM_LIMIT_LOWER** = **2** --- The minimum rotation. Only active if :ref:`angular_limit/enable` is ``true``. - **PARAM_LIMIT_BIAS** = **3** --- The speed with which the rotation across the axis perpendicular to the hinge gets corrected. @@ -82,7 +82,7 @@ enum **Param**: - **PARAM_MOTOR_MAX_IMPULSE** = **7** --- Maximum acceleration for the motor. -- **PARAM_MAX** = **8** --- End flag of PARAM\_\* constants, used internally. +- **PARAM_MAX** = **8** --- Represents the size of the :ref:`Param` enum. .. _enum_HingeJoint_Flag: @@ -98,12 +98,12 @@ enum **Flag**: - **FLAG_ENABLE_MOTOR** = **1** --- When activated, a motor turns the hinge. -- **FLAG_MAX** = **2** --- End flag of FLAG\_\* constants, used internally. +- **FLAG_MAX** = **2** --- Represents the size of the :ref:`Flag` enum. Description ----------- -Normally uses the z-axis of body A as the hinge axis, another axis can be specified when adding it manually though. +A HingeJoint normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though. Property Descriptions --------------------- @@ -136,7 +136,7 @@ If ``true``, the hinges maximum and minimum rotation, defined by :ref:`angular_l - :ref:`float` **angular_limit/lower** -The minimum rotation. only active if :ref:`angular_limit/enable` is ``true``. +The minimum rotation. Only active if :ref:`angular_limit/enable` is ``true``. .. _class_HingeJoint_property_angular_limit/relaxation: @@ -164,7 +164,7 @@ The lower this value, the more the rotation gets slowed down. - :ref:`float` **angular_limit/upper** -The maximum rotation. only active if :ref:`angular_limit/enable` is ``true``. +The maximum rotation. Only active if :ref:`angular_limit/enable` is ``true``. .. _class_HingeJoint_property_motor/enable: diff --git a/classes/class_hseparator.rst b/classes/class_hseparator.rst index 36dfaee55..ed62446aa 100644 --- a/classes/class_hseparator.rst +++ b/classes/class_hseparator.rst @@ -28,5 +28,5 @@ Theme Properties Description ----------- -Horizontal separator. See :ref:`Separator`. It is used to separate objects vertically, though (but it looks horizontal!). +Horizontal separator. See :ref:`Separator`. Even though it looks horizontal, it is used to separate objects vertically. diff --git a/classes/class_httpclient.rst b/classes/class_httpclient.rst index 8e0119cd7..a0353e864 100644 --- a/classes/class_httpclient.rst +++ b/classes/class_httpclient.rst @@ -93,7 +93,7 @@ enum **Method**: - **METHOD_POST** = **2** --- HTTP POST method. The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server. This is often used for forms and submitting data or uploading files. -- **METHOD_PUT** = **3** --- HTTP PUT method. The PUT method asks to replace all current representations of the target resource with the request payload. (You can think of ``POST`` as "create or update" and ``PUT`` as "update", although many services tend to not make a clear distinction or change their meaning). +- **METHOD_PUT** = **3** --- HTTP PUT method. The PUT method asks to replace all current representations of the target resource with the request payload. (You can think of POST as "create or update" and PUT as "update", although many services tend to not make a clear distinction or change their meaning). - **METHOD_DELETE** = **4** --- HTTP DELETE method. The DELETE method requests to delete the specified resource. @@ -105,7 +105,7 @@ enum **Method**: - **METHOD_PATCH** = **8** --- HTTP PATCH method. The PATCH method is used to apply partial modifications to a resource. -- **METHOD_MAX** = **9** --- Marker for end of ``METHOD_*`` enum. Not used. +- **METHOD_MAX** = **9** --- Represents the size of the :ref:`Method` enum. .. _enum_HTTPClient_Status: @@ -313,9 +313,9 @@ enum **ResponseCode**: - **RESPONSE_NOT_MODIFIED** = **304** --- HTTP status code ``304 Not Modified``. A conditional GET or HEAD request has been received and would have resulted in a 200 OK response if it were not for the fact that the condition evaluated to ``false``. -- **RESPONSE_USE_PROXY** = **305** --- HTTP status code ``305 Use Proxy``. Deprecated. Do not use. +- **RESPONSE_USE_PROXY** = **305** --- HTTP status code ``305 Use Proxy``. *Deprecated. Do not use.* -- **RESPONSE_SWITCH_PROXY** = **306** --- HTTP status code ``306 Switch Proxy``. Deprecated. Do not use. +- **RESPONSE_SWITCH_PROXY** = **306** --- HTTP status code ``306 Switch Proxy``. *Deprecated. Do not use.* - **RESPONSE_TEMPORARY_REDIRECT** = **307** --- HTTP status code ``307 Temporary Redirect``. The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI. @@ -402,9 +402,9 @@ enum **ResponseCode**: Description ----------- -Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. +Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. See :ref:`HTTPRequest` for an higher-level alternative. -Note that this client only needs to connect to a host once (see :ref:`connect_to_host`) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See :ref:`request` for a full example and to get started. +**Note:** This client only needs to connect to a host once (see :ref:`connect_to_host`) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See :ref:`request` for a full example and to get started. A ``HTTPClient`` should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports SSL and SSL server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side. @@ -457,7 +457,7 @@ Closes the current connection, allowing reuse of this ``HTTPClient``. - :ref:`Error` **connect_to_host** **(** :ref:`String` host, :ref:`int` port=-1, :ref:`bool` use_ssl=false, :ref:`bool` verify_host=true **)** -Connect to a host. This needs to be done before any requests are sent. +Connects to a host. This needs to be done before any requests are sent. The host should not have http:// prepended but will strip the protocol identifier if provided. @@ -487,17 +487,22 @@ Returns the response headers. - :ref:`Dictionary` **get_response_headers_as_dictionary** **(** **)** -Returns all response headers as dictionary where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator. +Returns all response headers as a Dictionary of structure ``{ "key": "value1; value2" }`` where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator. -Structure: ("key":"value1; value2") +**Example:** -Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) +:: + + { + "content-length": 12, + "Content-Type": "application/json; charset=UTF-8", + } .. _class_HTTPClient_method_get_status: - :ref:`Status` **get_status** **(** **)** const -Returns a STATUS\_\* enum constant. Need to call :ref:`poll` in order to get status updates. +Returns a ``STATUS_*`` enum constant. Need to call :ref:`poll` in order to get status updates. .. _class_HTTPClient_method_has_response: @@ -527,15 +532,15 @@ Generates a GET/POST application/x-www-form-urlencoded style query string from a var fields = {"username": "user", "password": "pass"} String query_string = http_client.query_string_from_dict(fields) - # returns: "username=user&password=pass" + # Returns "username=user&password=pass" -Furthermore, if a key has a null value, only the key itself is added, without equal sign and value. If the value is an array, for each value in it a pair with the same key is added. +Furthermore, if a key has a ``null`` value, only the key itself is added, without equal sign and value. If the value is an array, for each value in it a pair with the same key is added. :: var fields = {"single": 123, "not_valued": null, "multiple": [22, 33, 44]} String query_string = http_client.query_string_from_dict(fields) - # returns: "single=123¬_valued&multiple=22&multiple=33&multiple=44" + # Returns "single=123¬_valued&multiple=22&multiple=33&multiple=44" .. _class_HTTPClient_method_read_response_body_chunk: diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst index 3350259ef..bfb7cd536 100644 --- a/classes/class_httprequest.rst +++ b/classes/class_httprequest.rst @@ -51,7 +51,7 @@ Signals - **request_completed** **(** :ref:`int` result, :ref:`int` response_code, :ref:`PoolStringArray` headers, :ref:`PoolByteArray` body **)** -This signal is emitted upon request completion. +Emitted when a request is completed. Enumerations ------------ @@ -204,5 +204,5 @@ Returns the current status of the underlying :ref:`HTTPClient` Creates request on the underlying :ref:`HTTPClient`. If there is no configuration errors, it tries to connect using :ref:`HTTPClient.connect_to_host` and passes parameters onto :ref:`HTTPClient.request`. -Returns ``OK`` if request is successfully created. (Does not imply that the server has responded), ``ERR_UNCONFIGURED`` if not in the tree, ``ERR_BUSY`` if still processing previous request, ``ERR_INVALID_PARAMETER`` if given string is not a valid URL format, or ``ERR_CANT_CONNECT`` if not using thread and the :ref:`HTTPClient` cannot connect to host. +Returns :ref:`@GlobalScope.OK` if request is successfully created. (Does not imply that the server has responded), :ref:`@GlobalScope.ERR_UNCONFIGURED` if not in the tree, :ref:`@GlobalScope.ERR_BUSY` if still processing previous request, :ref:`@GlobalScope.ERR_INVALID_PARAMETER` if given string is not a valid URL format, or :ref:`@GlobalScope.ERR_CANT_CONNECT` if not using thread and the :ref:`HTTPClient` cannot connect to host. diff --git a/classes/class_image.rst b/classes/class_image.rst index 9d062927f..baf5a5739 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -215,77 +215,97 @@ enum **Format**: - **FORMAT_LA8** = **1** -- **FORMAT_R8** = **2** --- OpenGL texture format RED with a single component and a bitdepth of 8. +- **FORMAT_R8** = **2** --- OpenGL texture format ``RED`` with a single component and a bitdepth of 8. -- **FORMAT_RG8** = **3** --- OpenGL texture format RG with two components and a bitdepth of 8 for each. +- **FORMAT_RG8** = **3** --- OpenGL texture format ``RG`` with two components and a bitdepth of 8 for each. -- **FORMAT_RGB8** = **4** --- OpenGL texture format RGB with three components, each with a bitdepth of 8. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. +- **FORMAT_RGB8** = **4** --- OpenGL texture format ``RGB`` with three components, each with a bitdepth of 8. -- **FORMAT_RGBA8** = **5** --- OpenGL texture format RGBA with four components, each with a bitdepth of 8. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. +**Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_RGBA4444** = **6** --- OpenGL texture format RGBA with four components, each with a bitdepth of 4. +- **FORMAT_RGBA8** = **5** --- OpenGL texture format ``RGBA`` with four components, each with a bitdepth of 8. -- **FORMAT_RGBA5551** = **7** --- OpenGL texture format GL_RGB5_A1 where 5 bits of depth for each component of RGB and one bit for alpha. +**Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_RF** = **8** --- OpenGL texture format GL_R32F where there's one component, a 32-bit floating-point value. +- **FORMAT_RGBA4444** = **6** --- OpenGL texture format ``RGBA`` with four components, each with a bitdepth of 4. -- **FORMAT_RGF** = **9** --- OpenGL texture format GL_RG32F where there are two components, each a 32-bit floating-point values. +- **FORMAT_RGBA5551** = **7** --- OpenGL texture format ``GL_RGB5_A1`` where 5 bits of depth for each component of RGB and one bit for alpha. -- **FORMAT_RGBF** = **10** --- OpenGL texture format GL_RGB32F where there are three components, each a 32-bit floating-point values. +- **FORMAT_RF** = **8** --- OpenGL texture format ``GL_R32F`` where there's one component, a 32-bit floating-point value. -- **FORMAT_RGBAF** = **11** --- OpenGL texture format GL_RGBA32F where there are four components, each a 32-bit floating-point values. +- **FORMAT_RGF** = **9** --- OpenGL texture format ``GL_RG32F`` where there are two components, each a 32-bit floating-point values. -- **FORMAT_RH** = **12** --- OpenGL texture format GL_R32F where there's one component, a 16-bit "half-precision" floating-point value. +- **FORMAT_RGBF** = **10** --- OpenGL texture format ``GL_RGB32F`` where there are three components, each a 32-bit floating-point values. -- **FORMAT_RGH** = **13** --- OpenGL texture format GL_RG32F where there's two components, each a 16-bit "half-precision" floating-point value. +- **FORMAT_RGBAF** = **11** --- OpenGL texture format ``GL_RGBA32F`` where there are four components, each a 32-bit floating-point values. -- **FORMAT_RGBH** = **14** --- OpenGL texture format GL_RGB32F where there's three components, each a 16-bit "half-precision" floating-point value. +- **FORMAT_RH** = **12** --- OpenGL texture format ``GL_R32F`` where there's one component, a 16-bit "half-precision" floating-point value. -- **FORMAT_RGBAH** = **15** --- OpenGL texture format GL_RGBA32F where there's four components, each a 16-bit "half-precision" floating-point value. +- **FORMAT_RGH** = **13** --- OpenGL texture format ``GL_RG32F`` where there are two components, each a 16-bit "half-precision" floating-point value. -- **FORMAT_RGBE9995** = **16** --- A special OpenGL texture format where the three color components have 9 bits of precision and all three share a single exponent. +- **FORMAT_RGBH** = **14** --- OpenGL texture format ``GL_RGB32F`` where there are three components, each a 16-bit "half-precision" floating-point value. -- **FORMAT_DXT1** = **17** --- The S3TC texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha. More information can be found at https://www.khronos.org/opengl/wiki/S3_Texture_Compression. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. +- **FORMAT_RGBAH** = **15** --- OpenGL texture format ``GL_RGBA32F`` where there are four components, each a 16-bit "half-precision" floating-point value. -- **FORMAT_DXT3** = **18** --- The S3TC texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. +- **FORMAT_RGBE9995** = **16** --- A special OpenGL texture format where the three color components have 9 bits of precision and all three share a single 5-bit exponent. -- **FORMAT_DXT5** = **19** --- The S3TC texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparency gradients than DXT3. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. +- **FORMAT_DXT1** = **17** --- The `S3TC `_ texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha. -- **FORMAT_RGTC_R** = **20** --- Texture format that uses Red Green Texture Compression, normalizing the red channel data using the same compression algorithm that DXT5 uses for the alpha channel. More information can be found here https://www.khronos.org/opengl/wiki/Red_Green_Texture_Compression. +**Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_RGTC_RG** = **21** --- Texture format that uses Red Green Texture Compression, normalizing the red and green channel data using the same compression algorithm that DXT5 uses for the alpha channel. +- **FORMAT_DXT3** = **18** --- The `S3TC `_ texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas. -- **FORMAT_BPTC_RGBA** = **22** --- Texture format that uses BPTC compression with unsigned normalized RGBA components. More information can be found at https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. +**Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_BPTC_RGBF** = **23** --- Texture format that uses BPTC compression with signed floating-point RGB components. +- **FORMAT_DXT5** = **19** --- The `S3TC `_ texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparent gradients compared to DXT3. -- **FORMAT_BPTC_RGBFU** = **24** --- Texture format that uses BPTC compression with unsigned floating-point RGB components. +**Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_PVRTC2** = **25** --- Texture format used on PowerVR-supported mobile platforms, uses 2 bit color depth with no alpha. More information on PVRTC can be found here https://en.wikipedia.org/wiki/PVRTC. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. +- **FORMAT_RGTC_R** = **20** --- Texture format that uses `Red Green Texture Compression `_, normalizing the red channel data using the same compression algorithm that DXT5 uses for the alpha channel. -- **FORMAT_PVRTC2A** = **26** --- Same as PVRTC2, but with an alpha component. +- **FORMAT_RGTC_RG** = **21** --- Texture format that uses `Red Green Texture Compression `_, normalizing the red and green channel data using the same compression algorithm that DXT5 uses for the alpha channel. -- **FORMAT_PVRTC4** = **27** --- Similar to PVRTC2, but with 4 bit color depth and no alpha. +- **FORMAT_BPTC_RGBA** = **22** --- Texture format that uses `BPTC `_ compression with unsigned normalized RGBA components. -- **FORMAT_PVRTC4A** = **28** --- Same as PVRTC4, but with an alpha component. +**Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_ETC** = **29** --- Ericsson Texture Compression format, also referred to as 'ETC1', and is part of the OpenGL ES graphics standard. An overview of the format is given at https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC1. +- **FORMAT_BPTC_RGBF** = **23** --- Texture format that uses `BPTC `_ compression with signed floating-point RGB components. -- **FORMAT_ETC2_R11** = **30** --- Ericsson Texture Compression format 2 variant R11_EAC, which provides one channel of unsigned data. +- **FORMAT_BPTC_RGBFU** = **24** --- Texture format that uses `BPTC `_ compression with unsigned floating-point RGB components. -- **FORMAT_ETC2_R11S** = **31** --- Ericsson Texture Compression format 2 variant SIGNED_R11_EAC, which provides one channel of signed data. +- **FORMAT_PVRTC2** = **25** --- Texture format used on PowerVR-supported mobile platforms, uses 2-bit color depth with no alpha. More information can be found `here `_. -- **FORMAT_ETC2_RG11** = **32** --- Ericsson Texture Compression format 2 variant RG11_EAC, which provides two channels of unsigned data. +**Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_ETC2_RG11S** = **33** --- Ericsson Texture Compression format 2 variant SIGNED_RG11_EAC, which provides two channels of signed data. +- **FORMAT_PVRTC2A** = **26** --- Same as `PVRTC2 `_, but with an alpha component. -- **FORMAT_ETC2_RGB8** = **34** --- Ericsson Texture Compression format 2 variant RGB8, which is a followup of ETC1 and compresses RGB888 data. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. +- **FORMAT_PVRTC4** = **27** --- Similar to `PVRTC2 `_, but with 4-bit color depth and no alpha. -- **FORMAT_ETC2_RGBA8** = **35** --- Ericsson Texture Compression format 2 variant RGBA8, which compresses RGBA8888 data with full alpha support. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. +- **FORMAT_PVRTC4A** = **28** --- Same as `PVRTC4 `_, but with an alpha component. -- **FORMAT_ETC2_RGB8A1** = **36** --- Ericsson Texture Compression format 2 variant RGB8_PUNCHTHROUGH_ALPHA1, which compresses RGBA data to make alpha either fully transparent or fully opaque. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. +- **FORMAT_ETC** = **29** --- `Ericsson Texture Compression format 1 `_, also referred to as "ETC1", and is part of the OpenGL ES graphics standard. This format cannot store an alpha channel. -- **FORMAT_MAX** = **37** +- **FORMAT_ETC2_R11** = **30** --- `Ericsson Texture Compression format 2 `_ (``R11_EAC`` variant), which provides one channel of unsigned data. + +- **FORMAT_ETC2_R11S** = **31** --- `Ericsson Texture Compression format 2 `_ (``SIGNED_R11_EAC`` variant), which provides one channel of signed data. + +- **FORMAT_ETC2_RG11** = **32** --- `Ericsson Texture Compression format 2 `_ (``RG11_EAC`` variant), which provides two channels of unsigned data. + +- **FORMAT_ETC2_RG11S** = **33** --- `Ericsson Texture Compression format 2 `_ (``SIGNED_RG11_EAC`` variant), which provides two channels of signed data. + +- **FORMAT_ETC2_RGB8** = **34** --- `Ericsson Texture Compression format 2 `_ (``RGB8`` variant), which is a follow-up of ETC1 and compresses RGB888 data. + +**Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. + +- **FORMAT_ETC2_RGBA8** = **35** --- `Ericsson Texture Compression format 2 `_ (``RGBA8``\ variant), which compresses RGBA8888 data with full alpha support. + +**Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. + +- **FORMAT_ETC2_RGB8A1** = **36** --- `Ericsson Texture Compression format 2 `_ (``RGB8_PUNCHTHROUGH_ALPHA1`` variant), which compresses RGBA data to make alpha either fully transparent or fully opaque. + +**Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. + +- **FORMAT_MAX** = **37** --- Represents the size of the :ref:`Format` enum. .. _enum_Image_Interpolation: @@ -301,21 +321,23 @@ enum **Format**: enum **Interpolation**: -- **INTERPOLATE_NEAREST** = **0** +- **INTERPOLATE_NEAREST** = **0** --- Performs nearest-neighbor interpolation. If the image is resized, it will be pixelated. -- **INTERPOLATE_BILINEAR** = **1** +- **INTERPOLATE_BILINEAR** = **1** --- Performs bilinear interpolation. If the image is resized, it will be blurry. This mode is faster than :ref:`INTERPOLATE_CUBIC`, but it results in lower quality. -- **INTERPOLATE_CUBIC** = **2** +- **INTERPOLATE_CUBIC** = **2** --- Performs cubic interpolation. If the image is resized, it will be blurry. This mode often gives better results compared to :ref:`INTERPOLATE_BILINEAR`, at the cost of being slower. -- **INTERPOLATE_TRILINEAR** = **3** --- Performs bilinear separately on the two most suited mipmap levels, then linearly interpolates between them. +- **INTERPOLATE_TRILINEAR** = **3** --- Performs bilinear separately on the two most-suited mipmap levels, then linearly interpolates between them. -It's slower than ``INTERPOLATE_BILINEAR``, but produces higher quality results, with much less aliasing artifacts. +It's slower than :ref:`INTERPOLATE_BILINEAR`, but produces higher-quality results with much less aliasing artifacts. -If the image does not have mipmaps, they will be generated and used internally, but no mipmaps will be generated on the resulting image. (Note that if you intend to scale multiple copies of the original image, it's better to call ``generate_mipmaps`` on it in advance, to avoid wasting processing power in generating them again and again.) +If the image does not have mipmaps, they will be generated and used internally, but no mipmaps will be generated on the resulting image. + +**Note:** If you intend to scale multiple copies of the original image, it's better to call :ref:`generate_mipmaps`] on it in advance, to avoid wasting processing power in generating them again and again. On the other hand, if the image already has mipmaps, they will be used, and a new set will be generated for the resulting image. -- **INTERPOLATE_LANCZOS** = **4** +- **INTERPOLATE_LANCZOS** = **4** --- Performs Lanczos interpolation. This is the slowest image resizing mode, but it typically gives the best results, especially when downscalng images. .. _enum_Image_AlphaMode: @@ -457,13 +479,13 @@ Copies ``src`` image to this image. - void **create** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format **)** -Creates an empty image of given size and format. See ``FORMAT_*`` constants. If ``use_mipmaps`` is ``true`` then generate mipmaps for this image. See the ``generate_mipmaps`` method. +Creates an empty image of given size and format. See ``FORMAT_*`` constants. If ``use_mipmaps`` is ``true`` then generate mipmaps for this image. See the :ref:`generate_mipmaps`. .. _class_Image_method_create_from_data: - void **create_from_data** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format, :ref:`PoolByteArray` data **)** -Creates a new image of given size and format. See ``FORMAT_*`` constants. Fills the image with the given raw data. If ``use_mipmaps`` is ``true`` then generate mipmaps for this image. See the ``generate_mipmaps`` method. +Creates a new image of given size and format. See ``FORMAT_*`` constants. Fills the image with the given raw data. If ``use_mipmaps`` is ``true`` then generate mipmaps for this image. See the :ref:`generate_mipmaps`. .. _class_Image_method_crop: diff --git a/classes/class_imagetexture.rst b/classes/class_imagetexture.rst index c0b204c01..829d2a0e8 100644 --- a/classes/class_imagetexture.rst +++ b/classes/class_imagetexture.rst @@ -79,7 +79,7 @@ Property Descriptions | *Getter* | get_lossy_storage_quality() | +----------+----------------------------------+ -The storage quality for ``STORAGE_COMPRESS_LOSSY``. +The storage quality for :ref:`STORAGE_COMPRESS_LOSSY`. .. _class_ImageTexture_property_storage: @@ -126,7 +126,7 @@ Load an ``ImageTexture`` from a file path. - void **set_data** **(** :ref:`Image` image **)** -Set the :ref:`Image` of this ``ImageTexture``. +Sets the :ref:`Image` of this ``ImageTexture``. .. _class_ImageTexture_method_set_size_override: diff --git a/classes/class_immediategeometry.rst b/classes/class_immediategeometry.rst index 3157c89dd..7bcf2be52 100644 --- a/classes/class_immediategeometry.rst +++ b/classes/class_immediategeometry.rst @@ -53,7 +53,7 @@ Method Descriptions - void **add_sphere** **(** :ref:`int` lats, :ref:`int` lons, :ref:`float` radius, :ref:`bool` add_uv=true **)** -Simple helper to draw a uvsphere, with given latitudes, longitude and radius. +Simple helper to draw an UV sphere with given latitude, longitude and radius. .. _class_ImmediateGeometry_method_add_vertex: @@ -67,7 +67,7 @@ Adds a vertex with the currently set color/uv/etc. Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references. -For the type of primitive, use the :ref:`Mesh`.PRIMITIVE\_\* enumerations. +For the type of primitive, use the :ref:`Mesh`.``PRIMITIVE_*`` enumerations. .. _class_ImmediateGeometry_method_clear: diff --git a/classes/class_input.rst b/classes/class_input.rst index 876d35af2..23390317f 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -129,7 +129,7 @@ enum **MouseMode**: - **MOUSE_MODE_HIDDEN** = **1** --- Makes the mouse cursor hidden if it is visible. -- **MOUSE_MODE_CAPTURED** = **2** --- Captures the mouse. The mouse will be hidden and unable to leave the game window. But it will still register movement and mouse button presses. +- **MOUSE_MODE_CAPTURED** = **2** --- Captures the mouse. The mouse will be hidden and unable to leave the game window, but it will still register movement and mouse button presses. - **MOUSE_MODE_CONFINED** = **3** --- Makes the mouse cursor visible but confines it to the game window. @@ -179,9 +179,9 @@ enum **CursorShape**: - **CURSOR_CROSS** = **3** --- Cross cursor. Typically appears over regions in which a drawing operation can be performed or for selections. -- **CURSOR_WAIT** = **4** --- Wait cursor. Indicates that the application is busy performing an operation. +- **CURSOR_WAIT** = **4** --- Wait cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application is still usable during the operation. -- **CURSOR_BUSY** = **5** --- Busy cursor. See ``CURSOR_WAIT``. +- **CURSOR_BUSY** = **5** --- Busy cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application isn't usable during the operation (e.g. something is blocking its main thread). - **CURSOR_DRAG** = **6** --- Drag cursor. Usually displayed when dragging something. @@ -189,26 +189,26 @@ enum **CursorShape**: - **CURSOR_FORBIDDEN** = **8** --- Forbidden cursor. Indicates that the current action is forbidden (for example, when dragging something) or that the control at a position is disabled. -- **CURSOR_VSIZE** = **9** --- Vertical resize mouse cursor. A double headed vertical arrow. It tells the user they can resize the window or the panel vertically. +- **CURSOR_VSIZE** = **9** --- Vertical resize mouse cursor. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically. -- **CURSOR_HSIZE** = **10** --- Horizontal resize mouse cursor. A double headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. +- **CURSOR_HSIZE** = **10** --- Horizontal resize mouse cursor. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. -- **CURSOR_BDIAGSIZE** = **11** --- Window resize mouse cursor. The cursor is a double headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. +- **CURSOR_BDIAGSIZE** = **11** --- Window resize mouse cursor. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. -- **CURSOR_FDIAGSIZE** = **12** --- Window resize mouse cursor. The cursor is a double headed arrow that goes from the top left to the bottom right, the opposite of ``CURSOR_BDIAGSIZE``. It tells the user they can resize the window or the panel both horizontally and vertically. +- **CURSOR_FDIAGSIZE** = **12** --- Window resize mouse cursor. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of :ref:`CURSOR_BDIAGSIZE`. It tells the user they can resize the window or the panel both horizontally and vertically. - **CURSOR_MOVE** = **13** --- Move cursor. Indicates that something can be moved. -- **CURSOR_VSPLIT** = **14** --- Vertical split mouse cursor. On Windows, it's the same as ``CURSOR_VSIZE``. +- **CURSOR_VSPLIT** = **14** --- Vertical split mouse cursor. On Windows, it's the same as :ref:`CURSOR_VSIZE`. -- **CURSOR_HSPLIT** = **15** --- Horizontal split mouse cursor. On Windows, it's the same as ``CURSOR_HSIZE``. +- **CURSOR_HSPLIT** = **15** --- Horizontal split mouse cursor. On Windows, it's the same as :ref:`CURSOR_HSIZE`. - **CURSOR_HELP** = **16** --- Help cursor. Usually a question mark. Description ----------- -A Singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the Project Settings / Input Map tab. Or be set with :ref:`InputMap`. +A Singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the **Input Map** tab in the **Project > Project Settings**, or with the :ref:`InputMap` class. Tutorials --------- @@ -236,7 +236,7 @@ If the specified action is already pressed, this will release it. - void **add_joy_mapping** **(** :ref:`String` mapping, :ref:`bool` update_existing=false **)** -Add a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices. +Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices. .. _class_Input_method_get_accelerometer: @@ -272,7 +272,7 @@ If the device has an accelerometer, this will return the gravity. Otherwise, it - :ref:`Vector3` **get_gyroscope** **(** **)** const -If the device has a gyroscope, this will return the rate of rotation in rad/s around a device's x, y, and z axis. Otherwise, it returns an empty :ref:`Vector3`. +If the device has a gyroscope, this will return the rate of rotation in rad/s around a device's X, Y, and Z axes. Otherwise, it returns an empty :ref:`Vector3`. .. _class_Input_method_get_joy_axis: @@ -302,19 +302,19 @@ Returns the index of the provided button name. - :ref:`String` **get_joy_button_string** **(** :ref:`int` button_index **)** -Receives a joy button from :ref:`JoystickList` and returns its equivalent name as a string. +Receives a gamepad button from :ref:`JoystickList` and returns its equivalent name as a string. .. _class_Input_method_get_joy_guid: - :ref:`String` **get_joy_guid** **(** :ref:`int` device **)** const -Returns a SDL2 compatible device guid on platforms that use gamepad remapping. Returns "Default Gamepad" otherwise. +Returns a SDL2-compatible device GUID on platforms that use gamepad remapping. Returns ``"Default Gamepad"`` otherwise. .. _class_Input_method_get_joy_name: - :ref:`String` **get_joy_name** **(** :ref:`int` device **)** -Returns the name of the joypad at the specified device index +Returns the name of the joypad at the specified device index. .. _class_Input_method_get_joy_vibration_duration: @@ -344,7 +344,7 @@ If the device has a magnetometer, this will return the magnetic field strength i - :ref:`int` **get_mouse_button_mask** **(** **)** const -Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time the bits are added together. +Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. .. _class_Input_method_get_mouse_mode: @@ -410,7 +410,7 @@ Feeds an :ref:`InputEvent` to the game. Can be used to artific - void **remove_joy_mapping** **(** :ref:`String` guid **)** -Removes all mappings from the internal db that match the given uid. +Removes all mappings from the internal database that match the given GUID. .. _class_Input_method_set_custom_mouse_cursor: @@ -418,7 +418,7 @@ Removes all mappings from the internal db that match the given uid. Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing ``null`` to the image parameter resets to the system cursor. See enum ``CURSOR_*`` for the list of shapes. -``image``'s size must be lower than 256x256. +``image``'s size must be lower than 256×256. ``hotspot`` must be within ``image``'s size. @@ -426,15 +426,15 @@ Sets a custom mouse cursor image, which is only visible inside the game window. - void **set_default_cursor_shape** **(** :ref:`CursorShape` shape=0 **)** -Sets the default cursor shape to be used in the viewport instead of ``CURSOR_ARROW``. +Sets the default cursor shape to be used in the viewport instead of :ref:`CURSOR_ARROW`. -Note that if you want to change the default cursor shape for :ref:`Control`'s nodes, use :ref:`Control.mouse_default_cursor_shape` instead. +**Note:** If you want to change the default cursor shape for :ref:`Control`'s nodes, use :ref:`Control.mouse_default_cursor_shape` instead. .. _class_Input_method_set_mouse_mode: - void **set_mouse_mode** **(** :ref:`MouseMode` mode **)** -Set the mouse mode. See the constants for more information. +Sets the mouse mode. See the constants for more information. .. _class_Input_method_set_use_accumulated_input: @@ -446,9 +446,9 @@ Whether to accumulate similar input events sent by the operating system. Default - void **start_joy_vibration** **(** :ref:`int` device, :ref:`float` weak_magnitude, :ref:`float` strong_magnitude, :ref:`float` duration=0 **)** -Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). +Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. ``weak_magnitude`` is the strength of the weak motor (between 0 and 1) and ``strong_magnitude`` is the strength of the strong motor (between 0 and 1). ``duration`` is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). -Note that not every hardware is compatible with long effect durations, it is recommended to restart an effect if in need to play it for more than a few seconds. +**Note:** Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds. .. _class_Input_method_stop_joy_vibration: diff --git a/classes/class_inputevent.rst b/classes/class_inputevent.rst index a2b75ea4e..f56b02665 100644 --- a/classes/class_inputevent.rst +++ b/classes/class_inputevent.rst @@ -106,31 +106,31 @@ Returns ``true`` if this input event matches a pre-defined action of any type. - :ref:`bool` **is_action_pressed** **(** :ref:`String` action **)** const -Returns ``true`` if the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types ``MOUSE_MOTION``, ``SCREEN_DRAG`` or ``NONE``. +Returns ``true`` if the given action is being pressed (and is not an echo event for :ref:`InputEventKey` events). Not relevant for events of type :ref:`InputEventMouseMotion` or :ref:`InputEventScreenDrag`. .. _class_InputEvent_method_is_action_released: - :ref:`bool` **is_action_released** **(** :ref:`String` action **)** const -Returns ``true`` if the given action is released (i.e. not pressed). Not relevant for the event types ``MOUSE_MOTION``, ``SCREEN_DRAG`` or ``NONE``. +Returns ``true`` if the given action is released (i.e. not pressed). Not relevant for events of type :ref:`InputEventMouseMotion` or :ref:`InputEventScreenDrag`. .. _class_InputEvent_method_is_action_type: - :ref:`bool` **is_action_type** **(** **)** const -Returns ``true`` if this input event's type is one of the ``InputEvent`` constants. +Returns ``true`` if this input event's type is one that can be assigned to an input action. .. _class_InputEvent_method_is_echo: - :ref:`bool` **is_echo** **(** **)** const -Returns ``true`` if this input event is an echo event (only for events of type KEY). +Returns ``true`` if this input event is an echo event (only for events of type :ref:`InputEventKey`). .. _class_InputEvent_method_is_pressed: - :ref:`bool` **is_pressed** **(** **)** const -Returns ``true`` if this input event is pressed. Not relevant for the event types ``MOUSE_MOTION``, ``SCREEN_DRAG`` or ``NONE``. +Returns ``true`` if this input event is pressed. Not relevant for events of type :ref:`InputEventMouseMotion` or :ref:`InputEventScreenDrag`. .. _class_InputEvent_method_shortcut_match: diff --git a/classes/class_inputeventaction.rst b/classes/class_inputeventaction.rst index f80ee1e58..a63db5bd7 100644 --- a/classes/class_inputeventaction.rst +++ b/classes/class_inputeventaction.rst @@ -30,7 +30,7 @@ Properties Description ----------- -Contains a generic action which can be targeted from several type of inputs. Actions can be created from the project settings menu ``Project > Project Settings > Input Map``. See :ref:`Node._input`. +Contains a generic action which can be targeted from several types of inputs. Actions can be created from the **Input Map** tab in the **Project > Project Settings** menu. See :ref:`Node._input`. Tutorials --------- @@ -74,5 +74,5 @@ If ``true``, the action's state is pressed. If ``false``, the action's state is | *Getter* | get_strength() | +----------+---------------------+ -The action's strength between 0 and 1. This value is consired as equal to 0 if pressed is ``false``. The event strength allows faking analog joypad motion events, by precising how strongly is the joypad axis bent or pressed. +The action's strength between 0 and 1. This value is considered as equal to 0 if pressed is ``false``. The event strength allows faking analog joypad motion events, by precising how strongly is the joypad axis bent or pressed. diff --git a/classes/class_inputeventjoypadbutton.rst b/classes/class_inputeventjoypadbutton.rst index 597a9ad4f..b840b6af6 100644 --- a/classes/class_inputeventjoypadbutton.rst +++ b/classes/class_inputeventjoypadbutton.rst @@ -30,7 +30,7 @@ Properties Description ----------- -Input event type for gamepad buttons. For joysticks see :ref:`InputEventJoypadMotion`. +Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see :ref:`InputEventJoypadMotion`. Tutorials --------- diff --git a/classes/class_inputeventjoypadmotion.rst b/classes/class_inputeventjoypadmotion.rst index 41018045f..3e0666485 100644 --- a/classes/class_inputeventjoypadmotion.rst +++ b/classes/class_inputeventjoypadmotion.rst @@ -14,7 +14,7 @@ InputEventJoypadMotion Brief Description ----------------- -Input event type for gamepad joysticks and other motions. For buttons see ``InputEventJoypadButton``. +Input event type for gamepad joysticks and other motions. For buttons, see ``InputEventJoypadButton``. Properties ---------- diff --git a/classes/class_inputeventkey.rst b/classes/class_inputeventkey.rst index 3bb3f7d5a..ce8435eb9 100644 --- a/classes/class_inputeventkey.rst +++ b/classes/class_inputeventkey.rst @@ -95,7 +95,7 @@ Key scancode, one of the :ref:`KeyList` constants. | *Getter* | get_unicode() | +----------+--------------------+ -Key unicode identifier when relevant. Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See :ref:`OS.set_ime_active` for more information. +Key Unicode identifier when relevant. Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See :ref:`OS.set_ime_active` for more information. Method Descriptions ------------------- diff --git a/classes/class_inputeventmouse.rst b/classes/class_inputeventmouse.rst index 493fa8f05..1da46bec0 100644 --- a/classes/class_inputeventmouse.rst +++ b/classes/class_inputeventmouse.rst @@ -52,7 +52,7 @@ Property Descriptions | *Getter* | get_button_mask() | +----------+------------------------+ -Mouse button mask identifier, one of or a bitwise combination of the :ref:`ButtonList` button masks. +The mouse button mask identifier, one of or a bitwise combination of the :ref:`ButtonList` button masks. .. _class_InputEventMouse_property_global_position: @@ -64,7 +64,7 @@ Mouse button mask identifier, one of or a bitwise combination of the :ref:`Butto | *Getter* | get_global_position() | +----------+----------------------------+ -Mouse position relative to the current :ref:`Viewport` when used in :ref:`Control._gui_input`, otherwise is at 0,0. +The global mouse position relative to the current :ref:`Viewport` when used in :ref:`Control._gui_input`, otherwise is at 0,0. .. _class_InputEventMouse_property_position: @@ -76,5 +76,5 @@ Mouse position relative to the current :ref:`Viewport` when used | *Getter* | get_position() | +----------+---------------------+ -Mouse local position relative to the :ref:`Viewport`. If used in :ref:`Control._gui_input` the position is relative to the current :ref:`Control` which is under the mouse. +The local mouse position relative to the :ref:`Viewport`. If used in :ref:`Control._gui_input`, the position is relative to the current :ref:`Control` which is under the mouse. diff --git a/classes/class_inputeventmousebutton.rst b/classes/class_inputeventmousebutton.rst index 8b2c67324..258fb9a79 100644 --- a/classes/class_inputeventmousebutton.rst +++ b/classes/class_inputeventmousebutton.rst @@ -52,7 +52,7 @@ Property Descriptions | *Getter* | get_button_index() | +----------+-------------------------+ -Mouse button identifier, one of the :ref:`ButtonList` button or button wheel constants. +The mouse button identifier, one of the :ref:`ButtonList` button or button wheel constants. .. _class_InputEventMouseButton_property_doubleclick: @@ -76,7 +76,7 @@ If ``true``, the mouse button's state is a double-click. | *Getter* | get_factor() | +----------+-------------------+ -Magnitude. Amount (or delta) of the event. Used for scroll events, indicates scroll amount (vertically or horizontally). Only supported on some platforms, sensitivity varies by platform. May be 0 if not supported. +The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be ``0`` if not supported. .. _class_InputEventMouseButton_property_pressed: diff --git a/classes/class_inputeventmousemotion.rst b/classes/class_inputeventmousemotion.rst index 01a2535b8..3e88fc2a7 100644 --- a/classes/class_inputeventmousemotion.rst +++ b/classes/class_inputeventmousemotion.rst @@ -48,7 +48,7 @@ Property Descriptions | *Getter* | get_relative() | +----------+---------------------+ -Mouse position relative to the previous position (position at the last frame). +The mouse position relative to the previous position (position at the last frame). .. _class_InputEventMouseMotion_property_speed: @@ -60,5 +60,5 @@ Mouse position relative to the previous position (position at the last frame). | *Getter* | get_speed() | +----------+------------------+ -Mouse speed. +The mouse speed in pixels per second. diff --git a/classes/class_inputeventscreendrag.rst b/classes/class_inputeventscreendrag.rst index 459ee5140..df54aaecb 100644 --- a/classes/class_inputeventscreendrag.rst +++ b/classes/class_inputeventscreendrag.rst @@ -14,9 +14,7 @@ InputEventScreenDrag Brief Description ----------------- -Input event type for screen drag events. - -(only available on mobile devices) +Input event type for screen drag events. Only available on mobile devices. Properties ---------- @@ -54,7 +52,7 @@ Property Descriptions | *Getter* | get_index() | +----------+------------------+ -Drag event index in the case of a multi-drag event. +The drag event index in the case of a multi-drag event. .. _class_InputEventScreenDrag_property_position: @@ -66,7 +64,7 @@ Drag event index in the case of a multi-drag event. | *Getter* | get_position() | +----------+---------------------+ -Drag position. +The drag position. .. _class_InputEventScreenDrag_property_relative: @@ -78,7 +76,7 @@ Drag position. | *Getter* | get_relative() | +----------+---------------------+ -Drag position relative to its start position. +The drag position relative to its start position. .. _class_InputEventScreenDrag_property_speed: @@ -90,5 +88,5 @@ Drag position relative to its start position. | *Getter* | get_speed() | +----------+------------------+ -Drag speed. +The drag speed. diff --git a/classes/class_inputeventscreentouch.rst b/classes/class_inputeventscreentouch.rst index 3cfcbcb07..23abeb4fe 100644 --- a/classes/class_inputeventscreentouch.rst +++ b/classes/class_inputeventscreentouch.rst @@ -52,7 +52,7 @@ Property Descriptions | *Getter* | get_index() | +----------+------------------+ -Touch index in the case of a multi-touch event. One index = one finger. +The touch index in the case of a multi-touch event. One index = one finger. .. _class_InputEventScreenTouch_property_position: @@ -64,7 +64,7 @@ Touch index in the case of a multi-touch event. One index = one finger. | *Getter* | get_position() | +----------+---------------------+ -Touch position. +The touch position. .. _class_InputEventScreenTouch_property_pressed: diff --git a/classes/class_inputeventwithmodifiers.rst b/classes/class_inputeventwithmodifiers.rst index 90a41863e..de5fae86b 100644 --- a/classes/class_inputeventwithmodifiers.rst +++ b/classes/class_inputeventwithmodifiers.rst @@ -36,7 +36,7 @@ Properties Description ----------- -Contains keys events information with modifiers support like ``SHIFT`` or ``ALT``. See :ref:`Node._input`. +Contains keys events information with modifiers support like ``Shift`` or ``Alt``. See :ref:`Node._input`. Tutorials --------- @@ -56,7 +56,7 @@ Property Descriptions | *Getter* | get_alt() | +----------+----------------+ -State of the Alt modifier. +State of the ``Alt`` modifier. .. _class_InputEventWithModifiers_property_command: @@ -68,7 +68,7 @@ State of the Alt modifier. | *Getter* | get_command() | +----------+--------------------+ -State of the Command modifier. +State of the ``Command`` modifier. .. _class_InputEventWithModifiers_property_control: @@ -80,7 +80,7 @@ State of the Command modifier. | *Getter* | get_control() | +----------+--------------------+ -State of the Ctrl modifier. +State of the ``Ctrl`` modifier. .. _class_InputEventWithModifiers_property_meta: @@ -92,7 +92,7 @@ State of the Ctrl modifier. | *Getter* | get_metakey() | +----------+--------------------+ -State of the Meta modifier. +State of the ``Meta`` modifier. .. _class_InputEventWithModifiers_property_shift: @@ -104,5 +104,5 @@ State of the Meta modifier. | *Getter* | get_shift() | +----------+------------------+ -State of the Shift modifier. +State of the ``Shift`` modifier. diff --git a/classes/class_inputmap.rst b/classes/class_inputmap.rst index aa0347bd5..ae73a2693 100644 --- a/classes/class_inputmap.rst +++ b/classes/class_inputmap.rst @@ -48,7 +48,7 @@ Methods Description ----------- -Manages all :ref:`InputEventAction` which can be created/modified from the project settings menu ``Project > Project Settings > Input Map`` or in code with :ref:`add_action` and :ref:`action_add_event`. See :ref:`Node._input`. +Manages all :ref:`InputEventAction` which can be created/modified from the project settings menu **Project > Project Settings > Input Map** or in code with :ref:`add_action` and :ref:`action_add_event`. See :ref:`Node._input`. Tutorials --------- diff --git a/classes/class_instanceplaceholder.rst b/classes/class_instanceplaceholder.rst index c7807f339..a99238d69 100644 --- a/classes/class_instanceplaceholder.rst +++ b/classes/class_instanceplaceholder.rst @@ -47,7 +47,7 @@ Method Descriptions - :ref:`String` **get_instance_path** **(** **)** const -Retrieve the path to the :ref:`PackedScene` resource file that is loaded by default when calling :ref:`replace_by_instance`. +Gets the path to the :ref:`PackedScene` resource file that is loaded by default when calling :ref:`replace_by_instance`. .. _class_InstancePlaceholder_method_get_stored_values: @@ -57,5 +57,5 @@ Retrieve the path to the :ref:`PackedScene` resource file tha - void **replace_by_instance** **(** :ref:`PackedScene` custom_scene=null **)** -Replace this placeholder by the scene handed as an argument, or the original scene if no argument is given. As for all resources, the scene is loaded only if it's not loaded already. By manually loading the scene beforehand, delays caused by this function can be avoided. +Replaces this placeholder by the scene handed as an argument, or the original scene if no argument is given. As for all resources, the scene is loaded only if it's not loaded already. By manually loading the scene beforehand, delays caused by this function can be avoided. diff --git a/classes/class_ip.rst b/classes/class_ip.rst index 2e2fdd270..846b2af73 100644 --- a/classes/class_ip.rst +++ b/classes/class_ip.rst @@ -16,7 +16,7 @@ IP Brief Description ----------------- -Internet protocol (IP) support functions like DNS resolution. +Internet protocol (IP) support functions such as DNS resolution. Methods ------- @@ -89,9 +89,9 @@ Constants .. _class_IP_constant_RESOLVER_INVALID_ID: -- **RESOLVER_MAX_QUERIES** = **32** --- Maximum number of concurrent DNS resolver queries allowed, ``RESOLVER_INVALID_ID`` is returned if exceeded. +- **RESOLVER_MAX_QUERIES** = **32** --- Maximum number of concurrent DNS resolver queries allowed, :ref:`RESOLVER_INVALID_ID` is returned if exceeded. -- **RESOLVER_INVALID_ID** = **-1** --- Invalid ID constant. Returned if ``RESOLVER_MAX_QUERIES`` is exceeded. +- **RESOLVER_INVALID_ID** = **-1** --- Invalid ID constant. Returned if :ref:`RESOLVER_MAX_QUERIES` is exceeded. Description ----------- @@ -105,13 +105,13 @@ Method Descriptions - void **clear_cache** **(** :ref:`String` hostname="" **)** -Removes all of a "hostname"'s cached references. If no "hostname" is given then all cached IP addresses are removed. +Removes all of a ``hostname``'s cached references. If no ``hostname`` is given, all cached IP addresses are removed. .. _class_IP_method_erase_resolve_item: - void **erase_resolve_item** **(** :ref:`int` id **)** -Removes a given item "id" from the queue. This should be used to free a queue after it has completed to enable more queries to happen. +Removes a given item ``id`` from the queue. This should be used to free a queue after it has completed to enable more queries to happen. .. _class_IP_method_get_local_addresses: @@ -140,23 +140,23 @@ Each adapter is a dictionary of the form: - :ref:`String` **get_resolve_item_address** **(** :ref:`int` id **)** const -Returns a queued hostname's IP address, given its queue "id". Returns an empty string on error or if resolution hasn't happened yet (see :ref:`get_resolve_item_status`). +Returns a queued hostname's IP address, given its queue ``id``. Returns an empty string on error or if resolution hasn't happened yet (see :ref:`get_resolve_item_status`). .. _class_IP_method_get_resolve_item_status: - :ref:`ResolverStatus` **get_resolve_item_status** **(** :ref:`int` id **)** const -Returns a queued hostname's status as a RESOLVER_STATUS\_\* constant, given its queue "id". +Returns a queued hostname's status as a ``RESOLVER_STATUS_*`` constant, given its queue ``id``. .. _class_IP_method_resolve_hostname: - :ref:`String` **resolve_hostname** **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** -Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the TYPE\_\* constant given as "ip_type". +Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the ``TYPE_*`` constant given as ``ip_type``. .. _class_IP_method_resolve_hostname_queue_item: - :ref:`int` **resolve_hostname_queue_item** **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** -Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the TYPE\_\* constant given as "ip_type". Returns the queue ID if successful, or RESOLVER_INVALID_ID on error. +Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the ``TYPE_*`` constant given as ``ip_type``. Returns the queue ID if successful, or :ref:`RESOLVER_INVALID_ID` on error. diff --git a/classes/class_ip_unix.rst b/classes/class_ip_unix.rst index ad8cb5f97..4628f4b80 100644 --- a/classes/class_ip_unix.rst +++ b/classes/class_ip_unix.rst @@ -14,10 +14,10 @@ IP_Unix Brief Description ----------------- -Unix IP support. See :ref:`IP`. +UNIX IP support. See :ref:`IP`. Description ----------- -Unix-specific implementation of IP support functions. See :ref:`IP`. +UNIX-specific implementation of IP support functions. See :ref:`IP`. diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index 031c8648c..8b7e1d8ad 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -168,7 +168,7 @@ Signals - **item_activated** **(** :ref:`int` index **)** -Triggered when specified list item is activated via double click or Enter. +Triggered when specified list item is activated via double-clicking or by pressing Enter. .. _class_ItemList_signal_item_rmb_selected: @@ -176,9 +176,7 @@ Triggered when specified list item is activated via double click or Enter. Triggered when specified list item has been selected via right mouse clicking. -The click position is also provided to allow appropriate popup of context menus - -at the correct location. +The click position is also provided to allow appropriate popup of context menus at the correct location. :ref:`allow_rmb_select` must be enabled. @@ -233,16 +231,16 @@ enum **IconMode**: enum **SelectMode**: -- **SELECT_SINGLE** = **0** +- **SELECT_SINGLE** = **0** --- Only allow selecting a single item. -- **SELECT_MULTI** = **1** +- **SELECT_MULTI** = **1** --- Allows selecting multiple items by holding Ctrl or Shift. Description ----------- This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons, or both text and icon. Tooltips are supported and may be different for every item in the list. -Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be 'activated' with a double click (or Enter key). +Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be "activated" by double-clicking them or by pressing Enter. Property Descriptions --------------------- @@ -293,9 +291,7 @@ If ``true``, the control will automatically resize the height to fit its content | *Getter* | get_fixed_column_width() | +----------+-------------------------------+ -Sets the default column width in pixels. - -If left to default value, each item will have a width equal to the width of its content and the columns will have an uneven width. +Sets the default column width in pixels. If left to default value, each item will have a width equal to the width of its content and the columns will have an uneven width. .. _class_ItemList_property_fixed_icon_size: @@ -343,9 +339,7 @@ Sets the icon size to its initial size multiplied by the specified scale. Defaul | *Getter* | get_max_columns() | +----------+------------------------+ -Sets the maximum columns the list will have. - -If set to anything other than the default, the content will be split among the specified columns. +Sets the maximum columns the list will have. If set to anything other than the default, the content will be split among the specified columns. .. _class_ItemList_property_max_text_lines: @@ -379,7 +373,7 @@ If set to ``true``, all columns will have the same width specified by :ref:`fixe | *Getter* | get_select_mode() | +----------+------------------------+ -Allow single or multiple item selection. See the :ref:`SelectMode` constants. +Allows single or multiple item selection. See the :ref:`SelectMode` constants. Method Descriptions ------------------- @@ -394,15 +388,15 @@ Adds an item to the item list with no text, only an icon. - void **add_item** **(** :ref:`String` text, :ref:`Texture` icon=null, :ref:`bool` selectable=true **)** -Adds an item to the item list with specified text. Specify an icon of null for a list item with no icon. +Adds an item to the item list with specified text. Specify an ``icon``, or use ``null`` as the ``icon`` for a list item with no icon. -If selectable is ``true`` the list item will be selectable. +If selectable is ``true``, the list item will be selectable. .. _class_ItemList_method_clear: - void **clear** **(** **)** -Remove all items from the list. +Removes all items from the list. .. _class_ItemList_method_ensure_current_is_visible: @@ -438,7 +432,7 @@ Returns the custom foreground color of the item specified by ``idx`` index. Defa - :ref:`Texture` **get_item_icon** **(** :ref:`int` idx **)** const -Returns the icon associated with the specified index. Default value is ``null`` +Returns the icon associated with the specified index. Default value is ``null``. .. _class_ItemList_method_get_item_icon_modulate: @@ -490,7 +484,7 @@ Returns ``true`` if one or more items are selected. - :ref:`bool` **is_item_disabled** **(** :ref:`int` idx **)** const -Returns whether or not the item at the specified index is disabled. +Returns ``true`` if the item at the specified index is disabled. .. _class_ItemList_method_is_item_icon_transposed: @@ -500,19 +494,19 @@ Returns whether or not the item at the specified index is disabled. - :ref:`bool` **is_item_selectable** **(** :ref:`int` idx **)** const -Returns whether or not the item at the specified index is selectable. +Returns ``true`` if the item at the specified index is selectable. .. _class_ItemList_method_is_item_tooltip_enabled: - :ref:`bool` **is_item_tooltip_enabled** **(** :ref:`int` idx **)** const -Returns whether the tooltip is enabled for specified item index. +Returns ``true`` if the tooltip is enabled for specified item index. .. _class_ItemList_method_is_selected: - :ref:`bool` **is_selected** **(** :ref:`int` idx **)** const -Returns whether or not item at the specified index is currently selected. +Returns ``true`` if the item at the specified index is currently selected. .. _class_ItemList_method_move_item: @@ -532,7 +526,7 @@ Removes the item specified by ``idx`` index from the list. Select the item at the specified index. -Note: This method does not trigger the item selection signal. +**Note:** This method does not trigger the item selection signal. .. _class_ItemList_method_set_item_custom_bg_color: @@ -560,15 +554,15 @@ Sets the foreground color of the item specified by ``idx`` index to the specifie - void **set_item_disabled** **(** :ref:`int` idx, :ref:`bool` disabled **)** -Disable (or enable) item at the specified index. +Disables (or enables) the item at the specified index. -Disabled items are not be selectable and do not trigger activation (Enter or double-click) signals. +Disabled items cannot be selected and do not trigger activation signals (when double-clicking or pressing Enter). .. _class_ItemList_method_set_item_icon: - void **set_item_icon** **(** :ref:`int` idx, :ref:`Texture` icon **)** -Set (or replace) the icon's :ref:`Texture` associated with the specified index. +Sets (or replaces) the icon's :ref:`Texture` associated with the specified index. .. _class_ItemList_method_set_item_icon_modulate: @@ -594,7 +588,7 @@ Sets a value (of any type) to be stored with the item associated with the specif - void **set_item_selectable** **(** :ref:`int` idx, :ref:`bool` selectable **)** -Allow or disallow selection of the item associated with the specified index. +Allows or disallows selection of the item associated with the specified index. .. _class_ItemList_method_set_item_text: @@ -606,7 +600,7 @@ Sets text of the item associated with the specified index. - void **set_item_tooltip** **(** :ref:`int` idx, :ref:`String` tooltip **)** -Sets tooltip hint for the item associated with the specified index. +Sets the tooltip hint for the item associated with the specified index. .. _class_ItemList_method_set_item_tooltip_enabled: @@ -624,11 +618,11 @@ Sorts items in the list by their text. - void **unselect** **(** :ref:`int` idx **)** -Ensure the item associated with the specified index is not selected. +Ensures the item associated with the specified index is not selected. .. _class_ItemList_method_unselect_all: - void **unselect_all** **(** **)** -Ensure there are no items selected. +Ensures there are no items selected. diff --git a/classes/class_javascript.rst b/classes/class_javascript.rst index 568bd8955..42715338d 100644 --- a/classes/class_javascript.rst +++ b/classes/class_javascript.rst @@ -26,7 +26,7 @@ Methods Description ----------- -The JavaScript singleton is implemented only in HTML5 export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs. +The JavaScript singleton is implemented only in the HTML5 export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs. Tutorials --------- diff --git a/classes/class_joint.rst b/classes/class_joint.rst index 491150b59..5696d2bb5 100644 --- a/classes/class_joint.rst +++ b/classes/class_joint.rst @@ -16,7 +16,7 @@ Joint Brief Description ----------------- -Base class for all 3D joints +Base class for all 3D joints. Properties ---------- diff --git a/classes/class_joint2d.rst b/classes/class_joint2d.rst index b815cbcbb..2a0337b3d 100644 --- a/classes/class_joint2d.rst +++ b/classes/class_joint2d.rst @@ -49,7 +49,7 @@ Property Descriptions | *Getter* | get_bias() | +----------+-----------------+ -When :ref:`node_a` and :ref:`node_b` move in different directions the ``bias`` controls how fast the joint pulls them back to their original position. The lower the ``bias`` the more the two bodies can pull on the joint. Default value: ``0`` +When :ref:`node_a` and :ref:`node_b` move in different directions the ``bias`` controls how fast the joint pulls them back to their original position. The lower the ``bias`` the more the two bodies can pull on the joint. Default value: ``0``. .. _class_Joint2D_property_disable_collision: diff --git a/classes/class_json.rst b/classes/class_json.rst index 105f62489..b96edce7e 100644 --- a/classes/class_json.rst +++ b/classes/class_json.rst @@ -43,5 +43,5 @@ Parses a JSON encoded string and returns a :ref:`JSONParseResult` **print** **(** :ref:`Variant` value, :ref:`String` indent="", :ref:`bool` sort_keys=false **)** -Converts a Variant var to JSON text and returns the result. Useful for serializing data to store or send over the network. +Converts a :ref:`Variant` var to JSON text and returns the result. Useful for serializing data to store or send over the network. diff --git a/classes/class_jsonparseresult.rst b/classes/class_jsonparseresult.rst index e14d22251..f362c29bb 100644 --- a/classes/class_jsonparseresult.rst +++ b/classes/class_jsonparseresult.rst @@ -32,7 +32,7 @@ Properties Description ----------- -Returned by :ref:`JSON.parse`, ``JSONParseResult`` contains decoded JSON or error information if JSON source not successfully parsed. You can check if JSON source was successfully parsed with ``if json_result.error == OK``. +Returned by :ref:`JSON.parse`, ``JSONParseResult`` contains the decoded JSON or error information if the JSON source wasn't successfully parsed. You can check if the JSON source was successfully parsed with ``if json_result.error == OK``. Property Descriptions --------------------- @@ -47,7 +47,7 @@ Property Descriptions | *Getter* | get_error() | +----------+------------------+ -The error type if JSON source was not successfully parsed. See :ref:`@GlobalScope` ERR\_\* constants. +The error type if the JSON source was not successfully parsed. See the :ref:`@GlobalScope` ``ERR_*`` constants. .. _class_JSONParseResult_property_error_line: @@ -71,7 +71,7 @@ The line number where the error occurred if JSON source was not successfully par | *Getter* | get_error_string() | +----------+-------------------------+ -The error message if JSON source was not successfully parsed. See :ref:`@GlobalScope` ERR\_\* constants. +The error message if JSON source was not successfully parsed. See the :ref:`@GlobalScope` ``ERR_*`` constants. .. _class_JSONParseResult_property_result: @@ -83,17 +83,17 @@ The error message if JSON source was not successfully parsed. See :ref:`@GlobalS | *Getter* | get_result() | +----------+-------------------+ -A :ref:`Variant` containing the parsed JSON. Use typeof() to check if it is what you expect. For example, if JSON source starts with curly braces (``{}``) a :ref:`Dictionary` will be returned, if JSON source starts with braces (``[]``) an :ref:`Array` will be returned. +A :ref:`Variant` containing the parsed JSON. Use :ref:`@GDScript.typeof` or the ``is`` keyword to check if it is what you expect. For example, if the JSON source starts with curly braces (``{}``), a :ref:`Dictionary` will be returned. If the JSON source starts with braces (``[]``), an :ref:`Array` will be returned. -*Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to float types.* +**Note:** The JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to float types. -Note that JSON objects do not preserve key order like Godot dictionaries, thus you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements:* +**Note:** JSON objects do not preserve key order like Godot dictionaries, thus, you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements: :: var p = JSON.parse('["hello", "world", "!"]') if typeof(p.result) == TYPE_ARRAY: - print(p.result[0]) # prints 'hello' + print(p.result[0]) # Prints "hello" else: print("unexpected results") diff --git a/classes/class_kinematicbody.rst b/classes/class_kinematicbody.rst index d2f46be4a..3247f7288 100644 --- a/classes/class_kinematicbody.rst +++ b/classes/class_kinematicbody.rst @@ -57,11 +57,11 @@ Methods Description ----------- -Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses: +Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: -Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). +**Simulated motion:** When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). -Kinematic Characters: KinematicBody also has an API for moving objects (the :ref:`move_and_collide` and :ref:`move_and_slide` methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. +**Kinematic characters:** KinematicBody also has an API for moving objects (the :ref:`move_and_collide` and :ref:`move_and_slide` methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. Tutorials --------- @@ -93,7 +93,7 @@ If the body is at least this close to another body, this body will consider them | *Getter* | get_axis_lock() | +----------+----------------------+ -Lock the body's movement in the x-axis. +Lock the body's X axis movement. .. _class_KinematicBody_property_move_lock_y: @@ -105,7 +105,7 @@ Lock the body's movement in the x-axis. | *Getter* | get_axis_lock() | +----------+----------------------+ -Lock the body's movement in the y-axis. +Lock the body's Y axis movement. .. _class_KinematicBody_property_move_lock_z: @@ -117,7 +117,7 @@ Lock the body's movement in the y-axis. | *Getter* | get_axis_lock() | +----------+----------------------+ -Lock the body's movement in the z-axis. +Lock the body's Z axis movement. Method Descriptions ------------------- @@ -182,7 +182,7 @@ If the body collides, it will change direction a maximum of ``max_slides`` times ``floor_max_angle`` is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. -If ``infinite_inertia`` is ``true``, body will be able to push :ref:`RigidBody` nodes, but it won't also detect any collisions with them. If ``false`` it will interact with :ref:`RigidBody` nodes like with :ref:`StaticBody`. +If ``infinite_inertia`` is ``true``, body will be able to push :ref:`RigidBody` nodes, but it won't also detect any collisions with them. If ``false``, it will interact with :ref:`RigidBody` nodes like with :ref:`StaticBody`. Returns the ``linear_velocity`` vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use :ref:`get_slide_collision`. diff --git a/classes/class_kinematicbody2d.rst b/classes/class_kinematicbody2d.rst index 1dfed4080..b4c99550d 100644 --- a/classes/class_kinematicbody2d.rst +++ b/classes/class_kinematicbody2d.rst @@ -53,11 +53,11 @@ Methods Description ----------- -Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses: +Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: -Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). +**Simulated motion:** When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). -Kinematic Characters: KinematicBody2D also has an API for moving objects (the :ref:`move_and_collide` and :ref:`move_and_slide` methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. +**Kinematic characters:** KinematicBody2D also has an API for moving objects (the :ref:`move_and_collide` and :ref:`move_and_slide` methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. Tutorials --------- @@ -108,7 +108,7 @@ Returns the velocity of the floor. Only updates when calling :ref:`move_and_slid Returns a :ref:`KinematicCollision2D`, which contains information about a collision that occurred during the last :ref:`move_and_slide` call. Since the body can collide several times in a single call to :ref:`move_and_slide`, you must specify the index of the collision in the range 0 to (:ref:`get_slide_count` - 1). -Example usage: +**Example usage:** :: @@ -162,7 +162,7 @@ If the body collides, it will change direction a maximum of ``max_slides`` times ``floor_max_angle`` is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. -If ``infinite_inertia`` is ``true``, body will be able to push :ref:`RigidBody2D` nodes, but it won't also detect any collisions with them. If ``false`` it will interact with :ref:`RigidBody2D` nodes like with :ref:`StaticBody2D`. +If ``infinite_inertia`` is ``true``, body will be able to push :ref:`RigidBody2D` nodes, but it won't also detect any collisions with them. If ``false``, it will interact with :ref:`RigidBody2D` nodes like with :ref:`StaticBody2D`. Returns the ``linear_velocity`` vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use :ref:`get_slide_collision`. diff --git a/classes/class_kinematiccollision.rst b/classes/class_kinematiccollision.rst index 28fc24e32..b810a8905 100644 --- a/classes/class_kinematiccollision.rst +++ b/classes/class_kinematiccollision.rst @@ -14,7 +14,7 @@ KinematicCollision Brief Description ----------------- -Collision data for KinematicBody collisions. +Collision data for :ref:`KinematicBody` collisions. Properties ---------- @@ -46,7 +46,7 @@ Properties Description ----------- -Contains collision data for KinematicBody collisions. When a :ref:`KinematicBody` is moved using :ref:`KinematicBody.move_and_collide`, it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision object is returned. +Contains collision data for :ref:`KinematicBody` collisions. When a :ref:`KinematicBody` is moved using :ref:`KinematicBody.move_and_collide`, it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision object is returned. This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. diff --git a/classes/class_kinematiccollision2d.rst b/classes/class_kinematiccollision2d.rst index d92814c15..fa5ae57ef 100644 --- a/classes/class_kinematiccollision2d.rst +++ b/classes/class_kinematiccollision2d.rst @@ -14,7 +14,7 @@ KinematicCollision2D Brief Description ----------------- -Collision data for KinematicBody2D collisions. +Collision data for :ref:`KinematicBody2D` collisions. Properties ---------- @@ -46,7 +46,7 @@ Properties Description ----------- -Contains collision data for KinematicBody2D collisions. When a :ref:`KinematicBody2D` is moved using :ref:`KinematicBody2D.move_and_collide`, it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision2D object is returned. +Contains collision data for :ref:`KinematicBody2D` collisions. When a :ref:`KinematicBody2D` is moved using :ref:`KinematicBody2D.move_and_collide`, it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision2D object is returned. This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. diff --git a/classes/class_label.rst b/classes/class_label.rst index 47cb19715..066f7d3ed 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -96,7 +96,7 @@ enum **Align**: - **ALIGN_CENTER** = **1** --- Align rows centered. -- **ALIGN_RIGHT** = **2** --- Align rows to the right (default). +- **ALIGN_RIGHT** = **2** --- Align rows to the right. - **ALIGN_FILL** = **3** --- Expand row whitespaces to fit the width. @@ -125,7 +125,7 @@ Description Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment, and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics or other formatting. For that, use :ref:`RichTextLabel` instead. -Note that contrarily to most other :ref:`Control`\ s, Label's :ref:`Control.mouse_filter` defaults to MOUSE_FILTER_IGNORE (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured :ref:`Control.hint_tooltip`, unless you change its mouse filter. +**Note:** Contrarily to most other :ref:`Control`\ s, Label's :ref:`Control.mouse_filter` defaults to :ref:`Control.MOUSE_FILTER_IGNORE` (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured :ref:`Control.hint_tooltip`, unless you change its mouse filter. Property Descriptions --------------------- @@ -275,5 +275,5 @@ Returns the total number of printable characters in the text (excluding spaces a - :ref:`int` **get_visible_line_count** **(** **)** const -Returns the number of lines shown. Useful if the ``Label`` 's height cannot currently display all lines. +Returns the number of lines shown. Useful if the ``Label``'s height cannot currently display all lines. diff --git a/classes/class_largetexture.rst b/classes/class_largetexture.rst index 36050cd5a..9dfb0c073 100644 --- a/classes/class_largetexture.rst +++ b/classes/class_largetexture.rst @@ -14,7 +14,7 @@ LargeTexture Brief Description ----------------- -A Texture capable of storing many smaller Textures with offsets. +A :ref:`Texture` capable of storing many smaller textures with offsets. Methods ------- @@ -40,9 +40,9 @@ Methods Description ----------- -A Texture capable of storing many smaller Textures with offsets. +A :ref:`Texture` capable of storing many smaller textures with offsets. -You can dynamically add pieces(:ref:`Texture`) to this ``LargeTexture`` using different offsets. +You can dynamically add pieces (:ref:`Texture`\ s) to this ``LargeTexture`` using different offsets. Method Descriptions ------------------- @@ -51,7 +51,7 @@ Method Descriptions - :ref:`int` **add_piece** **(** :ref:`Vector2` ofs, :ref:`Texture` texture **)** -Add another :ref:`Texture` to this ``LargeTexture``, starting on offset "ofs". +Adds ``texture`` to this ``LargeTexture``, starting on offset ``ofs``. .. _class_LargeTexture_method_clear: @@ -69,25 +69,25 @@ Returns the number of pieces currently in this ``LargeTexture``. - :ref:`Vector2` **get_piece_offset** **(** :ref:`int` idx **)** const -Returns the offset of the piece with index "idx". +Returns the offset of the piece with the index ``idx``. .. _class_LargeTexture_method_get_piece_texture: - :ref:`Texture` **get_piece_texture** **(** :ref:`int` idx **)** const -Returns the :ref:`Texture` of the piece with index "idx". +Returns the :ref:`Texture` of the piece with the index ``idx``. .. _class_LargeTexture_method_set_piece_offset: - void **set_piece_offset** **(** :ref:`int` idx, :ref:`Vector2` ofs **)** -Sets the offset of the piece with index "idx" to "ofs". +Sets the offset of the piece with the index ``idx`` to ``ofs``. .. _class_LargeTexture_method_set_piece_texture: - void **set_piece_texture** **(** :ref:`int` idx, :ref:`Texture` texture **)** -Sets the :ref:`Texture` of the piece with index "idx" to "texture". +Sets the :ref:`Texture` of the piece with index ``idx`` to ``texture``. .. _class_LargeTexture_method_set_size: diff --git a/classes/class_light.rst b/classes/class_light.rst index be23253ff..9d343a151 100644 --- a/classes/class_light.rst +++ b/classes/class_light.rst @@ -118,7 +118,7 @@ enum **Param**: - **PARAM_SHADOW_BIAS_SPLIT_SCALE** = **14** -- **PARAM_MAX** = **15** +- **PARAM_MAX** = **15** --- Represents the size of the :ref:`Param` enum. .. _enum_Light_BakeMode: @@ -130,16 +130,20 @@ enum **Param**: enum **BakeMode**: -- **BAKE_DISABLED** = **0** --- Light is ignored when baking. Note: hiding a light does *not* affect baking. +- **BAKE_DISABLED** = **0** --- Light is ignored when baking. -- **BAKE_INDIRECT** = **1** --- Only indirect lighting will be baked. Default value. +**Note:** Hiding a light does *not* affect baking. -- **BAKE_ALL** = **2** --- Both direct and indirect light will be baked. Note: you should hide the light if you don't want it to appear twice (dynamic and baked). +- **BAKE_INDIRECT** = **1** --- Only indirect lighting will be baked (default). + +- **BAKE_ALL** = **2** --- Both direct and indirect light will be baked. + +**Note:** You should hide the light if you don't want it to appear twice (dynamic and baked). Description ----------- -Light is the abstract base class for light nodes, so it shouldn't be used directly (It can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting. +Light is the abstract base class for light nodes, so it shouldn't be used directly (it can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting. Tutorials --------- @@ -159,7 +163,7 @@ Property Descriptions | *Getter* | is_editor_only() | +----------+------------------------+ -If ``true``, the light only appears in the editor and will not be visible at runtime. Default value:``false``. +If ``true``, the light only appears in the editor and will not be visible at runtime. Default value: ``false``. .. _class_Light_property_light_bake_mode: @@ -219,7 +223,7 @@ The light's strength multiplier. | *Getter* | get_param() | +----------+------------------+ -Secondary multiplier used with indirect light (light bounces). This works in baked light or GIProbe. +Secondary multiplier used with indirect light (light bounces). This works on both :ref:`BakedLightmap` and :ref:`GIProbe`. .. _class_Light_property_light_negative: @@ -255,7 +259,7 @@ The intensity of the specular blob in objects affected by the light. At ``0`` th | *Getter* | get_param() | +----------+------------------+ -Used to adjust shadow appearance. Too small a value results in self shadowing, while too large a value causes shadows to separate from casters. Adjust as needed. +Used to adjust shadow appearance. Too small a value results in self-shadowing, while too large a value causes shadows to separate from casters. Adjust as needed. .. _class_Light_property_shadow_color: diff --git a/classes/class_light2d.rst b/classes/class_light2d.rst index 5888614db..29b2ca305 100644 --- a/classes/class_light2d.rst +++ b/classes/class_light2d.rst @@ -78,7 +78,7 @@ Enumerations enum **Mode**: -- **MODE_ADD** = **0** --- Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behaviour of a light. +- **MODE_ADD** = **0** --- Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behavior of a light. - **MODE_SUB** = **1** --- Subtracts the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect. @@ -117,7 +117,9 @@ enum **ShadowFilter**: Description ----------- -Casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note that Light2D can be used as a mask. +Casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). + +**Note:** Light2D can also be used as a mask. Tutorials --------- @@ -185,7 +187,7 @@ The Light2D's energy value. The larger the value, the stronger the light. | *Getter* | get_mode() | +----------+-----------------+ -The Light2D's mode. See MODE\_\* constants for values. +The Light2D's mode. See ``MODE_*`` constants for values. .. _class_Light2D_property_offset: @@ -257,7 +259,7 @@ Minimum layer value of objects that are affected by the Light2D. Default value: | *Getter* | get_z_range_max() | +----------+------------------------+ -Maximum ``Z`` value of objects that are affected by the Light2D. Default value: ``1024``. +Maximum ``z`` value of objects that are affected by the Light2D. Default value: ``1024``. .. _class_Light2D_property_range_z_min: @@ -317,7 +319,7 @@ If ``true``, the Light2D will cast shadows. Default value: ``false``. | *Getter* | get_shadow_filter() | +----------+--------------------------+ -Shadow filter type. Use :ref:`ShadowFilter` constants as values. Default value: ``SHADOW_FILTER_NONE``. +Shadow filter type. See :ref:`ShadowFilter` for possible values. Default value: :ref:`SHADOW_FILTER_NONE`. .. _class_Light2D_property_shadow_filter_smooth: diff --git a/classes/class_line2d.rst b/classes/class_line2d.rst index b168968cf..67af954d0 100644 --- a/classes/class_line2d.rst +++ b/classes/class_line2d.rst @@ -89,7 +89,7 @@ enum **LineJointMode**: enum **LineCapMode**: -- **LINE_CAP_NONE** = **0** --- Don't have a line cap. +- **LINE_CAP_NONE** = **0** --- Don't draw a line cap. - **LINE_CAP_BOX** = **1** --- Draws the line cap as a box. @@ -107,9 +107,9 @@ enum **LineTextureMode**: - **LINE_TEXTURE_NONE** = **0** --- Takes the left pixels of the texture and renders it over the whole line. -- **LINE_TEXTURE_TILE** = **1** --- Tiles the texture over the line. The texture need to be imported with Repeat Enabled for it to work properly. +- **LINE_TEXTURE_TILE** = **1** --- Tiles the texture over the line. The texture must be imported with **Repeat** enabled for it to work properly. -- **LINE_TEXTURE_STRETCH** = **2** --- Stretches the texture across the line. Import the texture with Repeat Disabled for best results. +- **LINE_TEXTURE_STRETCH** = **2** --- Stretches the texture across the line. Import the texture with **Repeat** disabled for best results. Description ----------- @@ -129,7 +129,7 @@ Property Descriptions | *Getter* | get_begin_cap_mode() | +----------+---------------------------+ -Controls the style of the line's first point. Use ``LINE_CAP_*`` constants. Default value: ``LINE_CAP_NONE``. +Controls the style of the line's first point. Use ``LINE_CAP_*`` constants. Default value: :ref:`LINE_CAP_NONE`. .. _class_Line2D_property_default_color: @@ -153,7 +153,7 @@ The line's color. Will not be used if a gradient is set. | *Getter* | get_end_cap_mode() | +----------+-------------------------+ -Controls the style of the line's last point. Use ``LINE_CAP_*`` constants. Default value: ``LINE_CAP_NONE``. +Controls the style of the line's last point. Use ``LINE_CAP_*`` constants. Default value: :ref:`LINE_CAP_NONE`. .. _class_Line2D_property_gradient: @@ -213,7 +213,7 @@ The smoothness of the rounded joints and caps. This is only used if a cap or joi | *Getter* | get_sharp_limit() | +----------+------------------------+ -The direction difference in radians between vector points. This value is only used if ``joint mode`` is set to ``LINE_JOINT_SHARP``. +The direction difference in radians between vector points. This value is only used if ``joint mode`` is set to :ref:`LINE_JOINT_SHARP`. .. _class_Line2D_property_texture: @@ -237,7 +237,7 @@ The texture used for the line's texture. Uses ``texture_mode`` for drawing style | *Getter* | get_texture_mode() | +----------+-------------------------+ -The style to render the ``texture`` on the line. Use ``LINE_TEXTURE_*`` constants. Default value: ``LINE_TEXTURE_NONE``. +The style to render the ``texture`` on the line. Use ``LINE_TEXTURE_*`` constants. Default value: :ref:`LINE_TEXTURE_NONE`. .. _class_Line2D_property_width: @@ -258,7 +258,7 @@ Method Descriptions - void **add_point** **(** :ref:`Vector2` position, :ref:`int` at_position=-1 **)** -Add a point at the ``position``. Appends the point at the end of the line. +Adds a point at the ``position``. Appends the point at the end of the line. If ``at_position`` is given, the point is inserted before the point number ``at_position``, moving that point (and every point after) after the inserted point. If ``at_position`` is not given, or is an illegal value (``at_position < 0`` or ``at_position >= [method get_point_count]``), the point will be appended at the end of the point list. @@ -284,7 +284,7 @@ Returns point ``i``'s position. - void **remove_point** **(** :ref:`int` i **)** -Remove the point at index ``i`` from the line. +Removes the point at index ``i`` from the line. .. _class_Line2D_method_set_point_position: diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index e2cfd4964..e52e63497 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -90,6 +90,8 @@ Theme Properties +---------------------------------+----------------------------+ | :ref:`Color` | font_color_selected | +---------------------------------+----------------------------+ +| :ref:`Color` | font_color_uneditable | ++---------------------------------+----------------------------+ | :ref:`int` | minimum_spaces | +---------------------------------+----------------------------+ | :ref:`StyleBox` | normal | @@ -129,11 +131,11 @@ Enumerations enum **Align**: -- **ALIGN_LEFT** = **0** --- Aligns the text on the left hand side of the ``LineEdit``. +- **ALIGN_LEFT** = **0** --- Aligns the text on the left-hand side of the ``LineEdit``. - **ALIGN_CENTER** = **1** --- Centers the text in the middle of the ``LineEdit``. -- **ALIGN_RIGHT** = **2** --- Aligns the text on the right hand side of the ``LineEdit``. +- **ALIGN_RIGHT** = **2** --- Aligns the text on the right-hand side of the ``LineEdit``. - **ALIGN_FILL** = **3** --- Stretches whitespaces to fit the ``LineEdit``'s width. @@ -173,7 +175,7 @@ Non-printable escape characters are automatically stripped from the OS clipboard - **MENU_REDO** = **6** --- Reverse the last undo action. -- **MENU_MAX** = **7** +- **MENU_MAX** = **7** --- Represents the size of the :ref:`MenuItems` enum. Description ----------- @@ -211,7 +213,7 @@ Property Descriptions | *Getter* | get_align() | +----------+------------------+ -Text alignment as defined in the ALIGN\_\* enum. +Text alignment as defined in the ``ALIGN_*`` enum. .. _class_LineEdit_property_caret_blink: @@ -271,7 +273,7 @@ If ``true``, the ``LineEdit`` will show a clear button if ``text`` is not empty. | *Getter* | is_context_menu_enabled() | +----------+---------------------------------+ -If ``true``, the context menu will appear when right clicked. +If ``true``, the context menu will appear when right-clicked. .. _class_LineEdit_property_editable: @@ -307,7 +309,7 @@ If ``true``, the ``LineEdit`` width will increase to stay longer than the :ref:` | *Getter* | get_focus_mode() | +----------+-----------------------+ -Defines how the ``LineEdit`` can grab focus (Keyboard and mouse, only keyboard, or none). See :ref:`FocusMode` in :ref:`Control` for details. +Defines how the ``LineEdit`` can grab focus (Keyboard and mouse, only keyboard, or none). See :ref:`FocusMode` for details. .. _class_LineEdit_property_max_length: @@ -412,20 +414,20 @@ Returns the :ref:`PopupMenu` of this ``LineEdit``. By default, - void **menu_option** **(** :ref:`int` option **)** -Executes a given action as defined in the MENU\_\* enum. +Executes a given action as defined in the``MENU_*`` enum. .. _class_LineEdit_method_select: - void **select** **(** :ref:`int` from=0, :ref:`int` to=-1 **)** -Selects characters inside ``LineEdit`` between ``from`` and ``to``. By default ``from`` is at the beginning and ``to`` at the end. +Selects characters inside ``LineEdit`` between ``from`` and ``to``. By default, ``from`` is at the beginning and ``to`` at the end. :: text = "Welcome" - select() # Welcome - select(4) # ome - select(2, 5) # lco + select() # Will select "Welcome" + select(4) # Will select "ome" + select(2, 5) # Will select "lco" .. _class_LineEdit_method_select_all: diff --git a/classes/class_lineshape2d.rst b/classes/class_lineshape2d.rst index f842d4d99..7844e9cf3 100644 --- a/classes/class_lineshape2d.rst +++ b/classes/class_lineshape2d.rst @@ -28,7 +28,7 @@ Properties Description ----------- -Line shape for 2D collisions. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame. +Line shape for 2D collisions. It works like a 2D plane and will not allow any physics body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame. Property Descriptions --------------------- diff --git a/classes/class_linkbutton.rst b/classes/class_linkbutton.rst index 8436d7c63..aff0d8d30 100644 --- a/classes/class_linkbutton.rst +++ b/classes/class_linkbutton.rst @@ -55,7 +55,7 @@ Enumerations enum **UnderlineMode**: -- **UNDERLINE_MODE_ALWAYS** = **0** --- The LinkButton will always show an underline at the bottom of its text +- **UNDERLINE_MODE_ALWAYS** = **0** --- The LinkButton will always show an underline at the bottom of its text. - **UNDERLINE_MODE_ON_HOVER** = **1** --- The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it. @@ -64,7 +64,7 @@ enum **UnderlineMode**: Description ----------- -This kind of buttons are primarily used when the interaction with the button causes a context change (like linking to a web page). +This kind of button is primarily used when the interaction with the button causes a context change (like linking to a web page). Property Descriptions --------------------- diff --git a/classes/class_mainloop.rst b/classes/class_mainloop.rst index be448ef29..1f3f65f1d 100644 --- a/classes/class_mainloop.rst +++ b/classes/class_mainloop.rst @@ -16,38 +16,38 @@ MainLoop Brief Description ----------------- -Main loop is the abstract main loop base class. +Abstract base class for the game's main loop. Methods ------- -+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_drop_files` **(** :ref:`PoolStringArray` files, :ref:`int` screen **)** virtual | -+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_finalize` **(** **)** virtual | -+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_idle` **(** :ref:`float` delta **)** virtual | -+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_initialize` **(** **)** virtual | -+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_input_event` **(** :ref:`InputEvent` event **)** virtual | -+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_input_text` **(** :ref:`String` text **)** virtual | -+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_iteration` **(** :ref:`float` delta **)** virtual | -+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`finish` **(** **)** | -+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`idle` **(** :ref:`float` delta **)** | -+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`init` **(** **)** | -+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`input_event` **(** :ref:`InputEvent` event **)** | -+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`input_text` **(** :ref:`String` text **)** | -+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`iteration` **(** :ref:`float` delta **)** | -+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_drop_files` **(** :ref:`PoolStringArray` files, :ref:`int` from_screen **)** virtual | ++-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_finalize` **(** **)** virtual | ++-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_idle` **(** :ref:`float` delta **)** virtual | ++-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_initialize` **(** **)** virtual | ++-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_input_event` **(** :ref:`InputEvent` event **)** virtual | ++-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_input_text` **(** :ref:`String` text **)** virtual | ++-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_iteration` **(** :ref:`float` delta **)** virtual | ++-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`finish` **(** **)** | ++-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`idle` **(** :ref:`float` delta **)** | ++-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`init` **(** **)** | ++-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`input_event` **(** :ref:`InputEvent` event **)** | ++-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`input_text` **(** :ref:`String` text **)** | ++-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`iteration` **(** :ref:`float` delta **)** | ++-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Constants --------- @@ -76,41 +76,102 @@ Constants .. _class_MainLoop_constant_NOTIFICATION_OS_IME_UPDATE: -- **NOTIFICATION_WM_MOUSE_ENTER** = **1002** +- **NOTIFICATION_WM_MOUSE_ENTER** = **1002** --- Notification received from the OS when the mouse enters the game window. -- **NOTIFICATION_WM_MOUSE_EXIT** = **1003** +Implemented on desktop and web platforms. -- **NOTIFICATION_WM_FOCUS_IN** = **1004** +- **NOTIFICATION_WM_MOUSE_EXIT** = **1003** --- Notification received from the OS when the mouse leaves the game window. -- **NOTIFICATION_WM_FOCUS_OUT** = **1005** +Implemented on desktop and web platforms. -- **NOTIFICATION_WM_QUIT_REQUEST** = **1006** +- **NOTIFICATION_WM_FOCUS_IN** = **1004** --- Notification received from the OS when the game window is focused. -- **NOTIFICATION_WM_GO_BACK_REQUEST** = **1007** +Implemented on all platforms. -- **NOTIFICATION_WM_UNFOCUS_REQUEST** = **1008** +- **NOTIFICATION_WM_FOCUS_OUT** = **1005** --- Notification received from the OS when the game window is unfocused. -- **NOTIFICATION_OS_MEMORY_WARNING** = **1009** +Implemented on all platforms. -- **NOTIFICATION_TRANSLATION_CHANGED** = **1010** +- **NOTIFICATION_WM_QUIT_REQUEST** = **1006** --- Notification received from the OS when a quit request is sent (e.g. closing the window with a "Close" button or Alt+F4). -- **NOTIFICATION_WM_ABOUT** = **1011** +Implemented on desktop platforms. -- **NOTIFICATION_CRASH** = **1012** +- **NOTIFICATION_WM_GO_BACK_REQUEST** = **1007** --- Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android). -- **NOTIFICATION_OS_IME_UPDATE** = **1013** +Specific to the Android platform. + +- **NOTIFICATION_WM_UNFOCUS_REQUEST** = **1008** --- Notification received from the OS when an unfocus request is sent (e.g. another OS window wants to take the focus). + +No supported platforms currently send this notification. + +- **NOTIFICATION_OS_MEMORY_WARNING** = **1009** --- Notification received from the OS when the application is exceeding its allocated memory. + +Specific to the iOS platform. + +- **NOTIFICATION_TRANSLATION_CHANGED** = **1010** --- Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like :ref:`Object.tr`. + +- **NOTIFICATION_WM_ABOUT** = **1011** --- Notification received from the OS when a request for "About" information is sent. + +Specific to the macOS platform. + +- **NOTIFICATION_CRASH** = **1012** --- Notification received from Godot's crash handler when the engine is about to crash. + +Implemented on desktop platforms if the crash handler is enabled. + +- **NOTIFICATION_OS_IME_UPDATE** = **1013** --- Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). + +Specific to the macOS platform. Description ----------- -Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a ``MainLoop`` has to be provided to OS, else the application will exit. This happens automatically (and a :ref:`SceneTree` is created), unless a main :ref:`Script` is supplied, which may or not create and return a ``MainLoop``. +``MainLoop`` is the abstract base class for a Godot project's game loop. It in inherited by :ref:`SceneTree`, which is the default game loop implementation used in Godot projects, though it is also possible to write and use one's own ``MainLoop`` subclass instead of the scene tree. + +Upon the application start, a ``MainLoop`` implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a :ref:`SceneTree` is created) unless a main :ref:`Script` is provided from the command line (with e.g. ``godot -s my_loop.gd``, which should then be a ``MainLoop`` implementation. + +Here is an example script implementing a simple ``MainLoop``: + +:: + + extends MainLoop + + var time_elapsed = 0 + var keys_typed = [] + var quit = false + + func _initialize(): + print("Initialized:") + print(" Starting time: %s" % str(time_elapsed)) + + func _idle(delta): + time_elapsed += delta + # Return true to end the main loop + return quit + + func _input_event(event): + # Record keys + if event is InputEventKey and event.pressed and !event.echo: + keys_typed.append(OS.get_scancode_string(event.scancode)) + # Quit on Escape press + if event.scancode == KEY_ESCAPE: + quit = true + # Quit on any mouse click + if event is InputEventMouseButton: + quit = true + + func _finalize(): + print("Finalized:") + print(" End time: %s" % str(time_elapsed)) + print(" Keys typed: %s" % var2str(keys_typed)) Method Descriptions ------------------- .. _class_MainLoop_method__drop_files: -- void **_drop_files** **(** :ref:`PoolStringArray` files, :ref:`int` screen **)** virtual +- void **_drop_files** **(** :ref:`PoolStringArray` files, :ref:`int` from_screen **)** virtual + +Called when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated. .. _class_MainLoop_method__finalize: @@ -120,9 +181,11 @@ Called before the program exits. .. _class_MainLoop_method__idle: -- void **_idle** **(** :ref:`float` delta **)** virtual +- :ref:`bool` **_idle** **(** :ref:`float` delta **)** virtual -Called each idle frame with time since last call as an only argument. +Called each idle frame with the time since the last idle frame as argument (in seconds). Equivalent to :ref:`Node._process`. + +If implemented, the method must return a boolean value. ``true`` ends the main loop, while ``false`` lets it proceed to the next frame. .. _class_MainLoop_method__initialize: @@ -134,35 +197,55 @@ Called once during initialization. - void **_input_event** **(** :ref:`InputEvent` event **)** virtual +Called whenever an :ref:`InputEvent` is received by the main loop. + .. _class_MainLoop_method__input_text: - void **_input_text** **(** :ref:`String` text **)** virtual +Deprecated callback, does not do anything. Use :ref:`_input_event` to parse text input. Will be removed in Godot 4.0. + .. _class_MainLoop_method__iteration: -- void **_iteration** **(** :ref:`float` delta **)** virtual +- :ref:`bool` **_iteration** **(** :ref:`float` delta **)** virtual + +Called each physics frame with the time since the last physics frame as argument (in seconds). Equivalent to :ref:`Node._physics_process`. + +If implemented, the method must return a boolean value. ``true`` ends the main loop, while ``false`` lets it proceed to the next frame. .. _class_MainLoop_method_finish: - void **finish** **(** **)** +Should not be called manually, override :ref:`_finalize` instead. Will be removed in Godot 4.0. + .. _class_MainLoop_method_idle: - :ref:`bool` **idle** **(** :ref:`float` delta **)** +Should not be called manually, override :ref:`_idle` instead. Will be removed in Godot 4.0. + .. _class_MainLoop_method_init: - void **init** **(** **)** +Should not be called manually, override :ref:`_initialize` instead. Will be removed in Godot 4.0. + .. _class_MainLoop_method_input_event: - void **input_event** **(** :ref:`InputEvent` event **)** +Should not be called manually, override :ref:`_input_event` instead. Will be removed in Godot 4.0. + .. _class_MainLoop_method_input_text: - void **input_text** **(** :ref:`String` text **)** +Should not be called manually, override :ref:`_input_text` instead. Will be removed in Godot 4.0. + .. _class_MainLoop_method_iteration: - :ref:`bool` **iteration** **(** :ref:`float` delta **)** +Should not be called manually, override :ref:`_iteration` instead. Will be removed in Godot 4.0. + diff --git a/classes/class_margincontainer.rst b/classes/class_margincontainer.rst index c9ce6ddc3..2f550ec70 100644 --- a/classes/class_margincontainer.rst +++ b/classes/class_margincontainer.rst @@ -32,5 +32,15 @@ Theme Properties Description ----------- -Simple margin container. Adds a left margin to anything contained. +Adds a top, left, bottom, and right margin to all :ref:`Control` nodes that are direct children of the container. To control the ``MarginContainer``'s margin, use the ``margin_*`` theme properties listed below. + +**Note:** Be careful, :ref:`Control` margin values are different than the constant margin values. If you want to change the custom margin values of the ``MarginContainer`` by code, you should use the following examples: + +:: + + var margin_value = 100 + set("custom_constants/margin_top", margin_value) + set("custom_constants/margin_left", margin_value) + set("custom_constants/margin_bottom", margin_value) + set("custom_constants/margin_right", margin_value) diff --git a/classes/class_marshalls.rst b/classes/class_marshalls.rst index 4f9b07069..c9830d2f4 100644 --- a/classes/class_marshalls.rst +++ b/classes/class_marshalls.rst @@ -45,37 +45,37 @@ Method Descriptions - :ref:`PoolByteArray` **base64_to_raw** **(** :ref:`String` base64_str **)** -Returns :ref:`PoolByteArray` of a given base64 encoded String. +Returns a decoded :ref:`PoolByteArray` corresponding to the Base64-encoded string ``base64_str``. .. _class_Marshalls_method_base64_to_utf8: - :ref:`String` **base64_to_utf8** **(** :ref:`String` base64_str **)** -Returns utf8 String of a given base64 encoded String. +Returns a decoded string corresponding to the Base64-encoded string ``base64_str``. .. _class_Marshalls_method_base64_to_variant: - :ref:`Variant` **base64_to_variant** **(** :ref:`String` base64_str, :ref:`bool` allow_objects=false **)** -Returns :ref:`Variant` of a given base64 encoded String. When ``allow_objects`` is ``true`` decoding objects is allowed. +Returns a decoded :ref:`Variant` corresponding to the Base64-encoded string ``base64_str``. If ``allow_objects`` is ``true``, decoding objects is allowed. -**WARNING:** Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). +**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. .. _class_Marshalls_method_raw_to_base64: - :ref:`String` **raw_to_base64** **(** :ref:`PoolByteArray` array **)** -Returns base64 encoded String of a given :ref:`PoolByteArray`. +Returns a Base64-encoded string of a given :ref:`PoolByteArray`. .. _class_Marshalls_method_utf8_to_base64: - :ref:`String` **utf8_to_base64** **(** :ref:`String` utf8_str **)** -Returns base64 encoded String of a given utf8 String. +Returns a Base64-encoded string of the UTF-8 string ``utf8_str``. .. _class_Marshalls_method_variant_to_base64: - :ref:`String` **variant_to_base64** **(** :ref:`Variant` variant, :ref:`bool` full_objects=false **)** -Returns base64 encoded String of a given :ref:`Variant`. When ``full_objects`` is ``true`` encoding objects is allowed (and can potentially include code). +Returns a Base64-encoded string of the :ref:`Variant` ``variant``. If ``full_objects`` is ``true``, encoding objects is allowed (and can potentially include code). diff --git a/classes/class_material.rst b/classes/class_material.rst index 67fee2219..d5319bfef 100644 --- a/classes/class_material.rst +++ b/classes/class_material.rst @@ -34,9 +34,9 @@ Constants .. _class_Material_constant_RENDER_PRIORITY_MIN: -- **RENDER_PRIORITY_MAX** = **127** +- **RENDER_PRIORITY_MAX** = **127** --- Maximum value for the :ref:`render_priority` parameter. -- **RENDER_PRIORITY_MIN** = **-128** +- **RENDER_PRIORITY_MIN** = **-128** --- Minimum value for the :ref:`render_priority` parameter. Description ----------- diff --git a/classes/class_mesh.rst b/classes/class_mesh.rst index 378b6709d..22a46753b 100644 --- a/classes/class_mesh.rst +++ b/classes/class_mesh.rst @@ -16,7 +16,7 @@ Mesh Brief Description ----------------- -A :ref:`Resource` that contains vertex-array based geometry. +A :ref:`Resource` that contains vertex array-based geometry. Properties ---------- @@ -231,12 +231,12 @@ enum **ArrayType**: - **ARRAY_INDEX** = **8** --- Array of indices. -- **ARRAY_MAX** = **9** +- **ARRAY_MAX** = **9** --- Represents the size of the :ref:`ArrayType` enum. Description ----------- -Mesh is a type of :ref:`Resource` that contains vertex-array based geometry, divided in *surfaces*. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. +Mesh is a type of :ref:`Resource` that contains vertex array-based geometry, divided in *surfaces*. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. Property Descriptions --------------------- @@ -264,7 +264,9 @@ Calculate a :ref:`ConvexPolygonShape` from the mesh. - :ref:`Mesh` **create_outline** **(** :ref:`float` margin **)** const -Calculate an outline mesh at a defined offset (margin) from the original mesh. Note: Typically returns the vertices in reverse order (e.g. clockwise to anti-clockwise). +Calculate an outline mesh at a defined offset (margin) from the original mesh. + +**Note:** This method typically returns the vertices in reverse order (e.g. clockwise to counterclockwise). .. _class_Mesh_method_create_trimesh_shape: @@ -312,5 +314,5 @@ Returns a :ref:`Material` in a given surface. Surface is rendere - void **surface_set_material** **(** :ref:`int` surf_idx, :ref:`Material` material **)** -Set a :ref:`Material` for a given surface. Surface will be rendered using this material. +Sets a :ref:`Material` for a given surface. Surface will be rendered using this material. diff --git a/classes/class_meshdatatool.rst b/classes/class_meshdatatool.rst index 17651c8b1..adc22de13 100644 --- a/classes/class_meshdatatool.rst +++ b/classes/class_meshdatatool.rst @@ -100,11 +100,11 @@ Methods Description ----------- -The MeshDataTool provides access to individual vertices in a :ref:`Mesh`. It allows users to read and edit vertex data of meshes. It also creates an array of faces and edges. +MeshDataTool provides access to individual vertices in a :ref:`Mesh`. It allows users to read and edit vertex data of meshes. It also creates an array of faces and edges. -To use the MeshDataTool, load a mesh with :ref:`create_from_surface`. When you are finished editing the data commit the data to a mesh with :ref:`commit_to_surface`. +To use MeshDataTool, load a mesh with :ref:`create_from_surface`. When you are finished editing the data commit the data to a mesh with :ref:`commit_to_surface`. -Below is an example of how the MeshDataTool may be used. +Below is an example of how MeshDataTool may be used. :: @@ -138,7 +138,7 @@ Adds a new surface to specified :ref:`Mesh` with edited data. Uses specified surface of given :ref:`Mesh` to populate data for MeshDataTool. -Requires :ref:`Mesh` with primitive type ``PRIMITIVE_TRIANGLES``. +Requires :ref:`Mesh` with primitive type :ref:`Mesh.PRIMITIVE_TRIANGLES`. .. _class_MeshDataTool_method_get_edge_count: @@ -184,19 +184,19 @@ Edge argument must 2 or less because a face only has three edges. - :ref:`Variant` **get_face_meta** **(** :ref:`int` idx **)** const -Returns meta data associated with given face. +Returns the metadata associated with the given face. .. _class_MeshDataTool_method_get_face_normal: - :ref:`Vector3` **get_face_normal** **(** :ref:`int` idx **)** const -Calculates and returns face normal of given face. +Calculates and returns the face normal of the given face. .. _class_MeshDataTool_method_get_face_vertex: - :ref:`int` **get_face_vertex** **(** :ref:`int` idx, :ref:`int` vertex **)** const -Returns specified vertex of given face. +Returns the specified vertex of the given face. Vertex argument must be 2 or less because faces contain three vertices. @@ -204,15 +204,15 @@ Vertex argument must be 2 or less because faces contain three vertices. - :ref:`int` **get_format** **(** **)** const -Returns format of :ref:`Mesh`. Format is an integer made up of :ref:`Mesh` format flags combined together. For example, a mesh containing both vertices and normals would return a format of ``3`` because ``ARRAY_FORMAT_VERTEX`` is ``1`` and ``ARRAY_FORMAT_NORMAL`` is ``2``. +Returns the :ref:`Mesh`'s format. Format is an integer made up of :ref:`Mesh` format flags combined together. For example, a mesh containing both vertices and normals would return a format of ``3`` because :ref:`ArrayMesh.ARRAY_FORMAT_VERTEX` is ``1`` and :ref:`ArrayMesh.ARRAY_FORMAT_NORMAL` is ``2``. -For list of format flags see :ref:`ArrayMesh`. +See :ref:`ArrayFormat` for a list of format flags. .. _class_MeshDataTool_method_get_material: - :ref:`Material` **get_material** **(** **)** const -Returns material assigned to the :ref:`Mesh`. +Returns the material assigned to the :ref:`Mesh`. .. _class_MeshDataTool_method_get_vertex: @@ -242,119 +242,119 @@ Returns the total number of vertices in :ref:`Mesh`. - :ref:`PoolIntArray` **get_vertex_edges** **(** :ref:`int` idx **)** const -Returns array of edges that share given vertex. +Returns an array of edges that share the given vertex. .. _class_MeshDataTool_method_get_vertex_faces: - :ref:`PoolIntArray` **get_vertex_faces** **(** :ref:`int` idx **)** const -Returns array of faces that share given vertex. +Returns an array of faces that share the given vertex. .. _class_MeshDataTool_method_get_vertex_meta: - :ref:`Variant` **get_vertex_meta** **(** :ref:`int` idx **)** const -Returns meta data associated with given vertex. +Returns the metadata associated with the given vertex. .. _class_MeshDataTool_method_get_vertex_normal: - :ref:`Vector3` **get_vertex_normal** **(** :ref:`int` idx **)** const -Returns normal of given vertex. +Returns the normal of the given vertex. .. _class_MeshDataTool_method_get_vertex_tangent: - :ref:`Plane` **get_vertex_tangent** **(** :ref:`int` idx **)** const -Returns tangent of given vertex. +Returns the tangent of the given vertex. .. _class_MeshDataTool_method_get_vertex_uv: - :ref:`Vector2` **get_vertex_uv** **(** :ref:`int` idx **)** const -Returns UV of given vertex. +Returns the UV of the given vertex. .. _class_MeshDataTool_method_get_vertex_uv2: - :ref:`Vector2` **get_vertex_uv2** **(** :ref:`int` idx **)** const -Returns UV2 of given vertex. +Returns the UV2 of the given vertex. .. _class_MeshDataTool_method_get_vertex_weights: - :ref:`PoolRealArray` **get_vertex_weights** **(** :ref:`int` idx **)** const -Returns bone weights of given vertex. +Returns bone weights of the given vertex. .. _class_MeshDataTool_method_set_edge_meta: - void **set_edge_meta** **(** :ref:`int` idx, :ref:`Variant` meta **)** -Sets the meta data of given edge. +Sets the metadata of the given edge. .. _class_MeshDataTool_method_set_face_meta: - void **set_face_meta** **(** :ref:`int` idx, :ref:`Variant` meta **)** -Sets the meta data of given face. +Sets the metadata of the given face. .. _class_MeshDataTool_method_set_material: - void **set_material** **(** :ref:`Material` material **)** -Sets the material to be used by newly constructed :ref:`Mesh`. +Sets the material to be used by newly-constructed :ref:`Mesh`. .. _class_MeshDataTool_method_set_vertex: - void **set_vertex** **(** :ref:`int` idx, :ref:`Vector3` vertex **)** -Sets the position of given vertex. +Sets the position of the given vertex. .. _class_MeshDataTool_method_set_vertex_bones: - void **set_vertex_bones** **(** :ref:`int` idx, :ref:`PoolIntArray` bones **)** -Sets the bones of given vertex. +Sets the bones of the given vertex. .. _class_MeshDataTool_method_set_vertex_color: - void **set_vertex_color** **(** :ref:`int` idx, :ref:`Color` color **)** -Sets the color of given vertex. +Sets the color of the given vertex. .. _class_MeshDataTool_method_set_vertex_meta: - void **set_vertex_meta** **(** :ref:`int` idx, :ref:`Variant` meta **)** -Sets the meta data associated with given vertex. +Sets the metadata associated with the given vertex. .. _class_MeshDataTool_method_set_vertex_normal: - void **set_vertex_normal** **(** :ref:`int` idx, :ref:`Vector3` normal **)** -Sets the normal of given vertex. +Sets the normal of the given vertex. .. _class_MeshDataTool_method_set_vertex_tangent: - void **set_vertex_tangent** **(** :ref:`int` idx, :ref:`Plane` tangent **)** -Sets the tangent of given vertex. +Sets the tangent of the given vertex. .. _class_MeshDataTool_method_set_vertex_uv: - void **set_vertex_uv** **(** :ref:`int` idx, :ref:`Vector2` uv **)** -Sets the UV of given vertex. +Sets the UV of the given vertex. .. _class_MeshDataTool_method_set_vertex_uv2: - void **set_vertex_uv2** **(** :ref:`int` idx, :ref:`Vector2` uv2 **)** -Sets the UV2 of given vertex. +Sets the UV2 of the given vertex. .. _class_MeshDataTool_method_set_vertex_weights: - void **set_vertex_weights** **(** :ref:`int` idx, :ref:`PoolRealArray` weights **)** -Sets the bone weights of given vertex. +Sets the bone weights of the given vertex. diff --git a/classes/class_meshlibrary.rst b/classes/class_meshlibrary.rst index e49c43f2b..74373c48b 100644 --- a/classes/class_meshlibrary.rst +++ b/classes/class_meshlibrary.rst @@ -60,7 +60,7 @@ Methods Description ----------- -Library of meshes. Contains a list of :ref:`Mesh` resources, each with name and ID. Useful for GridMap or painting Terrain. +Library of meshes. Contains a list of :ref:`Mesh` resources, each with name and ID. This resource is used in :ref:`GridMap`. Method Descriptions ------------------- @@ -119,25 +119,25 @@ Returns the name of the item. - :ref:`int` **get_last_unused_item_id** **(** **)** const -Get an unused id for a new item. +Gets an unused id for a new item. .. _class_MeshLibrary_method_remove_item: - void **remove_item** **(** :ref:`int` id **)** -Remove the item. +Removes the item. .. _class_MeshLibrary_method_set_item_mesh: - void **set_item_mesh** **(** :ref:`int` id, :ref:`Mesh` mesh **)** -Set the mesh of the item. +Sets the mesh of the item. .. _class_MeshLibrary_method_set_item_name: - void **set_item_name** **(** :ref:`int` id, :ref:`String` name **)** -Set the name of the item. +Sets the name of the item. .. _class_MeshLibrary_method_set_item_navmesh: diff --git a/classes/class_meshtexture.rst b/classes/class_meshtexture.rst index ee446d8fc..7356e1077 100644 --- a/classes/class_meshtexture.rst +++ b/classes/class_meshtexture.rst @@ -45,7 +45,7 @@ Property Descriptions | *Getter* | get_base_texture() | +----------+-------------------------+ -Set the base texture that the Mesh will use to draw. +Sets the base texture that the Mesh will use to draw. .. _class_MeshTexture_property_image_size: @@ -57,7 +57,7 @@ Set the base texture that the Mesh will use to draw. | *Getter* | get_image_size() | +----------+-----------------------+ -Set the size of the image, needed for reference. +Sets the size of the image, needed for reference. .. _class_MeshTexture_property_mesh: @@ -69,5 +69,5 @@ Set the size of the image, needed for reference. | *Getter* | get_mesh() | +----------+-----------------+ -Set the mesh used to draw. It must be a mesh using 2D vertices. +Sets the mesh used to draw. It must be a mesh using 2D vertices. diff --git a/classes/class_mobilevrinterface.rst b/classes/class_mobilevrinterface.rst index d50edddc7..eca5091d8 100644 --- a/classes/class_mobilevrinterface.rst +++ b/classes/class_mobilevrinterface.rst @@ -14,7 +14,7 @@ MobileVRInterface Brief Description ----------------- -Generic mobile VR implementation +Generic mobile VR implementation. Properties ---------- @@ -38,9 +38,9 @@ Properties Description ----------- -This is a generic mobile VR implementation where you need to provide details about the phone and HMD used. It does not rely on any existing framework. This is the most basic interface we have. For the best effect you do need a mobile phone with a gyroscope and accelerometer. +This is a generic mobile VR implementation where you need to provide details about the phone and HMD used. It does not rely on any existing framework. This is the most basic interface we have. For the best effect, you need a mobile phone with a gyroscope and accelerometer. -Note that even though there is no positional tracking the camera will assume the headset is at a height of 1.85 meters, you can change this by setting :ref:`eye_height`. +Note that even though there is no positional tracking, the camera will assume the headset is at a height of 1.85 meters. You can change this by setting :ref:`eye_height`. You can initialise this interface as follows: diff --git a/classes/class_multimesh.rst b/classes/class_multimesh.rst index 250c64357..af206f7b9 100644 --- a/classes/class_multimesh.rst +++ b/classes/class_multimesh.rst @@ -14,7 +14,7 @@ MultiMesh Brief Description ----------------- -Provides high performance mesh instancing. +Provides high-performance mesh instancing. Properties ---------- @@ -108,9 +108,9 @@ enum **CustomDataFormat**: Description ----------- -MultiMesh provides low level mesh instancing. Drawing thousands of :ref:`MeshInstance` nodes can be slow because each object is submitted to the GPU to be drawn individually. +MultiMesh provides low-level mesh instancing. Drawing thousands of :ref:`MeshInstance` nodes can be slow, since each object is submitted to the GPU then drawn individually. -MultiMesh is much faster because it can draw thousands of instances with a single draw call, resulting in less API overhead. +MultiMesh is much faster as it can draw thousands of instances with a single draw call, resulting in less API overhead. As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object). @@ -158,7 +158,7 @@ Format of custom data in custom data array that gets passed to shader. | *Getter* | get_instance_count() | +----------+---------------------------+ -Number of instances that will get drawn. This clears and (re)sizes the buffers. By default all instances are drawn but you can limit this with :ref:`visible_instance_count`. +Number of instances that will get drawn. This clears and (re)sizes the buffers. By default, all instances are drawn but you can limit this with :ref:`visible_instance_count`. .. _class_MultiMesh_property_mesh: @@ -203,13 +203,13 @@ Method Descriptions - :ref:`AABB` **get_aabb** **(** **)** const -Returns the visibility AABB. +Returns the visibility axis-aligned bounding box. .. _class_MultiMesh_method_get_instance_color: - :ref:`Color` **get_instance_color** **(** :ref:`int` instance **)** const -Get the color of a specific instance. +Gets a specific instance's color. .. _class_MultiMesh_method_get_instance_custom_data: @@ -233,17 +233,17 @@ Returns the :ref:`Transform2D` of a specific instance. - void **set_as_bulk_array** **(** :ref:`PoolRealArray` array **)** -Set all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative. +Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative. All data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc... -:ref:`Transform` is stored as 12 floats, :ref:`Transform2D` is stored as 8 floats, COLOR_8BIT / CUSTOM_DATA_8BIT is stored as 1 float (4 bytes as is) and COLOR_FLOAT / CUSTOM_DATA_FLOAT is stored as 4 floats. +:ref:`Transform` is stored as 12 floats, :ref:`Transform2D` is stored as 8 floats, ``COLOR_8BIT`` / ``CUSTOM_DATA_8BIT`` is stored as 1 float (4 bytes as is) and ``COLOR_FLOAT`` / ``CUSTOM_DATA_FLOAT`` is stored as 4 floats. .. _class_MultiMesh_method_set_instance_color: - void **set_instance_color** **(** :ref:`int` instance, :ref:`Color` color **)** -Set the color of a specific instance. +Sets the color of a specific instance. For the color to take effect, ensure that :ref:`color_format` is non-``null`` on the ``MultiMesh`` and :ref:`SpatialMaterial.vertex_color_use_as_albedo` is ``true`` on the material. @@ -251,17 +251,17 @@ For the color to take effect, ensure that :ref:`color_format` instance, :ref:`Color` custom_data **)** -Set custom data for a specific instance. Although :ref:`Color` is used, it is just a container for 4 numbers. +Sets custom data for a specific instance. Although :ref:`Color` is used, it is just a container for 4 numbers. .. _class_MultiMesh_method_set_instance_transform: - void **set_instance_transform** **(** :ref:`int` instance, :ref:`Transform` transform **)** -Set the :ref:`Transform` for a specific instance. +Sets the :ref:`Transform` for a specific instance. .. _class_MultiMesh_method_set_instance_transform_2d: - void **set_instance_transform_2d** **(** :ref:`int` instance, :ref:`Transform2D` transform **)** -Set the :ref:`Transform2D` for a specific instance. +Sets the :ref:`Transform2D` for a specific instance. diff --git a/classes/class_multimeshinstance.rst b/classes/class_multimeshinstance.rst index 02db57c61..43a7cfcc6 100644 --- a/classes/class_multimeshinstance.rst +++ b/classes/class_multimeshinstance.rst @@ -28,7 +28,7 @@ Description ``MultiMeshInstance`` is a specialized node to instance :ref:`GeometryInstance`\ s based on a :ref:`MultiMesh` resource. -This is useful to optimize the rendering of a high amount of instances of a given mesh (for example tree in a forest or grass strands). +This is useful to optimize the rendering of a high amount of instances of a given mesh (for example trees in a forest or grass strands). Tutorials --------- diff --git a/classes/class_multiplayerapi.rst b/classes/class_multiplayerapi.rst index 3e36681ed..83b04385d 100644 --- a/classes/class_multiplayerapi.rst +++ b/classes/class_multiplayerapi.rst @@ -14,7 +14,7 @@ MultiplayerAPI Brief Description ----------------- -High Level Multiplayer API. +High-level multiplayer API. Properties ---------- @@ -57,37 +57,37 @@ Signals - **connected_to_server** **(** **)** -Emitted whenever this MultiplayerAPI's :ref:`network_peer` successfully connected to a server. Only emitted on clients. +Emitted when this MultiplayerAPI's :ref:`network_peer` successfully connected to a server. Only emitted on clients. .. _class_MultiplayerAPI_signal_connection_failed: - **connection_failed** **(** **)** -Emitted whenever this MultiplayerAPI's :ref:`network_peer` fails to establish a connection to a server. Only emitted on clients. +Emitted when this MultiplayerAPI's :ref:`network_peer` fails to establish a connection to a server. Only emitted on clients. .. _class_MultiplayerAPI_signal_network_peer_connected: - **network_peer_connected** **(** :ref:`int` id **)** -Emitted whenever this MultiplayerAPI's :ref:`network_peer` connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1). +Emitted when this MultiplayerAPI's :ref:`network_peer` connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1). .. _class_MultiplayerAPI_signal_network_peer_disconnected: - **network_peer_disconnected** **(** :ref:`int` id **)** -Emitted whenever this MultiplayerAPI's :ref:`network_peer` disconnects from a peer. Clients get notified when other clients disconnect from the same server. +Emitted when this MultiplayerAPI's :ref:`network_peer` disconnects from a peer. Clients get notified when other clients disconnect from the same server. .. _class_MultiplayerAPI_signal_network_peer_packet: - **network_peer_packet** **(** :ref:`int` id, :ref:`PoolByteArray` packet **)** -Emitted whenever this MultiplayerAPI's :ref:`network_peer` receive a ``packet`` with custom data (see :ref:`send_bytes`). ID is the peer ID of the peer that sent the packet. +Emitted when this MultiplayerAPI's :ref:`network_peer` receive a ``packet`` with custom data (see :ref:`send_bytes`). ID is the peer ID of the peer that sent the packet. .. _class_MultiplayerAPI_signal_server_disconnected: - **server_disconnected** **(** **)** -Emitted whenever this MultiplayerAPI's :ref:`network_peer` disconnects from server. Only emitted on clients. +Emitted when this MultiplayerAPI's :ref:`network_peer` disconnects from server. Only emitted on clients. Enumerations ------------ @@ -122,20 +122,20 @@ enum **RPCMode**: - **RPC_MODE_PUPPET** = **3** --- Used with :ref:`Node.rpc_config` or :ref:`Node.rset_config` to set a method to be called or a property to be changed only on puppets for this node. Analogous to the ``puppet`` keyword. Only accepts calls or property changes from the node's network master, see :ref:`Node.set_network_master`. -- **RPC_MODE_SLAVE** = **3** --- Deprecated. Use ``RPC_MODE_PUPPET`` instead. Analogous to the ``slave`` keyword. +- **RPC_MODE_SLAVE** = **3** --- *Deprecated.* Use :ref:`RPC_MODE_PUPPET` instead. Analogous to the ``slave`` keyword. -- **RPC_MODE_REMOTESYNC** = **4** --- Behave like ``RPC_MODE_REMOTE`` but also make the call or property change locally. Analogous to the ``remotesync`` keyword. +- **RPC_MODE_REMOTESYNC** = **4** --- Behave like :ref:`RPC_MODE_REMOTE` but also make the call or property change locally. Analogous to the ``remotesync`` keyword. -- **RPC_MODE_SYNC** = **4** --- Deprecated. Use ``RPC_MODE_REMOTESYNC`` instead. Analogous to the ``sync`` keyword. +- **RPC_MODE_SYNC** = **4** --- *Deprecated.* Use :ref:`RPC_MODE_REMOTESYNC` instead. Analogous to the ``sync`` keyword. -- **RPC_MODE_MASTERSYNC** = **5** --- Behave like ``RPC_MODE_MASTER`` but also make the call or property change locally. Analogous to the ``mastersync`` keyword. +- **RPC_MODE_MASTERSYNC** = **5** --- Behave like :ref:`RPC_MODE_MASTER` but also make the call or property change locally. Analogous to the ``mastersync`` keyword. -- **RPC_MODE_PUPPETSYNC** = **6** --- Behave like ``RPC_MODE_PUPPET`` but also make the call or property change locally. Analogous to the ``puppetsync`` keyword. +- **RPC_MODE_PUPPETSYNC** = **6** --- Behave like :ref:`RPC_MODE_PUPPET` but also make the call or property change locally. Analogous to the ``puppetsync`` keyword. Description ----------- -This class implements most of the logic behind the high level multiplayer API. +This class implements most of the logic behind the high-level multiplayer API. By default, :ref:`SceneTree` has a reference to this class that is used to provide multiplayer capabilities (i.e. RPC/RSET) across the whole scene. @@ -154,9 +154,9 @@ Property Descriptions | *Getter* | is_object_decoding_allowed() | +----------+----------------------------------+ -If ``true`` (or if the :ref:`network_peer` :ref:`PacketPeer.allow_object_decoding` the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs. +If ``true`` (or if the :ref:`network_peer` has :ref:`PacketPeer.allow_object_decoding` set to ``true``), the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs. -**WARNING:** Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). +**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. .. _class_MultiplayerAPI_property_network_peer: @@ -168,7 +168,7 @@ If ``true`` (or if the :ref:`network_peer`) and will set root node's network mode to master (see NETWORK_MODE\_\* constants in :ref:`Node`), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. +The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with :ref:`is_network_server`) and will set root node's network mode to master (see ``NETWORK_MODE_*`` constants in :ref:`Node`), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. .. _class_MultiplayerAPI_property_refuse_new_network_connections: @@ -209,7 +209,7 @@ Returns the unique peer ID of this MultiplayerAPI's :ref:`network_peer` override or you set :ref:`SceneTree.multiplayer_poll` to ``false``. By default :ref:`SceneTree` will poll its MultiplayerAPI for you. +Method used for polling the MultiplayerAPI. You only need to worry about this if you are using :ref:`Node.custom_multiplayer` override or you set :ref:`SceneTree.multiplayer_poll` to ``false``. By default, :ref:`SceneTree` will poll its MultiplayerAPI for you. -NOTE: This method results in RPCs and RSETs being called, so they will be executed in the same context of this function (e.g. ``_process``, ``physics``, :ref:`Thread`). +**Note:** This method results in RPCs and RSETs being called, so they will be executed in the same context of this function (e.g. ``_process``, ``physics``, :ref:`Thread`). .. _class_MultiplayerAPI_method_send_bytes: diff --git a/classes/class_mutex.rst b/classes/class_mutex.rst index 7323872c8..12654f23e 100644 --- a/classes/class_mutex.rst +++ b/classes/class_mutex.rst @@ -14,7 +14,7 @@ Mutex Brief Description ----------------- -A synchronization Mutex. +A synchronization mutex (mutual exclusion). Methods ------- @@ -30,7 +30,7 @@ Methods Description ----------- -A synchronization Mutex. Element used to synchronize multiple :ref:`Thread`\ s. Basically a binary :ref:`Semaphore`. Guarantees that only one thread can ever acquire this lock at a time. Can be used to protect a critical section. Be careful to avoid deadlocks. +A synchronization mutex (mutual exclusion). This is used to synchronize multiple :ref:`Thread`\ s, and is equivalent to a binary :ref:`Semaphore`. It guarantees that only one thread can ever acquire the lock at a time. A mutex can be used to protect a critical section; however, be careful to avoid deadlocks. Method Descriptions ------------------- @@ -39,17 +39,17 @@ Method Descriptions - void **lock** **(** **)** -Lock this ``Mutex``, blocks until it is unlocked by the current owner. +Locks this ``Mutex``, blocks until it is unlocked by the current owner. .. _class_Mutex_method_try_lock: - :ref:`Error` **try_lock** **(** **)** -Try locking this ``Mutex``, does not block. Returns ``OK`` on success, ``ERR_BUSY`` otherwise. +Tries locking this ``Mutex``, but does not block. Returns :ref:`@GlobalScope.OK` on success, :ref:`@GlobalScope.ERR_BUSY` otherwise. .. _class_Mutex_method_unlock: - void **unlock** **(** **)** -Unlock this ``Mutex``, leaving it to other threads. +Unlocks this ``Mutex``, leaving it to other threads. diff --git a/classes/class_navigation.rst b/classes/class_navigation.rst index a5f9144ce..c7732c6f3 100644 --- a/classes/class_navigation.rst +++ b/classes/class_navigation.rst @@ -47,7 +47,7 @@ Methods Description ----------- -Provides navigation and pathfinding within a collection of :ref:`NavigationMesh`\ es. By default these will be automatically collected from child :ref:`NavigationMeshInstance` nodes, but they can also be added on the fly with :ref:`navmesh_add`. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on. +Provides navigation and pathfinding within a collection of :ref:`NavigationMesh`\ es. By default, these will be automatically collected from child :ref:`NavigationMeshInstance` nodes, but they can also be added on the fly with :ref:`navmesh_add`. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on. Property Descriptions --------------------- @@ -62,7 +62,7 @@ Property Descriptions | *Getter* | get_up_vector() | +----------+----------------------+ -Defines which direction is up. By default this is ``(0, 1, 0)``, which is the world up direction. +Defines which direction is up. By default, this is ``(0, 1, 0)``, which is the world's "up" direction. Method Descriptions ------------------- diff --git a/classes/class_navigation2d.rst b/classes/class_navigation2d.rst index 9679edbee..c1b384927 100644 --- a/classes/class_navigation2d.rst +++ b/classes/class_navigation2d.rst @@ -36,7 +36,7 @@ Methods Description ----------- -Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of :ref:`NavigationPolygon` resources. By default these are automatically collected from child :ref:`NavigationPolygonInstance` nodes, but they can also be added on the fly with :ref:`navpoly_add`. +Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of :ref:`NavigationPolygon` resources. By default, these are automatically collected from child :ref:`NavigationPolygonInstance` nodes, but they can also be added on the fly with :ref:`navpoly_add`. Method Descriptions ------------------- diff --git a/classes/class_navigationpolygon.rst b/classes/class_navigationpolygon.rst index 74dc9ce18..eb99a2327 100644 --- a/classes/class_navigationpolygon.rst +++ b/classes/class_navigationpolygon.rst @@ -52,7 +52,7 @@ Methods Description ----------- -There are two ways to create polygons. Either by using the :ref:`add_outline` method or using the :ref:`add_polygon` method. +There are two ways to create polygons. Either by using the :ref:`add_outline` method, or using the :ref:`add_polygon` method. Using :ref:`add_outline`: diff --git a/classes/class_networkedmultiplayerenet.rst b/classes/class_networkedmultiplayerenet.rst index 7761d015e..b34072b63 100644 --- a/classes/class_networkedmultiplayerenet.rst +++ b/classes/class_networkedmultiplayerenet.rst @@ -14,7 +14,7 @@ NetworkedMultiplayerENet Brief Description ----------------- -PacketPeer implementation using the ENet library. +PacketPeer implementation using the `ENet `_ library. Properties ---------- @@ -69,15 +69,15 @@ Enumerations enum **CompressionMode**: -- **COMPRESS_NONE** = **0** --- No compression. +- **COMPRESS_NONE** = **0** --- No compression. This uses the most bandwidth, but has the upside of requiring the fewest CPU resources. -- **COMPRESS_RANGE_CODER** = **1** --- ENet's buildin range encoding. +- **COMPRESS_RANGE_CODER** = **1** --- ENet's built-in range encoding. -- **COMPRESS_FASTLZ** = **2** --- FastLZ compression. +- **COMPRESS_FASTLZ** = **2** --- `FastLZ `_ compression. This option uses less CPU resources compared to :ref:`COMPRESS_ZLIB`, at the expense of using more bandwidth. -- **COMPRESS_ZLIB** = **3** --- zlib compression. +- **COMPRESS_ZLIB** = **3** --- `Zlib `_ compression. This option uses less bandwidth compared to :ref:`COMPRESS_FASTLZ`, at the expense of using more CPU resources. -- **COMPRESS_ZSTD** = **4** --- ZStandard compression. +- **COMPRESS_ZSTD** = **4** --- `Zstandard `_ compression. Description ----------- @@ -104,7 +104,7 @@ Property Descriptions | *Getter* | is_always_ordered() | +----------+---------------------------+ -Always use ``TRANSFER_MODE_ORDERED`` in place of ``TRANSFER_MODE_UNRELIABLE``. This is the only way to use ordering with the RPC system. +Enforce ordered packets when using :ref:`NetworkedMultiplayerPeer.TRANSFER_MODE_UNRELIABLE` (thus behaving similarly to :ref:`NetworkedMultiplayerPeer.TRANSFER_MODE_UNRELIABLE_ORDERED`). This is the only way to use ordering with the RPC system. .. _class_NetworkedMultiplayerENet_property_channel_count: @@ -128,7 +128,7 @@ The number of channels to be used by ENet. Default: ``3``. Channels are used to | *Getter* | get_compression_mode() | +----------+-----------------------------+ -The compression method used for network packets. Default is no compression. These have different tradeoffs of compression speed versus bandwidth, you may need to test which one works best for your use case if you use compression at all. +The compression method used for network packets. These have different tradeoffs of compression speed versus bandwidth, you may need to test which one works best for your use case if you use compression at all. Default value: :ref:`COMPRESS_NONE`. .. _class_NetworkedMultiplayerENet_property_transfer_channel: @@ -140,7 +140,7 @@ The compression method used for network packets. Default is no compression. Thes | *Getter* | get_transfer_channel() | +----------+-----------------------------+ -Set the default channel to be used to transfer data. By default this value is ``-1`` which means that ENet will only use 2 channels, one for reliable and one for unreliable packets. Channel ``0`` is reserved, and cannot be used. Setting this member to any value between ``0`` and :ref:`channel_count` (excluded) will force ENet to use that channel for sending data. +Set the default channel to be used to transfer data. By default, this value is ``-1`` which means that ENet will only use 2 channels, one for reliable and one for unreliable packets. Channel ``0`` is reserved, and cannot be used. Setting this member to any value between ``0`` and :ref:`channel_count` (excluded) will force ENet to use that channel for sending data. Method Descriptions ------------------- @@ -155,13 +155,13 @@ Closes the connection. Ignored if no connection is currently established. If thi - :ref:`Error` **create_client** **(** :ref:`String` address, :ref:`int` port, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0, :ref:`int` client_port=0 **)** -Create client that connects to a server at ``address`` using specified ``port``. The given address needs to be either a fully qualified domain name (e.g. ``www.example.com``) or an IP address in IPv4 or IPv6 format (e.g. ``192.168.1.1``). The ``port`` is the port the server is listening on. The ``in_bandwidth`` and ``out_bandwidth`` parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns ``OK`` if a client was created, ``ERR_ALREADY_IN_USE`` if this NetworkedMultiplayerEnet instance already has an open connection (in which case you need to call :ref:`close_connection` first) or ``ERR_CANT_CREATE`` if the client could not be created. If ``client_port`` is specified, the client will also listen to the given port, this is useful in some NAT traversal technique. +Create client that connects to a server at ``address`` using specified ``port``. The given address needs to be either a fully qualified domain name (e.g. ``"www.example.com"``) or an IP address in IPv4 or IPv6 format (e.g. ``"192.168.1.1"``). The ``port`` is the port the server is listening on. The ``in_bandwidth`` and ``out_bandwidth`` parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns :ref:`@GlobalScope.OK` if a client was created, :ref:`@GlobalScope.ERR_ALREADY_IN_USE` if this NetworkedMultiplayerENet instance already has an open connection (in which case you need to call :ref:`close_connection` first) or :ref:`@GlobalScope.ERR_CANT_CREATE` if the client could not be created. If ``client_port`` is specified, the client will also listen to the given port; this is useful for some NAT traversal techniques. .. _class_NetworkedMultiplayerENet_method_create_server: - :ref:`Error` **create_server** **(** :ref:`int` port, :ref:`int` max_clients=32, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** -Create server that listens to connections via ``port``. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use :ref:`set_bind_ip`. The default IP is the wildcard ``*``, which listens on all available interfaces. ``max_clients`` is the maximum number of clients that are allowed at once, any number up to 4096 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see :ref:`create_client`. Returns ``OK`` if a server was created, ``ERR_ALREADY_IN_USE`` if this NetworkedMultiplayerEnet instance already has an open connection (in which case you need to call :ref:`close_connection` first) or ``ERR_CANT_CREATE`` if the server could not be created. +Create server that listens to connections via ``port``. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use :ref:`set_bind_ip`. The default IP is the wildcard ``"*"``, which listens on all available interfaces. ``max_clients`` is the maximum number of clients that are allowed at once, any number up to 4096 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see :ref:`create_client`. Returns :ref:`@GlobalScope.OK` if a server was created, :ref:`@GlobalScope.ERR_ALREADY_IN_USE` if this NetworkedMultiplayerENet instance already has an open connection (in which case you need to call :ref:`close_connection` first) or :ref:`@GlobalScope.ERR_CANT_CREATE` if the server could not be created. .. _class_NetworkedMultiplayerENet_method_disconnect_peer: @@ -197,5 +197,5 @@ Returns the remote port of the given peer. - void **set_bind_ip** **(** :ref:`String` ip **)** -The IP used when creating a server. This is set to the wildcard ``*`` by default, which binds to all available interfaces. The given IP needs to be in IPv4 or IPv6 address format, for example: ``192.168.1.1``. +The IP used when creating a server. This is set to the wildcard ``"*"`` by default, which binds to all available interfaces. The given IP needs to be in IPv4 or IPv6 address format, for example: ``"192.168.1.1"``. diff --git a/classes/class_networkedmultiplayerpeer.rst b/classes/class_networkedmultiplayerpeer.rst index ea0d2dbe5..47479efcf 100644 --- a/classes/class_networkedmultiplayerpeer.rst +++ b/classes/class_networkedmultiplayerpeer.rst @@ -88,11 +88,11 @@ Enumerations enum **TransferMode**: -- **TRANSFER_MODE_UNRELIABLE** = **0** --- Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than ``TRANSFER_MODE_UNRELIABLE_ORDERED``. Use for non-critical data, and always consider whether the order matters. +- **TRANSFER_MODE_UNRELIABLE** = **0** --- Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than :ref:`TRANSFER_MODE_UNRELIABLE_ORDERED`. Use for non-critical data, and always consider whether the order matters. -- **TRANSFER_MODE_UNRELIABLE_ORDERED** = **1** --- Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than ``TRANSFER_MODE_RELIABLE``. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. +- **TRANSFER_MODE_UNRELIABLE_ORDERED** = **1** --- Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than :ref:`TRANSFER_MODE_RELIABLE`. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. -- **TRANSFER_MODE_RELIABLE** = **2** --- Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. +- **TRANSFER_MODE_RELIABLE** = **2** --- Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. .. _enum_NetworkedMultiplayerPeer_ConnectionStatus: @@ -191,5 +191,5 @@ Waits up to 1 second to receive a new network event. Sets the peer to which packets will be sent. -The ``id`` can be one of: ``TARGET_PEER_BROADCAST`` to send to all connected peers, ``TARGET_PEER_SERVER`` to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. Default: ``TARGET_PEER_BROADCAST`` +The ``id`` can be one of: :ref:`TARGET_PEER_BROADCAST` to send to all connected peers, :ref:`TARGET_PEER_SERVER` to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. Default: :ref:`TARGET_PEER_BROADCAST` diff --git a/classes/class_ninepatchrect.rst b/classes/class_ninepatchrect.rst index 88ccefa0a..5f8e9bf71 100644 --- a/classes/class_ninepatchrect.rst +++ b/classes/class_ninepatchrect.rst @@ -70,7 +70,7 @@ enum **AxisStretchMode**: Description ----------- -Better known as 9-slice panels, NinePatchRect produces clean panels of any size, based on a small texture. To do so, it splits the texture in a 3 by 3 grid. When you scale the node, it tiles the texture's sides horizontally or vertically, the center on both axes but it doesn't scale or tile the corners. +Also known as 9-slice panels, NinePatchRect produces clean panels of any size, based on a small texture. To do so, it splits the texture in a 3×3 grid. When you scale the node, it tiles the texture's sides horizontally or vertically, the center on both axes but it doesn't scale or tile the corners. Property Descriptions --------------------- @@ -109,7 +109,7 @@ Doesn't do anything at the time of writing. | *Getter* | is_draw_center_enabled() | +----------+--------------------------+ -If ``true``, draw the panel's center. Else, only draw the 9-slice's borders. Default value: ``true`` +If ``true``, draw the panel's center. Else, only draw the 9-slice's borders. Default value: ``true``. .. _class_NinePatchRect_property_patch_margin_bottom: diff --git a/classes/class_node.rst b/classes/class_node.rst index 8b6a89111..95f572ec4 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -252,9 +252,9 @@ Enumerations enum **PauseMode**: -- **PAUSE_MODE_INHERIT** = **0** --- Inherits pause mode from the node's parent. For the root node, it is equivalent to PAUSE_MODE_STOP. Default. +- **PAUSE_MODE_INHERIT** = **0** --- Inherits pause mode from the node's parent. For the root node, it is equivalent to :ref:`PAUSE_MODE_STOP`. Default. -- **PAUSE_MODE_STOP** = **1** --- Stop processing when the :ref:`SceneTree` is paused. +- **PAUSE_MODE_STOP** = **1** --- Stops processing when the :ref:`SceneTree` is paused. - **PAUSE_MODE_PROCESS** = **2** --- Continue to process regardless of the :ref:`SceneTree` pause state. @@ -353,7 +353,9 @@ Constants - **NOTIFICATION_PROCESS** = **17** --- Notification received every frame when the process flag is set (see :ref:`set_process`). -- **NOTIFICATION_PARENTED** = **18** --- Notification received when a node is set as a child of another node. Note that this doesn't mean that a node entered the Scene Tree. +- **NOTIFICATION_PARENTED** = **18** --- Notification received when a node is set as a child of another node. + +**Note:** This doesn't mean that a node entered the :ref:`SceneTree`. - **NOTIFICATION_UNPARENTED** = **19** --- Notification received when a node is unparented (parent removed it from the list of children). @@ -369,29 +371,51 @@ Constants - **NOTIFICATION_INTERNAL_PHYSICS_PROCESS** = **26** --- Notification received every frame when the internal physics process flag is set (see :ref:`set_physics_process_internal`). -- **NOTIFICATION_WM_MOUSE_ENTER** = **1002** +- **NOTIFICATION_WM_MOUSE_ENTER** = **1002** --- Notification received from the OS when the mouse enters the game window. -- **NOTIFICATION_WM_MOUSE_EXIT** = **1003** +Implemented on desktop and web platforms. -- **NOTIFICATION_WM_FOCUS_IN** = **1004** +- **NOTIFICATION_WM_MOUSE_EXIT** = **1003** --- Notification received from the OS when the mouse leaves the game window. -- **NOTIFICATION_WM_FOCUS_OUT** = **1005** +Implemented on desktop and web platforms. -- **NOTIFICATION_WM_QUIT_REQUEST** = **1006** +- **NOTIFICATION_WM_FOCUS_IN** = **1004** --- Notification received from the OS when the game window is focused. -- **NOTIFICATION_WM_GO_BACK_REQUEST** = **1007** +Implemented on all platforms. -- **NOTIFICATION_WM_UNFOCUS_REQUEST** = **1008** +- **NOTIFICATION_WM_FOCUS_OUT** = **1005** --- Notification received from the OS when the game window is unfocused. -- **NOTIFICATION_OS_MEMORY_WARNING** = **1009** +Implemented on all platforms. + +- **NOTIFICATION_WM_QUIT_REQUEST** = **1006** --- Notification received from the OS when a quit request is sent (e.g. closing the window with a "Close" button or Alt+F4). + +Implemented on desktop platforms. + +- **NOTIFICATION_WM_GO_BACK_REQUEST** = **1007** --- Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android). + +Specific to the Android platform. + +- **NOTIFICATION_WM_UNFOCUS_REQUEST** = **1008** --- Notification received from the OS when an unfocus request is sent (e.g. another OS window wants to take the focus). + +No supported platforms currently send this notification. + +- **NOTIFICATION_OS_MEMORY_WARNING** = **1009** --- Notification received from the OS when the application is exceeding its allocated memory. + +Specific to the iOS platform. - **NOTIFICATION_TRANSLATION_CHANGED** = **1010** --- Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like :ref:`Object.tr`. -- **NOTIFICATION_WM_ABOUT** = **1011** +- **NOTIFICATION_WM_ABOUT** = **1011** --- Notification received from the OS when a request for "About" information is sent. -- **NOTIFICATION_CRASH** = **1012** +Specific to the macOS platform. -- **NOTIFICATION_OS_IME_UPDATE** = **1013** +- **NOTIFICATION_CRASH** = **1012** --- Notification received from Godot's crash handler when the engine is about to crash. + +Implemented on desktop platforms if the crash handler is enabled. + +- **NOTIFICATION_OS_IME_UPDATE** = **1013** --- Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). + +Specific to the macOS platform. Description ----------- @@ -400,9 +424,9 @@ Nodes are Godot's building blocks. They can be assigned as the child of another A tree of nodes is called a *scene*. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects. -**Scene tree:** The :ref:`SceneTree` contains the active tree of nodes. When a node is added to the scene tree, it receives the NOTIFICATION_ENTER_TREE notification and its :ref:`_enter_tree` callback is triggered. Child nodes are always added *after* their parent node, i.e. the :ref:`_enter_tree` callback of a parent node will be triggered before its child's. +**Scene tree:** The :ref:`SceneTree` contains the active tree of nodes. When a node is added to the scene tree, it receives the :ref:`NOTIFICATION_ENTER_TREE` notification and its :ref:`_enter_tree` callback is triggered. Child nodes are always added *after* their parent node, i.e. the :ref:`_enter_tree` callback of a parent node will be triggered before its child's. -Once all nodes have been added in the scene tree, they receive the NOTIFICATION_READY notification and their respective :ref:`_ready` callbacks are triggered. For groups of nodes, the :ref:`_ready` callback is called in reverse order, starting with the children and moving up to the parent nodes. +Once all nodes have been added in the scene tree, they receive the :ref:`NOTIFICATION_READY` notification and their respective :ref:`_ready` callbacks are triggered. For groups of nodes, the :ref:`_ready` callback is called in reverse order, starting with the children and moving up to the parent nodes. This means that when adding a node to the scene tree, the following order will be used for the callbacks: :ref:`_enter_tree` of the parent, :ref:`_enter_tree` of the children, :ref:`_ready` of the children and finally :ref:`_ready` of the parent (recursively for the entire scene tree). @@ -416,7 +440,7 @@ Finally, when a node is freed with :ref:`Object.free` **Groups:** Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See :ref:`add_to_group`, :ref:`is_in_group` and :ref:`remove_from_group`. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on :ref:`SceneTree`. -**Networking with nodes:** After connecting to a server (or making one, see :ref:`NetworkedMultiplayerENet`) it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling :ref:`rpc` with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call Godot will use its :ref:`NodePath` (make sure node names are the same on all peers). Also take a look at the high-level networking tutorial and corresponding demos. +**Networking with nodes:** After connecting to a server (or making one, see :ref:`NetworkedMultiplayerENet`), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling :ref:`rpc` with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its :ref:`NodePath` (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos. Tutorials --------- @@ -436,7 +460,7 @@ Property Descriptions | *Getter* | get_custom_multiplayer() | +----------+-------------------------------+ -The override to the default :ref:`MultiplayerAPI`. Set to null to use the default SceneTree one. +The override to the default :ref:`MultiplayerAPI`. Set to ``null`` to use the default :ref:`SceneTree` one. .. _class_Node_property_filename: @@ -470,7 +494,7 @@ The :ref:`MultiplayerAPI` instance associated with this no | *Getter* | get_name() | +----------+-----------------+ -The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed +The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed. .. _class_Node_property_owner: @@ -482,7 +506,7 @@ The name of the node. This name is unique among the siblings (other child nodes | *Getter* | get_owner() | +----------+------------------+ -The node owner. A node can have any other node as owner (as long as it is a valid parent, grandparent, etc. ascending in the tree). When saving a node (using :ref:`PackedScene`) all the nodes it owns will be saved with it. This allows for the creation of complex :ref:`SceneTree`\ s, with instancing and subinstancing. +The node owner. A node can have any other node as owner (as long as it is a valid parent, grandparent, etc. ascending in the tree). When saving a node (using :ref:`PackedScene`), all the nodes it owns will be saved with it. This allows for the creation of complex :ref:`SceneTree`\ s, with instancing and subinstancing. .. _class_Node_property_pause_mode: @@ -505,7 +529,7 @@ Method Descriptions Called when the node enters the :ref:`SceneTree` (e.g. upon instancing, scene changing, or after calling :ref:`add_child` in a script). If the node has children, its :ref:`_enter_tree` callback will be called first, and then that of the children. -Corresponds to the NOTIFICATION_ENTER_TREE notification in :ref:`Object._notification`. +Corresponds to the :ref:`NOTIFICATION_ENTER_TREE` notification in :ref:`Object._notification`. .. _class_Node_method__exit_tree: @@ -513,7 +537,7 @@ Corresponds to the NOTIFICATION_ENTER_TREE notification in :ref:`Object._notific Called when the node is about to leave the :ref:`SceneTree` (e.g. upon freeing, scene changing, or after calling :ref:`remove_child` in a script). If the node has children, its :ref:`_exit_tree` callback will be called last, after all its children have left the tree. -Corresponds to the NOTIFICATION_EXIT_TREE notification in :ref:`Object._notification` and signal :ref:`tree_exiting`. To get notified when the node has already left the active tree, connect to the :ref:`tree_exited` +Corresponds to the :ref:`NOTIFICATION_EXIT_TREE` notification in :ref:`Object._notification` and signal :ref:`tree_exiting`. To get notified when the node has already left the active tree, connect to the :ref:`tree_exited` .. _class_Node_method__get_configuration_warning: @@ -543,7 +567,7 @@ Called during the physics processing step of the main loop. Physics processing m It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_physics_process`. -Corresponds to the NOTIFICATION_PHYSICS_PROCESS notification in :ref:`Object._notification`. +Corresponds to the :ref:`NOTIFICATION_PHYSICS_PROCESS` notification in :ref:`Object._notification`. .. _class_Node_method__process: @@ -553,7 +577,7 @@ Called during the processing step of the main loop. Processing happens at every It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process`. -Corresponds to the NOTIFICATION_PROCESS notification in :ref:`Object._notification`. +Corresponds to the :ref:`NOTIFICATION_PROCESS` notification in :ref:`Object._notification`. .. _class_Node_method__ready: @@ -561,9 +585,11 @@ Corresponds to the NOTIFICATION_PROCESS notification in :ref:`Object._notificati Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their :ref:`_ready` callbacks get triggered first, and the parent node will receive the ready notification afterwards. -Corresponds to the NOTIFICATION_READY notification in :ref:`Object._notification`. See also the ``onready`` keyword for variables. +Corresponds to the :ref:`NOTIFICATION_READY` notification in :ref:`Object._notification`. See also the ``onready`` keyword for variables. -Usually used for initialization. For even earlier initialization, :ref:`Object._init` may be used. Also see :ref:`_enter_tree`. +Usually used for initialization. For even earlier initialization, :ref:`Object._init` may be used. See also :ref:`_enter_tree`. + +**Note:** :ref:`_ready` may be called only once for each node. After removing a node from the scene tree and adding again, ``_ready`` will not be called for the second time. This can be bypassed with requesting another call with :ref:`request_ready`, which may be called anywhere before adding the node again. .. _class_Node_method__unhandled_input: @@ -595,7 +621,7 @@ For gameplay input, this and :ref:`_unhandled_input`). See notes in the description, and the group methods in :ref:`SceneTree`. -``persistent`` option is used when packing node to :ref:`PackedScene` and saving to file. Non-persistent groups aren't stored. +The ``persistent`` option is used when packing node to :ref:`PackedScene` and saving to file. Non-persistent groups aren't stored. .. _class_Node_method_can_process: @@ -631,15 +657,19 @@ You can fine-tune the behavior using the ``flags`` (see :ref:`DuplicateFlags` **find_node** **(** :ref:`String` mask, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** const -Finds a descendant of this node whose name matches ``mask`` as in :ref:`String.match` (i.e. case sensitive, but '\*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names. +Finds a descendant of this node whose name matches ``mask`` as in :ref:`String.match` (i.e. case-sensitive, but ``"*"`` matches zero or more characters and ``"?"`` matches any single character except ``"."``). -If ``owned`` is ``true``, this method only finds nodes whose owner is this node. This is especially important for scenes instantiated through script, because those scenes don't have an owner. +**Note:** It does not match against the full path, just against individual node names. + +If ``owned`` is ``true``, this method only finds nodes whose owner is this node. This is especially important for scenes instantiated through a script, because those scenes don't have an owner. .. _class_Node_method_find_parent: - :ref:`Node` **find_parent** **(** :ref:`String` mask **)** const -Finds the first parent of the current node whose name matches ``mask`` as in :ref:`String.match` (i.e. case sensitive, but '\*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names. +Finds the first parent of the current node whose name matches ``mask`` as in :ref:`String.match` (i.e. case-sensitive, but ``"*"`` matches zero or more characters and ``"?"`` matches any single character except ``"."``). + +**Note:** It does not match against the full path, just against individual node names. .. _class_Node_method_get_child: @@ -713,11 +743,23 @@ Possible paths are: - :ref:`Array` **get_node_and_resource** **(** :ref:`NodePath` path **)** +Fetches a node and one of its resources as specified by the :ref:`NodePath`'s subname (e.g. ``Area2D/CollisionShape2D:shape``). If several nested resources are specified in the :ref:`NodePath`, the last one will be fetched. + +The return value is an array of size 3: the first index points to the ``Node`` (or ``null`` if not found), the second index points to the :ref:`Resource` (or ``null`` if not found), and the third index is the remaining :ref:`NodePath`, if any. + +For example, assuming that ``Area2D/CollisionShape2D`` is a valid node and that its ``shape`` property has been assigned a :ref:`RectangleShape2D` resource, one could have this kind of output: + +:: + + print(get_node_and_resource("Area2D/CollisionShape2D")) # [[CollisionShape2D:1161], Null, ] + print(get_node_and_resource("Area2D/CollisionShape2D:shape")) # [[CollisionShape2D:1161], [RectangleShape2D:1156], ] + print(get_node_and_resource("Area2D/CollisionShape2D:shape:extents")) # [[CollisionShape2D:1161], [RectangleShape2D:1156], :extents] + .. _class_Node_method_get_node_or_null: - :ref:`Node` **get_node_or_null** **(** :ref:`NodePath` path **)** const -Similar to :ref:`get_node`, but does not raise an error when ``path`` does not point to a valid ``Node``. +Similar to :ref:`get_node`, but does not raise an error if ``path`` does not point to a valid ``Node``. .. _class_Node_method_get_parent: @@ -741,7 +783,7 @@ Returns the relative :ref:`NodePath` from this node to the speci - :ref:`float` **get_physics_process_delta_time** **(** **)** const -Returns the time elapsed since the last physics-bound frame (see :ref:`_physics_process`). This is always a constant value in physics processing unless the frames per second is changed in :ref:`OS`. +Returns the time elapsed since the last physics-bound frame (see :ref:`_physics_process`). This is always a constant value in physics processing unless the frames per second is changed via :ref:`Engine.target_fps`. .. _class_Node_method_get_position_in_parent: @@ -783,6 +825,8 @@ Returns ``true`` if the node that the :ref:`NodePath` points to - :ref:`bool` **has_node_and_resource** **(** :ref:`NodePath` path **)** const +Returns ``true`` if the :ref:`NodePath` points to a valid node and its subname points to a valid resource, e.g. ``Area2D/CollisionShape2D:shape``. Properties with a non-:ref:`Resource` type (e.g. nodes or primitive math types) are not considered resources. + .. _class_Node_method_is_a_parent_of: - :ref:`bool` **is_a_parent_of** **(** :ref:`Node` node **)** const @@ -865,7 +909,7 @@ Returns ``true`` if the node is processing unhandled key input (see :ref:`set_pr - void **move_child** **(** :ref:`Node` child_node, :ref:`int` to_position **)** -Moves a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful. +Moves a child node to a different position (order) among the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful. .. _class_Node_method_print_stray_nodes: @@ -877,7 +921,9 @@ Prints all stray nodes (nodes outside the :ref:`SceneTree`). Us - void **print_tree** **(** **)** -Prints the tree to stdout. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into the :ref:`get_node` function. Example output: +Prints the tree to stdout. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into the :ref:`get_node` function. + +**Example output:** :: @@ -892,7 +938,9 @@ Prints the tree to stdout. Used mainly for debugging purposes. This version disp - void **print_tree_pretty** **(** **)** -Similar to :ref:`print_tree`, this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the scene inspector. It is useful for inspecting larger trees. Example output: +Similar to :ref:`print_tree`, this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the scene inspector. It is useful for inspecting larger trees. + +**Example output:** :: @@ -907,13 +955,13 @@ Similar to :ref:`print_tree`, this prints the tree - void **propagate_call** **(** :ref:`String` method, :ref:`Array` args=[ ], :ref:`bool` parent_first=false **)** -Calls the given method (if present) with the arguments given in ``args`` on this node and recursively on all its children. If the parent_first argument is ``true`` then the method will be called on the current node first, then on all children. If it is ``false`` then the children will be called first. +Calls the given method (if present) with the arguments given in ``args`` on this node and recursively on all its children. If the ``parent_first`` argument is ``true``, the method will be called on the current node first, then on all its children. If ``parent_first`` is ``false``, the children will be called first. .. _class_Node_method_propagate_notification: - void **propagate_notification** **(** :ref:`int` what **)** -Notifies the current node and all its children recursively by calling notification() on all of them. +Notifies the current node and all its children recursively by calling :ref:`Object.notification` on all of them. .. _class_Node_method_queue_free: @@ -955,19 +1003,21 @@ Replaces a node in a scene by the given one. Subscriptions that pass through thi - void **request_ready** **(** **)** -Requests that ``_ready`` be called again. +Requests that ``_ready`` be called again. Note that the method won't be called immediately, but is scheduled for when the node is added to the scene tree again (see :ref:`_ready`). ``_ready`` is called only for the node which requested it, which means that you need to request ready for each child if you want them to call ``_ready`` too (in which case, ``_ready`` will be called in the same order as it would normally). .. _class_Node_method_rpc: - :ref:`Variant` **rpc** **(** :ref:`String` method, ... **)** vararg -Sends a remote procedure call request for the given ``method`` to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same :ref:`NodePath`, including the exact same node name. Behaviour depends on the RPC configuration for the given method, see :ref:`rpc_config`. Methods are not exposed to RPCs by default. Also see :ref:`rset` and :ref:`rset_config` for properties. Returns an empty :ref:`Variant`. Note that you can only safely use RPCs on clients after you received the ``connected_to_server`` signal from the :ref:`SceneTree`. You also need to keep track of the connection state, either by the :ref:`SceneTree` signals like ``server_disconnected`` or by checking ``SceneTree.network_peer.get_connection_status() == CONNECTION_CONNECTED``. +Sends a remote procedure call request for the given ``method`` to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same :ref:`NodePath`, including the exact same node name. Behaviour depends on the RPC configuration for the given method, see :ref:`rpc_config`. Methods are not exposed to RPCs by default. See also :ref:`rset` and :ref:`rset_config` for properties. Returns an empty :ref:`Variant`. + +**Note:** You can only safely use RPCs on clients after you received the ``connected_to_server`` signal from the :ref:`SceneTree`. You also need to keep track of the connection state, either by the :ref:`SceneTree` signals like ``server_disconnected`` or by checking ``SceneTree.network_peer.get_connection_status() == CONNECTION_CONNECTED``. .. _class_Node_method_rpc_config: - void **rpc_config** **(** :ref:`String` method, :ref:`RPCMode` mode **)** -Changes the RPC mode for the given ``method`` to the given ``mode``. See :ref:`RPCMode`. An alternative is annotating methods and properties with the corresponding keywords (``remote``, ``master``, ``puppet``, ``remotesync``, ``mastersync``, ``puppetsync``). By default, methods are not exposed to networking (and RPCs). Also see :ref:`rset` and :ref:`rset_config` for properties. +Changes the RPC mode for the given ``method`` to the given ``mode``. See :ref:`RPCMode`. An alternative is annotating methods and properties with the corresponding keywords (``remote``, ``master``, ``puppet``, ``remotesync``, ``mastersync``, ``puppetsync``). By default, methods are not exposed to networking (and RPCs). See also :ref:`rset` and :ref:`rset_config` for properties. .. _class_Node_method_rpc_id: @@ -991,13 +1041,13 @@ Sends a :ref:`rpc` to a specific peer identified by ``pee - void **rset** **(** :ref:`String` property, :ref:`Variant` value **)** -Remotely changes a property's value on other peers (and locally). Behaviour depends on the RPC configuration for the given property, see :ref:`rset_config`. Also see :ref:`rpc` for RPCs for methods, most information applies to this method as well. +Remotely changes a property's value on other peers (and locally). Behaviour depends on the RPC configuration for the given property, see :ref:`rset_config`. See also :ref:`rpc` for RPCs for methods, most information applies to this method as well. .. _class_Node_method_rset_config: - void **rset_config** **(** :ref:`String` property, :ref:`RPCMode` mode **)** -Changes the RPC mode for the given ``property`` to the given ``mode``. See :ref:`RPCMode`. An alternative is annotating methods and properties with the corresponding keywords (``remote``, ``master``, ``puppet``, ``remotesync``, ``mastersync``, ``puppetsync``). By default, properties are not exposed to networking (and RPCs). Also see :ref:`rpc` and :ref:`rpc_config` for methods. +Changes the RPC mode for the given ``property`` to the given ``mode``. See :ref:`RPCMode`. An alternative is annotating methods and properties with the corresponding keywords (``remote``, ``master``, ``puppet``, ``remotesync``, ``mastersync``, ``puppetsync``). By default, properties are not exposed to networking (and RPCs). See also :ref:`rpc` and :ref:`rpc_config` for methods. .. _class_Node_method_rset_id: @@ -1033,19 +1083,19 @@ Sets the node's network master to the peer with the given peer ID. The network m - void **set_physics_process** **(** :ref:`bool` enable **)** -Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a NOTIFICATION_PHYSICS_PROCESS at a fixed (usually 60 fps, see :ref:`OS` to change) interval (and the :ref:`_physics_process` callback will be called if exists). Enabled automatically if :ref:`_physics_process` is overridden. Any calls to this before :ref:`_ready` will be ignored. +Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a :ref:`NOTIFICATION_PHYSICS_PROCESS` at a fixed (usually 60 FPS, see :ref:`Engine.target_fps` to change) interval (and the :ref:`_physics_process` callback will be called if exists). Enabled automatically if :ref:`_physics_process` is overridden. Any calls to this before :ref:`_ready` will be ignored. .. _class_Node_method_set_physics_process_internal: - void **set_physics_process_internal** **(** :ref:`bool` enable **)** -Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal :ref:`_physics_process` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting (:ref:`set_physics_process`). Only useful for advanced uses to manipulate built-in nodes behaviour. +Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal :ref:`_physics_process` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting (:ref:`set_physics_process`). Only useful for advanced uses to manipulate built-in nodes' behaviour. .. _class_Node_method_set_process: - void **set_process** **(** :ref:`bool` enable **)** -Enables or disables processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the :ref:`_process` callback will be called if exists). Enabled automatically if :ref:`_process` is overridden. Any calls to this before :ref:`_ready` will be ignored. +Enables or disables processing. When a node is being processed, it will receive a :ref:`NOTIFICATION_PROCESS` on every drawn frame (and the :ref:`_process` callback will be called if exists). Enabled automatically if :ref:`_process` is overridden. Any calls to this before :ref:`_ready` will be ignored. .. _class_Node_method_set_process_input: @@ -1057,12 +1107,14 @@ Enables or disables input processing. This is not required for GUI controls! Ena - void **set_process_internal** **(** :ref:`bool` enable **)** -Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal :ref:`_process` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting (:ref:`set_process`). Only useful for advanced uses to manipulate built-in nodes behaviour. +Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal :ref:`_process` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting (:ref:`set_process`). Only useful for advanced uses to manipulate built-in nodes' behaviour. .. _class_Node_method_set_process_priority: - void **set_process_priority** **(** :ref:`int` priority **)** +Sets the node's priority in the execution order of the enabled processing callbacks (i.e. :ref:`NOTIFICATION_PROCESS`, :ref:`NOTIFICATION_PHYSICS_PROCESS` and their internal counterparts). Nodes with a higher process priority will have their processing callbacks executed first. + .. _class_Node_method_set_process_unhandled_input: - void **set_process_unhandled_input** **(** :ref:`bool` enable **)** diff --git a/classes/class_node2d.rst b/classes/class_node2d.rst index f88afc909..8e5e49aa3 100644 --- a/classes/class_node2d.rst +++ b/classes/class_node2d.rst @@ -16,7 +16,7 @@ Node2D Brief Description ----------------- -A 2D game object, parent of all 2D related nodes. Has a position, rotation, scale and Z-index. +A 2D game object, parent of all 2D-related nodes. Has a position, rotation, scale and Z index. Properties ---------- @@ -193,7 +193,7 @@ Rotation in degrees, relative to the node's parent. | *Getter* | get_scale() | +----------+------------------+ -The node's scale. Unscaled value: ``(1, 1)`` +The node's scale. Unscaled value: ``(1, 1)``. .. _class_Node2D_property_transform: @@ -217,7 +217,7 @@ Local :ref:`Transform2D`. | *Getter* | is_z_relative() | +----------+--------------------------+ -If ``true``, the node's Z-index is relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. +If ``true``, the node's Z index is relative to its parent's Z index. If this node's Z index is 2 and its parent's effective Z index is 3, then this node's effective Z index will be 2 + 3 = 5. .. _class_Node2D_property_z_index: @@ -229,7 +229,7 @@ If ``true``, the node's Z-index is relative to its parent's Z-index. If this nod | *Getter* | get_z_index() | +----------+--------------------+ -Z-index. Controls the order in which the nodes render. A node with a higher Z-index will display in front of others. +Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Method Descriptions ------------------- @@ -238,13 +238,13 @@ Method Descriptions - void **apply_scale** **(** :ref:`Vector2` ratio **)** -Multiplies the current scale by the 'ratio' vector. +Multiplies the current scale by the ``ratio`` vector. .. _class_Node2D_method_get_angle_to: - :ref:`float` **get_angle_to** **(** :ref:`Vector2` point **)** const -Returns the angle between the node and the 'point' in radians. +Returns the angle between the node and the ``point`` in radians. .. _class_Node2D_method_get_relative_transform_to_parent: @@ -256,13 +256,13 @@ Returns the :ref:`Transform2D` relative to this node's parent - void **global_translate** **(** :ref:`Vector2` offset **)** -Adds the 'offset' vector to the node's global position. +Adds the ``offset`` vector to the node's global position. .. _class_Node2D_method_look_at: - void **look_at** **(** :ref:`Vector2` point **)** -Rotates the node so it points towards the 'point'. +Rotates the node so it points towards the ``point``. .. _class_Node2D_method_move_local_x: diff --git a/classes/class_nodepath.rst b/classes/class_nodepath.rst index a5cc144b4..9407475c5 100644 --- a/classes/class_nodepath.rst +++ b/classes/class_nodepath.rst @@ -40,11 +40,11 @@ Methods Description ----------- -A pre-parsed relative or absolute path in a scene tree, for use with :ref:`Node.get_node` and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, ``"Path2D/PathFollow2D/Sprite:texture:size"`` would refer to the size property of the texture resource on the node named "Sprite" which is a child of the other named nodes in the path. Note that if you want to get a resource, you must end the path with a colon, otherwise the last element will be used as a property name. +A pre-parsed relative or absolute path in a scene tree, for use with :ref:`Node.get_node` and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, ``"Path2D/PathFollow2D/Sprite:texture:size"`` would refer to the ``size`` property of the ``texture`` resource on the node named ``"Sprite"`` which is a child of the other named nodes in the path. You will usually just pass a string to :ref:`Node.get_node` and it will be automatically converted, but you may occasionally want to parse a path ahead of time with ``NodePath`` or the literal syntax ``@"path"``. Exporting a ``NodePath`` variable will give you a node selection widget in the properties panel of the editor, which can often be useful. -A ``NodePath`` is made up of a list of node names, a list of "subnode" (resource) names, and the name of a property in the final node or resource. +A ``NodePath`` is composed of a list of slash-separated node names (like a filesystem path) and an optional colon-separated list of "subnames" which can be resources or properties. Method Descriptions ------------------- @@ -53,45 +53,98 @@ Method Descriptions - :ref:`NodePath` **NodePath** **(** :ref:`String` from **)** -Create a NodePath from a string, e.g. "Path2D/PathFollow2D/Sprite:texture:size". A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, ``"."`` and ``".."`` indicate the current node and its parent. +Creates a NodePath from a string, e.g. ``"Path2D/PathFollow2D/Sprite:texture:size"``. A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, ``"."`` and ``".."`` indicate the current node and its parent. + +The "subnames" optionally included after the path to the target node can point to resources or properties, and can also be nested. + +Examples of valid NodePaths (assuming that those nodes exist and have the referenced resources or properties): + +:: + + # Points to the Sprite node + "Path2D/PathFollow2D/Sprite" + # Points to the Sprite node and its "texture" resource. + # get_node() would retrieve "Sprite", while get_node_and_resource() + # would retrieve both the Sprite node and the "texture" resource. + "Path2D/PathFollow2D/Sprite:texture" + # Points to the Sprite node and its "position" property. + "Path2D/PathFollow2D/Sprite:position" + # Points to the Sprite node and the "x" component of its "position" property. + "Path2D/PathFollow2D/Sprite:position:x" + # Absolute path (from "root") + "/root/Level/Path2D" .. _class_NodePath_method_get_as_property_path: - :ref:`NodePath` **get_as_property_path** **(** **)** +Returns a node path with a colon character (``:``) prepended, transforming it to a pure property path with no node name (defaults to resolving from the current node). + +:: + + # This will be parsed as a node path to the "x" property in the "position" node + var node_path = NodePath("position:x") + # This will be parsed as a node path to the "x" component of the "position" property in the current node + var property_path = node_path.get_as_property_path() + print(property_path) # :position:x + .. _class_NodePath_method_get_concatenated_subnames: - :ref:`String` **get_concatenated_subnames** **(** **)** +Returns all subnames concatenated with a colon character (``:``) as separator, i.e. the right side of the first colon in a node path. + +:: + + var nodepath = NodePath("Path2D/PathFollow2D/Sprite:texture:load_path") + print(nodepath.get_concatenated_subnames()) # texture:load_path + .. _class_NodePath_method_get_name: - :ref:`String` **get_name** **(** :ref:`int` idx **)** -Get the node name indicated by ``idx`` (0 to :ref:`get_name_count`) +Gets the node name indicated by ``idx`` (0 to :ref:`get_name_count`). + +:: + + var node_path = NodePath("Path2D/PathFollow2D/Sprite") + print(node_path.get_name(0)) # Path2D + print(node_path.get_name(1)) # PathFollow2D + print(node_path.get_name(2)) # Sprite .. _class_NodePath_method_get_name_count: - :ref:`int` **get_name_count** **(** **)** -Get the number of node names which make up the path. +Gets the number of node names which make up the path. Subnames (see :ref:`get_subname_count`) are not included. + +For example, ``"Path2D/PathFollow2D/Sprite"`` has 3 names. .. _class_NodePath_method_get_subname: - :ref:`String` **get_subname** **(** :ref:`int` idx **)** -Get the resource name indicated by ``idx`` (0 to :ref:`get_subname_count`) +Gets the resource or property name indicated by ``idx`` (0 to :ref:`get_subname_count`). + +:: + + var node_path = NodePath("Path2D/PathFollow2D/Sprite:texture:load_path") + print(node_path.get_subname(0)) # texture + print(node_path.get_subname(1)) # load_path .. _class_NodePath_method_get_subname_count: - :ref:`int` **get_subname_count** **(** **)** -Get the number of resource names in the path. +Gets the number of resource or property names ("subnames") in the path. Each subname is listed after a colon character (``:``) in the node path. + +For example, ``"Path2D/PathFollow2D/Sprite:texture:load_path"`` has 2 subnames. .. _class_NodePath_method_is_absolute: - :ref:`bool` **is_absolute** **(** **)** -Returns ``true`` if the node path is absolute (not relative). +Returns ``true`` if the node path is absolute (as opposed to relative), which means that it starts with a slash character (``/``). Absolute node paths can be used to access the root node (``"/root"``) or autoloads (e.g. ``"/global"`` if a "global" autoload was registered). .. _class_NodePath_method_is_empty: diff --git a/classes/class_object.rst b/classes/class_object.rst index bad84fbf3..c594d7f68 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -82,7 +82,7 @@ Methods +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_blocking_signals` **(** **)** const | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_class` **(** :ref:`String` type **)** const | +| :ref:`bool` | :ref:`is_class` **(** :ref:`String` class **)** const | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_connected` **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method **)** const | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -120,7 +120,7 @@ Signals - **script_changed** **(** **)** -Emitted whenever the script of the Object is changed. +Emitted whenever the object's script is changed. Enumerations ------------ @@ -137,13 +137,13 @@ Enumerations enum **ConnectFlags**: -- **CONNECT_DEFERRED** = **1** --- Connect a signal in deferred mode. This way, signal emissions are stored in a queue, then set on idle time. +- **CONNECT_DEFERRED** = **1** --- Connects a signal in deferred mode. This way, signal emissions are stored in a queue, then set on idle time. - **CONNECT_PERSIST** = **2** --- Persisting connections are saved when the object is serialized to file. -- **CONNECT_ONESHOT** = **4** --- One shot connections disconnect themselves after emission. +- **CONNECT_ONESHOT** = **4** --- One-shot connections disconnect themselves after emission. -- **CONNECT_REFERENCE_COUNTED** = **8** +- **CONNECT_REFERENCE_COUNTED** = **8** --- Connect a signal as reference counted. This means that a given signal can be connected several times to the same target, and will only be fully disconnected once no references are left. Constants --------- @@ -169,7 +169,7 @@ Some classes that extend Object add memory management. This is the case of :ref: Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in :ref:`_get_property_list` and handled in :ref:`_get` and :ref:`_set`. However, scripting languages and C++ have simpler means to export them. -Objects also receive notifications. Notifications are a simple way to notify the object about simple events, so they can all be handled together. See :ref:`_notification`. +Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See :ref:`_notification`. Method Descriptions ------------------- @@ -178,80 +178,108 @@ Method Descriptions - :ref:`Variant` **_get** **(** :ref:`String` property **)** virtual +Virtual method which can be overridden to customize the return value of :ref:`get`. + Returns the given property. Returns ``null`` if the ``property`` does not exist. .. _class_Object_method__get_property_list: - :ref:`Array` **_get_property_list** **(** **)** virtual -Returns the object's property list as an :ref:`Array` of dictionaries. Dictionaries must contain: name:String, type:int (see TYPE\_\* enum in :ref:`@GlobalScope`) and optionally: hint:int (see PROPERTY_HINT\_\* in :ref:`@GlobalScope`), hint_string:String, usage:int (see PROPERTY_USAGE\_\* in :ref:`@GlobalScope`). +Virtual method which can be overridden to customize the return value of :ref:`get_property_list`. + +Returns the object's property list as an :ref:`Array` of dictionaries. + +Each property's :ref:`Dictionary` must contain at least ``name: String`` and ``type: int`` (see :ref:`Variant.Type`) entries. Optionally, it can also include ``hint: int`` (see :ref:`PropertyHint`), ``hint_string: String``, and ``usage: int`` (see :ref:`PropertyUsageFlags`). .. _class_Object_method__init: - void **_init** **(** **)** virtual -The virtual method called upon initialization. +Called when the object is initialized. .. _class_Object_method__notification: - void **_notification** **(** :ref:`int` what **)** virtual -Notify the object internally using an ID. +Called whenever the object receives a notification, which is identified in ``what`` by a constant. The base ``Object`` has two constants :ref:`NOTIFICATION_POSTINITIALIZE` and :ref:`NOTIFICATION_PREDELETE`, but subclasses such as :ref:`Node` define a lot more notifications which are also received by this method. .. _class_Object_method__set: - :ref:`bool` **_set** **(** :ref:`String` property, :ref:`Variant` value **)** virtual +Virtual method which can be overridden to customize the return value of :ref:`set`. + Sets a property. Returns ``true`` if the ``property`` exists. .. _class_Object_method__to_string: - :ref:`String` **_to_string** **(** **)** virtual -Returns a :ref:`String` representing the object. Default is ``"[ClassName:RID]"``. +Virtual method which can be overridden to customize the return value of :ref:`to_string`, and thus the object's representation where it is converted to a string, e.g. with ``print(obj)``. -Override this method to customize the :ref:`String` representation of the object when it's being converted to a string, for example: ``print(obj)``. +Returns a :ref:`String` representing the object. Default is ``"[ClassName:RID]"``. .. _class_Object_method_add_user_signal: - void **add_user_signal** **(** :ref:`String` signal, :ref:`Array` arguments=[ ] **)** -Adds a user-defined ``signal``. Arguments are optional, but can be added as an :ref:`Array` of dictionaries, each containing "name" and "type" (from :ref:`@GlobalScope` TYPE\_\*). +Adds a user-defined ``signal``. Arguments are optional, but can be added as an :ref:`Array` of dictionaries, each containing ``name: String`` and ``type: int`` (see :ref:`Variant.Type`) entries. .. _class_Object_method_call: - :ref:`Variant` **call** **(** :ref:`String` method, ... **)** vararg -Calls the ``method`` on the object and returns a result. Pass parameters as a comma separated list. +Calls the ``method`` on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: + +:: + + call("set", "position", Vector2(42.0, 0.0)) .. _class_Object_method_call_deferred: - :ref:`Variant` **call_deferred** **(** :ref:`String` method, ... **)** vararg -Calls the ``method`` on the object during idle time and returns a result. Pass parameters as a comma separated list. +Calls the ``method`` on the object during idle time and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: + +:: + + call_deferred("set", "position", Vector2(42.0, 0.0)) .. _class_Object_method_callv: - :ref:`Variant` **callv** **(** :ref:`String` method, :ref:`Array` arg_array **)** -Calls the ``method`` on the object and returns a result. Pass parameters as an :ref:`Array`. +Calls the ``method`` on the object and returns the result. Contrarily to :ref:`call`, this method does not support a variable number of arguments but expected all parameters passed via a single :ref:`Array`. + +:: + + callv("set", [ "position", Vector2(42.0, 0.0) ]) .. _class_Object_method_can_translate_messages: - :ref:`bool` **can_translate_messages** **(** **)** const -Returns ``true`` if the object can translate strings. +Returns ``true`` if the object can translate strings. See :ref:`set_message_translation` and :ref:`tr`. .. _class_Object_method_connect: - :ref:`Error` **connect** **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method, :ref:`Array` binds=[ ], :ref:`int` flags=0 **)** -Connects a ``signal`` to a ``method`` on a ``target`` object. Pass optional ``binds`` to the call. Use ``flags`` to set deferred or one shot connections. See ``CONNECT_*`` constants. +Connects a ``signal`` to a ``method`` on a ``target`` object. Pass optional ``binds`` to the call as an :ref:`Array` of parameters. Use ``flags`` to set deferred or one-shot connections. See :ref:`ConnectFlags` constants. -A ``signal`` can only be connected once to a ``method``. It will throw an error if already connected. To avoid this, first, use :ref:`is_connected` to check for existing connections. +A ``signal`` can only be connected once to a ``method``. It will throw an error if already connected, unless the signal was connected with :ref:`CONNECT_REFERENCE_COUNTED`. To avoid this, first, use :ref:`is_connected` to check for existing connections. If the ``target`` is destroyed in the game's lifecycle, the connection will be lost. +Examples: + +:: + + connect("pressed", self, "_on_Button_pressed") # BaseButton signal + connect("text_entered", self, "_on_LineEdit_text_entered") # LineEdit signal + connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # User-defined signal + .. _class_Object_method_disconnect: - void **disconnect** **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method **)** @@ -264,19 +292,24 @@ If you try to disconnect a connection that does not exist, the method will throw - :ref:`Variant` **emit_signal** **(** :ref:`String` signal, ... **)** vararg -Emits the given ``signal``. +Emits the given ``signal``. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: + +:: + + emit_signal("hit", weapon_type, damage) + emit_signal("game_over") .. _class_Object_method_free: - void **free** **(** **)** -Deletes the object from memory. +Deletes the object from memory. Any pre-existing reference to the freed object will now return ``null``. .. _class_Object_method_get: - :ref:`Variant` **get** **(** :ref:`String` property **)** const -Returns a :ref:`Variant` for a ``property``. +Returns the :ref:`Variant` value of the given ``property``. .. _class_Object_method_get_class: @@ -290,21 +323,19 @@ Returns the object's class as a :ref:`String`. Returns an :ref:`Array` of dictionaries with information about signals that are connected to the object. -Inside each :ref:`Dictionary` there are 3 fields: +Each :ref:`Dictionary` contains three String entries: -- "source" is a reference to signal emitter. +- ``source`` is a reference to the signal emitter. -- "signal_name" is name of connected signal. +- ``signal_name`` is the name of the connected signal. -- "method_name" is a name of method to which signal is connected. +- ``method_name`` is the name of the method to which the signal is connected. .. _class_Object_method_get_indexed: - :ref:`Variant` **get_indexed** **(** :ref:`NodePath` property **)** const -Get indexed object property by String. - -Property indices get accessed with colon separation, for example: ``position:x`` +Gets the object's property indexed by the given :ref:`NodePath`. The node path should be relative to the current object and can use the colon character (``:``) to access nested properties. Examples: ``"position:x"`` or ``"material:next_pass:blend_mode"``. .. _class_Object_method_get_instance_id: @@ -312,11 +343,13 @@ Property indices get accessed with colon separation, for example: ``position:x`` Returns the object's unique instance ID. +This ID can be saved in :ref:`EncodedObjectAsID`, and can be used to retrieve the object instance with :ref:`@GDScript.instance_from_id`. + .. _class_Object_method_get_meta: - :ref:`Variant` **get_meta** **(** :ref:`String` name **)** const -Returns the object's metadata for the given ``name``. +Returns the object's metadata entry for the given ``name``. .. _class_Object_method_get_meta_list: @@ -334,13 +367,15 @@ Returns the object's methods and their signatures as an :ref:`Array - :ref:`Array` **get_property_list** **(** **)** const -Returns the list of properties as an :ref:`Array` of dictionaries. Dictionaries contain: name:String, type:int (see TYPE\_\* enum in :ref:`@GlobalScope`) and optionally: hint:int (see PROPERTY_HINT\_\* in :ref:`@GlobalScope`), hint_string:String, usage:int (see PROPERTY_USAGE\_\* in :ref:`@GlobalScope`). +Returns the object's property list as an :ref:`Array` of dictionaries. + +Each property's :ref:`Dictionary` contain at least ``name: String`` and ``type: int`` (see :ref:`Variant.Type`) entries. Optionally, it can also include ``hint: int`` (see :ref:`PropertyHint`), ``hint_string: String``, and ``usage: int`` (see :ref:`PropertyUsageFlags`). .. _class_Object_method_get_script: - :ref:`Reference` **get_script** **(** **)** const -Returns the object's :ref:`Script` or ``null`` if one doesn't exist. +Returns the object's :ref:`Script` instance, or ``null`` if none is assigned. .. _class_Object_method_get_signal_connection_list: @@ -358,7 +393,7 @@ Returns the list of signals as an :ref:`Array` of dictionaries. - :ref:`bool` **has_meta** **(** :ref:`String` name **)** const -Returns ``true`` if a metadata is found with the given ``name``. +Returns ``true`` if a metadata entry is found with the given ``name``. .. _class_Object_method_has_method: @@ -380,9 +415,9 @@ Returns ``true`` if signal emission blocking is enabled. .. _class_Object_method_is_class: -- :ref:`bool` **is_class** **(** :ref:`String` type **)** const +- :ref:`bool` **is_class** **(** :ref:`String` class **)** const -Returns ``true`` if the object inherits from the given ``type``. +Returns ``true`` if the object inherits from the given ``class``. .. _class_Object_method_is_connected: @@ -394,27 +429,33 @@ Returns ``true`` if a connection exists for a given ``signal``, ``target``, and - :ref:`bool` **is_queued_for_deletion** **(** **)** const -Returns ``true`` if the ``queue_free`` method was called for the object. +Returns ``true`` if the :ref:`Node.queue_free` method was called for the object. .. _class_Object_method_notification: - void **notification** **(** :ref:`int` what, :ref:`bool` reversed=false **)** -Notify the object of something. +Send a given notification to the object, which will also trigger a call to the :ref:`_notification` method of all classes that the object inherits from. + +If ``reversed`` is ``true``, :ref:`_notification` is called first on the object's own class, and then up to its successive parent classes. If ``reversed`` is ``false``, :ref:`_notification` is called first on the highest ancestor (``Object`` itself), and then down to its successive inheriting classes. .. _class_Object_method_property_list_changed_notify: - void **property_list_changed_notify** **(** **)** +Notify the editor that the property list has changed, so that editor plugins can take the new values into account. Does nothing on export builds. + .. _class_Object_method_remove_meta: - void **remove_meta** **(** :ref:`String` name **)** +Removes a given entry from the object's metadata. + .. _class_Object_method_set: - void **set** **(** :ref:`String` property, :ref:`Variant` value **)** -Set property into the object. +Assigns a new value to the given property. If the ``property`` does not exist, nothing will happen. .. _class_Object_method_set_block_signals: @@ -426,29 +467,37 @@ If set to ``true``, signal emission is blocked. - void **set_deferred** **(** :ref:`String` property, :ref:`Variant` value **)** -Set property into the object, after the current frame's physics step. This is equivalent to calling :ref:`set` via :ref:`call_deferred`, i.e. ``call_deferred("set", [property, value])``. +Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling :ref:`set` via :ref:`call_deferred`, i.e. ``call_deferred("set", property, value)``. .. _class_Object_method_set_indexed: - void **set_indexed** **(** :ref:`NodePath` property, :ref:`Variant` value **)** +Assigns a new value to the property identified by the :ref:`NodePath`. The node path should be relative to the current object and can use the colon character (``:``) to access nested properties. Example: + +:: + + set_indexed("position", Vector2(42, 0)) + set_indexed("position:y", -10) + print(position) # (42, -10) + .. _class_Object_method_set_message_translation: - void **set_message_translation** **(** :ref:`bool` enable **)** -Define whether the object can translate strings (with calls to :ref:`tr`). Default is ``true``. +Defines whether the object can translate strings (with calls to :ref:`tr`). Default is ``true``. .. _class_Object_method_set_meta: - void **set_meta** **(** :ref:`String` name, :ref:`Variant` value **)** -Set a metadata into the object. Metadata is serialized. Metadata can be *anything*. +Adds or changes a given entry in the object's metadata. Metadata are serialized, and can take any :ref:`Variant` value. .. _class_Object_method_set_script: - void **set_script** **(** :ref:`Reference` script **)** -Set a script into the object, scripts extend the object functionality. +Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality. .. _class_Object_method_to_string: @@ -462,5 +511,7 @@ Override the method :ref:`_to_string` to customi - :ref:`String` **tr** **(** :ref:`String` message **)** const -Translate a message. Only works if message translation is enabled (which it is by default). See :ref:`set_message_translation`. +Translates a message using translation catalogs configured in the Project Settings. + +Only works if message translation is enabled (which it is by default), otherwise it returns the ``message`` unchanged. See :ref:`set_message_translation`. diff --git a/classes/class_occluderpolygon2d.rst b/classes/class_occluderpolygon2d.rst index 7445c11e9..d35a2c0bc 100644 --- a/classes/class_occluderpolygon2d.rst +++ b/classes/class_occluderpolygon2d.rst @@ -40,11 +40,11 @@ Enumerations enum **CullMode**: -- **CULL_DISABLED** = **0** --- Culling mode for the occlusion. Disabled means no culling. See :ref:`cull_mode`. +- **CULL_DISABLED** = **0** --- Culling is disabled. See :ref:`cull_mode`. -- **CULL_CLOCKWISE** = **1** --- Culling mode for the occlusion. Sets the culling to be in clockwise direction. See :ref:`cull_mode`. +- **CULL_CLOCKWISE** = **1** --- Culling is performed in the clockwise direction. See :ref:`cull_mode`. -- **CULL_COUNTER_CLOCKWISE** = **2** --- Culling mode for the occlusion. Sets the culling to be in counter clockwise direction. See :ref:`cull_mode`. +- **CULL_COUNTER_CLOCKWISE** = **2** --- Culling is performed in the counterclockwise direction. See :ref:`cull_mode`. Description ----------- @@ -64,7 +64,7 @@ Property Descriptions | *Getter* | is_closed() | +----------+-------------------+ -If ``true``, closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction. Default value ``true``. +If ``true``, closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction. Default value: ``true``. .. _class_OccluderPolygon2D_property_cull_mode: @@ -76,7 +76,7 @@ If ``true``, closes the polygon. A closed OccluderPolygon2D occludes the light c | *Getter* | get_cull_mode() | +----------+----------------------+ -Set the direction of the occlusion culling when not ``CULL_DISABLED``. Default value ``DISABLED``. +The culling mode to use. Default value: :ref:`CULL_DISABLED`. .. _class_OccluderPolygon2D_property_polygon: @@ -88,5 +88,7 @@ Set the direction of the occlusion culling when not ``CULL_DISABLED``. Default v | *Getter* | get_polygon() | +----------+--------------------+ -A :ref:`Vector2` array with the index for polygon's vertices positions. Note that the returned value is a copy of the underlying array, rather than a reference. +A :ref:`Vector2` array with the index for polygon's vertices positions. + +**Note:** The returned value is a copy of the underlying array, rather than a reference. diff --git a/classes/class_omnilight.rst b/classes/class_omnilight.rst index 2ab5e6b36..9894a121f 100644 --- a/classes/class_omnilight.rst +++ b/classes/class_omnilight.rst @@ -40,9 +40,9 @@ Enumerations enum **ShadowMode**: -- **SHADOW_DUAL_PARABOLOID** = **0** +- **SHADOW_DUAL_PARABOLOID** = **0** --- Shadows are rendered to a dual-paraboloid texture. Faster than :ref:`SHADOW_CUBE`, but lower-quality. -- **SHADOW_CUBE** = **1** +- **SHADOW_CUBE** = **1** --- Shadows are rendered to a cubemap. Slower than :ref:`SHADOW_DUAL_PARABOLOID`, but higher-quality. .. _enum_OmniLight_ShadowDetail: @@ -79,7 +79,7 @@ Property Descriptions | *Getter* | get_param() | +----------+------------------+ -The light's attenuation (drop-off) curve. A number of presets are available in the Inspector. +The light's attenuation (drop-off) curve. A number of presets are available in the **Inspector** by right-clicking the curve. .. _class_OmniLight_property_omni_range: @@ -91,7 +91,7 @@ The light's attenuation (drop-off) curve. A number of presets are available in t | *Getter* | get_param() | +----------+------------------+ -Maximum distance the light affects. +The light's radius. .. _class_OmniLight_property_omni_shadow_detail: diff --git a/classes/class_opensimplexnoise.rst b/classes/class_opensimplexnoise.rst index cc0383e65..7c74e5909 100644 --- a/classes/class_opensimplexnoise.rst +++ b/classes/class_opensimplexnoise.rst @@ -151,7 +151,7 @@ Generate a noise image with the requested ``width`` and ``height``, based on the Returns the 1D noise value ``[-1,1]`` at the given x-coordinate. -Note: This method actually returns the 2D noise value ``[-1,1]`` with fixed y-coordinate value 0.0. +**Note:** This method actually returns the 2D noise value ``[-1,1]`` with fixed y-coordinate value 0.0. .. _class_OpenSimplexNoise_method_get_noise_2d: @@ -187,5 +187,5 @@ Returns the 4D noise value ``[-1,1]`` at the given position. - :ref:`Image` **get_seamless_image** **(** :ref:`int` size **)** -Generate a tileable noise image, based on the current noise parameters. Generated seamless images are always square (``size`` x ``size``). +Generate a tileable noise image, based on the current noise parameters. Generated seamless images are always square (``size`` × ``size``). diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index 8274438ad..a66f9ec64 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -108,13 +108,13 @@ Signals - **item_focused** **(** :ref:`int` id **)** -This signal is emitted when user navigated to an item using ``ui_up`` or ``ui_down`` action. ID of the item selected is passed as argument. +Emitted the when user navigates to an item using the ``ui_up`` or ``ui_down`` actions. The index of the item selected is passed as argument. .. _class_OptionButton_signal_item_selected: - **item_selected** **(** :ref:`int` id **)** -This signal is emitted when the current item was changed by the user. Index of the item selected is passed as argument. +Emitted when the current item has been changed by the user. The index of the item selected is passed as argument. Description ----------- @@ -139,19 +139,19 @@ Method Descriptions - void **add_icon_item** **(** :ref:`Texture` texture, :ref:`String` label, :ref:`int` id=-1 **)** -Add an item, with a "texture" icon, text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end. +Adds an item, with a ``texture`` icon, text ``label`` and (optionally) ``id``. If no ``id`` is passed, ``id`` becomes the item index. New items are appended at the end. .. _class_OptionButton_method_add_item: - void **add_item** **(** :ref:`String` label, :ref:`int` id=-1 **)** -Add an item, with text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end. +Adds an item, with text ``label`` and (optionally) ``id``. If no ``id`` is passed, ``id`` becomes the item index. New items are appended at the end. .. _class_OptionButton_method_add_separator: - void **add_separator** **(** **)** -Add a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end. +Adds a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end. .. _class_OptionButton_method_clear: @@ -169,7 +169,7 @@ Returns the amount of items in the OptionButton. - :ref:`Texture` **get_item_icon** **(** :ref:`int` idx **)** const -Returns the icon of the item at index "idx". +Returns the icon of the item at index ``idx``. .. _class_OptionButton_method_get_item_id: @@ -191,7 +191,7 @@ Returns the index of the item with the given ``id``. - :ref:`String` **get_item_text** **(** :ref:`int` idx **)** const -Returns the text of the item at index "idx". +Returns the text of the item at index ``idx``. .. _class_OptionButton_method_get_popup: @@ -229,13 +229,13 @@ Select an item by index and make it the current item. - void **set_item_icon** **(** :ref:`int` idx, :ref:`Texture` texture **)** -Set the icon of an item at index "idx". +Sets the icon of an item at index ``idx``. .. _class_OptionButton_method_set_item_id: - void **set_item_id** **(** :ref:`int` idx, :ref:`int` id **)** -Set the ID of an item at index "idx". +Sets the ID of an item at index ``idx``. .. _class_OptionButton_method_set_item_metadata: @@ -245,5 +245,5 @@ Set the ID of an item at index "idx". - void **set_item_text** **(** :ref:`int` idx, :ref:`String` text **)** -Set the text of an item at index "idx". +Sets the text of an item at index ``idx``. diff --git a/classes/class_os.rst b/classes/class_os.rst index e22d3f46f..85b0f107b 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -438,7 +438,7 @@ enum **PowerState**: Description ----------- -Operating System functions. OS Wraps the most common functionality to communicate with the host Operating System, such as: mouse grabbing, mouse cursors, clipboard, video mode, date and time, timers, environment variables, execution of binaries, command line, etc. +Operating System functions. OS wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, date and time, timers, environment variables, execution of binaries, command line, etc. Property Descriptions --------------------- @@ -563,7 +563,7 @@ If ``true``, vertical synchronization (Vsync) is enabled. If ``true``, removes the window frame. -Note: Setting ``window_borderless`` to ``false`` disables per-pixel transparency. +**Note:** Setting ``window_borderless`` to ``false`` disables per-pixel transparency. .. _class_OS_property_window_fullscreen: @@ -615,7 +615,7 @@ If ``true``, the window background is transparent and window frame is removed. Use ``get_tree().get_root().set_transparent_background(true)`` to disable main viewport background rendering. -Note: This property has no effect if "Project > Project Settings > Display > Window > Per-pixel transparency > Allowed" setting is disabled. +**Note:** This property has no effect if **Project > Project Settings > Display > Window > Per-pixel transparency > Allowed** setting is disabled. .. _class_OS_property_window_position: @@ -660,7 +660,7 @@ Method Descriptions - void **alert** **(** :ref:`String` text, :ref:`String` title="Alert!" **)** -Displays a modal dialog box utilizing the host OS. +Displays a modal dialog box using the host OS' facilities. Execution is blocked until the dialog is closed. .. _class_OS_method_can_draw: @@ -688,13 +688,13 @@ Centers the window on the screen if in windowed mode. - void **delay_msec** **(** :ref:`int` msec **)** const -Delay execution of the current thread by given milliseconds. +Delay execution of the current thread by ``msec`` milliseconds. .. _class_OS_method_delay_usec: - void **delay_usec** **(** :ref:`int` usec **)** const -Delay execution of the current thread by given microseconds. +Delay execution of the current thread by ``usec`` microseconds. .. _class_OS_method_dump_memory_to_file: @@ -720,22 +720,22 @@ At the end of the file is a statistic of all used Resource Types. Execute the file at the given path with the arguments passed as an array of strings. Platform path resolution will take place. The resolved file must exist and be executable. -The arguments are used in the given order and separated by a space, so ``OS.execute('ping', ['-w', '3', 'godotengine.org'], false)`` will resolve to ``ping -w 3 godotengine.org`` in the system's shell. +The arguments are used in the given order and separated by a space, so ``OS.execute("ping", ["-w", "3", "godotengine.org"], false)`` will resolve to ``ping -w 3 godotengine.org`` in the system's shell. -This method has slightly different behaviour based on whether the ``blocking`` mode is enabled. +This method has slightly different behavior based on whether the ``blocking`` mode is enabled. -When ``blocking`` is enabled, the Godot thread will pause its execution while waiting for the process to terminate. The shell output of the process will be written to the ``output`` array as a single string. When the process terminates, the Godot thread will resume execution. +If ``blocking`` is ``true``, the Godot thread will pause its execution while waiting for the process to terminate. The shell output of the process will be written to the ``output`` array as a single string. When the process terminates, the Godot thread will resume execution. -When ``blocking`` is disabled, the Godot thread will continue while the new process runs. It is not possible to retrieve the shell output in non-blocking mode, so ``output`` will be empty. +If ``blocking`` is ``false``, the Godot thread will continue while the new process runs. It is not possible to retrieve the shell output in non-blocking mode, so ``output`` will be empty. -The return value also depends on the blocking mode. When blocking, the method will return -2 (no process ID information is available in blocking mode). When non-blocking, the method returns a process ID, which you can use to monitor the process (and potentially terminate it with :ref:`kill`). If the process forking (non-blocking) or opening (blocking) fails, the method will return -1. +The return value also depends on the blocking mode. When blocking, the method will return -2 (no process ID information is available in blocking mode). When non-blocking, the method returns a process ID, which you can use to monitor the process (and potentially terminate it with :ref:`kill`). If the process forking (non-blocking) or opening (blocking) fails, the method will return ``-1``. Example of blocking mode and retrieving the shell output: :: var output = [] - OS.execute('ls', ['-l', '/tmp'], true, output) + OS.execute("ls", ["-l", "/tmp"], true, output) Example of non-blocking mode, running another instance of the project and storing its process ID: @@ -747,13 +747,13 @@ If you wish to access a shell built-in or perform a composite command, a platfor :: - OS.execute('CMD.exe', ['/C', 'cd %TEMP% && dir'], true, output) + OS.execute("CMD.exe", ["/C", "cd %TEMP% && dir"], true, output) .. _class_OS_method_find_scancode_from_string: - :ref:`int` **find_scancode_from_string** **(** :ref:`String` string **)** const -Returns the scancode of the given string (e.g. "Escape") +Returns the scancode of the given string (e.g. "Escape"). .. _class_OS_method_get_audio_driver_count: @@ -787,21 +787,21 @@ Returns the currently used video driver, using one of the values from :ref:`Vide - :ref:`Dictionary` **get_date** **(** :ref:`bool` utc=false **)** const -Returns current date as a dictionary of keys: year, month, day, weekday, dst (daylight savings time). +Returns current date as a dictionary of keys: ``year``, ``month``, ``day``, ``weekday``, ``dst`` (Daylight Savings Time). .. _class_OS_method_get_datetime: - :ref:`Dictionary` **get_datetime** **(** :ref:`bool` utc=false **)** const -Returns current datetime as a dictionary of keys: year, month, day, weekday, dst (daylight savings time), hour, minute, second. +Returns current datetime as a dictionary of keys: ``year``, ``month``, ``day``, ``weekday``, ``dst`` (Daylight Savings Time), ``hour``, ``minute``, ``second``. .. _class_OS_method_get_datetime_from_unix_time: - :ref:`Dictionary` **get_datetime_from_unix_time** **(** :ref:`int` unix_time_val **)** const -Get a dictionary of time values when given epoch time. +Gets a dictionary of time values corresponding to the given UNIX epoch time (in seconds). -Dictionary Time values will be a union of values from :ref:`get_time` and :ref:`get_date` dictionaries (with the exception of dst = day light standard time, as it cannot be determined from epoch). +The returned Dictionary's values will be the same as :ref:`get_datetime`, with the exception of Daylight Savings Time as it cannot be determined from the epoch. .. _class_OS_method_get_dynamic_memory_usage: @@ -825,17 +825,17 @@ Returns the path to the current engine executable. - :ref:`Vector2` **get_ime_selection** **(** **)** const -Returns IME cursor position (currently edited portion of the string) relative to the characters in the composition string. +Returns the IME cursor position (the currently-edited portion of the string) relative to the characters in the composition string. -``NOTIFICATION_OS_IME_UPDATE`` is sent to the application to notify it of changes to the IME cursor position. +:ref:`MainLoop.NOTIFICATION_OS_IME_UPDATE` is sent to the application to notify it of changes to the IME cursor position. .. _class_OS_method_get_ime_text: - :ref:`String` **get_ime_text** **(** **)** const -Returns IME intermediate composition string. +Returns the IME intermediate composition string. -``NOTIFICATION_OS_IME_UPDATE`` is sent to the application to notify it of changes to the IME composition string. +:ref:`MainLoop.NOTIFICATION_OS_IME_UPDATE` is sent to the application to notify it of changes to the IME composition string. .. _class_OS_method_get_latin_keyboard_variant: @@ -843,7 +843,7 @@ Returns IME intermediate composition string. Returns the current latin keyboard variant as a String. -Possible return values are: "QWERTY", "AZERTY", "QZERTY", "DVORAK", "NEO", "COLEMAK" or "ERROR". +Possible return values are: ``"QWERTY"``, ``"AZERTY"``, ``"QZERTY"``, ``"DVORAK"``, ``"NEO"``, ``"COLEMAK"`` or ``"ERROR"``. .. _class_OS_method_get_locale: @@ -861,7 +861,7 @@ Returns the model name of the current device. - :ref:`String` **get_name** **(** **)** const -Returns the name of the host OS. Possible values are: "Android", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "UWP", "X11". +Returns the name of the host OS. Possible values are: ``"Android"``, ``"Haiku"``, ``"iOS"``, ``"HTML5"``, ``"OSX"``, ``"Server"``, ``"Windows"``, ``"UWP"``, ``"X11"``. .. _class_OS_method_get_power_percent_left: @@ -873,25 +873,25 @@ Returns the amount of battery left in the device as a percentage. - :ref:`int` **get_power_seconds_left** **(** **)** -Returns the time in seconds before the device runs out of battery. +Returns an estimate of the time left in seconds before the device runs out of battery. .. _class_OS_method_get_power_state: - :ref:`PowerState` **get_power_state** **(** **)** -Returns the current state of the device regarding battery and power. See ``POWERSTATE_*`` constants. +Returns the current state of the device regarding battery and power. See :ref:`PowerState` constants. .. _class_OS_method_get_process_id: - :ref:`int` **get_process_id** **(** **)** const -Returns the game process ID +Returns the project's process ID. .. _class_OS_method_get_processor_count: - :ref:`int` **get_processor_count** **(** **)** const -Returns the number of cores available in the host machine. +Returns the number of threads available on the host machine. .. _class_OS_method_get_real_window_size: @@ -903,7 +903,7 @@ Returns the window size including decorations like window borders. - :ref:`String` **get_scancode_string** **(** :ref:`int` code **)** const -Returns the given scancode as a string (e.g. Return values: "Escape", "Shift+Escape"). +Returns the given scancode as a string (e.g. Return values: ``"Escape"``, ``"Shift+Escape"``). .. _class_OS_method_get_screen_count: @@ -917,19 +917,16 @@ Returns the number of displays attached to the host machine. Returns the dots per inch density of the specified screen. -On Android Devices, the actual screen densities are grouped into six generalized densities: +On Android devices, the actual screen densities are grouped into six generalized densities: -ldpi - 120 dpi +:: -mdpi - 160 dpi - -hdpi - 240 dpi - -xhdpi - 320 dpi - -xxhdpi - 480 dpi - -xxxhdpi - 640 dpi + ldpi - 120 dpi + mdpi - 160 dpi + hdpi - 240 dpi + xhdpi - 320 dpi + xxhdpi - 480 dpi + xxxhdpi - 640 dpi .. _class_OS_method_get_screen_position: @@ -951,7 +948,7 @@ Returns the dimensions in pixels of the specified screen. - :ref:`int` **get_static_memory_peak_usage** **(** **)** const -Returns the max amount of static memory used (only works in debug). +Returns the maximum amount of static memory used (only works in debug). .. _class_OS_method_get_static_memory_usage: @@ -1007,23 +1004,23 @@ Returns the current time zone as a dictionary with the keys: bias and name. Returns a string that is unique to the device. -Returns empty string on HTML5 and UWP which are not supported yet. +**Note:** Returns an empty string on HTML5 and UWP, as this method isn't implemented on those platforms yet. .. _class_OS_method_get_unix_time: - :ref:`int` **get_unix_time** **(** **)** const -Returns the current unix epoch timestamp. +Returns the current UNIX epoch timestamp. .. _class_OS_method_get_unix_time_from_datetime: - :ref:`int` **get_unix_time_from_datetime** **(** :ref:`Dictionary` datetime **)** const -Get an epoch time value from a dictionary of time values. +Gets an epoch time value from a dictionary of time values. -``datetime`` must be populated with the following keys: year, month, day, hour, minute, second. +``datetime`` must be populated with the following keys: ``year``, ``month``, ``day``, ``hour``, ``minute``, ``second``. -You can pass the output from :ref:`get_datetime_from_unix_time` directly into this function. Daylight savings time (dst), if present, is ignored. +You can pass the output from :ref:`get_datetime_from_unix_time` directly into this function. Daylight Savings Time (``dst``), if present, is ignored. .. _class_OS_method_get_user_data_dir: @@ -1055,7 +1052,7 @@ Returns the name of the video driver matching the given ``driver`` index. This i - :ref:`int` **get_virtual_keyboard_height** **(** **)** -Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or it is currently hidden. +Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden. .. _class_OS_method_get_window_safe_area: @@ -1073,7 +1070,7 @@ Returns ``true`` if an environment variable exists. Returns ``true`` if the feature for the given feature tag is supported in the currently running instance, depending on platform, build etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the `Feature Tags `_ documentation for more details. -Note that tag names are case-sensitive. +**Note:** Tag names are case-sensitive. .. _class_OS_method_has_touchscreen_ui_hint: @@ -1107,19 +1104,19 @@ Returns ``false`` if the build is a release build. - :ref:`bool` **is_ok_left_and_cancel_right** **(** **)** const -Returns ``true`` if the "Okay" button should appear on the left and "Cancel" on the right. +Returns ``true`` if the **OK** button should appear on the left and **Cancel** on the right. .. _class_OS_method_is_scancode_unicode: - :ref:`bool` **is_scancode_unicode** **(** :ref:`int` code **)** const -Returns ``true`` if the input code has a unicode character. +Returns ``true`` if the input scancode corresponds to a Unicode character. .. _class_OS_method_is_stdout_verbose: - :ref:`bool` **is_stdout_verbose** **(** **)** const -Returns ``true`` if the engine was executed with -v (verbose stdout). +Returns ``true`` if the engine was executed with ``-v`` (verbose stdout). .. _class_OS_method_is_userfs_persistent: @@ -1139,7 +1136,7 @@ Returns ``true`` if the window should always be on top of other windows. Kill (terminate) the process identified by the given process ID (``pid``), e.g. the one returned by :ref:`execute` in non-blocking mode. -Note that this method can also be used to kill processes that were not spawned by the game. +**Note:** This method can also be used to kill processes that were not spawned by the game. .. _class_OS_method_move_window_to_foreground: @@ -1165,7 +1162,7 @@ Pauses native video playback. Plays native video from the specified path, at the given volume and with audio and subtitle tracks. -Note: This method is only implemented on Android and iOS, and the current Android implementation does not support the ``volume``, ``audio_track`` and ``subtitle_track`` options. +**Note:** This method is only implemented on Android and iOS, and the current Android implementation does not support the ``volume``, ``audio_track`` and ``subtitle_track`` options. .. _class_OS_method_native_video_stop: @@ -1187,7 +1184,7 @@ Resumes native video playback. - void **print_all_resources** **(** :ref:`String` tofile="" **)** -Shows all resources in the game. Optionally the list can be written to a file. +Shows all resources in the game. Optionally, the list can be written to a file by specifying a file path in ``tofile``. .. _class_OS_method_print_all_textures_by_size: @@ -1253,7 +1250,7 @@ Sets the game's icon using a multi-size platform-specific icon file (``*.ico`` o Appropriate size sub-icons are used for window caption, taskbar/dock and window selection dialog. -Note: This method is only implemented on macOS and Windows. +**Note:** This method is only implemented on macOS and Windows. .. _class_OS_method_set_thread_name: @@ -1293,5 +1290,5 @@ Requests the OS to open a resource with the most appropriate program. For exampl - void **show_virtual_keyboard** **(** :ref:`String` existing_text="" **)** -Shows the virtual keyboard if the platform has one. The *existing_text* parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). +Shows the virtual keyboard if the platform has one. The ``existing_text`` parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). diff --git a/classes/class_packedscene.rst b/classes/class_packedscene.rst index a2c2277cc..eda54c7ef 100644 --- a/classes/class_packedscene.rst +++ b/classes/class_packedscene.rst @@ -51,38 +51,44 @@ enum **GenEditState**: - **GEN_EDIT_STATE_DISABLED** = **0** --- If passed to :ref:`instance`, blocks edits to the scene state. -- **GEN_EDIT_STATE_INSTANCE** = **1** --- If passed to :ref:`instance`, provides local scene resources to the local scene. Requires tools compiled. +- **GEN_EDIT_STATE_INSTANCE** = **1** --- If passed to :ref:`instance`, provides local scene resources to the local scene. -- **GEN_EDIT_STATE_MAIN** = **2** --- If passed to :ref:`instance`, provides local scene resources to the local scene. Only the main scene should receive the main edit state. Requires tools compiled. +**Note:** Only available in editor builds. + +- **GEN_EDIT_STATE_MAIN** = **2** --- If passed to :ref:`instance`, provides local scene resources to the local scene. Only the main scene should receive the main edit state. + +**Note:** Only available in editor builds. Description ----------- A simplified interface to a scene file. Provides access to operations and checks that can be performed on the scene resource itself. -Can be used to save a node to a file. When saving, the node as well as all the node it owns get saved (see ``owner`` property on :ref:`Node`). Note that the node doesn't need to own itself. +Can be used to save a node to a file. When saving, the node as well as all the node it owns get saved (see ``owner`` property on :ref:`Node`). -Example of saving a node with different owners: The following example creates 3 objects: ``Node2D`` (``node``), ``RigidBody2D`` (``rigid``) and ``CollisionObject2D`` (``collision``). ``collision`` is a child of ``rigid`` which is a child of ``node``. Only ``rigid`` is owned by ``node`` and ``pack`` will therefore only save those two nodes, but not ``collision``. +**Note:** The node doesn't need to own itself. + +**Example of saving a node with different owners:** The following example creates 3 objects: ``Node2D`` (``node``), ``RigidBody2D`` (``rigid``) and ``CollisionObject2D`` (``collision``). ``collision`` is a child of ``rigid`` which is a child of ``node``. Only ``rigid`` is owned by ``node`` and ``pack`` will therefore only save those two nodes, but not ``collision``. :: - # create the objects + # Create the objects var node = Node2D.new() var rigid = RigidBody2D.new() var collision = CollisionShape2D.new() - # create the object hierarchy + # Create the object hierarchy rigid.add_child(collision) node.add_child(rigid) - # change owner of rigid, but not of collision + # Change owner of rigid, but not of collision rigid.owner = node var scene = PackedScene.new() - # only node and rigid are now packed + # Only node and rigid are now packed var result = scene.pack(node) if result == OK: - ResourceSaver.save("res://path/name.scn", scene) # or user://... + ResourceSaver.save("res://path/name.scn", scene) # Or "user://..." Property Descriptions --------------------- @@ -114,7 +120,7 @@ Returns the ``SceneState`` representing the scene file contents. - :ref:`Node` **instance** **(** :ref:`GenEditState` edit_state=0 **)** const -Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers :ref:`Node`'s ``NOTIFICATION_INSTANCED`` notification on the root node. +Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a :ref:`Node.NOTIFICATION_INSTANCED` notification on the root node. .. _class_PackedScene_method_pack: diff --git a/classes/class_packetpeer.rst b/classes/class_packetpeer.rst index 7789df59a..532199356 100644 --- a/classes/class_packetpeer.rst +++ b/classes/class_packetpeer.rst @@ -45,7 +45,7 @@ Methods Description ----------- -PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low level bytes or having to worry about network ordering. +PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low-level bytes or having to worry about network ordering. Property Descriptions --------------------- @@ -60,11 +60,11 @@ Property Descriptions | *Getter* | is_object_decoding_allowed() | +----------+----------------------------------+ -Deprecated. Use ``get_var`` and ``put_var`` parameters instead. +*Deprecated.* Use ``get_var`` and ``put_var`` parameters instead. -If ``true`` the PacketPeer will allow encoding and decoding of object via :ref:`get_var` and :ref:`put_var`. +If ``true``, the PacketPeer will allow encoding and decoding of object via :ref:`get_var` and :ref:`put_var`. -**WARNING:** Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). +**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. Method Descriptions ------------------- @@ -79,7 +79,7 @@ Returns the number of packets currently available in the ring-buffer. - :ref:`PoolByteArray` **get_packet** **(** **)** -Get a raw packet. +Gets a raw packet. .. _class_PacketPeer_method_get_packet_error: @@ -91,19 +91,19 @@ Returns the error state of the last packet received (via :ref:`get_packet` **get_var** **(** :ref:`bool` allow_objects=false **)** -Get a Variant. When ``allow_objects`` (or :ref:`allow_object_decoding`) is ``true`` decoding objects is allowed. +Gets a Variant. If ``allow_objects`` (or :ref:`allow_object_decoding`) is ``true``, decoding objects is allowed. -**WARNING:** Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). +**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. .. _class_PacketPeer_method_put_packet: - :ref:`Error` **put_packet** **(** :ref:`PoolByteArray` buffer **)** -Send a raw packet. +Sends a raw packet. .. _class_PacketPeer_method_put_var: - :ref:`Error` **put_var** **(** :ref:`Variant` var, :ref:`bool` full_objects=false **)** -Send a Variant as a packet. When ``full_objects`` (or :ref:`allow_object_decoding`) is ``true`` encoding objects is allowed (and can potentially include code). +Sends a :ref:`Variant` as a packet. If ``full_objects`` (or :ref:`allow_object_decoding`) is ``true``, encoding objects is allowed (and can potentially include code). diff --git a/classes/class_packetpeerudp.rst b/classes/class_packetpeerudp.rst index e96a7dc92..5456d5748 100644 --- a/classes/class_packetpeerudp.rst +++ b/classes/class_packetpeerudp.rst @@ -51,7 +51,7 @@ Method Descriptions - void **close** **(** **)** -Close the UDP socket the ``PacketPeerUDP`` is currently listening on. +Closes the UDP socket the ``PacketPeerUDP`` is currently listening on. .. _class_PacketPeerUDP_method_get_packet_ip: @@ -75,7 +75,7 @@ Returns whether this ``PacketPeerUDP`` is listening. - :ref:`Error` **join_multicast_group** **(** :ref:`String` multicast_address, :ref:`String` interface_name **)** -Join the multicast group specified by ``multicast_address`` using the interface identified by ``interface_name``. +Joins the multicast group specified by ``multicast_address`` using the interface identified by ``interface_name``. You can join the same multicast group with multiple interfaces. Use :ref:`IP.get_local_interfaces` to know which are available. @@ -83,29 +83,29 @@ You can join the same multicast group with multiple interfaces. Use :ref:`IP.get - :ref:`Error` **leave_multicast_group** **(** :ref:`String` multicast_address, :ref:`String` interface_name **)** -Remove the interface identified by ``interface_name`` from the multicast group specified by ``multicast_address``. +Removes the interface identified by ``interface_name`` from the multicast group specified by ``multicast_address``. .. _class_PacketPeerUDP_method_listen: - :ref:`Error` **listen** **(** :ref:`int` port, :ref:`String` bind_address="*", :ref:`int` recv_buf_size=65536 **)** -Make this ``PacketPeerUDP`` listen on the "port" binding to "bind_address" with a buffer size "recv_buf_size". +Makes this ``PacketPeerUDP`` listen on the ``port`` binding to ``bind_address`` with a buffer size ``recv_buf_size``. -If "bind_address" is set as "\*" (default), the peer will listen on all available addresses (both IPv4 and IPv6). +If ``bind_address`` is set to ``"*"`` (default), the peer will listen on all available addresses (both IPv4 and IPv6). -If "bind_address" is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the peer will listen on all available addresses matching that IP type. +If ``bind_address`` is set to ``"0.0.0.0"`` (for IPv4) or ``"::"`` (for IPv6), the peer will listen on all available addresses matching that IP type. -If "bind_address" is set to any valid address (e.g. "192.168.1.101", "::1", etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists). +If ``bind_address`` is set to any valid address (e.g. ``"192.168.1.101"``, ``"::1"``, etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists). .. _class_PacketPeerUDP_method_set_dest_address: - :ref:`Error` **set_dest_address** **(** :ref:`String` host, :ref:`int` port **)** -Set the destination address and port for sending packets and variables, a hostname will be resolved using if valid. +Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed. .. _class_PacketPeerUDP_method_wait: - :ref:`Error` **wait** **(** **)** -Wait for a packet to arrive on the listening port, see :ref:`listen`. +Waits for a packet to arrive on the listening port. See :ref:`listen`. diff --git a/classes/class_panoramasky.rst b/classes/class_panoramasky.rst index bfb322cbe..c332f4413 100644 --- a/classes/class_panoramasky.rst +++ b/classes/class_panoramasky.rst @@ -26,7 +26,7 @@ Properties Description ----------- -A resource referenced in an :ref:`Environment` that is used to draw a background. The Panorama sky functions similar to skyboxes in other engines except it uses a equirectangular sky map instead of a cube map. +A resource referenced in an :ref:`Environment` that is used to draw a background. The Panorama sky functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a cube map. Property Descriptions --------------------- diff --git a/classes/class_parallaxbackground.rst b/classes/class_parallaxbackground.rst index bc2a9610f..7777b51eb 100644 --- a/classes/class_parallaxbackground.rst +++ b/classes/class_parallaxbackground.rst @@ -51,7 +51,7 @@ Property Descriptions | *Getter* | get_scroll_base_offset() | +----------+-------------------------------+ -Base position offset of all :ref:`ParallaxLayer` children. +The base position offset for all :ref:`ParallaxLayer` children. .. _class_ParallaxBackground_property_scroll_base_scale: @@ -63,7 +63,7 @@ Base position offset of all :ref:`ParallaxLayer` children. | *Getter* | get_scroll_base_scale() | +----------+------------------------------+ -Base motion scale of all :ref:`ParallaxLayer` children. +The base motion scale for all :ref:`ParallaxLayer` children. .. _class_ParallaxBackground_property_scroll_ignore_camera_zoom: @@ -87,7 +87,7 @@ If ``true``, elements in :ref:`ParallaxLayer` child aren't | *Getter* | get_limit_begin() | +----------+------------------------+ -Top left limits for scrolling to begin. If the camera is outside of this limit the background will stop scrolling. Must be lower than :ref:`scroll_limit_end` to work. +Top-left limits for scrolling to begin. If the camera is outside of this limit, the background will stop scrolling. Must be lower than :ref:`scroll_limit_end` to work. .. _class_ParallaxBackground_property_scroll_limit_end: @@ -99,7 +99,7 @@ Top left limits for scrolling to begin. If the camera is outside of this limit t | *Getter* | get_limit_end() | +----------+----------------------+ -Right bottom limits for scrolling to end. If the camera is outside of this limit the background will stop scrolling. Must be higher than :ref:`scroll_limit_begin` to work. +Bottom-right limits for scrolling to end. If the camera is outside of this limit, the background will stop scrolling. Must be higher than :ref:`scroll_limit_begin` to work. .. _class_ParallaxBackground_property_scroll_offset: diff --git a/classes/class_parallaxlayer.rst b/classes/class_parallaxlayer.rst index b748c34a3..7f346c349 100644 --- a/classes/class_parallaxlayer.rst +++ b/classes/class_parallaxlayer.rst @@ -34,7 +34,7 @@ A ParallaxLayer must be the child of a :ref:`ParallaxBackground` mirroring. Useful for creating an infinite scrolling background. If an axis is set to ``0`` the :ref:`Texture` will not be mirrored. Default value: ``(0, 0)``. +The ParallaxLayer's :ref:`Texture` mirroring. Useful for creating an infinite scrolling background. If an axis is set to ``0``, the :ref:`Texture` will not be mirrored. Default value: ``(0, 0)``. .. _class_ParallaxLayer_property_motion_offset: @@ -73,5 +73,5 @@ The ParallaxLayer's offset relative to the parent ParallaxBackground's :ref:`Par | *Getter* | get_motion_scale() | +----------+-------------------------+ -Multiplies the ParallaxLayer's motion. If an axis is set to ``0`` it will not scroll. +Multiplies the ParallaxLayer's motion. If an axis is set to ``0``, it will not scroll. diff --git a/classes/class_particles.rst b/classes/class_particles.rst index a8d4e8c90..a2eb485e4 100644 --- a/classes/class_particles.rst +++ b/classes/class_particles.rst @@ -131,7 +131,7 @@ Number of particles to emit. | *Getter* | get_draw_order() | +----------+-----------------------+ -Particle draw order. Uses ``DRAW_ORDER_*`` values. Default value: ``DRAW_ORDER_INDEX``. +Particle draw order. Uses ``DRAW_ORDER_*`` values. Default value: :ref:`DRAW_ORDER_INDEX`. .. _class_Particles_property_draw_pass_1: @@ -215,7 +215,7 @@ If ``true``, particles are being emitted. Default value: ``true``. | *Getter* | get_explosiveness_ratio() | +----------+--------------------------------+ -Time ratio between each emission. If ``0`` particles are emitted continuously. If ``1`` all particles are emitted simultaneously. Default value: ``0``. +Time ratio between each emission. If ``0``, particles are emitted continuously. If ``1``, all particles are emitted simultaneously. Default value: ``0``. .. _class_Particles_property_fixed_fps: @@ -344,7 +344,7 @@ Method Descriptions - :ref:`AABB` **capture_aabb** **(** **)** const -Returns the bounding box that contains all the particles that are active in the current frame. +Returns the axis-aligned bounding box that contains all the particles that are active in the current frame. .. _class_Particles_method_restart: diff --git a/classes/class_particles2d.rst b/classes/class_particles2d.rst index 5a9fc701f..b6c7896c8 100644 --- a/classes/class_particles2d.rst +++ b/classes/class_particles2d.rst @@ -114,7 +114,7 @@ Number of particles emitted in one emission cycle. | *Getter* | get_draw_order() | +----------+-----------------------+ -Particle draw order. Uses ``DRAW_ORDER_*`` values. Default value: ``DRAW_ORDER_INDEX``. +Particle draw order. Uses ``DRAW_ORDER_*`` values. Default value: :ref:`DRAW_ORDER_INDEX`. .. _class_Particles2D_property_emitting: @@ -162,7 +162,7 @@ The particle system's frame rate is fixed to a value. For instance, changing the | *Getter* | get_fractional_delta() | +----------+-----------------------------+ -If ``true``, results in fractional delta calculation which has a smoother particles display effect. Default value: ``true`` +If ``true``, results in fractional delta calculation which has a smoother particles display effect. Default value: ``true``. .. _class_Particles2D_property_lifetime: @@ -270,7 +270,7 @@ Particle system's running speed scaling ratio. Default value: ``1``. A value of | *Getter* | get_texture() | +----------+--------------------+ -Particle texture. If ``null`` particles will be squares. +Particle texture. If ``null``, particles will be squares. .. _class_Particles2D_property_visibility_rect: diff --git a/classes/class_particlesmaterial.rst b/classes/class_particlesmaterial.rst index 5b3ff10f8..c40d85ef5 100644 --- a/classes/class_particlesmaterial.rst +++ b/classes/class_particlesmaterial.rst @@ -254,7 +254,7 @@ Property Descriptions Initial rotation applied to each particle, in degrees. -Only applied when :ref:`flag_disable_z` or :ref:`flag_rotate_y` are ``true`` or the :ref:`SpatialMaterial` being used to draw the particle is using ``BillboardMode.BILLBOARD_PARTICLES``. +Only applied when :ref:`flag_disable_z` or :ref:`flag_rotate_y` are ``true`` or the :ref:`SpatialMaterial` being used to draw the particle is using :ref:`SpatialMaterial.BILLBOARD_PARTICLES`. .. _class_ParticlesMaterial_property_angle_curve: @@ -292,7 +292,7 @@ Rotation randomness ratio. Default value: ``0``. Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. -Only applied when :ref:`flag_disable_z` or :ref:`flag_rotate_y` are ``true`` or the :ref:`SpatialMaterial` being used to draw the particle is using ``BillboardMode.BILLBOARD_PARTICLES``. +Only applied when :ref:`flag_disable_z` or :ref:`flag_rotate_y` are ``true`` or the :ref:`SpatialMaterial` being used to draw the particle is using :ref:`SpatialMaterial.BILLBOARD_PARTICLES`. .. _class_ParticlesMaterial_property_angular_velocity_curve: @@ -460,7 +460,7 @@ Damping randomness ratio. Default value: ``0``. | *Getter* | get_emission_box_extents() | +----------+---------------------------------+ -The box's extents if ``emission_shape`` is set to ``EMISSION_SHAPE_BOX``. +The box's extents if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_BOX`. .. _class_ParticlesMaterial_property_emission_color_texture: @@ -484,7 +484,7 @@ Particle color will be modulated by color determined by sampling this texture at | *Getter* | get_emission_normal_texture() | +----------+------------------------------------+ -Particle velocity and rotation will be set by sampling this texture at the same point as the :ref:`emission_point_texture`. Used only in ``EMISSION_SHAPE_DIRECTED``. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. +Particle velocity and rotation will be set by sampling this texture at the same point as the :ref:`emission_point_texture`. Used only in :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. .. _class_ParticlesMaterial_property_emission_point_count: @@ -496,7 +496,7 @@ Particle velocity and rotation will be set by sampling this texture at the same | *Getter* | get_emission_point_count() | +----------+---------------------------------+ -The number of emission points if ``emission_shape`` is set to ``EMISSION_SHAPE_POINTS`` or ``EMISSION_SHAPE_DIRECTED_POINTS``. +The number of emission points if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_POINTS` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. .. _class_ParticlesMaterial_property_emission_point_texture: @@ -508,7 +508,7 @@ The number of emission points if ``emission_shape`` is set to ``EMISSION_SHAPE_P | *Getter* | get_emission_point_texture() | +----------+-----------------------------------+ -Particles will be emitted at positions determined by sampling this texture at a random position. Used with ``EMISSION_SHAPE_POINTS`` and ``EMISSION_SHAPE_DIRECTED_POINTS``. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. +Particles will be emitted at positions determined by sampling this texture at a random position. Used with :ref:`EMISSION_SHAPE_POINTS` and :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. .. _class_ParticlesMaterial_property_emission_shape: @@ -520,7 +520,7 @@ Particles will be emitted at positions determined by sampling this texture at a | *Getter* | get_emission_shape() | +----------+---------------------------+ -Particles will be emitted inside this region. Use ``EMISSION_SHAPE_*`` constants for values. Default value: ``EMISSION_SHAPE_POINT``. +Particles will be emitted inside this region. Use ``EMISSION_SHAPE_*`` constants for values. Default value: :ref:`EMISSION_SHAPE_POINT`. .. _class_ParticlesMaterial_property_emission_sphere_radius: @@ -532,7 +532,7 @@ Particles will be emitted inside this region. Use ``EMISSION_SHAPE_*`` constants | *Getter* | get_emission_sphere_radius() | +----------+-----------------------------------+ -The sphere's radius if ``emission_shape`` is set to ``EMISSION_SHAPE_SPHERE``. +The sphere's radius if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_SPHERE`. .. _class_ParticlesMaterial_property_flag_align_y: @@ -544,7 +544,7 @@ The sphere's radius if ``emission_shape`` is set to ``EMISSION_SHAPE_SPHERE``. | *Getter* | get_flag() | +----------+-----------------+ -Align y-axis of particle with the direction of its velocity. +Align Y axis of particle with the direction of its velocity. .. _class_ParticlesMaterial_property_flag_disable_z: @@ -568,7 +568,7 @@ If ``true``, particles will not move on the z axis. Default value: ``true`` for | *Getter* | get_flag() | +----------+-----------------+ -If ``true``, particles rotate around y-axis by :ref:`angle`. +If ``true``, particles rotate around Y axis by :ref:`angle`. .. _class_ParticlesMaterial_property_flatness: diff --git a/classes/class_path.rst b/classes/class_path.rst index 597e54d21..d5fb46af7 100644 --- a/classes/class_path.rst +++ b/classes/class_path.rst @@ -14,7 +14,7 @@ Path Brief Description ----------------- -Container for a :ref:`Curve3D`. +Contains a :ref:`Curve3D` path for :ref:`PathFollow` nodes to follow. Properties ---------- @@ -30,10 +30,14 @@ Signals - **curve_changed** **(** **)** +Emitted when the :ref:`curve` changes. + Description ----------- -This class is a container/Node-ification of a :ref:`Curve3D`, so it can have :ref:`Spatial` properties and :ref:`Node` info. +Can have :ref:`PathFollow` child nodes moving along the :ref:`Curve3D`. See :ref:`PathFollow` for more information on the usage. + +Note that the path is considered as relative to the moved nodes (children of :ref:`PathFollow`). As such, the curve should usually start with a zero vector ``(0, 0, 0)``. Property Descriptions --------------------- @@ -48,3 +52,5 @@ Property Descriptions | *Getter* | get_curve() | +----------+------------------+ +A :ref:`Curve3D` describing the path. + diff --git a/classes/class_path2d.rst b/classes/class_path2d.rst index 182f6d247..8f536906a 100644 --- a/classes/class_path2d.rst +++ b/classes/class_path2d.rst @@ -26,9 +26,9 @@ Properties Description ----------- -Can have :ref:`PathFollow2D` child-nodes moving along the :ref:`Curve2D`. See :ref:`PathFollow2D` for more information on this usage. +Can have :ref:`PathFollow2D` child nodes moving along the :ref:`Curve2D`. See :ref:`PathFollow2D` for more information on usage. -Note that the path is considered as relative to the moved nodes (children of :ref:`PathFollow2D`) - usually the curve should start with a zero vector (0, 0). +**Note:** The path is considered as relative to the moved nodes (children of :ref:`PathFollow2D`). As such, the curve should usually start with a zero vector (``(0, 0)``). Property Descriptions --------------------- diff --git a/classes/class_pathfollow.rst b/classes/class_pathfollow.rst index 1a37481d6..0fd86ab42 100644 --- a/classes/class_pathfollow.rst +++ b/classes/class_pathfollow.rst @@ -67,7 +67,7 @@ Description This node takes its parent :ref:`Path`, and returns the coordinates of a point within it, given a distance from the first vertex. -It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly. +It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node. Property Descriptions --------------------- @@ -86,7 +86,7 @@ If ``true``, the position between two cached points is interpolated cubically, a The points along the :ref:`Curve3D` of the :ref:`Path` are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. -There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. +There are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. .. _class_PathFollow_property_h_offset: @@ -134,7 +134,7 @@ The distance from the first vertex, measured in 3D units along the path. This se | *Getter* | get_rotation_mode() | +----------+--------------------------+ -Allows or forbids rotation on one or more axes, depending on the constants being used. +Allows or forbids rotation on one or more axes, depending on the :ref:`RotationMode` constants being used. .. _class_PathFollow_property_unit_offset: diff --git a/classes/class_pathfollow2d.rst b/classes/class_pathfollow2d.rst index c28797c34..13716dd10 100644 --- a/classes/class_pathfollow2d.rst +++ b/classes/class_pathfollow2d.rst @@ -42,7 +42,7 @@ Description This node takes its parent :ref:`Path2D`, and returns the coordinates of a point within it, given a distance from the first vertex. -It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly. +It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node. Property Descriptions --------------------- @@ -61,7 +61,7 @@ If ``true``, the position between two cached points is interpolated cubically, a The points along the :ref:`Curve2D` of the :ref:`Path2D` are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. -There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. +There are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. .. _class_PathFollow2D_property_h_offset: diff --git a/classes/class_performance.rst b/classes/class_performance.rst index 952678d63..3cef5058e 100644 --- a/classes/class_performance.rst +++ b/classes/class_performance.rst @@ -14,7 +14,7 @@ Performance Brief Description ----------------- -Exposes performance related data. +Exposes performance-related data. Methods ------- @@ -90,11 +90,11 @@ Enumerations enum **Monitor**: -- **TIME_FPS** = **0** --- Frames per second. +- **TIME_FPS** = **0** --- Number of frames per second. -- **TIME_PROCESS** = **1** --- Time it took to complete one frame. +- **TIME_PROCESS** = **1** --- Time it took to complete one frame, in seconds. -- **TIME_PHYSICS_PROCESS** = **2** --- Time it took to complete one physics frame. +- **TIME_PHYSICS_PROCESS** = **2** --- Time it took to complete one physics frame, in seconds. - **MEMORY_STATIC** = **3** --- Static memory currently used, in bytes. Not available in release builds. @@ -112,13 +112,13 @@ enum **Monitor**: - **OBJECT_NODE_COUNT** = **10** --- Number of nodes currently instanced in the scene tree. This also includes the root node. -- **OBJECT_ORPHAN_NODE_COUNT** = **11** +- **OBJECT_ORPHAN_NODE_COUNT** = **11** --- Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. - **RENDER_OBJECTS_IN_FRAME** = **12** --- 3D objects drawn per frame. - **RENDER_VERTICES_IN_FRAME** = **13** --- Vertices drawn per frame. 3D only. -- **RENDER_MATERIAL_CHANGES_IN_FRAME** = **14** --- Material changes per frame. 3D only +- **RENDER_MATERIAL_CHANGES_IN_FRAME** = **14** --- Material changes per frame. 3D only. - **RENDER_SHADER_CHANGES_IN_FRAME** = **15** --- Shader changes per frame. 3D only. @@ -126,13 +126,13 @@ enum **Monitor**: - **RENDER_DRAW_CALLS_IN_FRAME** = **17** --- Draw calls per frame. 3D only. -- **RENDER_VIDEO_MEM_USED** = **18** --- Video memory used. Includes both texture and vertex memory. +- **RENDER_VIDEO_MEM_USED** = **18** --- The amount of video memory used, i.e. texture and vertex memory combined. -- **RENDER_TEXTURE_MEM_USED** = **19** --- Texture memory used. +- **RENDER_TEXTURE_MEM_USED** = **19** --- The amount of texture memory used. -- **RENDER_VERTEX_MEM_USED** = **20** --- Vertex memory used. +- **RENDER_VERTEX_MEM_USED** = **20** --- The amount of vertex memory used. -- **RENDER_USAGE_VIDEO_MEM_TOTAL** = **21** +- **RENDER_USAGE_VIDEO_MEM_TOTAL** = **21** --- Unimplemented in the GLES2 and GLES3 rendering backends, always returns 0. - **PHYSICS_2D_ACTIVE_OBJECTS** = **22** --- Number of active :ref:`RigidBody2D` nodes in the game. @@ -146,16 +146,18 @@ enum **Monitor**: - **PHYSICS_3D_ISLAND_COUNT** = **27** --- Number of islands in the 3D physics engine. -- **AUDIO_OUTPUT_LATENCY** = **28** +- **AUDIO_OUTPUT_LATENCY** = **28** --- Output latency of the :ref:`AudioServer`. -- **MONITOR_MAX** = **29** +- **MONITOR_MAX** = **29** --- Represents the size of the :ref:`Monitor` enum. Description ----------- -This class provides access to a number of different monitors related to performance, such as memory usage, draw calls, and FPS. These are the same as the values displayed in the *Monitor* tab in the editor's *Debugger* panel. By using the :ref:`get_monitor` method of this class, you can access this data from your code. Note that a few of these monitors are only available in debug mode and will always return 0 when used in a release build. +This class provides access to a number of different monitors related to performance, such as memory usage, draw calls, and FPS. These are the same as the values displayed in the **Monitor** tab in the editor's **Debugger** panel. By using the :ref:`get_monitor` method of this class, you can access this data from your code. -Many of these monitors are not updated in real-time, so there may be a short delay between changes. +**Note:** A few of these monitors are only available in debug mode and will always return 0 when used in a release build. + +**Note:** Many of these monitors are not updated in real-time, so there may be a short delay between changes. Method Descriptions ------------------- @@ -164,7 +166,7 @@ Method Descriptions - :ref:`float` **get_monitor** **(** :ref:`Monitor` monitor **)** const -Returns the value of one of the available monitors. You should provide one of this class's constants as the argument, like this: +Returns the value of one of the available monitors. You should provide one of the :ref:`Monitor` constants as the argument, like this: :: diff --git a/classes/class_physics2ddirectbodystate.rst b/classes/class_physics2ddirectbodystate.rst index 4bc3eec65..a4e132b7c 100644 --- a/classes/class_physics2ddirectbodystate.rst +++ b/classes/class_physics2ddirectbodystate.rst @@ -238,7 +238,7 @@ Applies a directional impulse without affecting rotation. - void **apply_impulse** **(** :ref:`Vector2` offset, :ref:`Vector2` impulse **)** -Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The offset uses the rotation of the global coordinate system, but is centered at the object's origin. +Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The offset uses the rotation of the global coordinate system, but is centered at the object's origin. .. _class_Physics2DDirectBodyState_method_apply_torque_impulse: @@ -292,7 +292,9 @@ Returns the linear velocity vector at the collider's contact point. - :ref:`int` **get_contact_count** **(** **)** const -Returns the number of contacts this body has with other bodies. Note that by default this returns 0 unless bodies are configured to log contacts. See :ref:`RigidBody2D.contact_monitor`. +Returns the number of contacts this body has with other bodies. + +**Note:** By default, this returns 0 unless bodies are configured to monitor contacts. See :ref:`RigidBody2D.contact_monitor`. .. _class_Physics2DDirectBodyState_method_get_contact_local_normal: diff --git a/classes/class_physics2ddirectspacestate.rst b/classes/class_physics2ddirectspacestate.rst index bb785491f..929572de3 100644 --- a/classes/class_physics2ddirectspacestate.rst +++ b/classes/class_physics2ddirectspacestate.rst @@ -52,9 +52,9 @@ Method Descriptions - :ref:`Array` **cast_motion** **(** :ref:`Physics2DShapeQueryParameters` shape **)** -Checks how far the shape can travel toward a point. Note that both the shape and the motion are supplied through a :ref:`Physics2DShapeQueryParameters` object. The method will return an array with two floats between 0 and 1, both representing a fraction of ``motion``. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be ``[1, 1]``. +Checks how far the shape can travel toward a point. If the shape can not move, the array will be empty. -If the shape can not move, the array will be empty. +**Note:** Both the shape and the motion are supplied through a :ref:`Physics2DShapeQueryParameters` object. The method will return an array with two floats between 0 and 1, both representing a fraction of ``motion``. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be ``[1, 1]``. .. _class_Physics2DDirectSpaceState_method_collide_shape: @@ -66,7 +66,9 @@ Checks the intersections of a shape, given through a :ref:`Physics2DShapeQueryPa - :ref:`Dictionary` **get_rest_info** **(** :ref:`Physics2DShapeQueryParameters` shape **)** -Checks the intersections of a shape, given through a :ref:`Physics2DShapeQueryParameters` object, against the space. If it collides with more than one shape, the nearest one is selected. Note that this method does not take into account the ``motion`` property of the object. The returned object is a dictionary containing the following fields: +Checks the intersections of a shape, given through a :ref:`Physics2DShapeQueryParameters` object, against the space. If it collides with more than one shape, the nearest one is selected. If the shape did not intersect anything, then an empty dictionary is returned instead. + +**Note:** This method does not take into account the ``motion`` property of the object. The returned object is a dictionary containing the following fields: ``collider_id``: The colliding object's ID. @@ -82,8 +84,6 @@ Checks the intersections of a shape, given through a :ref:`Physics2DShapeQueryPa ``shape``: The shape index of the colliding shape. -If the shape did not intersect anything, then an empty dictionary is returned instead. - .. _class_Physics2DDirectSpaceState_method_intersect_point: - :ref:`Array` **intersect_point** **(** :ref:`Vector2` point, :ref:`int` max_results=32, :ref:`Array` exclude=[ ], :ref:`int` collision_layer=2147483647, :ref:`bool` collide_with_bodies=true, :ref:`bool` collide_with_areas=false **)** @@ -134,7 +134,9 @@ Additionally, the method can take an ``exclude`` array of objects or :ref:`RID` **intersect_shape** **(** :ref:`Physics2DShapeQueryParameters` shape, :ref:`int` max_results=32 **)** -Checks the intersections of a shape, given through a :ref:`Physics2DShapeQueryParameters` object, against the space. Note that this method does not take into account the ``motion`` property of the object. The intersected shapes are returned in an array containing dictionaries with the following fields: +Checks the intersections of a shape, given through a :ref:`Physics2DShapeQueryParameters` object, against the space. + +**Note:** This method does not take into account the ``motion`` property of the object. The intersected shapes are returned in an array containing dictionaries with the following fields: ``collider``: The colliding object. diff --git a/classes/class_physics2dserver.rst b/classes/class_physics2dserver.rst index 6cd12177c..27bb3bec5 100644 --- a/classes/class_physics2dserver.rst +++ b/classes/class_physics2dserver.rst @@ -16,7 +16,7 @@ Physics2DServer Brief Description ----------------- -Physics 2D Server. +Server interface for low-level 2D physics access. Methods ------- @@ -420,7 +420,7 @@ enum **BodyParameter**: - **BODY_PARAM_ANGULAR_DAMP** = **6** --- Constant to set/get a body's angular dampening factor. -- **BODY_PARAM_MAX** = **7** --- This is the last ID for body parameters. Any attempt to set this property is ignored. Any attempt to get it returns 0. +- **BODY_PARAM_MAX** = **7** --- Represents the size of the :ref:`BodyParameter` enum. .. _enum_Physics2DServer_BodyState: @@ -488,11 +488,11 @@ enum **JointParam**: enum **DampedStringParam**: -- **DAMPED_STRING_REST_LENGTH** = **0** --- Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. +- **DAMPED_STRING_REST_LENGTH** = **0** --- Sets the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. -- **DAMPED_STRING_STIFFNESS** = **1** --- Set the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. +- **DAMPED_STRING_STIFFNESS** = **1** --- Sets the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. -- **DAMPED_STRING_DAMPING** = **2** --- Set the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping). +- **DAMPED_STRING_DAMPING** = **2** --- Sets the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping). .. _enum_Physics2DServer_CCDMode: @@ -541,7 +541,7 @@ enum **ProcessInfo**: Description ----------- -Physics 2D Server is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree. +Physics2DServer is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree. Method Descriptions ------------------- @@ -588,7 +588,7 @@ Gets the instance ID of the object the area is assigned to. - :ref:`Variant` **area_get_param** **(** :ref:`RID` area, :ref:`AreaParameter` param **)** const -Returns an area parameter value. A list of available parameters is on the AREA_PARAM\_\* constants. +Returns an area parameter value. See :ref:`AreaParameter` for a list of available parameters. .. _class_Physics2DServer_method_area_get_shape: @@ -672,7 +672,7 @@ Sets the function to call when any body/area enters or exits the area. This call - void **area_set_param** **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** -Sets the value for an area parameter. A list of available parameters is on the AREA_PARAM\_\* constants. +Sets the value for an area parameter. See :ref:`AreaParameter` for a list of available parameters. .. _class_Physics2DServer_method_area_set_shape: @@ -702,7 +702,7 @@ Assigns a space to the area. - void **area_set_space_override_mode** **(** :ref:`RID` area, :ref:`AreaSpaceOverrideMode` mode **)** -Sets the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE\_\*. +Sets the space override mode for the area. See :ref:`AreaSpaceOverrideMode` for a list of available modes. .. _class_Physics2DServer_method_area_set_transform: @@ -770,7 +770,7 @@ Removes all shapes from a body. - :ref:`RID` **body_create** **(** **)** -Creates a physics body. The first parameter can be any value from constants BODY_MODE\*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. +Creates a physics body. .. _class_Physics2DServer_method_body_get_canvas_instance_id: @@ -822,7 +822,7 @@ Gets the instance ID of the object the area is assigned to. - :ref:`float` **body_get_param** **(** :ref:`RID` body, :ref:`BodyParameter` param **)** const -Returns the value of a body parameter. A list of available parameters is on the BODY_PARAM\_\* constants. +Returns the value of a body parameter. See :ref:`BodyParameter` for a list of available parameters. .. _class_Physics2DServer_method_body_get_shape: @@ -900,7 +900,7 @@ Sets the physics layer or layers a body can collide with. - void **body_set_continuous_collision_detection_mode** **(** :ref:`RID` body, :ref:`CCDMode` mode **)** -Sets the continuous collision detection mode from any of the CCD_MODE\_\* constants. +Sets the continuous collision detection mode using one of the :ref:`CCDMode` constants. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. @@ -920,7 +920,7 @@ Sets the maximum contacts to report. Bodies can keep a log of the contacts with - void **body_set_mode** **(** :ref:`RID` body, :ref:`BodyMode` mode **)** -Sets the body mode, from one of the constants BODY_MODE\*. +Sets the body mode using one of the :ref:`BodyMode` constants. .. _class_Physics2DServer_method_body_set_omit_force_integration: @@ -932,7 +932,7 @@ Sets whether a body uses a callback function to calculate its own physics (see : - void **body_set_param** **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`float` value **)** -Sets a body parameter. A list of available parameters is on the BODY_PARAM\_\* constants. +Sets a body parameter. See :ref:`BodyParameter` for a list of available parameters. .. _class_Physics2DServer_method_body_set_shape: @@ -974,7 +974,7 @@ Assigns a space to the body (see :ref:`space_create` body, :ref:`BodyState` state, :ref:`Variant` value **)** -Sets a body state (see BODY_STATE\* constants). +Sets a body state using one of the :ref:`BodyState` constants. .. _class_Physics2DServer_method_body_test_motion: @@ -1014,7 +1014,7 @@ Returns the value of a damped spring joint parameter. - void **damped_string_joint_set_param** **(** :ref:`RID` joint, :ref:`DampedStringParam` param, :ref:`float` value **)** -Sets a damped spring joint parameter. Parameters are explained in the DAMPED_STRING\* constants. +Sets a damped spring joint parameter. See :ref:`DampedStringParam` for a list of available parameters. .. _class_Physics2DServer_method_free_rid: @@ -1026,13 +1026,13 @@ Destroys any of the objects created by Physics2DServer. If the :ref:`RID` **get_process_info** **(** :ref:`ProcessInfo` process_info **)** -Returns information about the current state of the 2D physics engine. The states are listed under the INFO\_\* constants. +Returns information about the current state of the 2D physics engine. See :ref:`ProcessInfo` for a list of available states. .. _class_Physics2DServer_method_groove_joint_create: - :ref:`RID` **groove_joint_create** **(** :ref:`Vector2` groove1_a, :ref:`Vector2` groove2_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** -Creates a groove joint between two bodies. If not specified, the bodyies are assumed to be the joint itself. +Creates a groove joint between two bodies. If not specified, the bodies are assumed to be the joint itself. .. _class_Physics2DServer_method_joint_get_param: @@ -1044,13 +1044,13 @@ Returns the value of a joint parameter. - :ref:`JointType` **joint_get_type** **(** :ref:`RID` joint **)** const -Returns the type of a joint (see JOINT\_\* constants). +Returns a joint's type (see :ref:`JointType`). .. _class_Physics2DServer_method_joint_set_param: - void **joint_set_param** **(** :ref:`RID` joint, :ref:`JointParam` param, :ref:`float` value **)** -Sets a joint parameter. Parameters are explained in the JOINT_PARAM\* constants. +Sets a joint parameter. See :ref:`JointParam` for a list of available parameters. .. _class_Physics2DServer_method_line_shape_create: @@ -1090,7 +1090,7 @@ Returns the shape data. - :ref:`ShapeType` **shape_get_type** **(** :ref:`RID` shape **)** const -Returns the type of shape (see SHAPE\_\* constants). +Returns a shape's type (see :ref:`ShapeType`). .. _class_Physics2DServer_method_shape_set_data: @@ -1132,5 +1132,5 @@ Marks a space as active. It will not have an effect, unless it is assigned to an - void **space_set_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** -Sets the value for a space parameter. A list of available parameters is on the SPACE_PARAM\_\* constants. +Sets the value for a space parameter. See :ref:`SpaceParameter` for a list of available parameters. diff --git a/classes/class_physics2dshapequeryparameters.rst b/classes/class_physics2dshapequeryparameters.rst index e17ef3a31..3cf1d4ca3 100644 --- a/classes/class_physics2dshapequeryparameters.rst +++ b/classes/class_physics2dshapequeryparameters.rst @@ -130,7 +130,7 @@ The motion of the shape being queried for. | *Getter* | get_shape_rid() | +----------+----------------------+ -The :ref:`RID` of the queried shape. See :ref:`set_shape` also. +The :ref:`RID` of the queried shape. See also :ref:`set_shape`. .. _class_Physics2DShapeQueryParameters_property_transform: @@ -151,5 +151,5 @@ Method Descriptions - void **set_shape** **(** :ref:`Resource` shape **)** -Set the :ref:`Shape2D` that will be used for collision/intersection queries. +Sets the :ref:`Shape2D` that will be used for collision/intersection queries. diff --git a/classes/class_physicsdirectbodystate.rst b/classes/class_physicsdirectbodystate.rst index 377afd096..29a77806d 100644 --- a/classes/class_physicsdirectbodystate.rst +++ b/classes/class_physicsdirectbodystate.rst @@ -257,13 +257,13 @@ This is equivalent to ``apply_impulse(Vector3(0, 0, 0), impulse)``. - void **apply_impulse** **(** :ref:`Vector3` position, :ref:`Vector3` j **)** -Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. +Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. .. _class_PhysicsDirectBodyState_method_apply_torque_impulse: - void **apply_torque_impulse** **(** :ref:`Vector3` j **)** -Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the passed in vector. +Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the vector ``j`` passed as parameter. .. _class_PhysicsDirectBodyState_method_get_contact_collider: @@ -305,7 +305,9 @@ Returns the linear velocity vector at the collider's contact point. - :ref:`int` **get_contact_count** **(** **)** const -Returns the number of contacts this body has with other bodies. Note that by default this returns 0 unless bodies are configured to log contacts. See :ref:`RigidBody.contact_monitor`. +Returns the number of contacts this body has with other bodies. + +**Note:** By default, this returns 0 unless bodies are configured to monitor contacts. See :ref:`RigidBody.contact_monitor`. .. _class_PhysicsDirectBodyState_method_get_contact_impulse: diff --git a/classes/class_physicsserver.rst b/classes/class_physicsserver.rst index b46048edc..31f6a7649 100644 --- a/classes/class_physicsserver.rst +++ b/classes/class_physicsserver.rst @@ -16,7 +16,7 @@ PhysicsServer Brief Description ----------------- -Server interface for low level physics access. +Server interface for low-level physics access. Methods ------- @@ -394,9 +394,9 @@ enum **HingeJointFlag**: enum **SliderJointParam**: -- **SLIDER_JOINT_LINEAR_LIMIT_UPPER** = **0** --- The maximum difference between the pivot points on their x-axis before damping happens. +- **SLIDER_JOINT_LINEAR_LIMIT_UPPER** = **0** --- The maximum difference between the pivot points on their X axis before damping happens. -- **SLIDER_JOINT_LINEAR_LIMIT_LOWER** = **1** --- The minimum difference between the pivot points on their x-axis before damping happens. +- **SLIDER_JOINT_LINEAR_LIMIT_LOWER** = **1** --- The minimum difference between the pivot points on their X axis before damping happens. - **SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. @@ -438,7 +438,7 @@ enum **SliderJointParam**: - **SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING** = **21** --- The amount of damping of the rotation across axes orthogonal to the slider. -- **SLIDER_JOINT_MAX** = **22** --- End flag of SLIDER_JOINT\_\* constants, used internally. +- **SLIDER_JOINT_MAX** = **22** --- Represents the size of the :ref:`SliderJointParam` enum. .. _enum_PhysicsServer_ConeTwistJointParam: @@ -460,7 +460,7 @@ The swing span defines, how much rotation will not get corrected allong the swin Could be defined as looseness in the :ref:`ConeTwistJoint`. -If below 0.05, this behaviour is locked. Default value: ``PI/4``. +If below 0.05, this behavior is locked. Default value: ``PI/4``. - **CONE_TWIST_JOINT_TWIST_SPAN** = **1** --- Twist is the rotation around the twist axis, this value defined how far the joint can twist. @@ -716,7 +716,7 @@ enum **BodyParameter**: - **BODY_PARAM_ANGULAR_DAMP** = **5** --- Constant to set/get a body's angular dampening factor. -- **BODY_PARAM_MAX** = **6** --- This is the last ID for body parameters. Any attempt to set this property is ignored. Any attempt to get it returns 0. +- **BODY_PARAM_MAX** = **6** --- Represents the size of the :ref:`BodyParameter` enum. .. _enum_PhysicsServer_BodyState: @@ -841,7 +841,7 @@ enum **BodyAxis**: Description ----------- -Everything related to physics in 3D. +PhysicsServer is the server responsible for all 3D physics. It can create many kinds of physics objects, but does not insert them on the node tree. Method Descriptions ------------------- @@ -880,7 +880,7 @@ Gets the instance ID of the object the area is assigned to. - :ref:`Variant` **area_get_param** **(** :ref:`RID` area, :ref:`AreaParameter` param **)** const -Returns an area parameter value. A list of available parameters is on the AREA_PARAM\_\* constants. +Returns an area parameter value. A list of available parameters is on the ``AREA_PARAM_*`` constants. .. _class_PhysicsServer_method_area_get_shape: @@ -970,7 +970,7 @@ Sets the function to call when any body/area enters or exits the area. This call - void **area_set_param** **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** -Sets the value for an area parameter. A list of available parameters is on the AREA_PARAM\_\* constants. +Sets the value for an area parameter. A list of available parameters is on the ``AREA_PARAM_*`` constants. .. _class_PhysicsServer_method_area_set_ray_pickable: @@ -1004,7 +1004,7 @@ Assigns a space to the area. - void **area_set_space_override_mode** **(** :ref:`RID` area, :ref:`AreaSpaceOverrideMode` mode **)** -Sets the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE\_\*. +Sets the space override mode for the area. The modes are described in the constants ``AREA_SPACE_OVERRIDE_*``. .. _class_PhysicsServer_method_area_set_transform: @@ -1116,7 +1116,7 @@ Gets the instance ID of the object the area is assigned to. - :ref:`float` **body_get_param** **(** :ref:`RID` body, :ref:`BodyParameter` param **)** const -Returns the value of a body parameter. A list of available parameters is on the BODY_PARAM\_\* constants. +Returns the value of a body parameter. A list of available parameters is on the ``BODY_PARAM_*`` constants. .. _class_PhysicsServer_method_body_get_shape: @@ -1168,7 +1168,7 @@ Returns whether a body uses a callback function to calculate its own physics (se - :ref:`bool` **body_is_ray_pickable** **(** :ref:`RID` body **)** const -If ``true``, the body can be detected by rays +If ``true``, the body can be detected by rays. .. _class_PhysicsServer_method_body_remove_collision_exception: @@ -1246,7 +1246,7 @@ Sets whether a body uses a callback function to calculate its own physics (see : - void **body_set_param** **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`float` value **)** -Sets a body parameter. A list of available parameters is on the BODY_PARAM\_\* constants. +Sets a body parameter. A list of available parameters is on the ``BODY_PARAM_*`` constants. .. _class_PhysicsServer_method_body_set_ray_pickable: @@ -1448,7 +1448,7 @@ Activates or deactivates the 3D physics engine. - :ref:`RID` **shape_create** **(** :ref:`ShapeType` type **)** -Creates a shape of type SHAPE\_\*. Does not assign it to a body or an area. To do so, you must use :ref:`area_set_shape` or :ref:`body_set_shape`. +Creates a shape of type ``SHAPE_*``. Does not assign it to a body or an area. To do so, you must use :ref:`area_set_shape` or :ref:`body_set_shape`. .. _class_PhysicsServer_method_shape_get_data: @@ -1460,7 +1460,7 @@ Returns the shape data. - :ref:`ShapeType` **shape_get_type** **(** :ref:`RID` shape **)** const -Returns the type of shape (see SHAPE\_\* constants). +Returns the type of shape (see ``SHAPE_*`` constants). .. _class_PhysicsServer_method_shape_set_data: @@ -1514,5 +1514,5 @@ Marks a space as active. It will not have an effect, unless it is assigned to an - void **space_set_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** -Sets the value for a space parameter. A list of available parameters is on the SPACE_PARAM\_\* constants. +Sets the value for a space parameter. A list of available parameters is on the ``SPACE_PARAM_*`` constants. diff --git a/classes/class_pinjoint.rst b/classes/class_pinjoint.rst index 5a0bf0e53..cbcb0959f 100644 --- a/classes/class_pinjoint.rst +++ b/classes/class_pinjoint.rst @@ -14,7 +14,7 @@ PinJoint Brief Description ----------------- -Pin Joint for 3D Shapes. +Pin joint for 3D shapes. Properties ---------- @@ -40,20 +40,16 @@ Enumerations enum **Param**: -- **PARAM_BIAS** = **0** --- The force with which the pinned objects stay in positional relation to each other. +- **PARAM_BIAS** = **0** --- The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. -The higher, the stronger. - -- **PARAM_DAMPING** = **1** --- The force with which the pinned objects stay in velocity relation to each other. - -The higher, the stronger. +- **PARAM_DAMPING** = **1** --- The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. - **PARAM_IMPULSE_CLAMP** = **2** --- If above 0, this value is the maximum value for an impulse that this Joint produces. Description ----------- -Pin Joint for 3D Rigid Bodies. It pins 2 bodies (rigid or static) together. +Pin joint for 3D rigid bodies. It pins 2 bodies (rigid or static) together. Property Descriptions --------------------- @@ -68,9 +64,7 @@ Property Descriptions | *Getter* | get_param() | +----------+------------------+ -The force with which the pinned objects stay in positional relation to each other. - -The higher, the stronger. +The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. .. _class_PinJoint_property_params/damping: @@ -82,9 +76,7 @@ The higher, the stronger. | *Getter* | get_param() | +----------+------------------+ -The force with which the pinned objects stay in velocity relation to each other. - -The higher, the stronger. +The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. .. _class_PinJoint_property_params/impulse_clamp: diff --git a/classes/class_pinjoint2d.rst b/classes/class_pinjoint2d.rst index 592484e34..f9c51cf13 100644 --- a/classes/class_pinjoint2d.rst +++ b/classes/class_pinjoint2d.rst @@ -14,7 +14,7 @@ PinJoint2D Brief Description ----------------- -Pin Joint for 2D Shapes. +Pin Joint for 2D shapes. Properties ---------- @@ -26,7 +26,7 @@ Properties Description ----------- -Pin Joint for 2D Rigid Bodies. It pins two bodies (rigid or static) together. +Pin Joint for 2D rigid bodies. It pins two bodies (rigid or static) together. Property Descriptions --------------------- diff --git a/classes/class_plane.rst b/classes/class_plane.rst index 106c580e7..618ffcaf4 100644 --- a/classes/class_plane.rst +++ b/classes/class_plane.rst @@ -115,7 +115,7 @@ Method Descriptions - :ref:`Plane` **Plane** **(** :ref:`float` a, :ref:`float` b, :ref:`float` c, :ref:`float` d **)** -Creates a plane from the four parameters "a", "b", "c" and "d". +Creates a plane from the four parameters ``a``, ``b``, ``c`` and ``d``. - :ref:`Plane` **Plane** **(** :ref:`Vector3` v1, :ref:`Vector3` v2, :ref:`Vector3` v3 **)** @@ -135,7 +135,7 @@ Returns the center of the plane. - :ref:`float` **distance_to** **(** :ref:`Vector3` point **)** -Returns the shortest distance from the plane to the position "point". +Returns the shortest distance from the plane to the position ``point``. .. _class_Plane_method_get_any_point: @@ -147,31 +147,31 @@ Returns a point on the plane. - :ref:`bool` **has_point** **(** :ref:`Vector3` point, :ref:`float` epsilon=0.00001 **)** -Returns ``true`` if "point" is inside the plane (by a very minimum threshold). +Returns ``true`` if ``point`` is inside the plane (by a very minimum ``epsilon`` threshold). .. _class_Plane_method_intersect_3: - :ref:`Vector3` **intersect_3** **(** :ref:`Plane` b, :ref:`Plane` c **)** -Returns the intersection point of the three planes "b", "c" and this plane. If no intersection is found null is returned. +Returns the intersection point of the three planes ``b``, ``c`` and this plane. If no intersection is found, ``null`` is returned. .. _class_Plane_method_intersects_ray: - :ref:`Vector3` **intersects_ray** **(** :ref:`Vector3` from, :ref:`Vector3` dir **)** -Returns the intersection point of a ray consisting of the position "from" and the direction normal "dir" with this plane. If no intersection is found null is returned. +Returns the intersection point of a ray consisting of the position ``from`` and the direction normal ``dir`` with this plane. If no intersection is found, ``null`` is returned. .. _class_Plane_method_intersects_segment: - :ref:`Vector3` **intersects_segment** **(** :ref:`Vector3` begin, :ref:`Vector3` end **)** -Returns the intersection point of a segment from position "begin" to position "end" with this plane. If no intersection is found null is returned. +Returns the intersection point of a segment from position ``begin`` to position ``end`` with this plane. If no intersection is found, ``null`` is returned. .. _class_Plane_method_is_point_over: - :ref:`bool` **is_point_over** **(** :ref:`Vector3` point **)** -Returns ``true`` if "point" is located above the plane. +Returns ``true`` if ``point`` is located above the plane. .. _class_Plane_method_normalized: @@ -183,5 +183,5 @@ Returns a copy of the plane, normalized. - :ref:`Vector3` **project** **(** :ref:`Vector3` point **)** -Returns the orthogonal projection of point "p" into a point in the plane. +Returns the orthogonal projection of point ``p`` into a point in the plane. diff --git a/classes/class_polygon2d.rst b/classes/class_polygon2d.rst index 1ff6ebd40..7da588b3e 100644 --- a/classes/class_polygon2d.rst +++ b/classes/class_polygon2d.rst @@ -168,7 +168,9 @@ The offset applied to each vertex. | *Getter* | get_polygon() | +----------+--------------------+ -The polygon's list of vertices. The final point will be connected to the first. Note that this returns a copy of the :ref:`PoolVector2Array` rather than a reference. +The polygon's list of vertices. The final point will be connected to the first. + +**Note:** This returns a copy of the :ref:`PoolVector2Array` rather than a reference. .. _class_Polygon2D_property_polygons: diff --git a/classes/class_poolbytearray.rst b/classes/class_poolbytearray.rst index 4012ca764..813e2dae4 100644 --- a/classes/class_poolbytearray.rst +++ b/classes/class_poolbytearray.rst @@ -54,7 +54,9 @@ Methods Description ----------- -An :ref:`Array` specifically designed to hold bytes. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. +An :ref:`Array` specifically designed to hold bytes. Optimized for memory usage, does not fragment the memory. + +**Note:** This type is passed by value and not by reference. Method Descriptions ------------------- @@ -63,19 +65,19 @@ Method Descriptions - :ref:`PoolByteArray` **PoolByteArray** **(** :ref:`Array` from **)** -Construct a new ``PoolByteArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +Constructs a new ``PoolByteArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. .. _class_PoolByteArray_method_append: - void **append** **(** :ref:`int` byte **)** -Append an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back`). .. _class_PoolByteArray_method_append_array: - void **append_array** **(** :ref:`PoolByteArray` array **)** -Append a ``PoolByteArray`` at the end of this array. +Appends a ``PoolByteArray`` at the end of this array. .. _class_PoolByteArray_method_compress: @@ -105,43 +107,43 @@ Returns a copy of the array's contents as :ref:`String`. Slower th - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`int` byte **)** -Insert a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). +Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). .. _class_PoolByteArray_method_invert: - void **invert** **(** **)** -Reverse the order of the elements in the array. +Reverses the order of the elements in the array. .. _class_PoolByteArray_method_push_back: - void **push_back** **(** :ref:`int` byte **)** -Append an element at the end of the array. +Appends an element at the end of the array. .. _class_PoolByteArray_method_remove: - void **remove** **(** :ref:`int` idx **)** -Remove an element from the array by index. +Removes an element from the array by index. .. _class_PoolByteArray_method_resize: - void **resize** **(** :ref:`int` idx **)** -Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. .. _class_PoolByteArray_method_set: - void **set** **(** :ref:`int` idx, :ref:`int` byte **)** -Change the byte at the given index. +Changes the byte at the given index. .. _class_PoolByteArray_method_sha256_string: - :ref:`String` **sha256_string** **(** **)** -Returns SHA256 string of the PoolByteArray. +Returns SHA-256 string of the PoolByteArray. .. _class_PoolByteArray_method_size: diff --git a/classes/class_poolcolorarray.rst b/classes/class_poolcolorarray.rst index f4d26c35f..48a4f4d76 100644 --- a/classes/class_poolcolorarray.rst +++ b/classes/class_poolcolorarray.rst @@ -42,7 +42,9 @@ Methods Description ----------- -An :ref:`Array` specifically designed to hold :ref:`Color`. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. +An :ref:`Array` specifically designed to hold :ref:`Color`. Optimized for memory usage, does not fragment the memory. + +**Note:** This type is passed by value and not by reference. Method Descriptions ------------------- @@ -51,55 +53,55 @@ Method Descriptions - :ref:`PoolColorArray` **PoolColorArray** **(** :ref:`Array` from **)** -Construct a new ``PoolColorArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +Constructs a new ``PoolColorArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. .. _class_PoolColorArray_method_append: - void **append** **(** :ref:`Color` color **)** -Append an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back`). .. _class_PoolColorArray_method_append_array: - void **append_array** **(** :ref:`PoolColorArray` array **)** -Append a ``PoolColorArray`` at the end of this array. +Appends a ``PoolColorArray`` at the end of this array. .. _class_PoolColorArray_method_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`Color` color **)** -Insert a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). +Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). .. _class_PoolColorArray_method_invert: - void **invert** **(** **)** -Reverse the order of the elements in the array. +Reverses the order of the elements in the array. .. _class_PoolColorArray_method_push_back: - void **push_back** **(** :ref:`Color` color **)** -Append a value to the array. +Appends a value to the array. .. _class_PoolColorArray_method_remove: - void **remove** **(** :ref:`int` idx **)** -Remove an element from the array by index. +Removes an element from the array by index. .. _class_PoolColorArray_method_resize: - void **resize** **(** :ref:`int` idx **)** -Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. .. _class_PoolColorArray_method_set: - void **set** **(** :ref:`int` idx, :ref:`Color` color **)** -Change the :ref:`Color` at the given index. +Changes the :ref:`Color` at the given index. .. _class_PoolColorArray_method_size: diff --git a/classes/class_poolintarray.rst b/classes/class_poolintarray.rst index 56a9ae586..fac9705e7 100644 --- a/classes/class_poolintarray.rst +++ b/classes/class_poolintarray.rst @@ -42,7 +42,9 @@ Methods Description ----------- -An :ref:`Array` specifically designed to hold integer values (:ref:`int`). Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. +An :ref:`Array` specifically designed to hold integer values (:ref:`int`). Optimized for memory usage, does not fragment the memory. + +**Note:** This type is passed by value and not by reference. Method Descriptions ------------------- @@ -51,55 +53,55 @@ Method Descriptions - :ref:`PoolIntArray` **PoolIntArray** **(** :ref:`Array` from **)** -Construct a new ``PoolIntArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +Constructs a new ``PoolIntArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. .. _class_PoolIntArray_method_append: - void **append** **(** :ref:`int` integer **)** -Append an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back`). .. _class_PoolIntArray_method_append_array: - void **append_array** **(** :ref:`PoolIntArray` array **)** -Append a ``PoolIntArray`` at the end of this array. +Appends a ``PoolIntArray`` at the end of this array. .. _class_PoolIntArray_method_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`int` integer **)** -Insert a new int at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). +Inserts a new int at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). .. _class_PoolIntArray_method_invert: - void **invert** **(** **)** -Reverse the order of the elements in the array. +Reverses the order of the elements in the array. .. _class_PoolIntArray_method_push_back: - void **push_back** **(** :ref:`int` integer **)** -Append a value to the array. +Appends a value to the array. .. _class_PoolIntArray_method_remove: - void **remove** **(** :ref:`int` idx **)** -Remove an element from the array by index. +Removes an element from the array by index. .. _class_PoolIntArray_method_resize: - void **resize** **(** :ref:`int` idx **)** -Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. .. _class_PoolIntArray_method_set: - void **set** **(** :ref:`int` idx, :ref:`int` integer **)** -Change the int at the given index. +Changes the int at the given index. .. _class_PoolIntArray_method_size: diff --git a/classes/class_poolrealarray.rst b/classes/class_poolrealarray.rst index d9d2e5cdb..10185ba0e 100644 --- a/classes/class_poolrealarray.rst +++ b/classes/class_poolrealarray.rst @@ -42,7 +42,9 @@ Methods Description ----------- -An :ref:`Array` specifically designed to hold floating point values (:ref:`float`). Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. +An :ref:`Array` specifically designed to hold floating-point values (:ref:`float`). Optimized for memory usage, does not fragment the memory. + +**Note:** This type is passed by value and not by reference. Method Descriptions ------------------- @@ -51,55 +53,55 @@ Method Descriptions - :ref:`PoolRealArray` **PoolRealArray** **(** :ref:`Array` from **)** -Construct a new ``PoolRealArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +Constructs a new ``PoolRealArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. .. _class_PoolRealArray_method_append: - void **append** **(** :ref:`float` value **)** -Append an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back`). .. _class_PoolRealArray_method_append_array: - void **append_array** **(** :ref:`PoolRealArray` array **)** -Append a ``PoolRealArray`` at the end of this array. +Appends a ``PoolRealArray`` at the end of this array. .. _class_PoolRealArray_method_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`float` value **)** -Insert a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). +Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). .. _class_PoolRealArray_method_invert: - void **invert** **(** **)** -Reverse the order of the elements in the array. +Reverses the order of the elements in the array. .. _class_PoolRealArray_method_push_back: - void **push_back** **(** :ref:`float` value **)** -Append an element at the end of the array. +Appends an element at the end of the array. .. _class_PoolRealArray_method_remove: - void **remove** **(** :ref:`int` idx **)** -Remove an element from the array by index. +Removes an element from the array by index. .. _class_PoolRealArray_method_resize: - void **resize** **(** :ref:`int` idx **)** -Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. .. _class_PoolRealArray_method_set: - void **set** **(** :ref:`int` idx, :ref:`float` value **)** -Change the float at the given index. +Changes the float at the given index. .. _class_PoolRealArray_method_size: diff --git a/classes/class_poolstringarray.rst b/classes/class_poolstringarray.rst index 931743166..a27aeefc9 100644 --- a/classes/class_poolstringarray.rst +++ b/classes/class_poolstringarray.rst @@ -44,7 +44,9 @@ Methods Description ----------- -An :ref:`Array` specifically designed to hold :ref:`String`. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. +An :ref:`Array` specifically designed to hold :ref:`String`\ s. Optimized for memory usage, does not fragment the memory. + +**Note:** This type is passed by value and not by reference. Method Descriptions ------------------- @@ -53,31 +55,31 @@ Method Descriptions - :ref:`PoolStringArray` **PoolStringArray** **(** :ref:`Array` from **)** -Construct a new ``PoolStringArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +Constructs a new ``PoolStringArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. .. _class_PoolStringArray_method_append: - void **append** **(** :ref:`String` string **)** -Append an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back`). .. _class_PoolStringArray_method_append_array: - void **append_array** **(** :ref:`PoolStringArray` array **)** -Append a ``PoolStringArray`` at the end of this array. +Appends a ``PoolStringArray`` at the end of this array. .. _class_PoolStringArray_method_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`String` string **)** -Insert a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). +Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). .. _class_PoolStringArray_method_invert: - void **invert** **(** **)** -Reverse the order of the elements in the array. +Reverses the order of the elements in the array. .. _class_PoolStringArray_method_join: @@ -89,25 +91,25 @@ Returns a :ref:`String` with each element of the array joined with - void **push_back** **(** :ref:`String` string **)** -Append a string element at end of the array. +Appends a string element at end of the array. .. _class_PoolStringArray_method_remove: - void **remove** **(** :ref:`int` idx **)** -Remove an element from the array by index. +Removes an element from the array by index. .. _class_PoolStringArray_method_resize: - void **resize** **(** :ref:`int` idx **)** -Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. .. _class_PoolStringArray_method_set: - void **set** **(** :ref:`int` idx, :ref:`String` string **)** -Change the :ref:`String` at the given index. +Changes the :ref:`String` at the given index. .. _class_PoolStringArray_method_size: diff --git a/classes/class_poolvector2array.rst b/classes/class_poolvector2array.rst index 97db800c7..c305b91c3 100644 --- a/classes/class_poolvector2array.rst +++ b/classes/class_poolvector2array.rst @@ -42,7 +42,9 @@ Methods Description ----------- -An :ref:`Array` specifically designed to hold :ref:`Vector2`. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. +An :ref:`Array` specifically designed to hold :ref:`Vector2`. Optimized for memory usage, does not fragment the memory. + +**Note:** This type is passed by value and not by reference. Method Descriptions ------------------- @@ -51,55 +53,55 @@ Method Descriptions - :ref:`PoolVector2Array` **PoolVector2Array** **(** :ref:`Array` from **)** -Construct a new ``PoolVector2Array``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +Constructs a new ``PoolVector2Array``. Optionally, you can pass in a generic :ref:`Array` that will be converted. .. _class_PoolVector2Array_method_append: - void **append** **(** :ref:`Vector2` vector2 **)** -Append an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back`). .. _class_PoolVector2Array_method_append_array: - void **append_array** **(** :ref:`PoolVector2Array` array **)** -Append a ``PoolVector2Array`` at the end of this array. +Appends a ``PoolVector2Array`` at the end of this array. .. _class_PoolVector2Array_method_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`Vector2` vector2 **)** -Insert a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). +Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). .. _class_PoolVector2Array_method_invert: - void **invert** **(** **)** -Reverse the order of the elements in the array. +Reverses the order of the elements in the array. .. _class_PoolVector2Array_method_push_back: - void **push_back** **(** :ref:`Vector2` vector2 **)** -Insert a :ref:`Vector2` at the end. +Inserts a :ref:`Vector2` at the end. .. _class_PoolVector2Array_method_remove: - void **remove** **(** :ref:`int` idx **)** -Remove an element from the array by index. +Removes an element from the array by index. .. _class_PoolVector2Array_method_resize: - void **resize** **(** :ref:`int` idx **)** -Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. .. _class_PoolVector2Array_method_set: - void **set** **(** :ref:`int` idx, :ref:`Vector2` vector2 **)** -Change the :ref:`Vector2` at the given index. +Changes the :ref:`Vector2` at the given index. .. _class_PoolVector2Array_method_size: diff --git a/classes/class_poolvector3array.rst b/classes/class_poolvector3array.rst index 54857774d..e82226848 100644 --- a/classes/class_poolvector3array.rst +++ b/classes/class_poolvector3array.rst @@ -42,7 +42,9 @@ Methods Description ----------- -An :ref:`Array` specifically designed to hold :ref:`Vector3`. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. +An :ref:`Array` specifically designed to hold :ref:`Vector3`. Optimized for memory usage, does not fragment the memory. + +**Note:** This type is passed by value and not by reference. Method Descriptions ------------------- @@ -51,55 +53,55 @@ Method Descriptions - :ref:`PoolVector3Array` **PoolVector3Array** **(** :ref:`Array` from **)** -Construct a new ``PoolVector3Array``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +Constructs a new ``PoolVector3Array``. Optionally, you can pass in a generic :ref:`Array` that will be converted. .. _class_PoolVector3Array_method_append: - void **append** **(** :ref:`Vector3` vector3 **)** -Append an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back`). .. _class_PoolVector3Array_method_append_array: - void **append_array** **(** :ref:`PoolVector3Array` array **)** -Append a ``PoolVector3Array`` at the end of this array. +Appends a ``PoolVector3Array`` at the end of this array. .. _class_PoolVector3Array_method_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`Vector3` vector3 **)** -Insert a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). +Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). .. _class_PoolVector3Array_method_invert: - void **invert** **(** **)** -Reverse the order of the elements in the array. +Reverses the order of the elements in the array. .. _class_PoolVector3Array_method_push_back: - void **push_back** **(** :ref:`Vector3` vector3 **)** -Insert a :ref:`Vector3` at the end. +Inserts a :ref:`Vector3` at the end. .. _class_PoolVector3Array_method_remove: - void **remove** **(** :ref:`int` idx **)** -Remove an element from the array by index. +Removes an element from the array by index. .. _class_PoolVector3Array_method_resize: - void **resize** **(** :ref:`int` idx **)** -Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. .. _class_PoolVector3Array_method_set: - void **set** **(** :ref:`int` idx, :ref:`Vector3` vector3 **)** -Change the :ref:`Vector3` at the given index. +Changes the :ref:`Vector3` at the given index. .. _class_PoolVector3Array_method_size: diff --git a/classes/class_popup.rst b/classes/class_popup.rst index c4fd29446..82b80d18b 100644 --- a/classes/class_popup.rst +++ b/classes/class_popup.rst @@ -47,13 +47,13 @@ Signals - **about_to_show** **(** **)** -This signal is emitted when a popup is about to be shown. (often used in :ref:`PopupMenu` for clearing the list of options and creating a new one according to the current context). +Emitted when a popup is about to be shown. This is often used in :ref:`PopupMenu` to clear the list of options then create a new one according to the current context. .. _class_Popup_signal_popup_hide: - **popup_hide** **(** **)** -This signal is emitted when a popup is hidden. +Emitted when a popup is hidden. Constants --------- @@ -99,7 +99,7 @@ Popup (show the control in modal form). - void **popup_centered** **(** :ref:`Vector2` size=Vector2( 0, 0 ) **)** -Popup (show the control in modal form) in the center of the screen relative to its current canvas transform, at the current size, or at a size determined by "size". +Popup (show the control in modal form) in the center of the screen relative to its current canvas transform, at the current size, or at a size determined by ``size``. .. _class_Popup_method_popup_centered_clamped: diff --git a/classes/class_popupdialog.rst b/classes/class_popupdialog.rst index 03a33c338..c19b974d7 100644 --- a/classes/class_popupdialog.rst +++ b/classes/class_popupdialog.rst @@ -14,7 +14,7 @@ PopupDialog Brief Description ----------------- -Base class for Popup Dialogs. +Base class for popup dialogs. Description ----------- diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index 44ac1b589..31b405cff 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -182,24 +182,24 @@ Signals - **id_focused** **(** :ref:`int` id **)** -This event is emitted when user navigated to an item of some id using ``ui_up`` or ``ui_down`` action. +Emitted when user navigated to an item of some ``id`` using ``ui_up`` or ``ui_down`` action. .. _class_PopupMenu_signal_id_pressed: - **id_pressed** **(** :ref:`int` id **)** -This event is emitted when an item of some id is pressed or its accelerator is activated. +Emitted when an item of some ``id`` is pressed or its accelerator is activated. .. _class_PopupMenu_signal_index_pressed: - **index_pressed** **(** :ref:`int` index **)** -This event is emitted when an item of some index is pressed or its accelerator is activated. +Emitted when an item of some ``index`` is pressed or its accelerator is activated. Description ----------- -PopupMenu is the typical Control that displays a list of options. They are popular in toolbars or context menus. +``PopupMenu`` is a :ref:`Control` that displays a list of options. They are popular in toolbars or context menus. Property Descriptions --------------------- @@ -226,6 +226,8 @@ If ``true``, allows to navigate ``PopupMenu`` with letter keys. Default value: ` | *Getter* | is_hide_on_checkable_item_selection() | +----------+---------------------------------------------+ +If ``true``, hides the ``PopupMenu`` when a checkbox or radio button is selected. + .. _class_PopupMenu_property_hide_on_item_selection: - :ref:`bool` **hide_on_item_selection** @@ -236,6 +238,8 @@ If ``true``, allows to navigate ``PopupMenu`` with letter keys. Default value: ` | *Getter* | is_hide_on_item_selection() | +----------+-----------------------------------+ +If ``true``, hides the ``PopupMenu`` when an item is selected. + .. _class_PopupMenu_property_hide_on_state_item_selection: - :ref:`bool` **hide_on_state_item_selection** @@ -246,6 +250,8 @@ If ``true``, allows to navigate ``PopupMenu`` with letter keys. Default value: ` | *Getter* | is_hide_on_state_item_selection() | +----------+-----------------------------------------+ +If ``true``, hides the ``PopupMenu`` when a state item is selected. + .. _class_PopupMenu_property_submenu_popup_delay: - :ref:`float` **submenu_popup_delay** @@ -265,229 +271,291 @@ Method Descriptions - void **add_check_item** **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** -Add a new checkable item with text "label". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. +Adds a new checkable item with text ``label``. + +An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided then the default ``0`` will be assigned to it. See :ref:`get_item_accelerator` for more info on accelerators. + +**Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked` for more info on how to control it. .. _class_PopupMenu_method_add_check_shortcut: - void **add_check_shortcut** **(** :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** +Adds a new checkable item and assigns the specified :ref:`ShortCut` to it. Sets the label of the checkbox to the :ref:`ShortCut`'s name. + +An ``id`` can optionally be provided. If no ``id`` is provided, one will be created from the index. + +**Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked` for more info on how to control it. + .. _class_PopupMenu_method_add_icon_check_item: - void **add_icon_check_item** **(** :ref:`Texture` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** -Add a new checkable item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be +Adds a new checkable item with text ``label`` and icon ``texture``. -created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. +An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided then the default ``0`` will be assigned to it. See :ref:`get_item_accelerator` for more info on accelerators. + +**Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked` for more info on how to control it. .. _class_PopupMenu_method_add_icon_check_shortcut: - void **add_icon_check_shortcut** **(** :ref:`Texture` texture, :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** +Adds a new checkable item and assigns the specified :ref:`ShortCut` and icon ``texture`` to it. Sets the label of the checkbox to the :ref:`ShortCut`'s name. + +An ``id`` can optionally be provided. If no ``id`` is provided, one will be created from the index. + +**Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked` for more info on how to control it. + .. _class_PopupMenu_method_add_icon_item: - void **add_icon_item** **(** :ref:`Texture` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** -Add a new item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index. +Adds a new item with text ``label`` and icon ``texture``. + +An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided then the default ``0`` will be assigned to it. See :ref:`get_item_accelerator` for more info on accelerators. .. _class_PopupMenu_method_add_icon_shortcut: - void **add_icon_shortcut** **(** :ref:`Texture` texture, :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** +Adds a new item and assigns the specified :ref:`ShortCut` and icon ``texture`` to it. Sets the label of the checkbox to the :ref:`ShortCut`'s name. + +An ``id`` can optionally be provided. If no ``id`` is provided, one will be created from the index. + .. _class_PopupMenu_method_add_item: - void **add_item** **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** -Add a new item with text "label". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index. +Adds a new item with text ``label``. + +An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided then the default ``0`` will be assigned to it. See :ref:`get_item_accelerator` for more info on accelerators. .. _class_PopupMenu_method_add_radio_check_item: - void **add_radio_check_item** **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** -The same as :ref:`add_check_item` but the inserted item will look as a radio button. Remember this is just cosmetic and you have to add the logic for checking/unchecking items in radio groups. +Adds a new radio button with text ``label``. + +An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided then the default ``0`` will be assigned to it. See :ref:`get_item_accelerator` for more info on accelerators. + +**Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked` for more info on how to control it. .. _class_PopupMenu_method_add_radio_check_shortcut: - void **add_radio_check_shortcut** **(** :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** +Adds a new radio check button and assigns a :ref:`ShortCut` to it. Sets the label of the checkbox to the :ref:`ShortCut`'s name. + +An ``id`` can optionally be provided. If no ``id`` is provided, one will be created from the index. + +**Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked` for more info on how to control it. + .. _class_PopupMenu_method_add_separator: - void **add_separator** **(** :ref:`String` label="" **)** -Add a separator between items. Separators also occupy an index. +Adds a separator between items. Separators also occupy an index. .. _class_PopupMenu_method_add_shortcut: - void **add_shortcut** **(** :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** +Adds a :ref:`ShortCut`. + +An ``id`` can optionally be provided. If no ``id`` is provided, one will be created from the index. + .. _class_PopupMenu_method_add_submenu_item: - void **add_submenu_item** **(** :ref:`String` label, :ref:`String` submenu, :ref:`int` id=-1 **)** -Adds an item with a submenu. The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. An id can optionally be provided, but if is isn't provided, one will be created from the index. +Adds an item that will act as a submenu of the parent ``PopupMenu`` node when clicked. The ``submenu`` argument is the name of the child ``PopupMenu`` node that will be shown when the item is clicked. + +An ``id`` can optionally be provided. If no ``id`` is provided, one will be created from the index. .. _class_PopupMenu_method_clear: - void **clear** **(** **)** -Clear the popup menu, in effect removing all items. +Removes all items from the ``PopupMenu``. .. _class_PopupMenu_method_get_item_accelerator: - :ref:`int` **get_item_accelerator** **(** :ref:`int` idx **)** const -Returns the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused. +Returns the accelerator of the item at index ``idx``. Accelerators are special combinations of keys that activate the item, no matter which control is focused. .. _class_PopupMenu_method_get_item_count: - :ref:`int` **get_item_count** **(** **)** const -Returns the amount of items. +Returns the number of items in the ``PopupMenu``. .. _class_PopupMenu_method_get_item_icon: - :ref:`Texture` **get_item_icon** **(** :ref:`int` idx **)** const -Returns the icon of the item at index "idx". +Returns the icon of the item at index ``idx``. .. _class_PopupMenu_method_get_item_id: - :ref:`int` **get_item_id** **(** :ref:`int` idx **)** const -Returns the id of the item at index "idx". +Returns the id of the item at index ``idx``. ``id`` can be manually assigned, while index can not. .. _class_PopupMenu_method_get_item_index: - :ref:`int` **get_item_index** **(** :ref:`int` id **)** const -Find and return the index of the item containing a given id. +Returns the index of the item containing the specified ``id``. Index is automatically assigned to each item by the engine. Index can not be set manualy. .. _class_PopupMenu_method_get_item_metadata: - :ref:`Variant` **get_item_metadata** **(** :ref:`int` idx **)** const -Returns the metadata of an item, which might be of any type. You can set it with :ref:`set_item_metadata`, which provides a simple way of assigning context data to items. +Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`set_item_metadata`, which provides a simple way of assigning context data to items. .. _class_PopupMenu_method_get_item_shortcut: - :ref:`ShortCut` **get_item_shortcut** **(** :ref:`int` idx **)** const +Returns the :ref:`ShortCut` associated with the specified ``idx`` item. + .. _class_PopupMenu_method_get_item_submenu: - :ref:`String` **get_item_submenu** **(** :ref:`int` idx **)** const -Returns the submenu name of the item at index "idx". +Returns the submenu name of the item at index ``idx``. See :ref:`add_submenu_item` for more info on how to add a submenu. .. _class_PopupMenu_method_get_item_text: - :ref:`String` **get_item_text** **(** :ref:`int` idx **)** const -Returns the text of the item at index "idx". +Returns the text of the item at index ``idx``. .. _class_PopupMenu_method_get_item_tooltip: - :ref:`String` **get_item_tooltip** **(** :ref:`int` idx **)** const +Returns the tooltip associated with the specified index index ``idx``. + .. _class_PopupMenu_method_is_hide_on_window_lose_focus: - :ref:`bool` **is_hide_on_window_lose_focus** **(** **)** const +Returns whether the popup will be hidden when the window loses focus or not. + .. _class_PopupMenu_method_is_item_checkable: - :ref:`bool` **is_item_checkable** **(** :ref:`int` idx **)** const -Returns whether the item at index "idx" is checkable in some way, i.e., whether has a checkbox or radio button. Note that checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually. +Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if it has a checkbox or radio button. + +**Note:** Checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually. .. _class_PopupMenu_method_is_item_checked: - :ref:`bool` **is_item_checked** **(** :ref:`int` idx **)** const -Returns whether the item at index "idx" is checked. +Returns ``true`` if the item at index ``idx`` is checked. .. _class_PopupMenu_method_is_item_disabled: - :ref:`bool` **is_item_disabled** **(** :ref:`int` idx **)** const -Returns whether the item at index "idx" is disabled. When it is disabled it can't be selected, or its action invoked. +Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled it can't be selected, or its action invoked. + +See :ref:`set_item_disabled` for more info on how to disable an item. .. _class_PopupMenu_method_is_item_radio_checkable: - :ref:`bool` **is_item_radio_checkable** **(** :ref:`int` idx **)** const -Returns whether the item at index "idx" has radio-button-style checkability. Remember this is just cosmetic and you have to add the logic for checking/unchecking items in radio groups. +Returns ``true`` if the item at index ``idx`` has radio button-style checkability. + +**Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. .. _class_PopupMenu_method_is_item_separator: - :ref:`bool` **is_item_separator** **(** :ref:`int` idx **)** const -Returns whether the item is a separator. If it is, it would be displayed as a line. +Returns ``true`` if the item is a separator. If it is, it will be displayed as a line. See :ref:`add_separator` for more info on how to add a separator. .. _class_PopupMenu_method_is_item_shortcut_disabled: - :ref:`bool` **is_item_shortcut_disabled** **(** :ref:`int` idx **)** const +Returns whether the shortcut of the specified item ``idx`` is disabled or not. + .. _class_PopupMenu_method_remove_item: - void **remove_item** **(** :ref:`int` idx **)** -Removes the item at index "idx" from the menu. Note that the indexes of items after the removed item are going to be shifted by one. +Removes the item at index ``idx`` from the menu. + +**Note:** The indices of items after the removed item will be shifted by one. .. _class_PopupMenu_method_set_hide_on_window_lose_focus: - void **set_hide_on_window_lose_focus** **(** :ref:`bool` enable **)** +Hides the ``PopupMenu`` when the window loses focus. + .. _class_PopupMenu_method_set_item_accelerator: - void **set_item_accelerator** **(** :ref:`int` idx, :ref:`int` accel **)** -Set the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused. +Sets the accelerator of the item at index ``idx``. Accelerators are special combinations of keys that activate the item, no matter which control is focused. .. _class_PopupMenu_method_set_item_as_checkable: - void **set_item_as_checkable** **(** :ref:`int` idx, :ref:`bool` enable **)** -Set whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. +Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the type of the item to plain text. + +**Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. .. _class_PopupMenu_method_set_item_as_radio_checkable: - void **set_item_as_radio_checkable** **(** :ref:`int` idx, :ref:`bool` enable **)** -The same as :ref:`set_item_as_checkable` but placing a radio button in case of enabling. If used for disabling, it's the same. - -Remember this is just cosmetic and you have to add the logic for checking/unchecking items in radio groups. +Sets the type of the item at the specified index ``idx`` to radio button. If false, sets the type of the item to plain text. .. _class_PopupMenu_method_set_item_as_separator: - void **set_item_as_separator** **(** :ref:`int` idx, :ref:`bool` enable **)** -Mark the item at index "idx" as a separator, which means that it would be displayed as a line. +Mark the item at index ``idx`` as a separator, which means that it would be displayed as a line. If ``false``, sets the type of the item to plain text. .. _class_PopupMenu_method_set_item_checked: - void **set_item_checked** **(** :ref:`int` idx, :ref:`bool` checked **)** -Set the checkstate status of the item at index "idx". +Sets the checkstate status of the item at index ``idx``. .. _class_PopupMenu_method_set_item_disabled: - void **set_item_disabled** **(** :ref:`int` idx, :ref:`bool` disabled **)** -Sets whether the item at index "idx" is disabled or not. When it is disabled it can't be selected, or its action invoked. +Sets whether the item at index ``idx`` is disabled or not. When it is disabled, it can't be selected and its action can't be invoked. .. _class_PopupMenu_method_set_item_icon: - void **set_item_icon** **(** :ref:`int` idx, :ref:`Texture` icon **)** +Replaces the :ref:`Texture` icon of the specified ``idx``. + .. _class_PopupMenu_method_set_item_id: - void **set_item_id** **(** :ref:`int` idx, :ref:`int` id **)** -Set the id of the item at index "idx". +Sets the ``id`` of the item at index ``idx``. .. _class_PopupMenu_method_set_item_metadata: - void **set_item_metadata** **(** :ref:`int` idx, :ref:`Variant` metadata **)** -Sets the metadata of an item, which might be of any type. You can later get it with :ref:`get_item_metadata`, which provides a simple way of assigning context data to items. +Sets the metadata of an item, which may be of any type. You can later get it with :ref:`get_item_metadata`, which provides a simple way of assigning context data to items. .. _class_PopupMenu_method_set_item_multistate: @@ -497,30 +565,38 @@ Sets the metadata of an item, which might be of any type. You can later get it w - void **set_item_shortcut** **(** :ref:`int` idx, :ref:`ShortCut` shortcut, :ref:`bool` global=false **)** +Sets a :ref:`ShortCut` for the specified item ``idx``. + .. _class_PopupMenu_method_set_item_shortcut_disabled: - void **set_item_shortcut_disabled** **(** :ref:`int` idx, :ref:`bool` disabled **)** +Disables the :ref:`ShortCut` of the specified index ``idx``. + .. _class_PopupMenu_method_set_item_submenu: - void **set_item_submenu** **(** :ref:`int` idx, :ref:`String` submenu **)** -Sets the submenu of the item at index "idx". The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. +Sets the submenu of the item at index ``idx``. The submenu is the name of a child ``PopupMenu`` node that would be shown when the item is clicked. .. _class_PopupMenu_method_set_item_text: - void **set_item_text** **(** :ref:`int` idx, :ref:`String` text **)** -Set the text of the item at index "idx". +Sets the text of the item at index ``idx``. .. _class_PopupMenu_method_set_item_tooltip: - void **set_item_tooltip** **(** :ref:`int` idx, :ref:`String` tooltip **)** +Sets the :ref:`String` tooltip of the item at the specified index ``idx``. + .. _class_PopupMenu_method_toggle_item_checked: - void **toggle_item_checked** **(** :ref:`int` idx **)** +Toggles the check state of the item of the specified index ``idx``. + .. _class_PopupMenu_method_toggle_item_multistate: - void **toggle_item_multistate** **(** :ref:`int` idx **)** diff --git a/classes/class_position2d.rst b/classes/class_position2d.rst index 1df02c151..6d78ad0a9 100644 --- a/classes/class_position2d.rst +++ b/classes/class_position2d.rst @@ -14,10 +14,10 @@ Position2D Brief Description ----------------- -Generic 2D Position hint for editing. +Generic 2D position hint for editing. Description ----------- -Generic 2D Position hint for editing. It's just like a plain :ref:`Node2D` but displays as a cross in the 2D-Editor at all times. You can set visual size of the cross by changing Gizmo Extents in the inspector. +Generic 2D position hint for editing. It's just like a plain :ref:`Node2D`, but it displays as a cross in the 2D editor at all times. You can set cross' visual size by using the gizmo in the 2D editor while the node is selected. diff --git a/classes/class_position3d.rst b/classes/class_position3d.rst index 23e6e41f5..faa545e7b 100644 --- a/classes/class_position3d.rst +++ b/classes/class_position3d.rst @@ -14,10 +14,10 @@ Position3D Brief Description ----------------- -Generic 3D Position hint for editing. +Generic 3D position hint for editing. Description ----------- -Generic 3D Position hint for editing. It's just like a plain :ref:`Spatial` but displays as a cross in the 3D-Editor at all times. +Generic 3D position hint for editing. It's just like a plain :ref:`Spatial`, but it displays as a cross in the 3D editor at all times. diff --git a/classes/class_primitivemesh.rst b/classes/class_primitivemesh.rst index 26c88cf56..84798fde5 100644 --- a/classes/class_primitivemesh.rst +++ b/classes/class_primitivemesh.rst @@ -87,5 +87,5 @@ Method Descriptions - :ref:`Array` **get_mesh_arrays** **(** **)** const -Returns mesh arrays used to constitute surface of :ref:`Mesh`. Mesh array can be used with :ref:`ArrayMesh` to create new surface. +Returns mesh arrays used to constitute surface of :ref:`Mesh`. Mesh arrays can be used with :ref:`ArrayMesh` to create new surfaces. diff --git a/classes/class_proceduralsky.rst b/classes/class_proceduralsky.rst index 29e80152f..f3770afc6 100644 --- a/classes/class_proceduralsky.rst +++ b/classes/class_proceduralsky.rst @@ -82,14 +82,14 @@ enum **TextureSize**: - **TEXTURE_SIZE_4096** = **4** -- **TEXTURE_SIZE_MAX** = **5** +- **TEXTURE_SIZE_MAX** = **5** --- Represents the size of the :ref:`TextureSize` enum. Description ----------- -ProceduralSky provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky. +ProceduralSky provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly, the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky. -The ProceduralSky is updated on the CPU after the parameters change and stored in a texture and then displayed as a background in the scene. This makes it relatively unsuitable for realtime updates during gameplay. But with a small texture size it is still feasible to update relatively frequently because it is updated on a background thread when multi-threading is available. +The ProceduralSky is updated on the CPU after the parameters change. It is stored in a texture and then displayed as a background in the scene. This makes it relatively unsuitable for real-time updates during gameplay. However, with a small enough texture size, it can still be updated relatively frequently, as it is updated on a background thread when multi-threading is available. Property Descriptions --------------------- @@ -224,7 +224,7 @@ Distance from sun where it goes from solid to starting to fade. | *Getter* | get_sun_color() | +----------+----------------------+ -Color of the sun. +The sun's color. .. _class_ProceduralSky_property_sun_curve: @@ -236,7 +236,7 @@ Color of the sun. | *Getter* | get_sun_curve() | +----------+----------------------+ -How quickly the sun fades away between :ref:`sun_angle_min` and :ref:`sun_angle_max` +How quickly the sun fades away between :ref:`sun_angle_min` and :ref:`sun_angle_max`. .. _class_ProceduralSky_property_sun_energy: @@ -260,7 +260,7 @@ Amount of energy contribution from the sun. | *Getter* | get_sun_latitude() | +----------+-------------------------+ -The suns height using polar coordinates. +The sun's height using polar coordinates. .. _class_ProceduralSky_property_sun_longitude: @@ -284,5 +284,5 @@ The direction of the sun using polar coordinates. | *Getter* | get_texture_size() | +----------+-------------------------+ -Size of :ref:`Texture` that the ProceduralSky will generate. +Size of :ref:`Texture` that the ProceduralSky will generate. The size is set using :ref:`TextureSize`. diff --git a/classes/class_progressbar.rst b/classes/class_progressbar.rst index b8f061f0f..95a4fa22d 100644 --- a/classes/class_progressbar.rst +++ b/classes/class_progressbar.rst @@ -14,7 +14,7 @@ ProgressBar Brief Description ----------------- -General purpose progress bar. +General-purpose progress bar. Properties ---------- @@ -41,7 +41,7 @@ Theme Properties Description ----------- -General purpose progress bar. Shows fill percentage from right to left. +General-purpose progress bar. Shows fill percentage from right to left. Property Descriptions --------------------- diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index be5e74562..438e70a95 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -994,7 +994,7 @@ Maximum call stack in visual scripting, to avoid infinite recursion. - :ref:`String` **display/mouse_cursor/custom_image** -Custom image for the mouse cursor (limited to 256x256). +Custom image for the mouse cursor (limited to 256×256). .. _class_ProjectSettings_property_display/mouse_cursor/custom_image_hotspot: @@ -1036,7 +1036,7 @@ If ``true``, allows per-pixel transparency in a desktop window. This affects per - :ref:`bool` **display/window/per_pixel_transparency/enabled** -Set the window background to transparent when it starts. +Sets the window background to transparent when it starts. .. _class_ProjectSettings_property_display/window/size/always_on_top: @@ -1054,13 +1054,13 @@ Force the window to be borderless. - :ref:`bool` **display/window/size/fullscreen** -Set the window to full screen when it starts. +Sets the window to full screen when it starts. .. _class_ProjectSettings_property_display/window/size/height: - :ref:`int` **display/window/size/height** -Set the main window height. On desktop, this is the default window size. Stretch mode settings use this also as a reference when enabled. +Sets the main window height. On desktop, this is the default window size. Stretch mode settings use this also as a reference when enabled. .. _class_ProjectSettings_property_display/window/size/resizable: @@ -1740,7 +1740,7 @@ If ``true``, forces snapping of polygons to pixels in 2D rendering. May help in - :ref:`String` **rendering/quality/depth_prepass/disable_for_vendors** -Disable depth pre-pass for some GPU vendors (usually mobile), as their architecture already does this. +Disables depth pre-pass for some GPU vendors (usually mobile), as their architecture already does this. .. _class_ProjectSettings_property_rendering/quality/depth_prepass/enable: @@ -1764,7 +1764,7 @@ The directional shadow's size in pixels. Higher values will result in sharper sh The video driver to use ("GLES2" or "GLES3"). -Note that the backend in use can be overridden at runtime via the ``--video-driver`` command line argument, or by the :ref:`rendering/quality/driver/fallback_to_gles2` option if the target system does not support GLES3 and falls back to GLES2. In such cases, this property is not updated, so use :ref:`OS.get_current_video_driver` to query it at run-time. +**Note:** The backend in use can be overridden at runtime via the ``--video-driver`` command line argument, or by the :ref:`rendering/quality/driver/fallback_to_gles2` option if the target system does not support GLES3 and falls back to GLES2. In such cases, this property is not updated, so use :ref:`OS.get_current_video_driver` to query it at run-time. .. _class_ProjectSettings_property_rendering/quality/driver/fallback_to_gles2: @@ -1772,7 +1772,7 @@ Note that the backend in use can be overridden at runtime via the ``--video-driv If ``true``, allows falling back to the GLES2 driver if the GLES3 driver is not supported. -Note that the two video drivers are not drop-in replacements for each other, so a game designed for GLES3 might not work properly when falling back to GLES2. In particular, some features of the GLES3 backend are not available in GLES2. Enabling this setting also means that both ETC and ETC2 VRAM-compressed textures will be exported on Android and iOS, increasing the data pack's size. +**Note:** The two video drivers are not drop-in replacements for each other, so a game designed for GLES3 might not work properly when falling back to GLES2. In particular, some features of the GLES3 backend are not available in GLES2. Enabling this setting also means that both ETC and ETC2 VRAM-compressed textures will be exported on Android and iOS, increasing the data pack's size. .. _class_ProjectSettings_property_rendering/quality/filters/anisotropic_filter_level: @@ -1965,9 +1965,9 @@ Method Descriptions - void **add_property_info** **(** :ref:`Dictionary` hint **)** -Adds a custom property info to a property. The dictionary must contain: name::ref:`String`\ (the property's name) and type::ref:`int`\ (see TYPE\_\* in :ref:`@GlobalScope`), and optionally hint::ref:`int`\ (see PROPERTY_HINT\_\* in :ref:`@GlobalScope`), hint_string::ref:`String`. +Adds a custom property info to a property. The dictionary must contain: name::ref:`String`\ (the property's name) and type::ref:`int`\ (see ``TYPE_*`` in :ref:`@GlobalScope`), and optionally hint::ref:`int`\ (see ``PROPERTY_HINT_*`` in :ref:`@GlobalScope`), hint_string::ref:`String`. -Example: +**Example:** :: @@ -2016,7 +2016,7 @@ Returns ``true`` if a configuration value is present. Loads the contents of the .pck or .zip file specified by ``pack`` into the resource filesystem (``res://``). Returns ``true`` on success. -Note: If a file from ``pack`` shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from ``pack``. +**Note:** If a file from ``pack`` shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from ``pack``. .. _class_ProjectSettings_method_localize_path: diff --git a/classes/class_proximitygroup.rst b/classes/class_proximitygroup.rst index 3692e8dcd..92f2b674a 100644 --- a/classes/class_proximitygroup.rst +++ b/classes/class_proximitygroup.rst @@ -14,7 +14,7 @@ ProximityGroup Brief Description ----------------- -General purpose proximity-detection node. +General-purpose proximity detection node. Properties ---------- @@ -59,7 +59,7 @@ enum **DispatchMode**: Description ----------- -General purpose proximity-detection node. +General-purpose proximity detection node. Property Descriptions --------------------- diff --git a/classes/class_quat.rst b/classes/class_quat.rst index 70ff5a92b..abdaaa7aa 100644 --- a/classes/class_quat.rst +++ b/classes/class_quat.rst @@ -78,7 +78,7 @@ Description A unit quaternion used for representing 3D rotations. -It is similar to :ref:`Basis`, which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. But due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating point errors. +It is similar to :ref:`Basis`, which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. But due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors. Quaternions need to be (re)normalized. @@ -94,25 +94,25 @@ Property Descriptions - :ref:`float` **w** -W component of the quaternion. Default value: ``1`` +W component of the quaternion. Default value: ``1``. .. _class_Quat_property_x: - :ref:`float` **x** -X component of the quaternion. Default value: ``0`` +X component of the quaternion. Default value: ``0``. .. _class_Quat_property_y: - :ref:`float` **y** -Y component of the quaternion. Default value: ``0`` +Y component of the quaternion. Default value: ``0``. .. _class_Quat_property_z: - :ref:`float` **z** -Z component of the quaternion. Default value: ``0`` +Z component of the quaternion. Default value: ``0``. Method Descriptions ------------------- @@ -125,7 +125,7 @@ Returns the rotation matrix corresponding to the given quaternion. - :ref:`Quat` **Quat** **(** :ref:`Vector3` euler **)** -Returns a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: first Z, then X, and Y last), given in the vector format as (X-angle, Y-angle, Z-angle). +Returns a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle). - :ref:`Quat` **Quat** **(** :ref:`Vector3` axis, :ref:`float` angle **)** @@ -151,7 +151,7 @@ Returns the dot product of two quaternions. - :ref:`Vector3` **get_euler** **(** **)** -Returns Euler angles (in the YXZ convention: first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X-angle, Y-angle, Z-angle). +Returns Euler angles (in the YXZ convention: first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). .. _class_Quat_method_inverse: @@ -187,13 +187,13 @@ Returns a copy of the quaternion, normalized to unit length. - void **set_axis_angle** **(** :ref:`Vector3` axis, :ref:`float` angle **)** -Set the quaternion to a rotation which rotates around axis by the specified angle, in radians. The axis must be a normalized vector. +Sets the quaternion to a rotation which rotates around axis by the specified angle, in radians. The axis must be a normalized vector. .. _class_Quat_method_set_euler: - void **set_euler** **(** :ref:`Vector3` euler **)** -Set the quaternion to a rotation specified by Euler angles (in the YXZ convention: first Z, then X, and Y last), given in the vector format as (X-angle, Y-angle, Z-angle). +Sets the quaternion to a rotation specified by Euler angles (in the YXZ convention: first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle). .. _class_Quat_method_slerp: diff --git a/classes/class_randomnumbergenerator.rst b/classes/class_randomnumbergenerator.rst index 816eead0c..af7344260 100644 --- a/classes/class_randomnumbergenerator.rst +++ b/classes/class_randomnumbergenerator.rst @@ -43,7 +43,9 @@ Methods Description ----------- -RandomNumberGenerator is a class for generating pseudo-random numbers. It currently uses PCG32. The underlying algorithm is an implementation detail. As a result, it should not be depended upon for reproducible random streams across Godot versions. +RandomNumberGenerator is a class for generating pseudo-random numbers. It currently uses `PCG32 `_. + +**Note:** The underlying algorithm is an implementation detail. As a result, it should not be depended upon for reproducible random streams across Godot versions. Property Descriptions --------------------- @@ -69,31 +71,31 @@ Method Descriptions - :ref:`float` **randf** **(** **)** -Generates pseudo-random float between '0.0' and '1.0', inclusive. +Generates a pseudo-random float between ``0.0`` and ``1.0`` (inclusive). .. _class_RandomNumberGenerator_method_randf_range: - :ref:`float` **randf_range** **(** :ref:`float` from, :ref:`float` to **)** -Generates pseudo-random float between ``from`` and ``to``, inclusive. +Generates a pseudo-random float between ``from`` and ``to`` (inclusive). .. _class_RandomNumberGenerator_method_randfn: - :ref:`float` **randfn** **(** :ref:`float` mean=0.0, :ref:`float` deviation=1.0 **)** -Generates normally(gaussian) distributed pseudo-random number, using Box-Muller transform with the specified ``mean`` and a standard ``deviation``. +Generates a `normally-distributed `_ pseudo-random number, using Box-Muller transform with the specified ``mean`` and a standard ``deviation``. This is also called Gaussian distribution. .. _class_RandomNumberGenerator_method_randi: - :ref:`int` **randi** **(** **)** -Generates pseudo-random 32-bit unsigned integer between '0' and '4294967295', inclusive. +Generates a pseudo-random 32-bit unsigned integer between ``0`` and ``4294967295`` (inclusive). .. _class_RandomNumberGenerator_method_randi_range: - :ref:`int` **randi_range** **(** :ref:`int` from, :ref:`int` to **)** -Generates pseudo-random 32-bit signed integer between ``from`` and ``to`` (inclusive). +Generates a pseudo-random 32-bit signed integer between ``from`` and ``to`` (inclusive). .. _class_RandomNumberGenerator_method_randomize: diff --git a/classes/class_range.rst b/classes/class_range.rst index 1c471372d..accc97d3e 100644 --- a/classes/class_range.rst +++ b/classes/class_range.rst @@ -70,7 +70,7 @@ Emitted when :ref:`value` changes. Description ----------- -Range is a base class for :ref:`Control` nodes that change a floating point *value* between a *minimum* and a *maximum*, using *step* and *page*, for example a :ref:`ScrollBar`. +Range is a base class for :ref:`Control` nodes that change a floating-point *value* between a *minimum* and a *maximum*, using *step* and *page*, for example a :ref:`ScrollBar`. Property Descriptions --------------------- @@ -208,5 +208,5 @@ Binds two ranges together along with any ranges previously grouped with either o - void **unshare** **(** **)** -Stop range from sharing its member variables with any other. +Stops range from sharing its member variables with any other. diff --git a/classes/class_raycast.rst b/classes/class_raycast.rst index e95750c17..417d903f1 100644 --- a/classes/class_raycast.rst +++ b/classes/class_raycast.rst @@ -179,7 +179,9 @@ Removes all collision exceptions for this ray. Updates the collision information for the ray. -Use this method to update the collision information immediately instead of waiting for the next ``_physics_process`` call, for example if the ray or its parent has changed state. Note: ``enabled == true`` is not required for this to work. +Use this method to update the collision information immediately instead of waiting for the next ``_physics_process`` call, for example if the ray or its parent has changed state. + +**Note:** ``enabled == true`` is not required for this to work. .. _class_RayCast_method_get_collider: @@ -197,7 +199,9 @@ Returns the shape ID of the first object that the ray intersects, or ``0`` if no - :ref:`bool` **get_collision_mask_bit** **(** :ref:`int` bit **)** const -Returns ``true`` if the bit index passed is turned on. Note that bit indexes range from 0-19. +Returns ``true`` if the bit index passed is turned on. + +**Note:** Bit indices range from 0-19. .. _class_RayCast_method_get_collision_normal: @@ -209,7 +213,9 @@ Returns the normal of the intersecting object's shape at the collision point. - :ref:`Vector3` **get_collision_point** **(** **)** const -Returns the collision point at which the ray intersects the closest object. Note: this point is in the **global** coordinate system. +Returns the collision point at which the ray intersects the closest object. + +**Note:** This point is in the **global** coordinate system. .. _class_RayCast_method_is_colliding: @@ -233,5 +239,7 @@ Removes a collision exception so the ray does report collisions with the specifi - void **set_collision_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** -Sets the bit index passed to the ``value`` passed. Note that bit indexes range from 0-19. +Sets the bit index passed to the ``value`` passed. + +**Note:** Bit indexes range from 0-19. diff --git a/classes/class_raycast2d.rst b/classes/class_raycast2d.rst index f2a7f382d..fa1d95858 100644 --- a/classes/class_raycast2d.rst +++ b/classes/class_raycast2d.rst @@ -177,7 +177,9 @@ Removes all collision exceptions for this ray. - void **force_raycast_update** **(** **)** -Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next ``_physics_process`` call, for example if the ray or its parent has changed state. Note: ``enabled == true`` is not required for this to work. +Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next ``_physics_process`` call, for example if the ray or its parent has changed state. + +**Note:** ``enabled == true`` is not required for this to work. .. _class_RayCast2D_method_get_collider: @@ -207,7 +209,9 @@ Returns the normal of the intersecting object's shape at the collision point. - :ref:`Vector2` **get_collision_point** **(** **)** const -Returns the collision point at which the ray intersects the closest object. Note: this point is in the **global** coordinate system. +Returns the collision point at which the ray intersects the closest object. + +**Note:** this point is in the **global** coordinate system. .. _class_RayCast2D_method_is_colliding: @@ -231,5 +235,5 @@ Removes a collision exception so the ray does report collisions with the specifi - void **set_collision_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** -Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier. +Sets or clears individual bits on the collision mask. This makes selecting the areas scanned easier. diff --git a/classes/class_rayshape.rst b/classes/class_rayshape.rst index a68443f86..cd3535712 100644 --- a/classes/class_rayshape.rst +++ b/classes/class_rayshape.rst @@ -28,7 +28,7 @@ Properties Description ----------- -Ray shape for 3D collisions, which can be set into a :ref:`PhysicsBody` or :ref:`Area`. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. +Ray shape for 3D collisions, which can be set into a :ref:`PhysicsBody` or :ref:`Area`. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. Property Descriptions --------------------- diff --git a/classes/class_rayshape2d.rst b/classes/class_rayshape2d.rst index a6f8f67ce..5683ae1b8 100644 --- a/classes/class_rayshape2d.rst +++ b/classes/class_rayshape2d.rst @@ -28,7 +28,7 @@ Properties Description ----------- -Ray shape for 2D collisions. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. +Ray shape for 2D collisions. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. Property Descriptions --------------------- diff --git a/classes/class_rect2.rst b/classes/class_rect2.rst index 04d9ad6d3..43d408512 100644 --- a/classes/class_rect2.rst +++ b/classes/class_rect2.rst @@ -12,7 +12,7 @@ Rect2 Brief Description ----------------- -2D Axis-aligned bounding box. +2D axis-aligned bounding box. Properties ---------- diff --git a/classes/class_reference.rst b/classes/class_reference.rst index 7b164cfab..91efb4a79 100644 --- a/classes/class_reference.rst +++ b/classes/class_reference.rst @@ -9,14 +9,14 @@ Reference **Inherits:** :ref:`Object` -**Inherited By:** :ref:`ARVRInterface`, :ref:`AStar`, :ref:`AStar2D`, :ref:`AnimationTrackEditPlugin`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`ConfigFile`, :ref:`Directory`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorImportPlugin`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorSceneImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScript`, :ref:`EncodedObjectAsID`, :ref:`Expression`, :ref:`File`, :ref:`FuncRef`, :ref:`GDNative`, :ref:`GDScriptFunctionState`, :ref:`GDScriptNativeClass`, :ref:`HTTPClient`, :ref:`JSONParseResult`, :ref:`KinematicCollision`, :ref:`KinematicCollision2D`, :ref:`Marshalls`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`PCKPacker`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`Physics2DShapeQueryParameters`, :ref:`Physics2DShapeQueryResult`, :ref:`Physics2DTestMotionResult`, :ref:`PhysicsShapeQueryParameters`, :ref:`PhysicsShapeQueryResult`, :ref:`RandomNumberGenerator`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceInteractiveLoader`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SpatialGizmo`, :ref:`SpatialVelocityTracker`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCP_Server`, :ref:`Thread`, :ref:`TriangleMesh`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`VisualScriptFunctionState`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser` +**Inherited By:** :ref:`ARVRInterface`, :ref:`AStar`, :ref:`AStar2D`, :ref:`AnimationTrackEditPlugin`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`ConfigFile`, :ref:`Directory`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorSceneImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScript`, :ref:`EncodedObjectAsID`, :ref:`Expression`, :ref:`File`, :ref:`FuncRef`, :ref:`GDNative`, :ref:`GDScriptFunctionState`, :ref:`GDScriptNativeClass`, :ref:`HTTPClient`, :ref:`JSONParseResult`, :ref:`KinematicCollision`, :ref:`KinematicCollision2D`, :ref:`Marshalls`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`PCKPacker`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`Physics2DShapeQueryParameters`, :ref:`Physics2DShapeQueryResult`, :ref:`Physics2DTestMotionResult`, :ref:`PhysicsShapeQueryParameters`, :ref:`PhysicsShapeQueryResult`, :ref:`RandomNumberGenerator`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`ResourceInteractiveLoader`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SpatialGizmo`, :ref:`SpatialVelocityTracker`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCP_Server`, :ref:`Thread`, :ref:`TriangleMesh`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`VisualScriptFunctionState`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser` **Category:** Core Brief Description ----------------- -Base class for anything that keeps a reference count. +Base class for reference-counted objects. Methods ------- @@ -32,7 +32,11 @@ Methods Description ----------- -Base class for anything that keeps a reference count. Resource and many other helper objects inherit this. References keep an internal reference counter so they are only released when no longer in use. +Base class for any object that keeps a reference count. :ref:`Resource` and many other helper objects inherit this class. + +References keep an internal reference counter so that they are automatically released when no longer in use, and only then. References therefore do not need to be freed manually with :ref:`Object.free`. + +In the vast majority of use cases, instantiating and using ``Reference``-derived types is all you need to do. The methods provided in this class are only for advanced users, and can cause issues if misused. Method Descriptions ------------------- @@ -41,15 +45,23 @@ Method Descriptions - :ref:`bool` **init_ref** **(** **)** +Initializes the internal reference counter. Use this only if you really know what you are doing. + +Returns whether the initialization was successful. + .. _class_Reference_method_reference: - :ref:`bool` **reference** **(** **)** -Increase the internal reference counter. Use this only if you really know what you are doing. +Increments the internal reference counter. Use this only if you really know what you are doing. + +Returns ``true`` if the increment was successful, ``false`` otherwise. .. _class_Reference_method_unreference: - :ref:`bool` **unreference** **(** **)** -Decrease the internal reference counter. Use this only if you really know what you are doing. +Decrements the internal reference counter. Use this only if you really know what you are doing. + +Returns ``true`` if the decrement was successful, ``false`` otherwise. diff --git a/classes/class_regex.rst b/classes/class_regex.rst index 6d8e372f4..1124700fd 100644 --- a/classes/class_regex.rst +++ b/classes/class_regex.rst @@ -42,7 +42,7 @@ Methods Description ----------- -Regular Expression (or regex) is a compact programming language that can be used to recognise strings that follow a specific pattern, such as URLs, email addresses, complete sentences, etc. For instance, a regex of ``ab[0-9]`` would find any string that is ``ab`` followed by any number from ``0`` to ``9``. For a more in-depth look, you can easily find various tutorials and detailed explanations on the Internet. +A regular expression (or regex) is a compact language that can be used to recognise strings that follow a specific pattern, such as URLs, email addresses, complete sentences, etc. For instance, a regex of ``ab[0-9]`` would find any string that is ``ab`` followed by any number from ``0`` to ``9``. For a more in-depth look, you can easily find various tutorials and detailed explanations on the Internet. To begin, the RegEx object needs to be compiled with the search pattern using :ref:`compile` before it can be used. @@ -63,7 +63,7 @@ Using :ref:`search` you can find the pattern within t if result: print(result.get_string()) # Would print n-0123 -The results of capturing groups ``()`` can be retrieved by passing the group number to the various functions in :ref:`RegExMatch`. Group 0 is the default and would always refer to the entire pattern. In the above example, calling ``result.get_string(1)`` would give you ``0123``. +The results of capturing groups ``()`` can be retrieved by passing the group number to the various functions in :ref:`RegExMatch`. Group 0 is the default and will always refer to the entire pattern. In the above example, calling ``result.get_string(1)`` would give you ``0123``. This version of RegEx also supports named capturing groups, and the names can be used to retrieve the results. If two or more groups have the same name, the name would only refer to the first one with a match. @@ -75,7 +75,7 @@ This version of RegEx also supports named capturing groups, and the names can be if result: print(result.get_string("digit")) # Would print 2f -If you need to process multiple results, :ref:`search_all` generates a list of all non-overlapping results. This can be combined with a for-loop for convenience. +If you need to process multiple results, :ref:`search_all` generates a list of all non-overlapping results. This can be combined with a ``for`` loop for convenience. :: @@ -91,13 +91,13 @@ Method Descriptions - void **clear** **(** **)** -This method resets the state of the object, as it was freshly created. Namely, it unassigns the regular expression of this object. +This method resets the state of the object, as if it was freshly created. Namely, it unassigns the regular expression of this object. .. _class_RegEx_method_compile: - :ref:`Error` **compile** **(** :ref:`String` pattern **)** -Compiles and assign the search pattern to use. Returns OK if the compilation is successful. If an error is encountered the details are printed to STDOUT and FAILED is returned. +Compiles and assign the search pattern to use. Returns :ref:`@GlobalScope.OK` if the compilation is successful. If an error is encountered, details are printed to standard output and an error is returned. .. _class_RegEx_method_get_group_count: @@ -127,17 +127,17 @@ Returns whether this object has a valid search pattern assigned. - :ref:`RegExMatch` **search** **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** const -Searches the text for the compiled pattern. Returns a :ref:`RegExMatch` container of the first matching result if found, otherwise null. The region to search within can be specified without modifying where the start and end anchor would be. +Searches the text for the compiled pattern. Returns a :ref:`RegExMatch` container of the first matching result if found, otherwise ``null``. The region to search within can be specified without modifying where the start and end anchor would be. .. _class_RegEx_method_search_all: - :ref:`Array` **search_all** **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** const -Searches the text for the compiled pattern. Returns an array of :ref:`RegExMatch` containers for each non-overlapping result. If no results were found an empty array is returned instead. The region to search within can be specified without modifying where the start and end anchor would be. +Searches the text for the compiled pattern. Returns an array of :ref:`RegExMatch` containers for each non-overlapping result. If no results were found, an empty array is returned instead. The region to search within can be specified without modifying where the start and end anchor would be. .. _class_RegEx_method_sub: - :ref:`String` **sub** **(** :ref:`String` subject, :ref:`String` replacement, :ref:`bool` all=false, :ref:`int` offset=0, :ref:`int` end=-1 **)** const -Searches the text for the compiled pattern and replaces it with the specified string. Escapes and backreferences such as ``$1`` and ``$name`` are expanded and resolved. By default only the first instance is replaced but it can be changed for all instances (global replacement). The region to search within can be specified without modifying where the start and end anchor would be. +Searches the text for the compiled pattern and replaces it with the specified string. Escapes and backreferences such as ``$1`` and ``$name`` are expanded and resolved. By default, only the first instance is replaced, but it can be changed for all instances (global replacement). The region to search within can be specified without modifying where the start and end anchor would be. diff --git a/classes/class_regexmatch.rst b/classes/class_regexmatch.rst index 7f3330665..d18df0acc 100644 --- a/classes/class_regexmatch.rst +++ b/classes/class_regexmatch.rst @@ -14,7 +14,7 @@ RegExMatch Brief Description ----------------- -Contains the results of a regex search. +Contains the results of a :ref:`RegEx` search. Properties ---------- @@ -43,7 +43,7 @@ Methods Description ----------- -Contains the results of a single regex match returned by :ref:`RegEx.search` and :ref:`RegEx.search_all`. It can be used to find the position and range of the match and its capturing groups, and it can extract its sub-string for you. +Contains the results of a single :ref:`RegEx` match returned by :ref:`RegEx.search` and :ref:`RegEx.search_all`. It can be used to find the position and range of the match and its capturing groups, and it can extract its substring for you. Property Descriptions --------------------- diff --git a/classes/class_resource.rst b/classes/class_resource.rst index 7898fcb74..7dadf740c 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -53,6 +53,8 @@ Signals - **changed** **(** **)** +Emitted whenever the resource changes. + Description ----------- @@ -127,7 +129,7 @@ If :ref:`resource_local_to_scene` **get_rid** **(** **)** const -Returns the RID of the resource (or an empty RID). Many resources (such as :ref:`Texture`, :ref:`Mesh`, etc) are high level abstractions of resources stored in a server, so this function will return the original RID. +Returns the RID of the resource (or an empty RID). Many resources (such as :ref:`Texture`, :ref:`Mesh`, etc) are high-level abstractions of resources stored in a server, so this function will return the original RID. .. _class_Resource_method_setup_local_to_scene: diff --git a/classes/class_resourceformatloader.rst b/classes/class_resourceformatloader.rst index 45ad6a9f7..187b09e91 100644 --- a/classes/class_resourceformatloader.rst +++ b/classes/class_resourceformatloader.rst @@ -40,7 +40,7 @@ Godot loads resources in the editor or in exported games using ResourceFormatLoa Extending this class allows you to define your own loader. Be sure to respect the documented return types and values. You should give it a global class name with ``class_name`` for it to be registered. Like built-in ResourceFormatLoaders, it will be called automatically when loading resources of its handled type(s). You may also implement a :ref:`ResourceFormatSaver`. -Note: You can also extend :ref:`EditorImportPlugin` if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import ``.png`` textures as ``.stex`` (:ref:`StreamTexture`) first, so they can be loaded with better efficiency on the graphics card. +**Note:** You can also extend :ref:`EditorImportPlugin` if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import ``.png`` textures as ``.stex`` (:ref:`StreamTexture`) first, so they can be loaded with better efficiency on the graphics card. Method Descriptions ------------------- @@ -49,7 +49,9 @@ Method Descriptions - void **get_dependencies** **(** :ref:`String` path, :ref:`String` add_types **)** virtual -If implemented, gets the dependencies of a given resource. If ``add_types`` is ``true``, paths should be appended ``::TypeName``, where ``TypeName`` is the class name of the dependency. Note that custom resource types defined by scripts aren't known by the :ref:`ClassDB`, so you might just return ``"Resource"`` for them. +If implemented, gets the dependencies of a given resource. If ``add_types`` is ``true``, paths should be appended ``::TypeName``, where ``TypeName`` is the class name of the dependency. + +**Note:** Custom resource types defined by scripts aren't known by the :ref:`ClassDB`, so you might just return ``"Resource"`` for them. .. _class_ResourceFormatLoader_method_get_recognized_extensions: @@ -61,13 +63,17 @@ Gets the list of extensions for files this loader is able to read. - :ref:`String` **get_resource_type** **(** :ref:`String` path **)** virtual -Gets the class name of the resource associated with the given path. If the loader cannot handle it, it should return ``""``. Note that custom resource types defined by scripts aren't known by the :ref:`ClassDB`, so you might just return ``"Resource"`` for them. +Gets the class name of the resource associated with the given path. If the loader cannot handle it, it should return ``""``. + +**Note:** Custom resource types defined by scripts aren't known by the :ref:`ClassDB`, so you might just return ``"Resource"`` for them. .. _class_ResourceFormatLoader_method_handles_type: - :ref:`bool` **handles_type** **(** :ref:`String` typename **)** virtual -Tells which resource class this loader can load. Note that custom resource types defined by scripts aren't known by the :ref:`ClassDB`, so you might just handle ``"Resource"`` for them. +Tells which resource class this loader can load. + +**Note:** Custom resource types defined by scripts aren't known by the :ref:`ClassDB`, so you might just handle ``"Resource"`` for them. .. _class_ResourceFormatLoader_method_load: diff --git a/classes/class_resourceimporter.rst b/classes/class_resourceimporter.rst new file mode 100644 index 000000000..578091b47 --- /dev/null +++ b/classes/class_resourceimporter.rst @@ -0,0 +1,20 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the ResourceImporter.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_ResourceImporter: + +ResourceImporter +================ + +**Inherits:** :ref:`Reference` **<** :ref:`Object` + +**Inherited By:** :ref:`EditorImportPlugin` + +**Category:** Core + +Brief Description +----------------- + + + diff --git a/classes/class_resourceinteractiveloader.rst b/classes/class_resourceinteractiveloader.rst index b01c18027..e890f9b81 100644 --- a/classes/class_resourceinteractiveloader.rst +++ b/classes/class_resourceinteractiveloader.rst @@ -34,7 +34,7 @@ Methods Description ----------- -Interactive :ref:`Resource` loader. This object is returned by :ref:`ResourceLoader` when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying loading bars/percentages. +Interactive :ref:`Resource` loader. This object is returned by :ref:`ResourceLoader` when performing an interactive load. It allows loading resources with high granularity, which makes it mainly useful for displaying loading bars or percentages. Method Descriptions ------------------- diff --git a/classes/class_resourceloader.rst b/classes/class_resourceloader.rst index ee7b6d082..10fafc651 100644 --- a/classes/class_resourceloader.rst +++ b/classes/class_resourceloader.rst @@ -73,7 +73,7 @@ Returns the list of recognized extensions for a resource type. - :ref:`bool` **has** **(** :ref:`String` path **)** -Deprecated method. Use :ref:`has_cached` or :ref:`exists` instead. +*Deprecated method.* Use :ref:`has_cached` or :ref:`exists` instead. .. _class_ResourceLoader_method_has_cached: @@ -109,5 +109,5 @@ An optional ``type_hint`` can be used to further specify the :ref:`Resource` abort **)** -Change the behavior on missing sub-resources. Default is to abort load. +Changes the behavior on missing sub-resources. The default behavior is to abort loading. diff --git a/classes/class_resourcesaver.rst b/classes/class_resourcesaver.rst index 16e671501..0b415fc44 100644 --- a/classes/class_resourcesaver.rst +++ b/classes/class_resourcesaver.rst @@ -50,7 +50,7 @@ enum **SaverFlags**: - **FLAG_BUNDLE_RESOURCES** = **2** --- Bundles external resources. -- **FLAG_CHANGE_PATH** = **4** --- Change the :ref:`Resource.resource_path` of the saved resource to match its new location. +- **FLAG_CHANGE_PATH** = **4** --- Changes the :ref:`Resource.resource_path` of the saved resource to match its new location. - **FLAG_OMIT_EDITOR_PROPERTIES** = **8** --- Do not save editor-specific metadata (identified by their ``__editor`` prefix). diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 134d36ab3..d40424b90 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -258,7 +258,7 @@ Description Rich text can contain custom text, fonts, images and some basic formatting. The label manages these as an internal tag stack. It also adapts itself to given width/heights. -Note that assignments to :ref:`bbcode_text` clear the tag stack and reconstruct it from the property's contents. Any edits made to :ref:`bbcode_text` will erase previous edits made from other manual sources such as :ref:`append_bbcode` and the ``push_*`` / :ref:`pop` methods. +**Note:** Assignments to :ref:`bbcode_text` clear the tag stack and reconstruct it from the property's contents. Any edits made to :ref:`bbcode_text` will erase previous edits made from other manual sources such as :ref:`append_bbcode` and the ``push_*`` / :ref:`pop` methods. Tutorials --------- @@ -374,7 +374,7 @@ If ``true``, the label allows text selection. | *Getter* | get_tab_size() | +----------+---------------------+ -The number of spaces associated with a single tab length. Does not affect "\\t" in text tags, only indent tags. +The number of spaces associated with a single tab length. Does not affect ``\t`` in text tags, only indent tags. .. _class_RichTextLabel_property_text: @@ -388,7 +388,7 @@ The number of spaces associated with a single tab length. Does not affect "\\t" The raw text of the label. -When set, clears the tag stack and adds a raw text tag to the top of it. Does not parse bbcodes. Does not modify :ref:`bbcode_text`. +When set, clears the tag stack and adds a raw text tag to the top of it. Does not parse BBCodes. Does not modify :ref:`bbcode_text`. .. _class_RichTextLabel_property_visible_characters: @@ -400,7 +400,7 @@ When set, clears the tag stack and adds a raw text tag to the top of it. Does no | *Getter* | get_visible_characters() | +----------+-------------------------------+ -The restricted number of characters to display in the label. +The restricted number of characters to display in the label. If ``-1``, all characters will be displayed. Method Descriptions ------------------- @@ -415,13 +415,13 @@ Adds an image's opening and closing tags to the tag stack. - void **add_text** **(** :ref:`String` text **)** -Adds raw non-bbcode-parsed text to the tag stack. +Adds raw non-BBCode-parsed text to the tag stack. .. _class_RichTextLabel_method_append_bbcode: - :ref:`Error` **append_bbcode** **(** :ref:`String` bbcode **)** -Parses ``bbcode`` and adds tags to the tag stack as needed. Returns the result of the parsing, ``OK`` if successful. +Parses ``bbcode`` and adds tags to the tag stack as needed. Returns the result of the parsing, :ref:`@GlobalScope.OK` if successful. .. _class_RichTextLabel_method_clear: @@ -445,7 +445,7 @@ Returns the total number of newlines in the tag stack's text tags. Considers wra - :ref:`int` **get_total_character_count** **(** **)** const -Returns the total number of characters from text tags. Does not include bbcodes. +Returns the total number of characters from text tags. Does not include BBCodes. .. _class_RichTextLabel_method_get_v_scroll: @@ -469,19 +469,19 @@ Adds a newline tag to the tag stack. - :ref:`Error` **parse_bbcode** **(** :ref:`String` bbcode **)** -The assignment version of :ref:`append_bbcode`. Clears the tag stack and inserts the new content. Returns ``OK`` if parses ``bbcode`` successfully. +The assignment version of :ref:`append_bbcode`. Clears the tag stack and inserts the new content. Returns :ref:`@GlobalScope.OK` if parses ``bbcode`` successfully. .. _class_RichTextLabel_method_pop: - void **pop** **(** **)** -Terminates the current tag. Use after ``push_*`` methods to close bbcodes manually. Does not need to follow ``add_*`` methods. +Terminates the current tag. Use after ``push_*`` methods to close BBCodes manually. Does not need to follow ``add_*`` methods. .. _class_RichTextLabel_method_push_align: - void **push_align** **(** :ref:`Align` align **)** -Adds an alignment tag based on the given ``align`` value. See :ref:`Align` for possible values. +Adds an ``[align]`` tag based on the given ``align`` value. See :ref:`Align` for possible values. .. _class_RichTextLabel_method_push_cell: @@ -511,13 +511,13 @@ Adds an ``[indent]`` tag to the tag stack. Multiplies "level" by current tab_siz - void **push_list** **(** :ref:`ListType` type **)** -Adds a list tag to the tag stack. Similar to the bbcodes ``[ol]`` or ``[ul]``, but supports more list types. Not fully implemented! +Adds a ``[list]`` tag to the tag stack. Similar to the BBCodes ``[ol]`` or ``[ul]``, but supports more list types. Not fully implemented! .. _class_RichTextLabel_method_push_meta: - void **push_meta** **(** :ref:`Variant` data **)** -Adds a meta tag to the tag stack. Similar to the bbcode ``[url=something]{text}[/url]``, but supports non-:ref:`String` metadata types. +Adds a ``[meta]`` tag to the tag stack. Similar to the BBCode ``[url=something]{text}[/url]``, but supports non-:ref:`String` metadata types. .. _class_RichTextLabel_method_push_strikethrough: @@ -553,9 +553,9 @@ Scrolls the window's top line to match ``line``. - void **set_table_column_expand** **(** :ref:`int` column, :ref:`bool` expand, :ref:`int` ratio **)** -Edits the selected columns expansion options. If ``expand`` is ``true``, the column expands in proportion to its expansion ratio versus the other columns' ratios. +Edits the selected column's expansion options. If ``expand`` is ``true``, the column expands in proportion to its expansion ratio versus the other columns' ratios. For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively. -Columns with a ``false`` expand will not contribute to the total ratio. +If ``expand`` is ``false``, the column will not contribute to the total ratio. diff --git a/classes/class_rid.rst b/classes/class_rid.rst index bee609a29..0983c9277 100644 --- a/classes/class_rid.rst +++ b/classes/class_rid.rst @@ -26,7 +26,7 @@ Methods Description ----------- -The RID type is used to access the unique integer ID of a resource. They are opaque, so they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as :ref:`VisualServer`. +The RID type is used to access the unique integer ID of a resource. They are opaque, which means they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as :ref:`VisualServer`. Method Descriptions ------------------- diff --git a/classes/class_rigidbody.rst b/classes/class_rigidbody.rst index 8478935cc..d312376f4 100644 --- a/classes/class_rigidbody.rst +++ b/classes/class_rigidbody.rst @@ -113,7 +113,7 @@ Emitted when a body shape exits contact with this one. Contact monitor and conta Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. -This signal not only receives the body that collided with this one, but also its :ref:`RID` (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body collided with. +This signal not only receives the body that collided with this one, but also its :ref:`RID` (``body_id``), the shape index from the colliding body (``body_shape``), and the shape index from this body (``local_shape``) the other body collided with. .. _class_RigidBody_signal_body_shape_exited: @@ -121,7 +121,7 @@ This signal not only receives the body that collided with this one, but also its Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. -This signal not only receives the body that stopped colliding with this one, but also its :ref:`RID` (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body stopped colliding with. +This signal not only receives the body that stopped colliding with this one, but also its :ref:`RID` (``body_id``), the shape index from the colliding body (``body_shape``), and the shape index from this body (``local_shape``) the other body stopped colliding with. .. _class_RigidBody_signal_sleeping_state_changed: @@ -155,13 +155,13 @@ enum **Mode**: Description ----------- -This is the node that implements full 3D physics. This means that you do not control a RigidBody directly. Instead you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. +This is the node that implements full 3D physics. This means that you do not control a RigidBody directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. A RigidBody has 4 behavior :ref:`mode`\ s: Rigid, Static, Character, and Kinematic. -**Note:** Don't change a RigidBody's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior. If you need to directly affect the body's state, use :ref:`_integrate_forces`, which allows you to directly access the physics state. +**Note:** Don't change a RigidBody's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use :ref:`_integrate_forces`, which allows you to directly access the physics state. -If you need to override the default physics behavior, you can write a custom force integration. See :ref:`custom_integrator`. +If you need to override the default physics behavior, you can write a custom force integration function. See :ref:`custom_integrator`. Tutorials --------- @@ -205,7 +205,7 @@ RigidBody's rotational velocity. | *Getter* | get_axis_lock() | +----------+----------------------+ -Lock the body's rotation in the x-axis. +Lock the body's rotation in the X axis. .. _class_RigidBody_property_axis_lock_angular_y: @@ -217,7 +217,7 @@ Lock the body's rotation in the x-axis. | *Getter* | get_axis_lock() | +----------+----------------------+ -Lock the body's rotation in the y-axis. +Lock the body's rotation in the Y axis. .. _class_RigidBody_property_axis_lock_angular_z: @@ -229,7 +229,7 @@ Lock the body's rotation in the y-axis. | *Getter* | get_axis_lock() | +----------+----------------------+ -Lock the body's rotation in the z-axis. +Lock the body's rotation in the Z axis. .. _class_RigidBody_property_axis_lock_linear_x: @@ -241,7 +241,7 @@ Lock the body's rotation in the z-axis. | *Getter* | get_axis_lock() | +----------+----------------------+ -Lock the body's movement in the x-axis. +Lock the body's movement in the X axis. .. _class_RigidBody_property_axis_lock_linear_y: @@ -253,7 +253,7 @@ Lock the body's movement in the x-axis. | *Getter* | get_axis_lock() | +----------+----------------------+ -Lock the body's movement in the y-axis. +Lock the body's movement in the Y axis. .. _class_RigidBody_property_axis_lock_linear_z: @@ -265,7 +265,7 @@ Lock the body's movement in the y-axis. | *Getter* | get_axis_lock() | +----------+----------------------+ -Lock the body's movement in the z-axis. +Lock the body's movement in the Z axis. .. _class_RigidBody_property_bounce: @@ -327,7 +327,7 @@ The maximum contacts to report. Bodies can keep a log of the contacts with other If ``true``, continuous collision detection is used. -Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses less impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. +Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses fewer impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. .. _class_RigidBody_property_custom_integrator: @@ -363,7 +363,7 @@ The body's friction, from 0 (frictionless) to 1 (max friction). | *Getter* | get_gravity_scale() | +----------+--------------------------+ -This is multiplied by the global 3D gravity setting found in "Project > Project Settings > Physics > 3d" to produce RigidBody's gravity. E.g. a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. +This is multiplied by the global 3D gravity setting found in **Project > Project Settings > Physics > 3d** to produce RigidBody's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. .. _class_RigidBody_property_linear_damp: @@ -387,7 +387,7 @@ The body's linear damp. Default value: -1, cannot be less than -1. If this value | *Getter* | get_linear_velocity() | +----------+----------------------------+ -The body's linear velocity. Can be used sporadically, but **DON'T SET THIS IN EVERY FRAME**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces` as your process loop for precise control of the body state. +The body's linear velocity. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces` as your process loop for precise control of the body state. .. _class_RigidBody_property_mass: @@ -411,7 +411,7 @@ The body's mass. | *Getter* | get_mode() | +----------+-----------------+ -The body mode from the MODE\_\* enum. Modes include: MODE_STATIC, MODE_KINEMATIC, MODE_RIGID, and MODE_CHARACTER. +The body mode. See :ref:`Mode` for possible values. Default value: ``MODE_RIGID``. .. _class_RigidBody_property_physics_material_override: @@ -445,7 +445,7 @@ If ``true``, the body is sleeping and will not calculate forces until woken up b | *Getter* | get_weight() | +----------+-------------------+ -The body's weight based on its mass and the global 3D gravity. Global values are set in "Project > Project Settings > Physics > 3d". +The body's weight based on its mass and the global 3D gravity. Global values are set in **Project > Project Settings > Physics > 3d**. Method Descriptions ------------------- @@ -488,19 +488,21 @@ This is equivalent to ``apply_impulse(Vector3(0,0,0), impulse)``. - void **apply_impulse** **(** :ref:`Vector3` position, :ref:`Vector3` impulse **)** -Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. +Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. .. _class_RigidBody_method_apply_torque_impulse: - void **apply_torque_impulse** **(** :ref:`Vector3` impulse **)** -Applies a torque impulse which will be affected by the body mass and shape. This will rotate the body around the passed in vector. +Applies a torque impulse which will be affected by the body mass and shape. This will rotate the body around the ``impulse`` vector passed. .. _class_RigidBody_method_get_colliding_bodies: - :ref:`Array` **get_colliding_bodies** **(** **)** const -Returns a list of the bodies colliding with this one. By default, number of max contacts reported is at 0, see the :ref:`contacts_reported` property to increase it. Note that the result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. +Returns a list of the bodies colliding with this one. By default, number of max contacts reported is at 0, see the :ref:`contacts_reported` property to increase it. + +**Note:** The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. .. _class_RigidBody_method_set_axis_velocity: diff --git a/classes/class_rigidbody2d.rst b/classes/class_rigidbody2d.rst index 37bf970b5..0d7569a9f 100644 --- a/classes/class_rigidbody2d.rst +++ b/classes/class_rigidbody2d.rst @@ -138,7 +138,7 @@ enum **Mode**: - **MODE_STATIC** = **1** --- Static mode. The body behaves like a :ref:`StaticBody2D` and does not move. -- **MODE_CHARACTER** = **2** --- Character mode. Similar to ``MODE_RIGID``, but the body can not rotate. +- **MODE_CHARACTER** = **2** --- Character mode. Similar to :ref:`MODE_RIGID`, but the body can not rotate. - **MODE_KINEMATIC** = **3** --- Kinematic mode. The body behaves like a :ref:`KinematicBody2D`, and must be moved by code. @@ -184,7 +184,7 @@ Property Descriptions | *Getter* | get_angular_damp() | +----------+-------------------------+ -Damps the body's :ref:`angular_velocity`. If ``-1`` the body will use the "Default Angular Damp" in "Project > Project Settings > Physics > 2d". Default value: ``-1``. +Damps the body's :ref:`angular_velocity`. If ``-1``, the body will use the **Default Angular Damp** defined in **Project > Project Settings > Physics > 2d**. Default value: ``-1``. .. _class_RigidBody2D_property_angular_velocity: @@ -280,9 +280,9 @@ The maximum number of contacts to report. Default value: ``0``. | *Getter* | get_continuous_collision_detection_mode() | +----------+------------------------------------------------+ -Continuous collision detection mode. Default value: ``CCD_MODE_DISABLED``. +Continuous collision detection mode. Default value: :ref:`CCD_MODE_DISABLED`. -Continuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See ``CCD_MODE_`` constants for details. +Continuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See :ref:`CCDMode` for details. .. _class_RigidBody2D_property_custom_integrator: @@ -318,7 +318,7 @@ The body's friction. Values range from ``0`` (frictionless) to ``1`` (maximum fr | *Getter* | get_gravity_scale() | +----------+--------------------------+ -Multiplies the gravity applied to the body. The body's gravity is calculated from the "Default Gravity" value in "Project > Project Settings > Physics > 2d" and/or any additional gravity vector applied by :ref:`Area2D`\ s. Default value: ``1``. +Multiplies the gravity applied to the body. The body's gravity is calculated from the **Default Gravity** value in **Project > Project Settings > Physics > 2d** and/or any additional gravity vector applied by :ref:`Area2D`\ s. Default value: ``1``. .. _class_RigidBody2D_property_inertia: @@ -342,7 +342,7 @@ The body's moment of inertia. This is like mass, but for rotation: it determines | *Getter* | get_linear_damp() | +----------+------------------------+ -Damps the body's :ref:`linear_velocity`. If ``-1`` the body will use the "Default Linear Damp" in "Project > Project Settings > Physics > 2d". Default value: ``-1``. +Damps the body's :ref:`linear_velocity`. If ``-1``, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 2d**. Default value: ``-1``. .. _class_RigidBody2D_property_linear_velocity: @@ -378,7 +378,7 @@ The body's mass. Default value: ``1``. | *Getter* | get_mode() | +----------+-----------------+ -The body's mode. See ``MODE_*`` constants. Default value: ``MODE_RIGID``. +The body's mode. See :ref:`Mode` for possible values. Default value: :ref:`MODE_RIGID`. .. _class_RigidBody2D_property_physics_material_override: @@ -412,7 +412,7 @@ If ``true``, the body is sleeping and will not calculate forces until woken up b | *Getter* | get_weight() | +----------+-------------------+ -The body's weight based on its mass and the "Default Gravity" value in "Project > Project Settings > Physics > 2d". +The body's weight based on its mass and the **Default Gravity** value in **Project > Project Settings > Physics > 2d**. Method Descriptions ------------------- @@ -451,7 +451,7 @@ Applies a directional impulse without affecting rotation. - void **apply_impulse** **(** :ref:`Vector2` offset, :ref:`Vector2` impulse **)** -Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The position uses the rotation of the global coordinate system, but is centered at the object's origin. +Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The position uses the rotation of the global coordinate system, but is centered at the object's origin. .. _class_RigidBody2D_method_apply_torque_impulse: @@ -463,7 +463,9 @@ Applies a rotational impulse to the body. - :ref:`Array` **get_colliding_bodies** **(** **)** const -Returns a list of the bodies colliding with this one. Use :ref:`contacts_reported` to set the maximum number reported. You must also set :ref:`contact_monitor` to ``true``. Note that the result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. +Returns a list of the bodies colliding with this one. Use :ref:`contacts_reported` to set the maximum number reported. You must also set :ref:`contact_monitor` to ``true``. + +**Note:** The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. .. _class_RigidBody2D_method_set_axis_velocity: diff --git a/classes/class_scenestate.rst b/classes/class_scenestate.rst index 2f9943723..ad234d645 100644 --- a/classes/class_scenestate.rst +++ b/classes/class_scenestate.rst @@ -76,15 +76,21 @@ enum **GenEditState**: - **GEN_EDIT_STATE_DISABLED** = **0** --- If passed to :ref:`PackedScene.instance`, blocks edits to the scene state. -- **GEN_EDIT_STATE_INSTANCE** = **1** --- If passed to :ref:`PackedScene.instance`, provides inherited scene resources to the local scene. Requires tools compiled. +- **GEN_EDIT_STATE_INSTANCE** = **1** --- If passed to :ref:`PackedScene.instance`, provides inherited scene resources to the local scene. -- **GEN_EDIT_STATE_MAIN** = **2** --- If passed to :ref:`PackedScene.instance`, provides local scene resources to the local scene. Only the main scene should receive the main edit state. Requires tools compiled. +**Note:** Only available in editor builds. + +- **GEN_EDIT_STATE_MAIN** = **2** --- If passed to :ref:`PackedScene.instance`, provides local scene resources to the local scene. Only the main scene should receive the main edit state. + +**Note:** Only available in editor builds. Description ----------- Maintains a list of resources, nodes, exported, and overridden properties, and built-in scripts associated with a scene. +This class cannot be instantiated directly, it is retrieved for a given scene as the result of :ref:`PackedScene.get_state`. + Method Descriptions ------------------- @@ -100,11 +106,13 @@ Returns the list of bound parameters for the signal at ``idx``. Returns the number of signal connections in the scene. +The ``idx`` argument used to query connection metadata in other ``get_connection_*`` methods in the interval ``[0, get_connection_count() - 1]``. + .. _class_SceneState_method_get_connection_flags: - :ref:`int` **get_connection_flags** **(** :ref:`int` idx **)** const -Returns the flags for the signal at ``idx``. See :ref:`Object`'s ``CONNECT_*`` flags. +Returns the connection flags for the signal at ``idx``. See :ref:`ConnectFlags` constants. .. _class_SceneState_method_get_connection_method: @@ -136,6 +144,8 @@ Returns the path to the node that owns the method connected to the signal at ``i Returns the number of nodes in the scene. +The ``idx`` argument used to query node data in other ``get_node_*`` methods in the interval ``[0, get_node_count() - 1]``. + .. _class_SceneState_method_get_node_groups: - :ref:`PoolStringArray` **get_node_groups** **(** :ref:`int` idx **)** const @@ -146,11 +156,13 @@ Returns the list of group names associated with the node at ``idx``. - :ref:`int` **get_node_index** **(** :ref:`int` idx **)** const +Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instanced or inherited scene among siblings from the base scene. Despite the name, this index is not related to the ``idx`` argument used here and in other methods. + .. _class_SceneState_method_get_node_instance: - :ref:`PackedScene` **get_node_instance** **(** :ref:`int` idx **)** const -Returns the scene for the node at ``idx`` or ``null`` if the node is not an instance. +Returns a :ref:`PackedScene` for the node at ``idx`` (i.e. the whole branch starting at this node, with its child nodes and resources), or ``null`` if the node is not an instance. .. _class_SceneState_method_get_node_instance_placeholder: @@ -176,12 +188,16 @@ Returns the path to the owner of the node at ``idx``, relative to the root node. Returns the path to the node at ``idx``. +If ``for_parent`` is ``true``, returns the path of the ``idx`` node's parent instead. + .. _class_SceneState_method_get_node_property_count: - :ref:`int` **get_node_property_count** **(** :ref:`int` idx **)** const Returns the number of exported or overridden properties for the node at ``idx``. +The ``prop_idx`` argument used to query node property data in other ``get_node_property_*`` methods in the interval ``[0, get_node_property_count() - 1]``. + .. _class_SceneState_method_get_node_property_name: - :ref:`String` **get_node_property_name** **(** :ref:`int` idx, :ref:`int` prop_idx **)** const diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index c07593eaf..b0673a2aa 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -14,7 +14,7 @@ SceneTree Brief Description ----------------- -SceneTree manages a hierarchy of nodes. +Manages the game loop via a hierarchy of nodes. Properties ---------- @@ -107,83 +107,85 @@ Signals - **connected_to_server** **(** **)** -Emitted whenever this SceneTree's :ref:`network_peer` successfully connected to a server. Only emitted on clients. +Emitted whenever this ``SceneTree``'s :ref:`network_peer` successfully connected to a server. Only emitted on clients. .. _class_SceneTree_signal_connection_failed: - **connection_failed** **(** **)** -Emitted whenever this SceneTree's :ref:`network_peer` fails to establish a connection to a server. Only emitted on clients. +Emitted whenever this ``SceneTree``'s :ref:`network_peer` fails to establish a connection to a server. Only emitted on clients. .. _class_SceneTree_signal_files_dropped: - **files_dropped** **(** :ref:`PoolStringArray` files, :ref:`int` screen **)** -Emitted whenever files are drag-and-dropped onto the window. +Emitted when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated. .. _class_SceneTree_signal_idle_frame: - **idle_frame** **(** **)** -Emitted immediately before :ref:`Node._process` is called on every node in the SceneTree. +Emitted immediately before :ref:`Node._process` is called on every node in the ``SceneTree``. .. _class_SceneTree_signal_network_peer_connected: - **network_peer_connected** **(** :ref:`int` id **)** -Emitted whenever this SceneTree's :ref:`network_peer` connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1). +Emitted whenever this ``SceneTree``'s :ref:`network_peer` connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1). .. _class_SceneTree_signal_network_peer_disconnected: - **network_peer_disconnected** **(** :ref:`int` id **)** -Emitted whenever this SceneTree's :ref:`network_peer` disconnects from a peer. Clients get notified when other clients disconnect from the same server. +Emitted whenever this ``SceneTree``'s :ref:`network_peer` disconnects from a peer. Clients get notified when other clients disconnect from the same server. .. _class_SceneTree_signal_node_added: - **node_added** **(** :ref:`Node` node **)** -Emitted whenever a node is added to the SceneTree. +Emitted whenever a node is added to the ``SceneTree``. .. _class_SceneTree_signal_node_configuration_warning_changed: - **node_configuration_warning_changed** **(** :ref:`Node` node **)** -Emitted when a node's configuration changed. Only emitted in tool mode. +Emitted when a node's configuration changed. Only emitted in ``tool`` mode. .. _class_SceneTree_signal_node_removed: - **node_removed** **(** :ref:`Node` node **)** -Emitted whenever a node is removed from the SceneTree. +Emitted whenever a node is removed from the ``SceneTree``. .. _class_SceneTree_signal_node_renamed: - **node_renamed** **(** :ref:`Node` node **)** +Emitted whenever a node is renamed. + .. _class_SceneTree_signal_physics_frame: - **physics_frame** **(** **)** -Emitted immediately before :ref:`Node._physics_process` is called on every node in the SceneTree. +Emitted immediately before :ref:`Node._physics_process` is called on every node in the ``SceneTree``. .. _class_SceneTree_signal_screen_resized: - **screen_resized** **(** **)** -Emitted whenever the screen resolution (fullscreen) or window size (windowed) changes. +Emitted when the screen resolution (fullscreen) or window size (windowed) changes. .. _class_SceneTree_signal_server_disconnected: - **server_disconnected** **(** **)** -Emitted whenever this SceneTree's :ref:`network_peer` disconnected from server. Only emitted on clients. +Emitted whenever this ``SceneTree``'s :ref:`network_peer` disconnected from server. Only emitted on clients. .. _class_SceneTree_signal_tree_changed: - **tree_changed** **(** **)** -Emitted whenever the SceneTree hierarchy changed (children being moved or renamed, etc.). +Emitted whenever the ``SceneTree`` hierarchy changed (children being moved or renamed, etc.). Enumerations ------------ @@ -238,20 +240,24 @@ enum **StretchMode**: enum **StretchAspect**: -- **STRETCH_ASPECT_IGNORE** = **0** --- Fill the window with the content stretched to cover excessive space. Content may appear elongated. +- **STRETCH_ASPECT_IGNORE** = **0** --- Fill the window with the content stretched to cover excessive space. Content may appear stretched. -- **STRETCH_ASPECT_KEEP** = **1** --- Retain the same aspect ratio by padding with black bars in either axes. No expansion of content. +- **STRETCH_ASPECT_KEEP** = **1** --- Retain the same aspect ratio by padding with black bars on either axis. This prevents distortion. - **STRETCH_ASPECT_KEEP_WIDTH** = **2** --- Expand vertically. Left/right black bars may appear if the window is too wide. - **STRETCH_ASPECT_KEEP_HEIGHT** = **3** --- Expand horizontally. Top/bottom black bars may appear if the window is too tall. -- **STRETCH_ASPECT_EXPAND** = **4** --- Expand in both directions, retaining the same aspect ratio. No black bars. +- **STRETCH_ASPECT_EXPAND** = **4** --- Expand in both directions, retaining the same aspect ratio. This prevents distortion while avoiding black bars. Description ----------- -As one of the most important classes, the ``SceneTree`` manages the hierarchy of nodes in a scene as well as scenes themselves. Nodes can be added, retrieved and removed. The whole scene tree (and thus the current scene) can be paused. Scenes can be loaded, switched and reloaded. You can also use the SceneTree to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. a "enemy" group. You can then iterate these groups or even call methods and set properties on all the group's members at once. +As one of the most important classes, the ``SceneTree`` manages the hierarchy of nodes in a scene as well as scenes themselves. Nodes can be added, retrieved and removed. The whole scene tree (and thus the current scene) can be paused. Scenes can be loaded, switched and reloaded. + +You can also use the ``SceneTree`` to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. a "enemy" group. You can then iterate these groups or even call methods and set properties on all the group's members at once. + +``SceneTree`` is the default :ref:`MainLoop` implementation used by scenes, and is thus in charge of the game loop. Tutorials --------- @@ -285,6 +291,8 @@ The current scene. | *Getter* | is_debugging_collisions_hint() | +----------+----------------------------------+ +If ``true``, collision shapes will be visible when running the game from the editor for debugging purposes. + .. _class_SceneTree_property_debug_navigation_hint: - :ref:`bool` **debug_navigation_hint** @@ -295,6 +303,8 @@ The current scene. | *Getter* | is_debugging_navigation_hint() | +----------+----------------------------------+ +If ``true``, navigation polygons will be visible when running the game from the editor for debugging purposes. + .. _class_SceneTree_property_edited_scene_root: - :ref:`Node` **edited_scene_root** @@ -317,7 +327,7 @@ The root of the edited scene. | *Getter* | get_multiplayer() | +----------+------------------------+ -The default :ref:`MultiplayerAPI` instance for this SceneTree. +The default :ref:`MultiplayerAPI` instance for this ``SceneTree``. .. _class_SceneTree_property_multiplayer_poll: @@ -329,9 +339,9 @@ The default :ref:`MultiplayerAPI` instance for this SceneT | *Getter* | is_multiplayer_poll_enabled() | +----------+-------------------------------------+ -If ``true``, (default) enable the automatic polling of the :ref:`MultiplayerAPI` for this SceneTree during :ref:`idle_frame`. +If ``true`` (default value), enables automatic polling of the :ref:`MultiplayerAPI` for this SceneTree during :ref:`idle_frame`. -When ``false`` you need to manually call :ref:`MultiplayerAPI.poll` for processing network packets and delivering RPCs/RSETs. This allows to run RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual :ref:`Mutex` protection when accessing the :ref:`MultiplayerAPI` from threads. +If ``false``, you need to manually call :ref:`MultiplayerAPI.poll` to process network packets and deliver RPCs/RSETs. This allows running RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual :ref:`Mutex` protection when accessing the :ref:`MultiplayerAPI` from threads. .. _class_SceneTree_property_network_peer: @@ -343,7 +353,7 @@ When ``false`` you need to manually call :ref:`MultiplayerAPI.poll`) and will set root node's network mode to master (see NETWORK_MODE\_\* constants in :ref:`Node`), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals. +The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the ``SceneTree`` will become a network server (check with :ref:`is_network_server`) and will set the root node's network mode to master (see ``NETWORK_MODE_*`` constants in :ref:`Node`), or it will become a regular peer with the root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to ``SceneTree``'s signals. .. _class_SceneTree_property_paused: @@ -355,15 +365,11 @@ The peer object to handle the RPC system (effectively enabling networking when s | *Getter* | is_paused() | +----------+------------------+ -If ``true``, the SceneTree is paused. +If ``true``, the ``SceneTree`` is paused. Doing so will have the following behavior: -Doing so will have the following behavior: +- 2D and 3D physics will be stopped. -\* 2D and 3D physics will be stopped. - -\* _process and _physics_process will not be called anymore in nodes. - -\* _input and _input_event will not be called anymore either. +- :ref:`Node._process`, :ref:`Node._physics_process` and :ref:`Node._input` will not be called anymore in nodes. .. _class_SceneTree_property_refuse_new_network_connections: @@ -375,7 +381,7 @@ Doing so will have the following behavior: | *Getter* | is_refusing_new_network_connections() | +----------+-------------------------------------------+ -If ``true``, the SceneTree's :ref:`network_peer` refuses new incoming connections. +If ``true``, the ``SceneTree``'s :ref:`network_peer` refuses new incoming connections. .. _class_SceneTree_property_root: @@ -385,7 +391,7 @@ If ``true``, the SceneTree's :ref:`network_peer`. +The ``SceneTree``'s root :ref:`Viewport`. .. _class_SceneTree_property_use_font_oversampling: @@ -418,19 +424,23 @@ Calls ``method`` on each member of the given group, respecting the given :ref:`G - :ref:`Error` **change_scene** **(** :ref:`String` path **)** -Changes to the scene at the given ``path``. +Changes the running scene to the one at the given ``path``, after loading it into a :ref:`PackedScene` and creating a new instance. + +Returns :ref:`@GlobalScope.OK` on success, :ref:`@GlobalScope.ERR_CANT_OPEN` if the ``path`` cannot be loaded into a :ref:`PackedScene`, or :ref:`@GlobalScope.ERR_CANT_CREATE` if that scene cannot be instantiated. .. _class_SceneTree_method_change_scene_to: - :ref:`Error` **change_scene_to** **(** :ref:`PackedScene` packed_scene **)** -Changes to the given :ref:`PackedScene`. +Changes the running scene to a new instance of the given :ref:`PackedScene`. + +Returns :ref:`@GlobalScope.OK` on success or :ref:`@GlobalScope.ERR_CANT_CREATE` if the scene cannot be instantiated. .. _class_SceneTree_method_create_timer: - :ref:`SceneTreeTimer` **create_timer** **(** :ref:`float` time_sec, :ref:`bool` pause_mode_process=true **)** -Returns a :ref:`SceneTreeTimer` which will :ref:`SceneTreeTimer.timeout` after the given time in seconds elapsed in this SceneTree. If ``pause_mode_process`` is set to ``false``, pausing the SceneTree will also pause the timer. +Returns a :ref:`SceneTreeTimer` which will :ref:`SceneTreeTimer.timeout` after the given time in seconds elapsed in this ``SceneTree``. If ``pause_mode_process`` is set to ``false``, pausing the ``SceneTree`` will also pause the timer. Commonly used to create a one-shot delay timer as in the following example: @@ -445,31 +455,31 @@ Commonly used to create a one-shot delay timer as in the following example: - :ref:`int` **get_frame** **(** **)** const -Returns the current frame, i.e. number of frames since the application started. +Returns the current frame number, i.e. the total frame count since the application started. .. _class_SceneTree_method_get_network_connected_peers: - :ref:`PoolIntArray` **get_network_connected_peers** **(** **)** const -Returns the peer IDs of all connected peers of this SceneTree's :ref:`network_peer`. +Returns the peer IDs of all connected peers of this ``SceneTree``'s :ref:`network_peer`. .. _class_SceneTree_method_get_network_unique_id: - :ref:`int` **get_network_unique_id** **(** **)** const -Returns the unique peer ID of this SceneTree's :ref:`network_peer`. +Returns the unique peer ID of this ``SceneTree``'s :ref:`network_peer`. .. _class_SceneTree_method_get_node_count: - :ref:`int` **get_node_count** **(** **)** const -Returns the number of nodes in this SceneTree. +Returns the number of nodes in this ``SceneTree``. .. _class_SceneTree_method_get_nodes_in_group: - :ref:`Array` **get_nodes_in_group** **(** :ref:`String` group **)** -Returns all nodes assigned to the given group. +Returns a list of all nodes assigned to the given group. .. _class_SceneTree_method_get_rpc_sender_id: @@ -493,13 +503,13 @@ Returns ``true`` if there is a :ref:`network_peer` **is_input_handled** **(** **)** -Returns ``true`` if the most recent InputEvent was marked as handled with :ref:`set_input_as_handled`. +Returns ``true`` if the most recent :ref:`InputEvent` was marked as handled with :ref:`set_input_as_handled`. .. _class_SceneTree_method_is_network_server: - :ref:`bool` **is_network_server** **(** **)** const -Returns ``true`` if this SceneTree's :ref:`network_peer` is in server mode (listening for connections). +Returns ``true`` if this ``SceneTree``'s :ref:`network_peer` is in server mode (listening for connections). .. _class_SceneTree_method_notify_group: @@ -531,11 +541,13 @@ Quits the application. Reloads the currently active scene. +Returns an :ref:`Error` code as described in :ref:`change_scene`, with the addition of :ref:`@GlobalScope.ERR_UNCONFIGURED` if no :ref:`current_scene` was defined yet. + .. _class_SceneTree_method_set_auto_accept_quit: - void **set_auto_accept_quit** **(** :ref:`bool` enabled **)** -If ``true``, the application automatically accepts quitting. +If ``true``, the application automatically accepts quitting. Defaults to ``true``. .. _class_SceneTree_method_set_group: @@ -553,17 +565,17 @@ Sets the given ``property`` to ``value`` on all members of the given group, resp - void **set_input_as_handled** **(** **)** -Marks the most recent input event as handled. +Marks the most recent :ref:`InputEvent` as handled. .. _class_SceneTree_method_set_quit_on_go_back: - void **set_quit_on_go_back** **(** :ref:`bool` enabled **)** -If ``true``, the application quits automatically on going back (e.g. on Android). +If ``true``, the application quits automatically on going back (e.g. on Android). Defaults to ``true``. .. _class_SceneTree_method_set_screen_stretch: - void **set_screen_stretch** **(** :ref:`StretchMode` mode, :ref:`StretchAspect` aspect, :ref:`Vector2` minsize, :ref:`float` shrink=1 **)** -Configures screen stretching to the given :ref:`StretchMode`, :ref:`StretchAspect`, minimum size and ``shrink``. +Configures screen stretching to the given :ref:`StretchMode`, :ref:`StretchAspect`, minimum size and ``shrink`` ratio. diff --git a/classes/class_scriptcreatedialog.rst b/classes/class_scriptcreatedialog.rst index e51493ac0..ef52d464c 100644 --- a/classes/class_scriptcreatedialog.rst +++ b/classes/class_scriptcreatedialog.rst @@ -40,8 +40,8 @@ The ``ScriptCreateDialog`` creates script files according to a given template fo :: func _ready(): - dialog.config("Node", "res://new_node.gd") # for in-engine types - dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # for script types + dialog.config("Node", "res://new_node.gd") # For in-engine types + dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # For script types dialog.popup_centered() Method Descriptions diff --git a/classes/class_scrollbar.rst b/classes/class_scrollbar.rst index 4a87b33ed..53fb56fd2 100644 --- a/classes/class_scrollbar.rst +++ b/classes/class_scrollbar.rst @@ -32,12 +32,12 @@ Signals - **scrolling** **(** **)** -Emitted whenever the scrollbar is being scrolled. +Emitted when the scrollbar is being scrolled. Description ----------- -Scrollbars are a :ref:`Range` based :ref:`Control`, that display a draggable area (the size of the page). Horizontal (:ref:`HScrollBar`) and Vertical (:ref:`VScrollBar`) versions are available. +Scrollbars are a :ref:`Range`-based :ref:`Control`, that display a draggable area (the size of the page). Horizontal (:ref:`HScrollBar`) and Vertical (:ref:`VScrollBar`) versions are available. Property Descriptions --------------------- diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst index cd6656c0b..db8741b61 100644 --- a/classes/class_scrollcontainer.rst +++ b/classes/class_scrollcontainer.rst @@ -16,7 +16,7 @@ ScrollContainer Brief Description ----------------- -A helper node for displaying scrollable elements (e.g. lists). +A helper node for displaying scrollable elements such as lists. Properties ---------- @@ -56,18 +56,18 @@ Signals - **scroll_ended** **(** **)** -Emitted whenever scrolling stops. +Emitted when scrolling stops. .. _class_ScrollContainer_signal_scroll_started: - **scroll_started** **(** **)** -Emitted whenever scrolling is started. +Emitted when scrolling is started. Description ----------- -A ScrollContainer node meant to contain a :ref:`Control` child. ScrollContainers will automatically create a scrollbar child (:ref:`HScrollBar`, :ref:`VScrollBar`, or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a :ref:`Panel` control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension). +A ScrollContainer node meant to contain a :ref:`Control` child. ScrollContainers will automatically create a scrollbar child (:ref:`HScrollBar`, :ref:`VScrollBar`, or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the :ref:`Control.rect_min_size` of the Control relative to the ScrollContainer. Works great with a :ref:`Panel` control. You can set ``EXPAND`` on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). Property Descriptions --------------------- diff --git a/classes/class_semaphore.rst b/classes/class_semaphore.rst index 461d38151..be2c8bd66 100644 --- a/classes/class_semaphore.rst +++ b/classes/class_semaphore.rst @@ -14,7 +14,7 @@ Semaphore Brief Description ----------------- -A synchronization Semaphore. +A synchronization semaphore. Methods ------- @@ -28,7 +28,7 @@ Methods Description ----------- -A synchronization Semaphore. Element used to synchronize multiple :ref:`Thread`\ s. Initialized to zero on creation. Be careful to avoid deadlocks. For a binary version, see :ref:`Mutex`. +A synchronization semaphore which can be used to synchronize multiple :ref:`Thread`\ s. Initialized to zero on creation. Be careful to avoid deadlocks. For a binary version, see :ref:`Mutex`. Method Descriptions ------------------- @@ -37,11 +37,11 @@ Method Descriptions - :ref:`Error` **post** **(** **)** -Lowers the ``Semaphore``, allowing one more thread in. Returns ``OK`` on success, ``ERR_BUSY`` otherwise. +Lowers the ``Semaphore``, allowing one more thread in. Returns :ref:`@GlobalScope.OK` on success, :ref:`@GlobalScope.ERR_BUSY` otherwise. .. _class_Semaphore_method_wait: - :ref:`Error` **wait** **(** **)** -Tries to wait for the ``Semaphore``, if its value is zero, blocks until non-zero. Returns ``OK`` on success, ``ERR_BUSY`` otherwise. +Tries to wait for the ``Semaphore``, if its value is zero, blocks until non-zero. Returns :ref:`@GlobalScope.OK` on success, :ref:`@GlobalScope.ERR_BUSY` otherwise. diff --git a/classes/class_shader.rst b/classes/class_shader.rst index cdd3b2c7f..484a6a0f4 100644 --- a/classes/class_shader.rst +++ b/classes/class_shader.rst @@ -91,7 +91,7 @@ Method Descriptions - :ref:`Mode` **get_mode** **(** **)** const -Returns the shader mode for the shader, either ``MODE_CANVAS_ITEM``, ``MODE_SPATIAL`` or ``MODE_PARTICLES`` +Returns the shader mode for the shader, either :ref:`MODE_CANVAS_ITEM`, :ref:`MODE_SPATIAL` or :ref:`MODE_PARTICLES` .. _class_Shader_method_has_param: diff --git a/classes/class_shape2d.rst b/classes/class_shape2d.rst index dc4f005d2..89b1b4d32 100644 --- a/classes/class_shape2d.rst +++ b/classes/class_shape2d.rst @@ -16,7 +16,7 @@ Shape2D Brief Description ----------------- -Base class for all 2D Shapes. +Base class for all 2D shapes. Properties ---------- @@ -41,7 +41,7 @@ Methods Description ----------- -Base class for all 2D Shapes. All 2D shape types inherit from this. +Base class for all 2D shapes. All 2D shape types inherit from this. Tutorials --------- diff --git a/classes/class_skeleton.rst b/classes/class_skeleton.rst index 3e73a60a7..0af243014 100644 --- a/classes/class_skeleton.rst +++ b/classes/class_skeleton.rst @@ -120,13 +120,13 @@ Method Descriptions - void **add_bone** **(** :ref:`String` name **)** -Add a bone, with name "name". :ref:`get_bone_count` will become the bone index. +Adds a bone, with name ``name``. :ref:`get_bone_count` will become the bone index. .. _class_Skeleton_method_bind_child_node_to_bone: - void **bind_child_node_to_bone** **(** :ref:`int` bone_idx, :ref:`Node` node **)** -Deprecated soon. +*Deprecated soon.* .. _class_Skeleton_method_clear_bones: @@ -138,7 +138,7 @@ Clear all the bones in this skeleton. - :ref:`int` **find_bone** **(** :ref:`String` name **)** const -Returns the bone index that matches "name" as its name. +Returns the bone index that matches ``name`` as its name. .. _class_Skeleton_method_get_bone_count: @@ -162,13 +162,15 @@ Returns the overall transform of the specified bone, with respect to the skeleto - :ref:`String` **get_bone_name** **(** :ref:`int` bone_idx **)** const -Returns the name of the bone at index "index". +Returns the name of the bone at index ``index``. .. _class_Skeleton_method_get_bone_parent: - :ref:`int` **get_bone_parent** **(** :ref:`int` bone_idx **)** const -Returns the bone index which is the parent of the bone at "bone_idx". If -1, then bone has no parent. Note that the parent bone returned will always be less than "bone_idx". +Returns the bone index which is the parent of the bone at ``bone_idx``. If -1, then bone has no parent. + +**Note:** The parent bone returned will always be less than ``bone_idx``. .. _class_Skeleton_method_get_bone_pose: @@ -180,7 +182,7 @@ Returns the pose transform of the specified bone. Pose is applied on top of the - :ref:`Transform` **get_bone_rest** **(** :ref:`int` bone_idx **)** const -Returns the rest transform for a bone "bone_idx". +Returns the rest transform for a bone ``bone_idx``. .. _class_Skeleton_method_get_bone_transform: @@ -192,7 +194,7 @@ Returns the combination of custom pose and pose. The returned transform is in sk - :ref:`Array` **get_bound_child_nodes_to_bone** **(** :ref:`int` bone_idx **)** const -Deprecated soon. +*Deprecated soon.* .. _class_Skeleton_method_is_bone_rest_disabled: @@ -238,25 +240,27 @@ Deprecated soon. - void **set_bone_parent** **(** :ref:`int` bone_idx, :ref:`int` parent_idx **)** -Set the bone index "parent_idx" as the parent of the bone at "bone_idx". If -1, then bone has no parent. Note: "parent_idx" must be less than "bone_idx". +Sets the bone index ``parent_idx`` as the parent of the bone at ``bone_idx``. If -1, then bone has no parent. + +**Note:** ``parent_idx`` must be less than ``bone_idx``. .. _class_Skeleton_method_set_bone_pose: - void **set_bone_pose** **(** :ref:`int` bone_idx, :ref:`Transform` pose **)** -Returns the pose transform for bone "bone_idx". +Returns the pose transform for bone ``bone_idx``. .. _class_Skeleton_method_set_bone_rest: - void **set_bone_rest** **(** :ref:`int` bone_idx, :ref:`Transform` rest **)** -Set the rest transform for bone "bone_idx" +Sets the rest transform for bone ``bone_idx``. .. _class_Skeleton_method_unbind_child_node_from_bone: - void **unbind_child_node_from_bone** **(** :ref:`int` bone_idx, :ref:`Node` node **)** -Deprecated soon. +*Deprecated soon.* .. _class_Skeleton_method_unparent_bone_and_rest: diff --git a/classes/class_sky.rst b/classes/class_sky.rst index c449bd463..fb684f997 100644 --- a/classes/class_sky.rst +++ b/classes/class_sky.rst @@ -48,21 +48,21 @@ Enumerations enum **RadianceSize**: -- **RADIANCE_SIZE_32** = **0** --- Radiance texture size is 32x32 pixels. +- **RADIANCE_SIZE_32** = **0** --- Radiance texture size is 32×32 pixels. -- **RADIANCE_SIZE_64** = **1** --- Radiance texture size is 64x64 pixels. +- **RADIANCE_SIZE_64** = **1** --- Radiance texture size is 64×64 pixels. -- **RADIANCE_SIZE_128** = **2** --- Radiance texture size is 128x128 pixels. +- **RADIANCE_SIZE_128** = **2** --- Radiance texture size is 128×128 pixels. -- **RADIANCE_SIZE_256** = **3** --- Radiance texture size is 256x256 pixels. +- **RADIANCE_SIZE_256** = **3** --- Radiance texture size is 256×256 pixels. -- **RADIANCE_SIZE_512** = **4** --- Radiance texture size is 512x512 pixels. +- **RADIANCE_SIZE_512** = **4** --- Radiance texture size is 512×512 pixels. -- **RADIANCE_SIZE_1024** = **5** --- Radiance texture size is 1024x1024 pixels. +- **RADIANCE_SIZE_1024** = **5** --- Radiance texture size is 1024×1024 pixels. -- **RADIANCE_SIZE_2048** = **6** --- Radiance texture size is 2048x2048 pixels. +- **RADIANCE_SIZE_2048** = **6** --- Radiance texture size is 2048×2048 pixels. -- **RADIANCE_SIZE_MAX** = **7** --- Radiance texture size is the largest size it can be. +- **RADIANCE_SIZE_MAX** = **7** --- Represents the size of the :ref:`RadianceSize` enum. Description ----------- @@ -82,9 +82,7 @@ Property Descriptions | *Getter* | get_radiance_size() | +----------+--------------------------+ -The Sky's radiance map size. +The ``Sky``'s radiance map size. The higher the radiance map size, the more detailed the lighting from the ``Sky`` will be. -The higher the radiance map size, the more detailed the lighting from the Sky will be. - -See RADIANCE_SIZE\_\* constants for values. Default size is RADIANCE_SIZE_512. +See :ref:`RadianceSize` constants for values. Default size is :ref:`RADIANCE_SIZE_512`. diff --git a/classes/class_slider.rst b/classes/class_slider.rst index e4a72a54a..f8324d04c 100644 --- a/classes/class_slider.rst +++ b/classes/class_slider.rst @@ -16,7 +16,7 @@ Slider Brief Description ----------------- -Base class for GUI Sliders. +Base class for GUI sliders. Properties ---------- @@ -36,7 +36,7 @@ Properties Description ----------- -Base class for GUI Sliders. +Base class for GUI sliders. Property Descriptions --------------------- diff --git a/classes/class_sliderjoint.rst b/classes/class_sliderjoint.rst index 94473db04..5908bf75b 100644 --- a/classes/class_sliderjoint.rst +++ b/classes/class_sliderjoint.rst @@ -118,9 +118,9 @@ Enumerations enum **Param**: -- **PARAM_LINEAR_LIMIT_UPPER** = **0** --- The maximum difference between the pivot points on their x-axis before damping happens. +- **PARAM_LINEAR_LIMIT_UPPER** = **0** --- The maximum difference between the pivot points on their X axis before damping happens. -- **PARAM_LINEAR_LIMIT_LOWER** = **1** --- The minimum difference between the pivot points on their x-axis before damping happens. +- **PARAM_LINEAR_LIMIT_LOWER** = **1** --- The minimum difference between the pivot points on their X axis before damping happens. - **PARAM_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. @@ -162,12 +162,12 @@ enum **Param**: - **PARAM_ANGULAR_ORTHOGONAL_DAMPING** = **21** --- The amount of damping of the rotation across axes orthogonal to the slider. -- **PARAM_MAX** = **22** --- End flag of PARAM\_\* constants, used internally. +- **PARAM_MAX** = **22** --- Represents the size of the :ref:`Param` enum. Description ----------- -Slides across the x-axis of the pivot object. +Slides across the X axis of the pivot object. Property Descriptions --------------------- @@ -320,7 +320,7 @@ The amount of damping that happens once the limit defined by :ref:`linear_limit/ | *Getter* | get_param() | +----------+------------------+ -The minimum difference between the pivot points on their x-axis before damping happens. +The minimum difference between the pivot points on their X axis before damping happens. .. _class_SliderJoint_property_linear_limit/restitution: @@ -356,7 +356,7 @@ A factor applied to the movement across the slider axis once the limits get surp | *Getter* | get_param() | +----------+------------------+ -The maximum difference between the pivot points on their x-axis before damping happens. +The maximum difference between the pivot points on their X axis before damping happens. .. _class_SliderJoint_property_linear_motion/damping: diff --git a/classes/class_spatial.rst b/classes/class_spatial.rst index f4d90676b..ef4e354ae 100644 --- a/classes/class_spatial.rst +++ b/classes/class_spatial.rst @@ -16,7 +16,7 @@ Spatial Brief Description ----------------- -Most basic 3D game object, parent of all 3D related nodes. +Most basic 3D game object, parent of all 3D-related nodes. Properties ---------- @@ -132,7 +132,7 @@ Constants - **NOTIFICATION_TRANSFORM_CHANGED** = **2000** --- Spatial nodes receives this notification when their global transform changes. This means that either the current or a parent node changed its transform. -In order for ``NOTIFICATION_TRANSFORM_CHANGED`` to work, users first need to ask for it, with :ref:`set_notify_transform`. +In order for :ref:`NOTIFICATION_TRANSFORM_CHANGED` to work, users first need to ask for it, with :ref:`set_notify_transform`. - **NOTIFICATION_ENTER_WORLD** = **41** --- Spatial nodes receives this notification when they are registered to new :ref:`World` resource. @@ -145,7 +145,7 @@ Description Most basic 3D game object, with a 3D :ref:`Transform` and visibility settings. All other 3D game objects inherit from Spatial. Use ``Spatial`` as a parent node to move, scale, rotate and show/hide children in a 3D project. -Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the ``Spatial`` object is set as top level. Affine operations in this coordinate system correspond to direct affine operations on the ``Spatial``'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the ``Spatial`` object itself is referred to as object-local coordinate system. +Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the ``Spatial`` object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the ``Spatial``'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the ``Spatial`` object itself is referred to as object-local coordinate system. Tutorials --------- @@ -189,9 +189,9 @@ World space (global) :ref:`Transform` of this node. | *Getter* | get_rotation() | +----------+---------------------+ -Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X-angle, Y-angle, Z-angle). +Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). -Note that in the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a :ref:`Vector3` data structure not because the rotation is a vector, but only because :ref:`Vector3` exists as a convenient data-structure to store 3 floating point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. +**Note:** In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a :ref:`Vector3` data structure not because the rotation is a vector, but only because :ref:`Vector3` exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. .. _class_Spatial_property_rotation_degrees: @@ -203,7 +203,7 @@ Note that in the mathematical sense, rotation is a matrix and not a vector. The | *Getter* | get_rotation_degrees() | +----------+-----------------------------+ -Rotation part of the local transformation in degrees, specified in terms of YXZ-Euler angles in the format (X-angle, Y-angle, Z-angle). +Rotation part of the local transformation in degrees, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). .. _class_Spatial_property_scale: @@ -360,7 +360,7 @@ Rotates the local transformation around axis, a unit :ref:`Vector3` angle **)** -Rotates the local transformation around the X axis by angle in radians +Rotates the local transformation around the X axis by angle in radians. .. _class_Spatial_method_rotate_y: @@ -394,25 +394,25 @@ Makes the node ignore its parents transformations. Node transformations are only - void **set_identity** **(** **)** -Reset all transformations for this node. Set its :ref:`Transform` to identity matrix. +Reset all transformations for this node (sets its :ref:`Transform` to the identity matrix). .. _class_Spatial_method_set_ignore_transform_notification: - void **set_ignore_transform_notification** **(** :ref:`bool` enabled **)** -Set whether the node ignores notification that its transformation (global or local) changed. +Sets whether the node ignores notification that its transformation (global or local) changed. .. _class_Spatial_method_set_notify_local_transform: - void **set_notify_local_transform** **(** :ref:`bool` enable **)** -Set whether the node notifies about its local transformation changes. ``Spatial`` will not propagate this by default. +Sets whether the node notifies about its local transformation changes. ``Spatial`` will not propagate this by default. .. _class_Spatial_method_set_notify_transform: - void **set_notify_transform** **(** :ref:`bool` enable **)** -Set whether the node notifies about its global and local transformation changes. ``Spatial`` will not propagate this by default. +Sets whether the node notifies about its global and local transformation changes. ``Spatial`` will not propagate this by default. .. _class_Spatial_method_show: @@ -424,13 +424,13 @@ Enables rendering of this node. Changes :ref:`visible` **to_global** **(** :ref:`Vector3` local_point **)** const -Transforms :ref:`Vector3` "local_point" from this node's local space to world space. +Transforms ``local_point`` from this node's local space to world space. .. _class_Spatial_method_to_local: - :ref:`Vector3` **to_local** **(** :ref:`Vector3` global_point **)** const -Transforms :ref:`Vector3` "global_point" from world space to this node's local space. +Transforms ``global_point`` from world space to this node's local space. .. _class_Spatial_method_translate: diff --git a/classes/class_spatialmaterial.rst b/classes/class_spatialmaterial.rst index e5ba41596..e3de3b6ef 100644 --- a/classes/class_spatialmaterial.rst +++ b/classes/class_spatialmaterial.rst @@ -296,7 +296,7 @@ enum **TextureParam**: - **TEXTURE_DETAIL_NORMAL** = **15** -- **TEXTURE_MAX** = **16** +- **TEXTURE_MAX** = **16** --- Represents the size of the :ref:`TextureParam` enum. .. _enum_SpatialMaterial_DetailUV: @@ -364,7 +364,7 @@ enum **Feature**: - **FEATURE_DETAIL** = **11** -- **FEATURE_MAX** = **12** +- **FEATURE_MAX** = **12** --- Represents the size of the :ref:`Feature` enum. .. _enum_SpatialMaterial_BlendMode: @@ -504,7 +504,7 @@ enum **Flags**: - **FLAG_USE_SHADOW_TO_OPACITY** = **18** -- **FLAG_MAX** = **19** +- **FLAG_MAX** = **19** --- Represents the size of the :ref:`Flags` enum. .. _enum_SpatialMaterial_DiffuseMode: @@ -568,9 +568,9 @@ enum **BillboardMode**: - **BILLBOARD_DISABLED** = **0** --- Default value. -- **BILLBOARD_ENABLED** = **1** --- The object's z-axis will always face the camera. +- **BILLBOARD_ENABLED** = **1** --- The object's Z axis will always face the camera. -- **BILLBOARD_FIXED_Y** = **2** --- The object's x-axis will always face the camera. +- **BILLBOARD_FIXED_Y** = **2** --- The object's X axis will always face the camera. - **BILLBOARD_PARTICLES** = **3** --- Used for particle systems. Enables particle animation options. @@ -813,7 +813,7 @@ If ``true``, clearcoat rendering is enabled. Adds a secondary transparent pass t | *Getter* | get_feature() | +----------+--------------------+ -If ``true``, Depth mapping is enabled. See also :ref:`normal_enabled`. +If ``true``, depth mapping is enabled (also called "parallax mapping" or "height mapping"). See also :ref:`normal_enabled`. .. _class_SpatialMaterial_property_depth_flip_binormal: @@ -1133,7 +1133,9 @@ If ``true``, the object is unaffected by lighting. Default value: ``false``. | *Getter* | get_flag() | +----------+-----------------+ -If ``true``, render point size can be changed. Note: this is only effective for objects whose geometry is point-based rather than triangle-based. See also :ref:`params_point_size`. +If ``true``, render point size can be changed. + +**Note:** this is only effective for objects whose geometry is point-based rather than triangle-based. See also :ref:`params_point_size`. .. _class_SpatialMaterial_property_flags_use_shadow_to_opacity: @@ -1179,7 +1181,7 @@ If ``true``, triplanar mapping is calculated in world space rather than object l | *Getter* | get_metallic() | +----------+---------------------+ -The reflectivity of the object's surface. The higher the value the more light is reflected. +The reflectivity of the object's surface. The higher the value, the more light is reflected. .. _class_SpatialMaterial_property_metallic_specular: @@ -1191,7 +1193,9 @@ The reflectivity of the object's surface. The higher the value the more light is | *Getter* | get_specular() | +----------+---------------------+ -General reflectivity amount. Note: unlike :ref:`metallic`, this is not energy-conserving, so it should be left at ``0.5`` in most cases. See also :ref:`roughness`. +General reflectivity amount. + +**Note:** unlike :ref:`metallic`, this is not energy-conserving, so it should be left at ``0.5`` in most cases. See also :ref:`roughness`. .. _class_SpatialMaterial_property_metallic_texture: @@ -1289,7 +1293,9 @@ Controls how the object faces the camera. See :ref:`BillboardMode`. +The material's blend mode. + +**Note:** Values other than ``Mix`` force the object into the transparent pipeline. See :ref:`BlendMode`. .. _class_SpatialMaterial_property_params_cull_mode: @@ -1405,7 +1411,7 @@ The method for rendering the specular blob. See :ref:`SpecularMode`. +The number of horizontal frames in the particle sprite sheet. Only enabled when using :ref:`BILLBOARD_PARTICLES`. See :ref:`params_billboard_mode`. .. _class_SpatialMaterial_property_particles_anim_loop: @@ -1417,7 +1423,7 @@ The number of horizontal frames in the particle spritesheet. Only enabled when u | *Getter* | get_particles_anim_loop() | +----------+--------------------------------+ -If ``true``, particle animations are looped. Only enabled when using ``BillboardMode.BILLBOARD_PARTICLES``. See :ref:`params_billboard_mode`. +If ``true``, particle animations are looped. Only enabled when using :ref:`BILLBOARD_PARTICLES`. See :ref:`params_billboard_mode`. .. _class_SpatialMaterial_property_particles_anim_v_frames: @@ -1429,7 +1435,7 @@ If ``true``, particle animations are looped. Only enabled when using ``Billboard | *Getter* | get_particles_anim_v_frames() | +----------+------------------------------------+ -The number of vertical frames in the particle spritesheet. Only enabled when using ``BillboardMode.BILLBOARD_PARTICLES``. See :ref:`params_billboard_mode`. +The number of vertical frames in the particle sprite sheet. Only enabled when using :ref:`BILLBOARD_PARTICLES`. See :ref:`params_billboard_mode`. .. _class_SpatialMaterial_property_proximity_fade_distance: diff --git a/classes/class_spheremesh.rst b/classes/class_spheremesh.rst index a1cd8594e..ce37e7acb 100644 --- a/classes/class_spheremesh.rst +++ b/classes/class_spheremesh.rst @@ -61,7 +61,9 @@ Full height of the sphere. Defaults to 2.0. | *Getter* | get_is_hemisphere() | +----------+--------------------------+ -Determines whether a full sphere or a hemisphere is created. Attention: To get a regular hemisphere, the height and radius of the sphere have to equal. Defaults to ``false``. +Determines whether a full sphere or a hemisphere is created. + +**Note:** To get a regular hemisphere, the height and radius of the sphere must be equal. Defaults to ``false``. .. _class_SphereMesh_property_radial_segments: diff --git a/classes/class_spinbox.rst b/classes/class_spinbox.rst index 973afbe1a..dfed9ca54 100644 --- a/classes/class_spinbox.rst +++ b/classes/class_spinbox.rst @@ -48,6 +48,20 @@ Description SpinBox is a numerical input text field. It allows entering integers and floats. +**Example:** + +:: + + var spin_box = SpinBox.new() + add_child(spin_box) + var line_edit = spin_box.get_line_edit() + line_edit.context_menu_enabled = false + spin_box.align = LineEdit.ALIGN_RIGHT + +The above code will create a ``SpinBox``, disable context menu on it and set the text alignment to right. + +See :ref:`Range` class for more options over the ``SpinBox``. + Property Descriptions --------------------- @@ -61,6 +75,8 @@ Property Descriptions | *Getter* | get_align() | +----------+------------------+ +Sets the text alignment of the ``SpinBox``. + .. _class_SpinBox_property_editable: - :ref:`bool` **editable** @@ -71,6 +87,8 @@ Property Descriptions | *Getter* | is_editable() | +----------+---------------------+ +If ``true``, the ``SpinBox`` will be editable. Otherwise, it will be read only. + .. _class_SpinBox_property_prefix: - :ref:`String` **prefix** @@ -81,6 +99,8 @@ Property Descriptions | *Getter* | get_prefix() | +----------+-------------------+ +Adds the specified ``prefix`` string before the numerical value of the ``SpinBox``. + .. _class_SpinBox_property_suffix: - :ref:`String` **suffix** @@ -91,6 +111,8 @@ Property Descriptions | *Getter* | get_suffix() | +----------+-------------------+ +Adds the specified ``prefix`` string after the numerical value of the ``SpinBox``. + Method Descriptions ------------------- @@ -98,3 +120,5 @@ Method Descriptions - :ref:`LineEdit` **get_line_edit** **(** **)** +Returns the :ref:`LineEdit` instance from this ``SpinBox``. You can use it to access properties and methods of :ref:`LineEdit`. + diff --git a/classes/class_spotlight.rst b/classes/class_spotlight.rst index 71cadb01d..aaed3b8c2 100644 --- a/classes/class_spotlight.rst +++ b/classes/class_spotlight.rst @@ -14,7 +14,7 @@ SpotLight Brief Description ----------------- -Spotlight :ref:`Light`, such as a reflector spotlight or a lantern. +A spotlight, such as a reflector spotlight or a lantern. Properties ---------- @@ -32,7 +32,7 @@ Properties Description ----------- -A SpotLight light is a type of :ref:`Light` node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of :ref:`Light`. +A Spotlight is a type of :ref:`Light` node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance. This attenuation can be configured by changing the energy, radius and attenuation parameters of :ref:`Light`. Tutorials --------- @@ -52,6 +52,8 @@ Property Descriptions | *Getter* | get_param() | +----------+------------------+ +The spotlight's angle in degrees. + .. _class_SpotLight_property_spot_angle_attenuation: - :ref:`float` **spot_angle_attenuation** @@ -62,6 +64,8 @@ Property Descriptions | *Getter* | get_param() | +----------+------------------+ +The spotlight's angular attenuation curve. + .. _class_SpotLight_property_spot_attenuation: - :ref:`float` **spot_attenuation** @@ -72,6 +76,8 @@ Property Descriptions | *Getter* | get_param() | +----------+------------------+ +The spotlight's light energy attenuation curve. + .. _class_SpotLight_property_spot_range: - :ref:`float` **spot_range** @@ -82,3 +88,5 @@ Property Descriptions | *Getter* | get_param() | +----------+------------------+ +The maximal range that can be reached by the spotlight. + diff --git a/classes/class_sprite.rst b/classes/class_sprite.rst index 07cdc42f6..72fccfe9c 100644 --- a/classes/class_sprite.rst +++ b/classes/class_sprite.rst @@ -14,7 +14,7 @@ Sprite Brief Description ----------------- -General purpose Sprite node. +General-purpose sprite node. Properties ---------- @@ -243,5 +243,5 @@ Returns a :ref:`Rect2` representing the Sprite's boundary in local Returns ``true``, if the pixel at the given position is opaque and ``false`` in other case. -Note: It also returns ``false``, if the sprite's texture is null or if the given position is invalid. +**Note:** It also returns ``false``, if the sprite's texture is ``null`` or if the given position is invalid. diff --git a/classes/class_sprite3d.rst b/classes/class_sprite3d.rst index f1a985f7c..88fca7acb 100644 --- a/classes/class_sprite3d.rst +++ b/classes/class_sprite3d.rst @@ -14,7 +14,7 @@ Sprite3D Brief Description ----------------- -2D Sprite node in 3D world. +2D sprite node in a 3D world. Properties ---------- diff --git a/classes/class_spritebase3d.rst b/classes/class_spritebase3d.rst index dd3def361..6d5575199 100644 --- a/classes/class_spritebase3d.rst +++ b/classes/class_spritebase3d.rst @@ -16,7 +16,7 @@ SpriteBase3D Brief Description ----------------- -2D Sprite node in 3D environment. +2D sprite node in 3D environment. Properties ---------- @@ -71,13 +71,13 @@ Enumerations enum **DrawFlags**: -- **FLAG_TRANSPARENT** = **0** --- If set, the texture's transparency and the opacity are used to make those parts of the Sprite invisible. +- **FLAG_TRANSPARENT** = **0** --- If set, the texture's transparency and the opacity are used to make those parts of the sprite invisible. -- **FLAG_SHADED** = **1** --- If set, the Light in the Environment has effects on the Sprite. +- **FLAG_SHADED** = **1** --- If set, lights in the environment affect the sprite. - **FLAG_DOUBLE_SIDED** = **2** --- If set, texture can be seen from the back as well, if not, it is invisible when looking at it from behind. -- **FLAG_MAX** = **3** --- Used internally to mark the end of the Flags section. +- **FLAG_MAX** = **3** --- Represents the size of the :ref:`DrawFlags` enum. .. _enum_SpriteBase3D_AlphaCutMode: @@ -219,7 +219,7 @@ The objects visibility on a scale from ``0`` fully invisible to ``1`` fully visi | *Getter* | get_pixel_size() | +----------+-----------------------+ -The size of one pixel's width on the Sprite to scale it in 3D. +The size of one pixel's width on the sprite to scale it in 3D. .. _class_SpriteBase3D_property_shaded: @@ -231,7 +231,7 @@ The size of one pixel's width on the Sprite to scale it in 3D. | *Getter* | get_draw_flag() | +----------+----------------------+ -If ``true``, the :ref:`Light` in the :ref:`Environment` has effects on the Sprite. Default value: ``false``. +If ``true``, the :ref:`Light` in the :ref:`Environment` has effects on the sprite. Default value: ``false``. .. _class_SpriteBase3D_property_transparent: @@ -243,7 +243,7 @@ If ``true``, the :ref:`Light` in the :ref:`Environment` so they are great for scenario collision. +Static body for 3D physics. A static body is a simple body that is not intended to move. In contrast to :ref:`RigidBody`, they don't consume any CPU resources as long as they don't move. -A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies. +A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active, the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies. Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). @@ -53,7 +53,7 @@ Property Descriptions | *Getter* | get_bounce() | +----------+-------------------+ -The body bounciness. +The body's bounciness. .. _class_StaticBody_property_constant_angular_velocity: @@ -65,7 +65,7 @@ The body bounciness. | *Getter* | get_constant_angular_velocity() | +----------+--------------------------------------+ -The constant angular velocity for the body. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation. +The body's constant angular velocity. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation. .. _class_StaticBody_property_constant_linear_velocity: @@ -77,7 +77,7 @@ The constant angular velocity for the body. This does not rotate the body, but a | *Getter* | get_constant_linear_velocity() | +----------+-------------------------------------+ -The constant linear velocity for the body. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement. +The body's constant linear velocity. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement. .. _class_StaticBody_property_friction: @@ -89,7 +89,7 @@ The constant linear velocity for the body. This does not move the body, but affe | *Getter* | get_friction() | +----------+---------------------+ -The body friction, from 0 (frictionless) to 1 (full friction). +The body's friction, from 0 (frictionless) to 1 (full friction). .. _class_StaticBody_property_physics_material_override: diff --git a/classes/class_staticbody2d.rst b/classes/class_staticbody2d.rst index 882e87e8f..201b1aeb3 100644 --- a/classes/class_staticbody2d.rst +++ b/classes/class_staticbody2d.rst @@ -14,7 +14,7 @@ StaticBody2D Brief Description ----------------- -Static body for 2D Physics. +Static body for 2D physics. Properties ---------- @@ -34,7 +34,7 @@ Properties Description ----------- -Static body for 2D Physics. A StaticBody2D is a body that is not intended to move. It is ideal for implementing objects in the environment, such as walls or platforms. +Static body for 2D physics. A StaticBody2D is a body that is not intended to move. It is ideal for implementing objects in the environment, such as walls or platforms. Additionally, a constant linear or angular velocity can be set for the static body, which will affect colliding bodies as if it were moving (for example, a conveyor belt). @@ -63,7 +63,7 @@ The body's bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounci | *Getter* | get_constant_angular_velocity() | +----------+--------------------------------------+ -Constant angular velocity for the body. This does not rotate the body, but affects colliding bodies, as if it were rotating. +The body's constant angular velocity. This does not rotate the body, but affects colliding bodies, as if it were rotating. .. _class_StaticBody2D_property_constant_linear_velocity: @@ -75,7 +75,7 @@ Constant angular velocity for the body. This does not rotate the body, but affec | *Getter* | get_constant_linear_velocity() | +----------+-------------------------------------+ -Constant linear velocity for the body. This does not move the body, but affects colliding bodies, as if it were moving. +The body's constant linear velocity. This does not move the body, but affects colliding bodies, as if it were moving. .. _class_StaticBody2D_property_friction: diff --git a/classes/class_streampeer.rst b/classes/class_streampeer.rst index d414fe3fe..58d1de7bc 100644 --- a/classes/class_streampeer.rst +++ b/classes/class_streampeer.rst @@ -95,7 +95,7 @@ Methods Description ----------- -StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or Unix Sockets). It provides an API for sending and receiving data through streams as raw data or strings. +StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or UNIX sockets). It provides an API for sending and receiving data through streams as raw data or strings. Property Descriptions --------------------- @@ -119,25 +119,25 @@ Method Descriptions - :ref:`int` **get_16** **(** **)** -Get a signed 16 bit value from the stream. +Gets a signed 16-bit value from the stream. .. _class_StreamPeer_method_get_32: - :ref:`int` **get_32** **(** **)** -Get a signed 32 bit value from the stream. +Gets a signed 32-bit value from the stream. .. _class_StreamPeer_method_get_64: - :ref:`int` **get_64** **(** **)** -Get a signed 64 bit value from the stream. +Gets a signed 64-bit value from the stream. .. _class_StreamPeer_method_get_8: - :ref:`int` **get_8** **(** **)** -Get a signed byte from the stream. +Gets a signed byte from the stream. .. _class_StreamPeer_method_get_available_bytes: @@ -149,157 +149,157 @@ Returns the amount of bytes this ``StreamPeer`` has available. - :ref:`Array` **get_data** **(** :ref:`int` bytes **)** -Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an Error code and a data array. +Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the ``bytes`` argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an :ref:`Error` code and a data array. .. _class_StreamPeer_method_get_double: - :ref:`float` **get_double** **(** **)** -Get a double-precision float from the stream. +Gets a double-precision float from the stream. .. _class_StreamPeer_method_get_float: - :ref:`float` **get_float** **(** **)** -Get a single-precision float from the stream. +Gets a single-precision float from the stream. .. _class_StreamPeer_method_get_partial_data: - :ref:`Array` **get_partial_data** **(** :ref:`int` bytes **)** -Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an Error code, and a data array. +Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an :ref:`Error` code, and a data array. .. _class_StreamPeer_method_get_string: - :ref:`String` **get_string** **(** :ref:`int` bytes=-1 **)** -Get a string with byte-length ``bytes`` from the stream. If ``bytes`` is negative (default) the length will be read from the stream using the reverse process of :ref:`put_string`. +Gets a string with byte-length ``bytes`` from the stream. If ``bytes`` is negative (default) the length will be read from the stream using the reverse process of :ref:`put_string`. .. _class_StreamPeer_method_get_u16: - :ref:`int` **get_u16** **(** **)** -Get an unsigned 16 bit value from the stream. +Gets an unsigned 16-bit value from the stream. .. _class_StreamPeer_method_get_u32: - :ref:`int` **get_u32** **(** **)** -Get an unsigned 32 bit value from the stream. +Gets an unsigned 32-bit value from the stream. .. _class_StreamPeer_method_get_u64: - :ref:`int` **get_u64** **(** **)** -Get an unsigned 64 bit value from the stream. +Gets an unsigned 64-bit value from the stream. .. _class_StreamPeer_method_get_u8: - :ref:`int` **get_u8** **(** **)** -Get an unsigned byte from the stream. +Gets an unsigned byte from the stream. .. _class_StreamPeer_method_get_utf8_string: - :ref:`String` **get_utf8_string** **(** :ref:`int` bytes=-1 **)** -Get a utf8 string with byte-length ``bytes`` from the stream (this decodes the string sent as utf8). If ``bytes`` is negative (default) the length will be read from the stream using the reverse process of :ref:`put_utf8_string`. +Gets an UTF-8 string with byte-length ``bytes`` from the stream (this decodes the string sent as UTF-8). If ``bytes`` is negative (default) the length will be read from the stream using the reverse process of :ref:`put_utf8_string`. .. _class_StreamPeer_method_get_var: - :ref:`Variant` **get_var** **(** :ref:`bool` allow_objects=false **)** -Get a Variant from the stream. When ``allow_objects`` is ``true`` decoding objects is allowed. +Gets a Variant from the stream. If ``allow_objects`` is ``true``, decoding objects is allowed. -**WARNING:** Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). +**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. .. _class_StreamPeer_method_put_16: - void **put_16** **(** :ref:`int` value **)** -Put a signed 16 bit value into the stream. +Puts a signed 16-bit value into the stream. .. _class_StreamPeer_method_put_32: - void **put_32** **(** :ref:`int` value **)** -Put a signed 32 bit value into the stream. +Puts a signed 32-bit value into the stream. .. _class_StreamPeer_method_put_64: - void **put_64** **(** :ref:`int` value **)** -Put a signed 64 bit value into the stream. +Puts a signed 64-bit value into the stream. .. _class_StreamPeer_method_put_8: - void **put_8** **(** :ref:`int` value **)** -Put a signed byte into the stream. +Puts a signed byte into the stream. .. _class_StreamPeer_method_put_data: - :ref:`Error` **put_data** **(** :ref:`PoolByteArray` data **)** -Send a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an Error code. +Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an :ref:`Error` code. .. _class_StreamPeer_method_put_double: - void **put_double** **(** :ref:`float` value **)** -Put a double-precision float into the stream. +Puts a double-precision float into the stream. .. _class_StreamPeer_method_put_float: - void **put_float** **(** :ref:`float` value **)** -Put a single-precision float into the stream. +Puts a single-precision float into the stream. .. _class_StreamPeer_method_put_partial_data: - :ref:`Array` **put_partial_data** **(** :ref:`PoolByteArray` data **)** -Send a chunk of data through the connection, if all the data could not be sent at once, only part of it will. This function returns two values, an Error code and an integer, describing how much data was actually sent. +Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an :ref:`Error` code and an integer, describing how much data was actually sent. .. _class_StreamPeer_method_put_string: - void **put_string** **(** :ref:`String` value **)** -Put a zero-terminated ascii string into the stream prepended by a 32 bits unsigned integer representing its size. +Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsigned integer representing its size. .. _class_StreamPeer_method_put_u16: - void **put_u16** **(** :ref:`int` value **)** -Put an unsigned 16 bit value into the stream. +Puts an unsigned 16-bit value into the stream. .. _class_StreamPeer_method_put_u32: - void **put_u32** **(** :ref:`int` value **)** -Put an unsigned 32 bit value into the stream. +Puts an unsigned 32-bit value into the stream. .. _class_StreamPeer_method_put_u64: - void **put_u64** **(** :ref:`int` value **)** -Put an unsigned 64 bit value into the stream. +Puts an unsigned 64-bit value into the stream. .. _class_StreamPeer_method_put_u8: - void **put_u8** **(** :ref:`int` value **)** -Put an unsigned byte into the stream. +Puts an unsigned byte into the stream. .. _class_StreamPeer_method_put_utf8_string: - void **put_utf8_string** **(** :ref:`String` value **)** -Put a zero-terminated utf8 string into the stream prepended by a 32 bits unsigned integer representing its size. +Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size. .. _class_StreamPeer_method_put_var: - void **put_var** **(** :ref:`Variant` value, :ref:`bool` full_objects=false **)** -Put a Variant into the stream. When ``full_objects`` is ``true`` encoding objects is allowed (and can potentially include code). +Puts a Variant into the stream. If ``full_objects`` is ``true`` encoding objects is allowed (and can potentially include code). diff --git a/classes/class_streampeerssl.rst b/classes/class_streampeerssl.rst index 8a9a6b32e..08b7027f1 100644 --- a/classes/class_streampeerssl.rst +++ b/classes/class_streampeerssl.rst @@ -14,7 +14,7 @@ StreamPeerSSL Brief Description ----------------- -SSL Stream peer. +SSL stream peer. Properties ---------- @@ -68,7 +68,7 @@ enum **Status**: Description ----------- -SSL Stream peer. This object can be used to connect to SSL servers. +SSL stream peer. This object can be used to connect to SSL servers. Tutorials --------- @@ -99,23 +99,23 @@ Method Descriptions - :ref:`Error` **connect_to_stream** **(** :ref:`StreamPeer` stream, :ref:`bool` validate_certs=false, :ref:`String` for_hostname="" **)** -Connect to a peer using an underlying :ref:`StreamPeer` "stream", when "validate_certs" is ``true``, ``StreamPeerSSL`` will validate that the certificate presented by the peer matches the "for_hostname". +Connects to a peer using an underlying :ref:`StreamPeer` ``stream``. If ``validate_certs`` is ``true``, ``StreamPeerSSL`` will validate that the certificate presented by the peer matches the ``for_hostname``. .. _class_StreamPeerSSL_method_disconnect_from_stream: - void **disconnect_from_stream** **(** **)** -Disconnect from host. +Disconnects from host. .. _class_StreamPeerSSL_method_get_status: - :ref:`Status` **get_status** **(** **)** const -Returns the status of the connection, one of STATUS\_\* enum. +Returns the status of the connection. See :ref:`Status` for values. .. _class_StreamPeerSSL_method_poll: - void **poll** **(** **)** -Poll the connection to check for incoming bytes. Call this right before "get_available_bytes()" for it to work properly. +Poll the connection to check for incoming bytes. Call this right before :ref:`StreamPeer.get_available_bytes` for it to work properly. diff --git a/classes/class_streampeertcp.rst b/classes/class_streampeertcp.rst index f5855971f..0126bebe3 100644 --- a/classes/class_streampeertcp.rst +++ b/classes/class_streampeertcp.rst @@ -14,7 +14,7 @@ StreamPeerTCP Brief Description ----------------- -TCP Stream peer. +TCP stream peer. Methods ------- @@ -50,7 +50,7 @@ Enumerations enum **Status**: -- **STATUS_NONE** = **0** --- The initial status of the ``StreamPeerTCP``, also the status after a disconnect. +- **STATUS_NONE** = **0** --- The initial status of the ``StreamPeerTCP``. This is also the status after disconnecting. - **STATUS_CONNECTING** = **1** --- A status representing a ``StreamPeerTCP`` that is connecting to a host. @@ -61,7 +61,7 @@ enum **Status**: Description ----------- -TCP Stream peer. This object can be used to connect to TCP servers, or also is returned by a TCP server. +TCP stream peer. This object can be used to connect to TCP servers, or also is returned by a TCP server. Method Descriptions ------------------- @@ -70,13 +70,13 @@ Method Descriptions - :ref:`Error` **connect_to_host** **(** :ref:`String` host, :ref:`int` port **)** -Connect to the specified host:port pair. A hostname will be resolved if valid. Returns ``OK`` on success or ``FAILED`` on failure. +Connects to the specified ``host:port`` pair. A hostname will be resolved if valid. Returns :ref:`@GlobalScope.OK` on success or :ref:`@GlobalScope.FAILED` on failure. .. _class_StreamPeerTCP_method_disconnect_from_host: - void **disconnect_from_host** **(** **)** -Disconnect from host. +Disconnects from host. .. _class_StreamPeerTCP_method_get_connected_host: @@ -106,7 +106,7 @@ Returns ``true`` if this peer is currently connected to a host, ``false`` otherw - void **set_no_delay** **(** :ref:`bool` enabled **)** -Disable Nagle algorithm to improve latency for small packets. +Disables Nagle's algorithm to improve latency for small packets. -Note that for applications that send large packets, or need to transfer a lot of data, this can reduce total bandwidth. +**Note:** For applications that send large packets or need to transfer a lot of data, this can decrease the total available bandwidth. diff --git a/classes/class_streamtexture.rst b/classes/class_streamtexture.rst index 8e179bf1a..f81b0a240 100644 --- a/classes/class_streamtexture.rst +++ b/classes/class_streamtexture.rst @@ -14,7 +14,7 @@ StreamTexture Brief Description ----------------- -A .stex texture. +A ``.stex`` texture. Properties ---------- @@ -26,7 +26,7 @@ Properties Description ----------- -A texture that is loaded from a .stex file. +A texture that is loaded from a ``.stex`` file. Property Descriptions --------------------- @@ -41,5 +41,5 @@ Property Descriptions | *Getter* | get_load_path() | +----------+-----------------+ -The StreamTexture's filepath to a .stex file. +The StreamTexture's file path to a ``.stex`` file. diff --git a/classes/class_string.rst b/classes/class_string.rst index 27286d97b..bbf09a7c5 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -354,7 +354,7 @@ Returns a copy of the string with escaped characters replaced by their meanings - :ref:`String` **capitalize** **(** **)** -Changes the case of some letters. Replaces underscores with spaces, converts all letters to lowercase, then capitalizes first and every letter following the space character. For ``capitalize camelCase mixed_with_underscores`` it will return ``Capitalize Camelcase Mixed With Underscores``. +Changes the case of some letters. Replaces underscores with spaces, converts all letters to lowercase, then capitalizes first and every letter following the space character. For ``capitalize camelCase mixed_with_underscores``, it will return ``Capitalize Camelcase Mixed With Underscores``. .. _class_String_method_casecmp_to: @@ -366,7 +366,7 @@ Performs a case-sensitive comparison to another string. Returns ``-1`` if less t - :ref:`String` **dedent** **(** **)** -Removes indentation from string. +Returns a copy of the string with indentation (leading tabs and spaces) removed. .. _class_String_method_empty: @@ -508,7 +508,7 @@ Returns ``true`` if this string contains a valid hexadecimal number. If ``with_p - :ref:`bool` **is_valid_html_color** **(** **)** -Returns ``true`` if this string contains a valid color in HTML notation. +Returns ``true`` if this string contains a valid color in hexadecimal HTML notation. Other HTML notations such as named colors or ``hsl()`` colors aren't considered valid by this method and will return ``false``. .. _class_String_method_is_valid_identifier: @@ -556,13 +556,13 @@ Returns a copy of the string with characters removed from the left. - :ref:`bool` **match** **(** :ref:`String` expr **)** -Does a simple expression match, where ``*`` matches zero or more arbitrary characters and ``?`` matches any single character except '.'. +Does a simple case-sensitive expression match, where ``"*"`` matches zero or more arbitrary characters and ``"?"`` matches any single character except a period (``"."``). .. _class_String_method_matchn: - :ref:`bool` **matchn** **(** :ref:`String` expr **)** -Does a simple case insensitive expression match, using ``?`` and ``*`` wildcards (see :ref:`match`). +Does a simple case-insensitive expression match, where ``"*"`` matches zero or more arbitrary characters and ``"?"`` matches any single character except a period (``"."``). .. _class_String_method_md5_buffer: @@ -622,25 +622,25 @@ If the string is a path, this concatenates ``file`` at the end of the string as - :ref:`String` **replace** **(** :ref:`String` what, :ref:`String` forwhat **)** -Replaces occurrences of a substring with the given one inside the string. +Replaces occurrences of a case-sensitive substring with the given one inside the string. .. _class_String_method_replacen: - :ref:`String` **replacen** **(** :ref:`String` what, :ref:`String` forwhat **)** -Replaces occurrences of a substring with the given one inside the string. Ignores case. +Replaces occurrences of a case-insensitive substring with the given one inside the string. .. _class_String_method_rfind: - :ref:`int` **rfind** **(** :ref:`String` what, :ref:`int` from=-1 **)** -Performs a search for a substring, but starts from the end of the string instead of the beginning. +Performs a case-sensitive search for a substring, but starts from the end of the string instead of the beginning. .. _class_String_method_rfindn: - :ref:`int` **rfindn** **(** :ref:`String` what, :ref:`int` from=-1 **)** -Performs a search for a substring, but starts from the end of the string instead of the beginning. Ignores case. +Performs a case-insensitive search for a substring, but starts from the end of the string instead of the beginning. .. _class_String_method_right: @@ -658,7 +658,7 @@ The splits in the returned array are sorted in the same order as the original st If ``maxsplit`` is specified, it defines the number of splits to do from the right up to ``maxsplit``. The default value of 0 means that all items are split, thus giving the same result as :ref:`split`. -**Example:** ``"One,Two,Three,Four"`` will return ``["Three","Four"]`` if split by ``","`` with ``maxsplit`` of 2. +For example, ``"One,Two,Three,Four"`` will return ``["Three","Four"]`` if split by ``","`` with a ``maxsplit`` value of 2. .. _class_String_method_rstrip: @@ -692,7 +692,7 @@ Splits the string by a ``delimiter`` string and returns an array of the substrin If ``maxsplit`` is specified, it defines the number of splits to do from the left up to ``maxsplit``. The default value of 0 means that all items are split. -**Example:** ``"One,Two,Three"`` will return ``["One","Two"]`` if split by ``","`` with ``maxsplit`` of 2. +For example, ``"One,Two,Three"`` will return ``["One","Two"]`` if split by ``","`` with a ``maxsplit`` value of 2. .. _class_String_method_split_floats: @@ -700,7 +700,7 @@ If ``maxsplit`` is specified, it defines the number of splits to do from the lef Splits the string in floats by using a delimiter string and returns an array of the substrings. -**Example:** ``"1,2.5,3"`` will return ``[1,2.5,3]`` if split by ``","``. +For example, ``"1,2.5,3"`` will return ``[1,2.5,3]`` if split by ``","``. .. _class_String_method_strip_edges: @@ -724,7 +724,7 @@ Returns part of the string from the position ``from`` with length ``len``. Argum - :ref:`PoolByteArray` **to_ascii** **(** **)** -Converts the String (which is a character array) to :ref:`PoolByteArray` (which is an array of bytes). The conversion is sped up in comparison to :ref:`to_utf8` with the assumption that all the characters the String contains are only ASCII characters. +Converts the String (which is a character array) to :ref:`PoolByteArray` (which is an array of bytes). The conversion is faster compared to :ref:`to_utf8`, as this method assumes that all the characters in the String are ASCII characters. .. _class_String_method_to_float: diff --git a/classes/class_stylebox.rst b/classes/class_stylebox.rst index 12abfa25f..f6e484bc5 100644 --- a/classes/class_stylebox.rst +++ b/classes/class_stylebox.rst @@ -137,7 +137,7 @@ Method Descriptions - :ref:`float` **get_margin** **(** :ref:`Margin` margin **)** const -Returns the content margin offset for the specified margin +Returns the content margin offset for the specified margin. Positive values reduce size inwards, unlike :ref:`Control`'s margin values. @@ -151,7 +151,7 @@ Returns the minimum size that this stylebox can be shrunk to. - :ref:`Vector2` **get_offset** **(** **)** const -Returns the "offset" of a stylebox, this is a helper function, like writing ``Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))``. +Returns the "offset" of a stylebox. This helper function returns a value equivalent to ``Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))``. .. _class_StyleBox_method_test_mask: diff --git a/classes/class_styleboxflat.rst b/classes/class_styleboxflat.rst index 4ddf4f6fe..e734027d8 100644 --- a/classes/class_styleboxflat.rst +++ b/classes/class_styleboxflat.rst @@ -95,7 +95,7 @@ This stylebox can be used to achieve all kinds of looks without the need of a te - Shadow -Setting corner radius to high values is allowed. As soon as corners would overlap the stylebox will switch to a relative system. Example: +Setting corner radius to high values is allowed. As soon as corners would overlap, the stylebox will switch to a relative system. Example: :: @@ -123,7 +123,7 @@ Property Descriptions | *Getter* | is_anti_aliased() | +----------+-------------------------+ -Anti Aliasing draws a small ring around edges. This ring fades to transparent. As a result edges look much smoother. This is only noticeable when using rounded corners. +Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners. .. _class_StyleBoxFlat_property_anti_aliasing_size: @@ -159,7 +159,7 @@ The background color of the stylebox. | *Getter* | get_border_blend() | +----------+-------------------------+ -When set to ``true``, the border will fade into the background color. +If ``true``, the border will fade into the background color. .. _class_StyleBoxFlat_property_border_color: @@ -231,11 +231,9 @@ Border width for the top border. | *Getter* | get_corner_detail() | +----------+--------------------------+ -This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value you should take the corner radius (:ref:`set_corner_radius_all`) into account. +This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius (:ref:`set_corner_radius_all`) into account. -For corner radius smaller than 10, 4-5 should be enough. - -For corner radius smaller than 30, 8-12 should be enough. +For corner radii smaller than 10, 4-5 should be enough. For corner radii smaller than 30, 8-12 should be enough. .. _class_StyleBoxFlat_property_corner_radius_bottom_left: @@ -247,7 +245,7 @@ For corner radius smaller than 30, 8-12 should be enough. | *Getter* | get_corner_radius() | +----------+--------------------------+ -The corner radius of the bottom left corner. When set to 0 the corner is not rounded. +The bottom-left corner's radius. If ``0``, the corner is not rounded. .. _class_StyleBoxFlat_property_corner_radius_bottom_right: @@ -259,7 +257,7 @@ The corner radius of the bottom left corner. When set to 0 the corner is not rou | *Getter* | get_corner_radius() | +----------+--------------------------+ -The corner radius of the bottom right corner. When set to 0 the corner is not rounded. +The bottom-right corner's radius. If ``0``, the corner is not rounded. .. _class_StyleBoxFlat_property_corner_radius_top_left: @@ -271,7 +269,7 @@ The corner radius of the bottom right corner. When set to 0 the corner is not ro | *Getter* | get_corner_radius() | +----------+--------------------------+ -The corner radius of the top left corner. When set to 0 the corner is not rounded. +The top-left corner's radius. If ``0``, the corner is not rounded. .. _class_StyleBoxFlat_property_corner_radius_top_right: @@ -283,7 +281,7 @@ The corner radius of the top left corner. When set to 0 the corner is not rounde | *Getter* | get_corner_radius() | +----------+--------------------------+ -The corner radius of the top right corner. When set to 0 the corner is not rounded. +The top-right corner's radius. If ``0``, the corner is not rounded. .. _class_StyleBoxFlat_property_draw_center: @@ -295,7 +293,7 @@ The corner radius of the top right corner. When set to 0 the corner is not round | *Getter* | is_draw_center_enabled() | +----------+--------------------------+ -Toggels drawing of the inner part of the stylebox. +Toggles drawing of the inner part of the stylebox. .. _class_StyleBoxFlat_property_expand_margin_bottom: @@ -307,7 +305,7 @@ Toggels drawing of the inner part of the stylebox. | *Getter* | get_expand_margin() | +----------+--------------------------+ -Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with border_width_bottom. To draw a border outside the control rect. +Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with :ref:`border_width_bottom` to draw a border outside the control rect. .. _class_StyleBoxFlat_property_expand_margin_left: @@ -319,7 +317,7 @@ Expands the stylebox outside of the control rect on the bottom edge. Useful in c | *Getter* | get_expand_margin() | +----------+--------------------------+ -Expands the stylebox outside of the control rect on the left edge. Useful in combination with border_width_left. To draw a border outside the control rect. +Expands the stylebox outside of the control rect on the left edge. Useful in combination with :ref:`border_width_left` to draw a border outside the control rect. .. _class_StyleBoxFlat_property_expand_margin_right: @@ -331,7 +329,7 @@ Expands the stylebox outside of the control rect on the left edge. Useful in com | *Getter* | get_expand_margin() | +----------+--------------------------+ -Expands the stylebox outside of the control rect on the right edge. Useful in combination with border_width_right. To draw a border outside the control rect. +Expands the stylebox outside of the control rect on the right edge. Useful in combination with :ref:`border_width_right` to draw a border outside the control rect. .. _class_StyleBoxFlat_property_expand_margin_top: @@ -343,7 +341,7 @@ Expands the stylebox outside of the control rect on the right edge. Useful in co | *Getter* | get_expand_margin() | +----------+--------------------------+ -Expands the stylebox outside of the control rect on the top edge. Useful in combination with border_width_top. To draw a border outside the control rect. +Expands the stylebox outside of the control rect on the top edge. Useful in combination with :ref:`border_width_top` to draw a border outside the control rect. .. _class_StyleBoxFlat_property_shadow_color: @@ -355,7 +353,7 @@ Expands the stylebox outside of the control rect on the top edge. Useful in comb | *Getter* | get_shadow_color() | +----------+-------------------------+ -The color of the shadow. (This has no effect when shadow_size < 1) +The color of the shadow. This has no effect if :ref:`shadow_size` is lower than 1. .. _class_StyleBoxFlat_property_shadow_offset: diff --git a/classes/class_styleboxtexture.rst b/classes/class_styleboxtexture.rst index 9c1aed7df..35764696e 100644 --- a/classes/class_styleboxtexture.rst +++ b/classes/class_styleboxtexture.rst @@ -14,7 +14,7 @@ StyleBoxTexture Brief Description ----------------- -Texture Based 3x3 scale style. +Texture-based nine-patch :ref:`StyleBox`. Properties ---------- @@ -89,7 +89,7 @@ enum **AxisStretchMode**: Description ----------- -Texture Based 3x3 scale style. This stylebox performs a 3x3 scaling of a texture, where only the center cell is fully stretched. This allows for the easy creation of bordered styles. +Texture-based nine-patch :ref:`StyleBox`, in a way similar to :ref:`NinePatchRect`. This stylebox performs a 3×3 scaling of a texture, where only the center cell is fully stretched. This makes it possible to design bordered styles regardless of the stylebox's size. Property Descriptions --------------------- @@ -134,7 +134,7 @@ Property Descriptions | *Getter* | get_expand_margin_size() | +----------+-------------------------------+ -Expands the bottom margin of this style box when drawing, causing it be drawn larger than requested. +Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested. .. _class_StyleBoxTexture_property_expand_margin_left: @@ -146,7 +146,7 @@ Expands the bottom margin of this style box when drawing, causing it be drawn la | *Getter* | get_expand_margin_size() | +----------+-------------------------------+ -Expands the left margin of this style box when drawing, causing it be drawn larger than requested. +Expands the left margin of this style box when drawing, causing it to be drawn larger than requested. .. _class_StyleBoxTexture_property_expand_margin_right: @@ -158,7 +158,7 @@ Expands the left margin of this style box when drawing, causing it be drawn larg | *Getter* | get_expand_margin_size() | +----------+-------------------------------+ -Expands the right margin of this style box when drawing, causing it be drawn larger than requested. +Expands the right margin of this style box when drawing, causing it to be drawn larger than requested. .. _class_StyleBoxTexture_property_expand_margin_top: @@ -170,7 +170,7 @@ Expands the right margin of this style box when drawing, causing it be drawn lar | *Getter* | get_expand_margin_size() | +----------+-------------------------------+ -Expands the top margin of this style box when drawing, causing it be drawn larger than requested. +Expands the top margin of this style box when drawing, causing it to be drawn larger than requested. .. _class_StyleBoxTexture_property_margin_bottom: @@ -182,9 +182,9 @@ Expands the top margin of this style box when drawing, causing it be drawn large | *Getter* | get_margin_size() | +----------+------------------------+ -Increases the bottom margin of the 3x3 texture box. +Increases the bottom margin of the 3×3 texture box. -A higher value means more of the source texture is considered to be part of the bottom border of the 3x3 box. +A higher value means more of the source texture is considered to be part of the bottom border of the 3×3 box. This is also the value used as fallback for :ref:`StyleBox.content_margin_bottom` if it is negative. @@ -198,9 +198,9 @@ This is also the value used as fallback for :ref:`StyleBox.content_margin_bottom | *Getter* | get_margin_size() | +----------+------------------------+ -Increases the left margin of the 3x3 texture box. +Increases the left margin of the 3×3 texture box. -A higher value means more of the source texture is considered to be part of the left border of the 3x3 box. +A higher value means more of the source texture is considered to be part of the left border of the 3×3 box. This is also the value used as fallback for :ref:`StyleBox.content_margin_left` if it is negative. @@ -214,9 +214,9 @@ This is also the value used as fallback for :ref:`StyleBox.content_margin_left` if it is negative. @@ -230,9 +230,9 @@ This is also the value used as fallback for :ref:`StyleBox.content_margin_right< | *Getter* | get_margin_size() | +----------+------------------------+ -Increases the top margin of the 3x3 texture box. +Increases the top margin of the 3×3 texture box. -A higher value means more of the source texture is considered to be part of the top border of the 3x3 box. +A higher value means more of the source texture is considered to be part of the top border of the 3×3 box. This is also the value used as fallback for :ref:`StyleBox.content_margin_top` if it is negative. diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index 2468d4f98..f624fb5c0 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -70,7 +70,7 @@ Methods Description ----------- -The ``SurfaceTool`` is used to construct a :ref:`Mesh` by specifying vertex attributes individually. It can be used to construct a :ref:`Mesh` from script. All properties except index need to be added before a call to :ref:`add_vertex`. For example adding vertex colors and UVs looks like +The ``SurfaceTool`` is used to construct a :ref:`Mesh` by specifying vertex attributes individually. It can be used to construct a :ref:`Mesh` from a script. All properties except indices need to be added before calling :ref:`add_vertex`. For example, to add vertex colors and UVs: :: @@ -80,11 +80,11 @@ The ``SurfaceTool`` is used to construct a :ref:`Mesh` by specifying st.add_uv(Vector2(0, 0)) st.add_vertex(Vector3(0, 0, 0)) -The ``SurfaceTool`` now contains one vertex of a triangle which has a UV coordinate and a specified :ref:`Color`. If another vertex were added without calls to :ref:`add_uv` or :ref:`add_color` then the last values would be used. +The above ``SurfaceTool`` now contains one vertex of a triangle which has a UV coordinate and a specified :ref:`Color`. If another vertex were added without calling :ref:`add_uv` or :ref:`add_color`, then the last values would be used. -It is very important that vertex attributes are passed **before** the call to :ref:`add_vertex`, failure to do this will result in an error when committing the vertex information to a mesh. +Vertex attributes must be passed **before** calling :ref:`add_vertex`. Failure to do so will result in an error when committing the vertex information to a mesh. -Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices. +Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example, if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices. Method Descriptions ------------------- @@ -93,69 +93,69 @@ Method Descriptions - void **add_bones** **(** :ref:`PoolIntArray` bones **)** -Add an array of bones for the next Vertex to use. Array must contain 4 integers. +Adds an array of bones for the next vertex to use. ``bones`` must contain 4 integers. .. _class_SurfaceTool_method_add_color: - void **add_color** **(** :ref:`Color` color **)** -Specify a :ref:`Color` for the next Vertex to use. +Specifies a :ref:`Color` for the next vertex to use. .. _class_SurfaceTool_method_add_index: - void **add_index** **(** :ref:`int` index **)** -Adds an index to index array if you are using indexed Vertices. Does not need to be called before adding Vertex. +Adds an index to index array if you are using indexed vertices. Does not need to be called before adding vertices. .. _class_SurfaceTool_method_add_normal: - void **add_normal** **(** :ref:`Vector3` normal **)** -Specify a normal for the next Vertex to use. +Specifies a normal for the next vertex to use. .. _class_SurfaceTool_method_add_smooth_group: - void **add_smooth_group** **(** :ref:`bool` smooth **)** -Specify whether current Vertex (if using only Vertex arrays) or current index (if also using index arrays) should utilize smooth normals for normal calculation. +Specifies whether the current vertex (if using only vertex arrays) or current index (if also using index arrays) should use smooth normals for normal calculation. .. _class_SurfaceTool_method_add_tangent: - void **add_tangent** **(** :ref:`Plane` tangent **)** -Specify a Tangent for the next Vertex to use. +Specifies a tangent for the next vertex to use. .. _class_SurfaceTool_method_add_triangle_fan: - void **add_triangle_fan** **(** :ref:`PoolVector3Array` vertices, :ref:`PoolVector2Array` uvs=PoolVector2Array( ), :ref:`PoolColorArray` colors=PoolColorArray( ), :ref:`PoolVector2Array` uv2s=PoolVector2Array( ), :ref:`PoolVector3Array` normals=PoolVector3Array( ), :ref:`Array` tangents=[ ] **)** -Insert a triangle fan made of array data into :ref:`Mesh` being constructed. +Inserts a triangle fan made of array data into :ref:`Mesh` being constructed. -Requires primitive type be set to ``PRIMITIVE_TRIANGLES``. +Requires the primitive type be set to :ref:`Mesh.PRIMITIVE_TRIANGLES`. .. _class_SurfaceTool_method_add_uv: - void **add_uv** **(** :ref:`Vector2` uv **)** -Specify UV Coordinate for next Vertex to use. +Specifies a set of UV coordinates to use for the next vertex. .. _class_SurfaceTool_method_add_uv2: - void **add_uv2** **(** :ref:`Vector2` uv2 **)** -Specify an optional second set of UV coordinates for next Vertex to use. +Specifies an optional second set of UV coordinates to use for the next vertex. .. _class_SurfaceTool_method_add_vertex: - void **add_vertex** **(** :ref:`Vector3` vertex **)** -Specify position of current Vertex. Should be called after specifying other vertex properties (e.g. Color, UV). +Specifies the position of current vertex. Should be called after specifying other vertex properties (e.g. Color, UV). .. _class_SurfaceTool_method_add_weights: - void **add_weights** **(** :ref:`PoolRealArray` weights **)** -Specify weight values for next Vertex to use. Array must contain 4 values. +Specifies weight values for next vertex to use. ``weights`` must contain 4 values. .. _class_SurfaceTool_method_append_from: @@ -167,7 +167,7 @@ Append vertices from a given :ref:`Mesh` surface onto the current ve - void **begin** **(** :ref:`PrimitiveType` primitive **)** -Called before adding any Vertices. Takes the primitive type as an argument (e.g. Mesh.PRIMITIVE_TRIANGLES). +Called before adding any vertices. Takes the primitive type as an argument (e.g. :ref:`Mesh.PRIMITIVE_TRIANGLES`). .. _class_SurfaceTool_method_clear: @@ -199,31 +199,27 @@ Creates a vertex array from an existing :ref:`Mesh`. - void **deindex** **(** **)** -Removes index array by expanding Vertex array. +Removes the index array by expanding the vertex array. .. _class_SurfaceTool_method_generate_normals: - void **generate_normals** **(** :ref:`bool` flip=false **)** -Generates normals from Vertices so you do not have to do it manually. +Generates normals from vertices so you do not have to do it manually. If ``flip`` is ``true``, the resulting normals will be inverted. -Setting "flip" ``true`` inverts resulting normals. - -Requires primitive type to be set to ``PRIMITIVE_TRIANGLES``. +Requires the primitive type to be set to :ref:`Mesh.PRIMITIVE_TRIANGLES`. .. _class_SurfaceTool_method_generate_tangents: - void **generate_tangents** **(** **)** -Generates a tangent vector for each vertex. - -Requires that each vertex have UVs and normals set already. +Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already. .. _class_SurfaceTool_method_index: - void **index** **(** **)** -Shrinks Vertex array by creating an index array. Avoids reusing Vertices. +Shrinks the vertex array by creating an index array (avoids reusing vertices). .. _class_SurfaceTool_method_set_material: diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst index 0b1ff80e5..ff64a09c0 100644 --- a/classes/class_tabcontainer.rst +++ b/classes/class_tabcontainer.rst @@ -14,7 +14,7 @@ TabContainer Brief Description ----------------- -Tabbed Container. +Tabbed container. Properties ---------- @@ -250,7 +250,7 @@ Returns ``true`` if the tab at index ``tab_idx`` is disabled. - :ref:`Texture` **get_tab_icon** **(** :ref:`int` tab_idx **)** const -Returns the :ref:`Texture` for the tab at index ``tab_idx`` or null if the tab has no :ref:`Texture`. +Returns the :ref:`Texture` for the tab at index ``tab_idx`` or ``null`` if the tab has no :ref:`Texture`. .. _class_TabContainer_method_get_tab_title: @@ -274,7 +274,9 @@ If set on a :ref:`Popup` node instance, a popup menu icon appears i - void **set_tab_disabled** **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** -If ``disabled`` is ``false``, hides the tab at index ``tab_idx``. Note that its title text will remain, unless also removed with :ref:`set_tab_title`. +If ``disabled`` is ``false``, hides the tab at index ``tab_idx``. + +**Note:** Its title text will remain, unless also removed with :ref:`set_tab_title`. .. _class_TabContainer_method_set_tab_icon: diff --git a/classes/class_tabs.rst b/classes/class_tabs.rst index 8cf21a203..2d2c97f77 100644 --- a/classes/class_tabs.rst +++ b/classes/class_tabs.rst @@ -14,7 +14,7 @@ Tabs Brief Description ----------------- -Tabs Control. +Tabs control. Properties ---------- @@ -163,7 +163,7 @@ enum **TabAlign**: - **ALIGN_RIGHT** = **2** --- Align the tabs to the right. -- **ALIGN_MAX** = **3** +- **ALIGN_MAX** = **3** --- Represents the size of the :ref:`TabAlign` enum. .. _enum_Tabs_CloseButtonDisplayPolicy: @@ -183,7 +183,7 @@ enum **CloseButtonDisplayPolicy**: - **CLOSE_BUTTON_SHOW_ALWAYS** = **2** -- **CLOSE_BUTTON_MAX** = **3** +- **CLOSE_BUTTON_MAX** = **3** --- Represents the size of the :ref:`CloseButtonDisplayPolicy` enum. Description ----------- @@ -262,7 +262,7 @@ Adds a new tab. - void **ensure_tab_visible** **(** :ref:`int` idx **)** -Moves the Scroll view to make the tab visible. +Moves the scroll view to make the tab visible. .. _class_Tabs_method_get_offset_buttons_visible: @@ -290,7 +290,7 @@ Returns ``true`` if the tab at index ``tab_idx`` is disabled. - :ref:`Texture` **get_tab_icon** **(** :ref:`int` tab_idx **)** const -Returns the :ref:`Texture` for the tab at index ``tab_idx`` or null if the tab has no :ref:`Texture`. +Returns the :ref:`Texture` for the tab at index ``tab_idx`` or ``null`` if the tab has no :ref:`Texture`. .. _class_Tabs_method_get_tab_offset: @@ -312,47 +312,49 @@ Returns the title of the tab at index ``tab_idx``. Tab titles default to the nam - :ref:`int` **get_tabs_rearrange_group** **(** **)** const -Returns the ``Tabs`` rearrange group id. +Returns the ``Tabs``' rearrange group ID. .. _class_Tabs_method_move_tab: - void **move_tab** **(** :ref:`int` from, :ref:`int` to **)** -Rearrange tab. +Moves a tab from ``from`` to ``to``. .. _class_Tabs_method_remove_tab: - void **remove_tab** **(** :ref:`int` tab_idx **)** -Removes tab at index ``tab_idx`` +Removes the tab at index ``tab_idx``. .. _class_Tabs_method_set_select_with_rmb: - void **set_select_with_rmb** **(** :ref:`bool` enabled **)** -If ``true``, enables selecting a tab with right mouse button. +If ``true``, enables selecting a tab with the right mouse button. .. _class_Tabs_method_set_tab_disabled: - void **set_tab_disabled** **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** -If ``disabled`` is ``false``, hides the tab at index ``tab_idx``. Note that its title text will remain, unless also removed with :ref:`set_tab_title`. +If ``disabled`` is ``false``, hides the tab at index ``tab_idx``. + +**Note:** Its title text will remain unless it is also removed with :ref:`set_tab_title`. .. _class_Tabs_method_set_tab_icon: - void **set_tab_icon** **(** :ref:`int` tab_idx, :ref:`Texture` icon **)** -Sets an icon for the tab at index ``tab_idx``. +Sets an ``icon`` for the tab at index ``tab_idx``. .. _class_Tabs_method_set_tab_title: - void **set_tab_title** **(** :ref:`int` tab_idx, :ref:`String` title **)** -Sets a title for the tab at index ``tab_idx``. +Sets a ``title`` for the tab at index ``tab_idx``. .. _class_Tabs_method_set_tabs_rearrange_group: - void **set_tabs_rearrange_group** **(** :ref:`int` group_id **)** -Defines rearrange group id, choose for each ``Tabs`` the same value to enable tab drag between ``Tabs``. Enable drag with ``set_drag_to_rearrange_enabled(true)``. +Defines the rearrange group ID. Choose for each ``Tabs`` the same value to dragging tabs between ``Tabs``. Enable drag with ``set_drag_to_rearrange_enabled(true)``. diff --git a/classes/class_tcp_server.rst b/classes/class_tcp_server.rst index fa4a36d3b..abf86cf01 100644 --- a/classes/class_tcp_server.rst +++ b/classes/class_tcp_server.rst @@ -14,7 +14,7 @@ TCP_Server Brief Description ----------------- -TCP Server. +A TCP server. Methods ------- @@ -32,7 +32,7 @@ Methods Description ----------- -TCP Server class. Listens to connections on a port and returns a :ref:`StreamPeerTCP` when got a connection. +A TCP server. Listens to connections on a port and returns a :ref:`StreamPeerTCP` when it gets an incoming connection. Method Descriptions ------------------- @@ -47,23 +47,23 @@ Returns ``true`` if a connection is available for taking. - :ref:`Error` **listen** **(** :ref:`int` port, :ref:`String` bind_address="*" **)** -Listen on the "port" binding to "bind_address". +Listen on the ``port`` binding to ``bind_address``. -If "bind_address" is set as "\*" (default), the server will listen on all available addresses (both IPv4 and IPv6). +If ``bind_address`` is set as ``"*"`` (default), the server will listen on all available addresses (both IPv4 and IPv6). -If "bind_address" is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the server will listen on all available addresses matching that IP type. +If ``bind_address`` is set as ``"0.0.0.0"`` (for IPv4) or ``"::"`` (for IPv6), the server will listen on all available addresses matching that IP type. -If "bind_address" is set to any valid address (e.g. "192.168.1.101", "::1", etc), the server will only listen on the interface with that addresses (or fail if no interface with the given address exists). +If ``bind_address`` is set to any valid address (e.g. ``"192.168.1.101"``, ``"::1"``, etc), the server will only listen on the interface with that addresses (or fail if no interface with the given address exists). .. _class_TCP_Server_method_stop: - void **stop** **(** **)** -Stop listening. +Stops listening. .. _class_TCP_Server_method_take_connection: - :ref:`StreamPeerTCP` **take_connection** **(** **)** -If a connection is available, return a StreamPeerTCP with the connection/ +If a connection is available, returns a StreamPeerTCP with the connection. diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 8629525d9..325c5411e 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -202,6 +202,8 @@ Theme Properties +---------------------------------+-----------------------------+ | :ref:`Color` | font_color | +---------------------------------+-----------------------------+ +| :ref:`Color` | font_color_readonly | ++---------------------------------+-----------------------------+ | :ref:`Color` | font_color_selected | +---------------------------------+-----------------------------+ | :ref:`Color` | function_color | @@ -391,7 +393,7 @@ If ``false``, the caret displays as a bar. | *Getter* | is_right_click_moving_caret() | +----------+------------------------------------+ -If ``true``, a right click moves the cursor at the mouse position before displaying the context menu. +If ``true``, a right-click moves the cursor at the mouse position before displaying the context menu. If ``false``, the context menu disregards mouse location. @@ -405,7 +407,7 @@ If ``false``, the context menu disregards mouse location. | *Getter* | is_context_menu_enabled() | +----------+---------------------------------+ -If ``true``, a right click displays the context menu. +If ``true``, a right-click displays the context menu. .. _class_TextEdit_property_draw_spaces: @@ -580,13 +582,13 @@ Method Descriptions - void **add_color_region** **(** :ref:`String` begin_key, :ref:`String` end_key, :ref:`Color` color, :ref:`bool` line_only=false **)** -Add color region (given the delimiters) and its colors. +Adds color region (given the delimiters) and its colors. .. _class_TextEdit_method_add_keyword_color: - void **add_keyword_color** **(** :ref:`String` keyword, :ref:`Color` color **)** -Add a ``keyword`` and its :ref:`Color`. +Adds a ``keyword`` and its :ref:`Color`. .. _class_TextEdit_method_can_fold: @@ -770,7 +772,7 @@ Returns ``true`` if the selection is active. - void **menu_option** **(** :ref:`int` option **)** -Triggers a right click menu action by the specified index. See :ref:`MenuItems` for a list of available indexes. +Triggers a right-click menu action by the specified index. See :ref:`MenuItems` for a list of available indexes. .. _class_TextEdit_method_paste: @@ -788,13 +790,13 @@ Perform redo operation. - void **remove_breakpoints** **(** **)** -Removes all the breakpoints (without firing "breakpoint_toggled" signal). +Removes all the breakpoints. This will not fire the :ref:`breakpoint_toggled` signal. .. _class_TextEdit_method_search: - :ref:`PoolIntArray` **search** **(** :ref:`String` key, :ref:`int` flags, :ref:`int` from_line, :ref:`int` from_column **)** const -Perform a search inside the text. Search flags can be specified in the SEARCH\_\* enum. +Perform a search inside the text. Search flags can be specified in the``SEARCH_*`` enum. .. _class_TextEdit_method_select: diff --git a/classes/class_texture.rst b/classes/class_texture.rst index 23d1d13ce..f5a46961d 100644 --- a/classes/class_texture.rst +++ b/classes/class_texture.rst @@ -69,21 +69,21 @@ Enumerations enum **Flags**: -- **FLAGS_DEFAULT** = **7** --- Default flags. Generate mipmaps, repeat, and filter are enabled. +- **FLAGS_DEFAULT** = **7** --- Default flags. :ref:`FLAG_MIPMAPS`, :ref:`FLAG_REPEAT` and :ref:`FLAG_FILTER` are are enabled. -- **FLAG_MIPMAPS** = **1** --- Generate mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. +- **FLAG_MIPMAPS** = **1** --- Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. -- **FLAG_REPEAT** = **2** --- Repeats texture (instead of clamp to edge). +- **FLAG_REPEAT** = **2** --- Repeats the texture (instead of clamp to edge). -- **FLAG_FILTER** = **4** --- Magnifying filter, to enable smooth zooming in of the texture. +- **FLAG_FILTER** = **4** --- Uses a magnifying filter, to enable smooth zooming in of the texture. -- **FLAG_ANISOTROPIC_FILTER** = **8** --- Anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios. +- **FLAG_ANISOTROPIC_FILTER** = **8** --- Uses anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios. -More effective on planes often shown going to the horrizon as those textures (Walls or Ground for example) get squashed in the viewport to different aspect ratios and regular mipmaps keep the aspect ratio so they don't optimize storage that well in those cases. +This results in better-looking textures when viewed from oblique angles. -- **FLAG_CONVERT_TO_LINEAR** = **16** --- Converts texture to SRGB color space. +- **FLAG_CONVERT_TO_LINEAR** = **16** --- Converts the texture to the sRGB color space. -- **FLAG_MIRRORED_REPEAT** = **32** --- Repeats texture with alternate sections mirrored. +- **FLAG_MIRRORED_REPEAT** = **32** --- Repeats the texture with alternate sections mirrored. - **FLAG_VIDEO_SURFACE** = **2048** --- Texture is a video surface. diff --git a/classes/class_texturebutton.rst b/classes/class_texturebutton.rst index 203483a94..b146557d5 100644 --- a/classes/class_texturebutton.rst +++ b/classes/class_texturebutton.rst @@ -75,9 +75,9 @@ enum **StretchMode**: Description ----------- -``TextureButton`` has the same functionality as :ref:`Button`, except it uses sprites instead of Godot's :ref:`Theme` resource. It is faster to create, but it doesn't support localization like more complex Controls. +``TextureButton`` has the same functionality as :ref:`Button`, except it uses sprites instead of Godot's :ref:`Theme` resource. It is faster to create, but it doesn't support localization like more complex :ref:`Control`\ s. -The Normal state's texture is required. Others are optional. +The "normal" state must contain a texture (:ref:`texture_normal`); other textures are optional. Property Descriptions --------------------- @@ -176,5 +176,5 @@ Texture to display by default, when the node is **not** in the disabled, focused | *Getter* | get_pressed_texture() | +----------+----------------------------+ -Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the enter key or if the player presses the :ref:`BaseButton.shortcut` key. +Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the Enter key or if the player presses the :ref:`BaseButton.shortcut` key. diff --git a/classes/class_textureprogress.rst b/classes/class_textureprogress.rst index 9a95c6626..02ab768e7 100644 --- a/classes/class_textureprogress.rst +++ b/classes/class_textureprogress.rst @@ -86,18 +86,18 @@ enum **FillMode**: - **FILL_CLOCKWISE** = **4** --- Turns the node into a radial bar. The :ref:`texture_progress` fills clockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to control the way the bar fills up. -- **FILL_COUNTER_CLOCKWISE** = **5** --- Turns the node into a radial bar. The :ref:`texture_progress` fills counter-clockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to control the way the bar fills up. +- **FILL_COUNTER_CLOCKWISE** = **5** --- Turns the node into a radial bar. The :ref:`texture_progress` fills counterclockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to control the way the bar fills up. - **FILL_BILINEAR_LEFT_AND_RIGHT** = **6** --- The :ref:`texture_progress` fills from the center, expanding both towards the left and the right. - **FILL_BILINEAR_TOP_AND_BOTTOM** = **7** --- The :ref:`texture_progress` fills from the center, expanding both towards the top and the bottom. -- **FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE** = **8** --- Turns the node into a radial bar. The :ref:`texture_progress` fills radially from the center, expanding both clockwise and counter-clockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to control the way the bar fills up. +- **FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE** = **8** --- Turns the node into a radial bar. The :ref:`texture_progress` fills radially from the center, expanding both clockwise and counterclockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to control the way the bar fills up. Description ----------- -TextureProgress works like :ref:`ProgressBar` but it uses up to 3 textures instead of Godot's :ref:`Theme` resource. Works horizontally, vertically, and radially. +TextureProgress works like :ref:`ProgressBar`, but uses up to 3 textures instead of Godot's :ref:`Theme` resource. It can be used to create horizontal, vertical and radial progress bars. Property Descriptions --------------------- @@ -112,7 +112,7 @@ Property Descriptions | *Getter* | get_fill_mode() | +----------+----------------------+ -The fill direction. Uses FILL\_\* constants. +The fill direction. See :ref:`FillMode` for possible values. .. _class_TextureProgress_property_nine_patch_stretch: @@ -124,7 +124,7 @@ The fill direction. Uses FILL\_\* constants. | *Getter* | get_nine_patch_stretch() | +----------+-------------------------------+ -If ``true``, Godot treats the bar's textures like :ref:`NinePatchRect`. Use ``stretch_margin_*``, like :ref:`stretch_margin_bottom`, to set up the nine patch's 3x3 grid. Default value: ``false``. +If ``true``, Godot treats the bar's textures like in :ref:`NinePatchRect`. Use the ``stretch_margin_*`` properties like :ref:`stretch_margin_bottom` to set up the nine patch's 3×3 grid. Default value: ``false``. .. _class_TextureProgress_property_radial_center_offset: @@ -136,7 +136,7 @@ If ``true``, Godot treats the bar's textures like :ref:`NinePatchRect` if :ref:`fill_mode` is ``FILL_CLOCKWISE`` or ``FILL_COUNTER_CLOCKWISE``. +Offsets :ref:`texture_progress` if :ref:`fill_mode` is :ref:`FILL_CLOCKWISE` or :ref:`FILL_COUNTER_CLOCKWISE`. .. _class_TextureProgress_property_radial_fill_degrees: @@ -148,7 +148,7 @@ Offsets :ref:`texture_progress` | *Getter* | get_fill_degrees() | +----------+-------------------------+ -Upper limit for the fill of :ref:`texture_progress` if :ref:`fill_mode` is ``FILL_CLOCKWISE`` or ``FILL_COUNTER_CLOCKWISE``. When the node's ``value`` is equal to its ``max_value``, the texture fills up to this angle. +Upper limit for the fill of :ref:`texture_progress` if :ref:`fill_mode` is :ref:`FILL_CLOCKWISE` or :ref:`FILL_COUNTER_CLOCKWISE`. When the node's ``value`` is equal to its ``max_value``, the texture fills up to this angle. See :ref:`Range.value`, :ref:`Range.max_value`. @@ -162,7 +162,7 @@ See :ref:`Range.value`, :ref:`Range.max_value` if :ref:`fill_mode` is ``FILL_CLOCKWISE`` or ``FILL_COUNTER_CLOCKWISE``. When the node's ``value`` is equal to its ``min_value``, the texture doesn't show up at all. When the ``value`` increases, the texture fills and tends towards :ref:`radial_fill_degrees`. +Starting angle for the fill of :ref:`texture_progress` if :ref:`fill_mode` is :ref:`FILL_CLOCKWISE` or :ref:`FILL_COUNTER_CLOCKWISE`. When the node's ``value`` is equal to its ``min_value``, the texture doesn't show up at all. When the ``value`` increases, the texture fills and tends towards :ref:`radial_fill_degrees`. .. _class_TextureProgress_property_stretch_margin_bottom: diff --git a/classes/class_texturerect.rst b/classes/class_texturerect.rst index 9d19a0e22..64c3c7960 100644 --- a/classes/class_texturerect.rst +++ b/classes/class_texturerect.rst @@ -54,7 +54,7 @@ Enumerations enum **StretchMode**: -- **STRETCH_SCALE_ON_EXPAND** = **0** --- Scale to fit the node's bounding rectangle, only if ``expand`` is ``true``. Default ``stretch_mode``, for backwards compatibility. Until you set ``expand`` to ``true``, the texture will behave like ``STRETCH_KEEP``. +- **STRETCH_SCALE_ON_EXPAND** = **0** --- Scale to fit the node's bounding rectangle, only if ``expand`` is ``true``. Default ``stretch_mode``, for backwards compatibility. Until you set ``expand`` to ``true``, the texture will behave like :ref:`STRETCH_KEEP`. - **STRETCH_SCALE** = **1** --- Scale to fit the node's bounding rectangle. diff --git a/classes/class_theme.rst b/classes/class_theme.rst index 704207799..8ae1bfb7f 100644 --- a/classes/class_theme.rst +++ b/classes/class_theme.rst @@ -91,9 +91,9 @@ Methods Description ----------- -Theme for skinning controls. Controls can be skinned individually, but for complex applications it's more efficient to just create a global theme that defines everything. This theme can be applied to any :ref:`Control`, and it and its children will automatically use it. +A theme for skinning controls. Controls can be skinned individually, but for complex applications, it's more practical to just create a global theme that defines everything. This theme can be applied to any :ref:`Control`; the Control and its children will automatically use it. -Theme resources can be alternatively loaded by writing them in a .theme file, see docs for more info. +Theme resources can alternatively be loaded by writing them in a ``.theme`` file, see the documentation for more information. Tutorials --------- @@ -126,37 +126,37 @@ Method Descriptions - void **clear_color** **(** :ref:`String` name, :ref:`String` type **)** -Clears theme :ref:`Color` at ``name`` if Theme has ``type``. +Clears the :ref:`Color` at ``name`` if the Theme has ``type``. .. _class_Theme_method_clear_constant: - void **clear_constant** **(** :ref:`String` name, :ref:`String` type **)** -Clears theme constant at ``name`` if Theme has ``type``. +Clears the constant at ``name`` if the Theme has ``type``. .. _class_Theme_method_clear_font: - void **clear_font** **(** :ref:`String` name, :ref:`String` type **)** -Clears :ref:`Font` at ``name`` if Theme has ``type``. +Clears the :ref:`Font` at ``name`` if the Theme has ``type``. .. _class_Theme_method_clear_icon: - void **clear_icon** **(** :ref:`String` name, :ref:`String` type **)** -Clears icon at ``name`` if Theme has ``type``. +Clears the icon at ``name`` if the Theme has ``type``. .. _class_Theme_method_clear_stylebox: - void **clear_stylebox** **(** :ref:`String` name, :ref:`String` type **)** -Clears :ref:`StyleBox` at ``name`` if Theme has ``type``. +Clears :ref:`StyleBox` at ``name`` if the Theme has ``type``. .. _class_Theme_method_copy_default_theme: - void **copy_default_theme** **(** **)** -Sets theme values to a copy of the default theme values. +Sets the Theme's values to a copy of the default theme values. .. _class_Theme_method_copy_theme: @@ -166,73 +166,73 @@ Sets theme values to a copy of the default theme values. - :ref:`Color` **get_color** **(** :ref:`String` name, :ref:`String` type **)** const -Returns the :ref:`Color` at ``name`` if Theme has ``type``. +Returns the :ref:`Color` at ``name`` if the Theme has ``type``. .. _class_Theme_method_get_color_list: - :ref:`PoolStringArray` **get_color_list** **(** :ref:`String` type **)** const -Returns all of the :ref:`Color`\ s as a :ref:`PoolStringArray` filled with each :ref:`Color`'s name, for use in :ref:`get_color`, if Theme has ``type``. +Returns all the :ref:`Color`\ s as a :ref:`PoolStringArray` filled with each :ref:`Color`'s name, for use in :ref:`get_color`, if the Theme has ``type``. .. _class_Theme_method_get_constant: - :ref:`int` **get_constant** **(** :ref:`String` name, :ref:`String` type **)** const -Returns the constant at ``name`` if Theme has ``type``. +Returns the constant at ``name`` if the Theme has ``type``. .. _class_Theme_method_get_constant_list: - :ref:`PoolStringArray` **get_constant_list** **(** :ref:`String` type **)** const -Returns all of the constants as a :ref:`PoolStringArray` filled with each constant's name, for use in :ref:`get_constant`, if Theme has ``type``. +Returns all the constants as a :ref:`PoolStringArray` filled with each constant's name, for use in :ref:`get_constant`, if the Theme has ``type``. .. _class_Theme_method_get_font: - :ref:`Font` **get_font** **(** :ref:`String` name, :ref:`String` type **)** const -Returns the :ref:`Font` at ``name`` if Theme has ``type``. +Returns the :ref:`Font` at ``name`` if the Theme has ``type``. .. _class_Theme_method_get_font_list: - :ref:`PoolStringArray` **get_font_list** **(** :ref:`String` type **)** const -Returns all of the :ref:`Font`\ s as a :ref:`PoolStringArray` filled with each :ref:`Font`'s name, for use in :ref:`get_font`, if Theme has ``type``. +Returns all the :ref:`Font`\ s as a :ref:`PoolStringArray` filled with each :ref:`Font`'s name, for use in :ref:`get_font`, if the Theme has ``type``. .. _class_Theme_method_get_icon: - :ref:`Texture` **get_icon** **(** :ref:`String` name, :ref:`String` type **)** const -Returns the icon :ref:`Texture` at ``name`` if Theme has ``type``. +Returns the icon :ref:`Texture` at ``name`` if the Theme has ``type``. .. _class_Theme_method_get_icon_list: - :ref:`PoolStringArray` **get_icon_list** **(** :ref:`String` type **)** const -Returns all of the icons as a :ref:`PoolStringArray` filled with each :ref:`Texture`'s name, for use in :ref:`get_icon`, if Theme has ``type``. +Returns all the icons as a :ref:`PoolStringArray` filled with each :ref:`Texture`'s name, for use in :ref:`get_icon`, if the Theme has ``type``. .. _class_Theme_method_get_stylebox: - :ref:`StyleBox` **get_stylebox** **(** :ref:`String` name, :ref:`String` type **)** const -Returns the icon :ref:`StyleBox` at ``name`` if Theme has ``type``. +Returns the icon :ref:`StyleBox` at ``name`` if the Theme has ``type``. .. _class_Theme_method_get_stylebox_list: - :ref:`PoolStringArray` **get_stylebox_list** **(** :ref:`String` type **)** const -Returns all of the :ref:`StyleBox`\ s as a :ref:`PoolStringArray` filled with each :ref:`StyleBox`'s name, for use in :ref:`get_stylebox`, if Theme has ``type``. +Returns all the :ref:`StyleBox`\ s as a :ref:`PoolStringArray` filled with each :ref:`StyleBox`'s name, for use in :ref:`get_stylebox`, if the Theme has ``type``. .. _class_Theme_method_get_stylebox_types: - :ref:`PoolStringArray` **get_stylebox_types** **(** **)** const -Returns all of the :ref:`StyleBox` types as a :ref:`PoolStringArray` filled with each :ref:`StyleBox`'s type, for use in :ref:`get_stylebox` and/or :ref:`get_stylebox_list`, if Theme has ``type``. +Returns all the :ref:`StyleBox` types as a :ref:`PoolStringArray` filled with each :ref:`StyleBox`'s type, for use in :ref:`get_stylebox` and/or :ref:`get_stylebox_list`, if the Theme has ``type``. .. _class_Theme_method_get_type_list: - :ref:`PoolStringArray` **get_type_list** **(** :ref:`String` type **)** const -Returns all of the types in ``type`` as a :ref:`PoolStringArray` for use in any of the get\_\* functions, if Theme has ``type``. +Returns all the types in ``type`` as a :ref:`PoolStringArray` for use in any of the get\_\* functions, if the Theme has ``type``. .. _class_Theme_method_has_color: @@ -240,7 +240,7 @@ Returns all of the types in ``type`` as a :ref:`PoolStringArray` with ``name`` is in ``type``. -Returns ``false`` if Theme does not have ``type``. +Returns ``false`` if the Theme does not have ``type``. .. _class_Theme_method_has_constant: @@ -248,7 +248,7 @@ Returns ``false`` if Theme does not have ``type``. Returns ``true`` if constant with ``name`` is in ``type``. -Returns ``false`` if Theme does not have ``type``. +Returns ``false`` if the Theme does not have ``type``. .. _class_Theme_method_has_font: @@ -256,7 +256,7 @@ Returns ``false`` if Theme does not have ``type``. Returns ``true`` if :ref:`Font` with ``name`` is in ``type``. -Returns ``false`` if Theme does not have ``type``. +Returns ``false`` if the Theme does not have ``type``. .. _class_Theme_method_has_icon: @@ -264,7 +264,7 @@ Returns ``false`` if Theme does not have ``type``. Returns ``true`` if icon :ref:`Texture` with ``name`` is in ``type``. -Returns ``false`` if Theme does not have ``type``. +Returns ``false`` if the Theme does not have ``type``. .. _class_Theme_method_has_stylebox: @@ -272,39 +272,39 @@ Returns ``false`` if Theme does not have ``type``. Returns ``true`` if :ref:`StyleBox` with ``name`` is in ``type``. -Returns ``false`` if Theme does not have ``type``. +Returns ``false`` if the Theme does not have ``type``. .. _class_Theme_method_set_color: - void **set_color** **(** :ref:`String` name, :ref:`String` type, :ref:`Color` color **)** -Sets Theme's :ref:`Color` to ``color`` at ``name`` in ``type``. +Sets the Theme's :ref:`Color` to ``color`` at ``name`` in ``type``. -Does nothing if Theme does not have ``type``. +Does nothing if the Theme does not have ``type``. .. _class_Theme_method_set_constant: - void **set_constant** **(** :ref:`String` name, :ref:`String` type, :ref:`int` constant **)** -Sets Theme's constant to ``constant`` at ``name`` in ``type``. +Sets the Theme's constant to ``constant`` at ``name`` in ``type``. -Does nothing if Theme does not have ``type``. +Does nothing if the Theme does not have ``type``. .. _class_Theme_method_set_font: - void **set_font** **(** :ref:`String` name, :ref:`String` type, :ref:`Font` font **)** -Sets Theme's :ref:`Font` to ``font`` at ``name`` in ``type``. +Sets the Theme's :ref:`Font` to ``font`` at ``name`` in ``type``. -Does nothing if Theme does not have ``type``. +Does nothing if the Theme does not have ``type``. .. _class_Theme_method_set_icon: - void **set_icon** **(** :ref:`String` name, :ref:`String` type, :ref:`Texture` texture **)** -Sets Theme's icon :ref:`Texture` to ``texture`` at ``name`` in ``type``. +Sets the Theme's icon :ref:`Texture` to ``texture`` at ``name`` in ``type``. -Does nothing if Theme does not have ``type``. +Does nothing if the Theme does not have ``type``. .. _class_Theme_method_set_stylebox: @@ -312,5 +312,5 @@ Does nothing if Theme does not have ``type``. Sets Theme's :ref:`StyleBox` to ``stylebox`` at ``name`` in ``type``. -Does nothing if Theme does not have ``type``. +Does nothing if the Theme does not have ``type``. diff --git a/classes/class_thread.rst b/classes/class_thread.rst index 9a7de1958..8639e93d6 100644 --- a/classes/class_thread.rst +++ b/classes/class_thread.rst @@ -51,7 +51,7 @@ enum **Priority**: Description ----------- -A unit of execution in a process. Can run methods on :ref:`Object`\ s simultaneously. The use of synchronization via :ref:`Mutex`, :ref:`Semaphore` is advised if working with shared objects. +A unit of execution in a process. Can run methods on :ref:`Object`\ s simultaneously. The use of synchronization via :ref:`Mutex` or :ref:`Semaphore` is advised if working with shared objects. Method Descriptions ------------------- @@ -60,7 +60,7 @@ Method Descriptions - :ref:`String` **get_id** **(** **)** const -Returns the current ``Thread``\ s id, uniquely identifying it among all threads. +Returns the current ``Thread``'s ID, uniquely identifying it among all threads. .. _class_Thread_method_is_active: @@ -72,9 +72,9 @@ Returns ``true`` if this ``Thread`` is currently active. An active ``Thread`` ca - :ref:`Error` **start** **(** :ref:`Object` instance, :ref:`String` method, :ref:`Variant` userdata=null, :ref:`Priority` priority=1 **)** -Starts a new ``Thread`` that runs "method" on object "instance" with "userdata" passed as an argument. The "priority" of the ``Thread`` can be changed by passing a PRIORITY\_\* enum. +Starts a new ``Thread`` that runs ``method`` on object ``instance`` with ``userdata`` passed as an argument. The ``priority`` of the ``Thread`` can be changed by passing a value from the :ref:`Priority` enum. -Returns OK on success, or ERR_CANT_CREATE on failure. +Returns :ref:`@GlobalScope.OK` on success, or :ref:`@GlobalScope.ERR_CANT_CREATE` on failure. .. _class_Thread_method_wait_to_finish: diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index 04ab455a9..97b89d06c 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -220,7 +220,7 @@ The custom :ref:`Transform2D` to be applied to the TileMap's | *Getter* | get_half_offset() | +----------+------------------------+ -Amount to offset alternating tiles. Uses HALF_OFFSET\_\* constants. Default value: HALF_OFFSET_DISABLED. +Amount to offset alternating tiles. See :ref:`HalfOffset` for possible values. Default value: ``HALF_OFFSET_DISABLED``. .. _class_TileMap_property_cell_quadrant_size: @@ -256,7 +256,7 @@ The TileMap's cell size. | *Getter* | get_tile_origin() | +----------+------------------------+ -Position for tile origin. Uses TILE_ORIGIN\_\* constants. Default value: TILE_ORIGIN_TOP_LEFT. +Position for tile origin. See :ref:`TileOrigin` for possible values. Default value: ``TILE_ORIGIN_TOP_LEFT``. .. _class_TileMap_property_cell_y_sort: @@ -340,7 +340,7 @@ If ``true``, TileMap collisions will be handled as a kinematic body. If ``false` | *Getter* | get_mode() | +----------+-----------------+ -The TileMap orientation mode. Uses MODE\_\* constants. Default value: MODE_SQUARE. +The TileMap orientation mode. See :ref:`Mode` for possible values. Default value: ``MODE_SQUARE``. .. _class_TileMap_property_occluder_light_mask: @@ -419,7 +419,7 @@ Returns a :ref:`Vector2` array with the positions of all cells co - :ref:`Array` **get_used_cells_by_id** **(** :ref:`int` id **)** const -Returns an array of all cells with the given tile id. +Returns an array of all cells with the given tile ``id``. .. _class_TileMap_method_get_used_rect: @@ -431,19 +431,19 @@ Returns a rectangle enclosing the used (non-empty) tiles of the map. - :ref:`bool` **is_cell_transposed** **(** :ref:`int` x, :ref:`int` y **)** const -Returns ``true`` if the given cell is transposed, i.e. the x and y axes are swapped. +Returns ``true`` if the given cell is transposed, i.e. the X and Y axes are swapped. .. _class_TileMap_method_is_cell_x_flipped: - :ref:`bool` **is_cell_x_flipped** **(** :ref:`int` x, :ref:`int` y **)** const -Returns ``true`` if the given cell is flipped in the x axis. +Returns ``true`` if the given cell is flipped in the X axis. .. _class_TileMap_method_is_cell_y_flipped: - :ref:`bool` **is_cell_y_flipped** **(** :ref:`int` x, :ref:`int` y **)** const -Returns ``true`` if the given cell is flipped in the y axis. +Returns ``true`` if the given cell is flipped in the Y axis. .. _class_TileMap_method_map_to_world: @@ -463,7 +463,7 @@ An index of ``-1`` clears the cell. Optionally, the tile can also be flipped, transposed, or given autotile coordinates. -Note that data such as navigation polygons and collision shapes are not immediately updated for performance reasons. +**Note:** Data such as navigation polygons and collision shapes are not immediately updated for performance reasons. If you need these to be immediately updated, you can call :ref:`update_dirty_quadrants`. @@ -486,7 +486,7 @@ An index of ``-1`` clears the cell. Optionally, the tile can also be flipped or transposed. -Note that data such as navigation polygons and collision shapes are not immediately updated for performance reasons. +**Note:** Data such as navigation polygons and collision shapes are not immediately updated for performance reasons. If you need these to be immediately updated, you can call :ref:`update_dirty_quadrants`. @@ -506,13 +506,13 @@ Sets the given collision mask bit. - void **update_bitmask_area** **(** :ref:`Vector2` position **)** -Applies autotiling rules to the cell (and its adjacent cells) referenced by its grid-based x and y coordinates. +Applies autotiling rules to the cell (and its adjacent cells) referenced by its grid-based X and Y coordinates. .. _class_TileMap_method_update_bitmask_region: - void **update_bitmask_region** **(** :ref:`Vector2` start=Vector2( 0, 0 ), :ref:`Vector2` end=Vector2( 0, 0 ) **)** -Applies autotiling rules to the cells in the given region (specified by grid-based x and y coordinates). +Applies autotiling rules to the cells in the given region (specified by grid-based X and Y coordinates). Calling with invalid (or missing) parameters applies autotiling rules for the entire tilemap. diff --git a/classes/class_tileset.rst b/classes/class_tileset.rst index ac8ecc70b..c8e71a89c 100644 --- a/classes/class_tileset.rst +++ b/classes/class_tileset.rst @@ -254,7 +254,7 @@ Method Descriptions - void **autotile_clear_bitmask_map** **(** :ref:`int` id **)** -Clears all bitmask info of the autotile. +Clears all bitmask information of the autotile. .. _class_TileSet_method_autotile_get_bitmask: @@ -276,7 +276,7 @@ Returns the :ref:`BitmaskMode` of the autotile. Returns the subtile that's being used as an icon in an atlas/autotile given its coordinates. -The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask info is incomplete. It will also be used to represent it in the TileSet editor. +The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor. .. _class_TileSet_method_autotile_get_light_occluder: @@ -336,7 +336,7 @@ Sets the :ref:`BitmaskMode` of the autotile. Sets the subtile that will be used as an icon in an atlas/autotile given its coordinates. -The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask info is incomplete. It will also be used to represent it in the TileSet editor. +The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor. .. _class_TileSet_method_autotile_set_light_occluder: @@ -534,7 +534,7 @@ Returns the tile's :ref:`TileMode`. - :ref:`int` **tile_get_z_index** **(** :ref:`int` id **)** const -Returns the tile's z-index (drawing layer). +Returns the tile's Z index (drawing layer). .. _class_TileSet_method_tile_set_light_occluder: diff --git a/classes/class_timer.rst b/classes/class_timer.rst index 8560a1a4a..f352fad6d 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -71,7 +71,7 @@ enum **TimerProcessMode**: Description ----------- -Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one shot" mode. +Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one-shot" mode. Property Descriptions --------------------- @@ -134,7 +134,7 @@ Processing mode. See :ref:`TimerProcessMode`. The timer's remaining time in seconds. Returns 0 if the timer is inactive. -Note: You cannot set this value. To change the timer's remaining time, use :ref:`wait_time`. +**Note:** You cannot set this value. To change the timer's remaining time, use :ref:`wait_time`. .. _class_Timer_property_wait_time: @@ -163,7 +163,7 @@ Returns ``true`` if the timer is stopped. Starts the timer. Sets ``wait_time`` to ``time_sec`` if ``time_sec > 0``. This also resets the remaining time to ``wait_time``. -Note: this method will not resume a paused timer. See :ref:`paused`. +**Note:** this method will not resume a paused timer. See :ref:`paused`. .. _class_Timer_method_stop: diff --git a/classes/class_touchscreenbutton.rst b/classes/class_touchscreenbutton.rst index d240688af..049a99476 100644 --- a/classes/class_touchscreenbutton.rst +++ b/classes/class_touchscreenbutton.rst @@ -130,7 +130,7 @@ The button's texture for the normal state. | *Getter* | is_passby_press_enabled() | +----------+---------------------------+ -If ``true``, passby presses are enabled. +If ``true``, pass-by presses are enabled. .. _class_TouchScreenButton_property_pressed: @@ -190,7 +190,7 @@ If ``true``, the button's shape is visible. | *Getter* | get_visibility_mode() | +----------+----------------------------+ -The button's visibility mode. See ``VISIBILITY_*`` constants. +The button's visibility mode. See :ref:`VisibilityMode` for possible values. Method Descriptions ------------------- diff --git a/classes/class_transform.rst b/classes/class_transform.rst index d3b8303a4..92b3c9310 100644 --- a/classes/class_transform.rst +++ b/classes/class_transform.rst @@ -12,7 +12,7 @@ Transform Brief Description ----------------- -3D Transformation. 3x4 matrix. +3D transformation (3×4 matrix). Properties ---------- @@ -80,7 +80,7 @@ Constants Description ----------- -Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a :ref:`Basis` "basis" and an :ref:`Vector3` "origin". It is similar to a 3x4 matrix. +Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a :ref:`basis` and an :ref:`origin`. It is similar to a 3×4 matrix. Tutorials --------- diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index 46d92545b..1819b396c 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -12,7 +12,7 @@ Transform2D Brief Description ----------------- -2D Transformation. 3x2 matrix. +2D transformation (3×2 matrix). Properties ---------- @@ -82,7 +82,7 @@ Constants Description ----------- -Represents one or many transformations in 2D space such as translation, rotation, or scaling. It consists of a two :ref:`Vector2` x, y and :ref:`Vector2` "origin". It is similar to a 3x2 matrix. +Represents one or many transformations in 2D space such as translation, rotation, or scaling. It consists of two :ref:`x` and :ref:`y` :ref:`Vector2`\ s and an :ref:`origin`. It is similar to a 3×2 matrix. Property Descriptions --------------------- @@ -97,13 +97,13 @@ The transform's translation offset. - :ref:`Vector2` **x** -The X axis of 2x2 basis matrix containing 2 :ref:`Vector2`\ s as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. +The X axis of 2×2 basis matrix containing 2 :ref:`Vector2`\ s as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. .. _class_Transform2D_property_y: - :ref:`Vector2` **y** -The Y axis of 2x2 basis matrix containing 2 :ref:`Vector2`\ s as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. +The Y axis of 2×2 basis matrix containing 2 :ref:`Vector2`\ s as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. Method Descriptions ------------------- diff --git a/classes/class_translation.rst b/classes/class_translation.rst index c09b34807..4da8c094a 100644 --- a/classes/class_translation.rst +++ b/classes/class_translation.rst @@ -43,7 +43,7 @@ Methods Description ----------- -Translations are resources that can be loaded/unloaded on demand. They map a string to another string. +Translations are resources that can be loaded and unloaded on demand. They map a string to another string. Tutorials --------- diff --git a/classes/class_translationserver.rst b/classes/class_translationserver.rst index d6a705be2..5b37c2233 100644 --- a/classes/class_translationserver.rst +++ b/classes/class_translationserver.rst @@ -80,7 +80,7 @@ Returns the current locale of the game. - :ref:`String` **get_locale_name** **(** :ref:`String` locale **)** const -Returns a locale's language and its variant (e.g. "en_US" would return "English (United States)"). +Returns a locale's language and its variant (e.g. ``"en_US"`` would return ``"English (United States)"``). .. _class_TranslationServer_method_remove_translation: diff --git a/classes/class_tree.rst b/classes/class_tree.rst index 6a278369c..e7d805bcf 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -194,7 +194,7 @@ Emitted when a column's title is pressed. - **custom_popup_edited** **(** :ref:`bool` arrow_clicked **)** -Emitted when a cell with the ``CELL_MODE_CUSTOM`` is clicked to be edited. +Emitted when a cell with the :ref:`TreeItem.CELL_MODE_CUSTOM` is clicked to be edited. .. _class_Tree_signal_empty_rmb: @@ -204,7 +204,7 @@ Emitted when a cell with the ``CELL_MODE_CUSTOM`` is clicked to be edited. - **empty_tree_rmb_selected** **(** :ref:`Vector2` position **)** -Emitted when the right mouse button is pressed if RMB selection is active and the tree is empty. +Emitted when the right mouse button is pressed if right mouse button selection is active and the tree is empty. .. _class_Tree_signal_item_activated: @@ -256,7 +256,7 @@ Emitted when an item is selected. - **multi_selected** **(** :ref:`TreeItem` item, :ref:`int` column, :ref:`bool` selected **)** -Emitted instead of ``item_selected`` when ``select_mode`` is ``SELECT_MULTI``. +Emitted instead of ``item_selected`` if ``select_mode`` is :ref:`SELECT_MULTI`. .. _class_Tree_signal_nothing_selected: @@ -275,11 +275,11 @@ Enumerations enum **SelectMode**: -- **SELECT_SINGLE** = **0** --- Allow selection of a single item at a time. +- **SELECT_SINGLE** = **0** --- Allows selection of a single item at a time. - **SELECT_ROW** = **1** -- **SELECT_MULTI** = **2** --- Allow selection of multiple items at the same time. +- **SELECT_MULTI** = **2** --- Allows selection of multiple items at the same time. .. _enum_Tree_DropModeFlags: @@ -352,7 +352,7 @@ If ``true``, a right mouse button click can select items. | *Getter* | get_columns() | +----------+--------------------+ -The amount of columns. +The number of columns. .. _class_Tree_property_drop_mode_flags: @@ -364,7 +364,7 @@ The amount of columns. | *Getter* | get_drop_mode_flags() | +----------+----------------------------+ -The drop mode as an OR combination of flags. See ``DROP_MODE_*`` constants. Once dropping is done, reverts to ``DROP_MODE_DISABLED``. Setting this during :ref:`Control.can_drop_data` is recommended. +The drop mode as an OR combination of flags. See ``DROP_MODE_*`` constants. Once dropping is done, reverts to :ref:`DROP_MODE_DISABLED`. Setting this during :ref:`Control.can_drop_data` is recommended. .. _class_Tree_property_hide_folding: @@ -400,7 +400,7 @@ If ``true``, the tree's root is hidden. | *Getter* | get_select_mode() | +----------+------------------------+ -Allow single or multiple selection. See the ``SELECT_*`` constants. +Allows single or multiple selection. See the ``SELECT_*`` constants. Method Descriptions ------------------- @@ -421,7 +421,7 @@ Clears the tree. This removes all items. - :ref:`TreeItem` **create_item** **(** :ref:`Object` parent=null, :ref:`int` idx=-1 **)** -Create an item in the tree and add it as the last child of ``parent``. If parent is not given, it will be added as the root's last child, or it'll the be the root itself if the tree is empty. +Create an item in the tree and add it as the last child of ``parent``. If ``parent`` is ``null``, it will be added as the root's last child, or it'll be the the root itself if the tree is empty. .. _class_Tree_method_ensure_cursor_is_visible: @@ -457,9 +457,9 @@ Returns the rectangle for custom popups. Helper to create custom cell controls t - :ref:`int` **get_drop_section_at_position** **(** :ref:`Vector2` position **)** const -If :ref:`drop_mode_flags` includes ``DROP_MODE_INBETWEEN``, returns -1 if ``position`` is the upper part of a tree item at that position, 1 for the lower part, and additionally 0 for the middle part if :ref:`drop_mode_flags` includes ``DROP_MODE_ON_ITEM``. +If :ref:`drop_mode_flags` includes :ref:`DROP_MODE_INBETWEEN`, returns -1 if ``position`` is the upper part of a tree item at that position, 1 for the lower part, and additionally 0 for the middle part if :ref:`drop_mode_flags` includes :ref:`DROP_MODE_ON_ITEM`. -Otherwise, returns 0. If there are no tree item at ``position``, returns -100. +Otherwise, returns 0. If there are no tree items at ``position``, returns -100. .. _class_Tree_method_get_edited: @@ -531,13 +531,13 @@ If ``true``, the column will have the "Expand" flag of :ref:`Control` column, :ref:`int` min_width **)** -Set the minimum width of a column. +Sets the minimum width of a column. .. _class_Tree_method_set_column_title: - void **set_column_title** **(** :ref:`int` column, :ref:`String` title **)** -Set the title of a column. +Sets the title of a column. .. _class_Tree_method_set_column_titles_visible: diff --git a/classes/class_treeitem.rst b/classes/class_treeitem.rst index ce24e3600..034271e1d 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -276,7 +276,7 @@ Returns the number of buttons in column ``column``. May be used to get the most - :ref:`TreeCellMode` **get_cell_mode** **(** :ref:`int` column **)** const -Returns the column's cell mode. See ``CELL_MODE_*`` constants. +Returns the column's cell mode. .. _class_TreeItem_method_get_children: @@ -534,7 +534,7 @@ If ``true``, the given column is selectable. - void **set_text_align** **(** :ref:`int` column, :ref:`TextAlign` text_align **)** -Sets the given column's text alignment. See ``ALIGN_*`` constants. +Sets the given column's text alignment. See :ref:`TextAlign` for possible values. .. _class_TreeItem_method_set_tooltip: diff --git a/classes/class_tween.rst b/classes/class_tween.rst index 38106c6b0..76b5c9ead 100644 --- a/classes/class_tween.rst +++ b/classes/class_tween.rst @@ -189,7 +189,7 @@ enum **EaseType**: Description ----------- -Tweens are useful for animations requiring a numerical property to be interpolated over a range of values. The name \*tween\* comes from \*in-betweening\*, an animation technique where you specify \*keyframes\* and the computer interpolates the frames that appear between them. +Tweens are useful for animations requiring a numerical property to be interpolated over a range of values. The name *tween* comes from *in-betweening*, an animation technique where you specify *keyframes* and the computer interpolates the frames that appear between them. Here is a brief usage example that causes a 2D node to move smoothly between two positions: @@ -201,9 +201,9 @@ Here is a brief usage example that causes a 2D node to move smoothly between two Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) tween.start() -Many methods require a property name, such as "position" above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using "property:component" (eg. ``position:x``), where it would only apply to that particular component. +Many methods require a property name, such as ``"position"`` above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using ``"property:component"`` (eg. ``position:x``), where it would only apply to that particular component. -Many of the methods accept ``trans_type`` and ``ease_type``. The first accepts an :ref:`TransitionType` constant, and refers to the way the timing of the animation is handled (see ``http://easings.net/`` for some examples). The second accepts an :ref:`EaseType` constant, and controls the where ``trans_type`` is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different :ref:`TransitionType` constants with ``EASE_IN_OUT``, and use the one that looks best. +Many of the methods accept ``trans_type`` and ``ease_type``. The first accepts an :ref:`TransitionType` constant, and refers to the way the timing of the animation is handled (see ``http://easings.net/`` for some examples). The second accepts an :ref:`EaseType` constant, and controls the where ``trans_type`` is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different :ref:`TransitionType` constants with :ref:`EASE_IN_OUT`, and use the one that looks best. Property Descriptions --------------------- @@ -253,7 +253,7 @@ Method Descriptions Follows ``method`` of ``object`` and applies the returned value on ``target_method`` of ``target``, beginning from ``initial_val`` for ``duration`` seconds, ``delay`` later. Methods are called with consecutive values. -Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information +Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information. .. _class_Tween_method_follow_property: @@ -261,7 +261,7 @@ Use :ref:`TransitionType` for ``trans_type`` and :ref Follows ``property`` of ``object`` and applies it on ``target_property`` of ``target``, beginning from ``initial_val`` for ``duration`` seconds, ``delay`` seconds later. -Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information +Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information. .. _class_Tween_method_get_runtime: @@ -287,7 +287,7 @@ Calls ``callback`` of ``object`` after ``duration`` on the main thread (similar Animates ``method`` of ``object`` from ``initial_val`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. Methods are called with consecutive values. -Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information +Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information. .. _class_Tween_method_interpolate_property: @@ -295,13 +295,15 @@ Use :ref:`TransitionType` for ``trans_type`` and :ref Animates ``property`` of ``object`` from ``initial_val`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. Setting the initial value to ``null`` uses the current value of the property. -Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information +Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information. .. _class_Tween_method_is_active: - :ref:`bool` **is_active** **(** **)** const -Returns ``true`` if any tweens are currently running. Note that this method doesn't consider tweens that have ended. +Returns ``true`` if any tweens are currently running. + +**Note:** This method doesn't consider tweens that have ended. .. _class_Tween_method_remove: @@ -375,7 +377,7 @@ Stops animating all tweens. Animates ``method`` of ``object`` from the value returned by ``initial_method`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. Methods are animated by calling them with consecutive values. -Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information +Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information. .. _class_Tween_method_targeting_property: @@ -383,7 +385,7 @@ Use :ref:`TransitionType` for ``trans_type`` and :ref Animates ``property`` of ``object`` from the current value of the ``initial_val`` property of ``initial`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. -Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information +Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information. .. _class_Tween_method_tell: diff --git a/classes/class_undoredo.rst b/classes/class_undoredo.rst index d94af3e53..365448cf7 100644 --- a/classes/class_undoredo.rst +++ b/classes/class_undoredo.rst @@ -14,7 +14,7 @@ UndoRedo Brief Description ----------------- -Helper to manage UndoRedo in the editor or custom tools. +Helper to manage undo/redo operations in the editor or custom tools. Methods ------- @@ -42,6 +42,10 @@ Methods +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_version` **(** **)** const | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_redo` **(** **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_undo` **(** **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_commiting_action` **(** **)** const | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`redo` **(** **)** | @@ -49,6 +53,15 @@ Methods | :ref:`bool` | :ref:`undo` **(** **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +Signals +------- + +.. _class_UndoRedo_signal_version_changed: + +- **version_changed** **(** **)** + +Called when :ref:`undo` or :ref:`redo` was called. + Enumerations ------------ @@ -62,20 +75,20 @@ Enumerations enum **MergeMode**: -- **MERGE_DISABLE** = **0** --- Makes ``do``/``undo`` operations stay in separate actions. +- **MERGE_DISABLE** = **0** --- Makes "do"/"undo" operations stay in separate actions. -- **MERGE_ENDS** = **1** --- Makes so that the action's ``do`` operation is from the first action created and the ``undo`` operation is from the last subsequent action with the same name. +- **MERGE_ENDS** = **1** --- Makes so that the action's "do" operation is from the first action created and the "undo" operation is from the last subsequent action with the same name. - **MERGE_ALL** = **2** --- Makes subsequent actions with the same name be merged into one. Description ----------- -Helper to manage UndoRedo in the editor or custom tools. It works by registering methods and property changes inside 'actions'. +Helper to manage undo/redo operations in the editor or custom tools. It works by registering methods and property changes inside "actions". Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action. -Here's an example on how to add an action to Godot editor's own 'undoredo': +Here's an example on how to add an action to the Godot editor's own ``UndoRedo``, from a plugin: :: @@ -98,7 +111,7 @@ Here's an example on how to add an action to Godot editor's own 'undoredo': :ref:`create_action`, :ref:`add_do_method`, :ref:`add_undo_method`, :ref:`add_do_property`, :ref:`add_undo_property`, and :ref:`commit_action` should be called one after the other, like in the example. Not doing so could lead to crashes. -If you don't need to register a method you can leave :ref:`add_do_method` and :ref:`add_undo_method` out, and so it goes for properties. You can register more than one method/property. +If you don't need to register a method, you can leave :ref:`add_do_method` and :ref:`add_undo_method` out; the same goes for properties. You can also register more than one method/property. Method Descriptions ------------------- @@ -113,13 +126,13 @@ Register a method that will be called when the action is committed. - void **add_do_property** **(** :ref:`Object` object, :ref:`String` property, :ref:`Variant` value **)** -Register a property value change for 'do'. +Register a property value change for "do". .. _class_UndoRedo_method_add_do_reference: - void **add_do_reference** **(** :ref:`Object` object **)** -Register a reference for 'do' that will be erased if the 'do' history is lost. This is useful mostly for new nodes created for the 'do' call. Do not use for resources. +Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources. .. _class_UndoRedo_method_add_undo_method: @@ -131,13 +144,13 @@ Register a method that will be called when the action is undone. - void **add_undo_property** **(** :ref:`Object` object, :ref:`String` property, :ref:`Variant` value **)** -Register a property value change for 'undo'. +Register a property value change for "undo". .. _class_UndoRedo_method_add_undo_reference: - void **add_undo_reference** **(** :ref:`Object` object **)** -Register a reference for 'undo' that will be erased if the 'undo' history is lost. This is useful mostly for nodes removed with the 'do' call (not the 'undo' call!). +Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!). .. _class_UndoRedo_method_clear_history: @@ -151,7 +164,7 @@ Passing ``false`` to ``increase_version`` will prevent the version number to be - void **commit_action** **(** **)** -Commit the action. All 'do' methods/properties are called/set when this function is called. +Commit the action. All "do" methods/properties are called/set when this function is called. .. _class_UndoRedo_method_create_action: @@ -165,29 +178,43 @@ The way actions are merged is dictated by the ``merge_mode`` argument. See :ref: - :ref:`String` **get_current_action_name** **(** **)** const -Get the name of the current action. +Gets the name of the current action. .. _class_UndoRedo_method_get_version: - :ref:`int` **get_version** **(** **)** const -Get the version, each time a new action is committed, the version number of the UndoRedo is increased automatically. +Gets the version. Every time a new action is committed, the ``UndoRedo``'s version number is increased automatically. This is useful mostly to check if something changed from a saved version. +.. _class_UndoRedo_method_has_redo: + +- :ref:`bool` **has_redo** **(** **)** + +Returns ``true`` if a "redo" action is available. + +.. _class_UndoRedo_method_has_undo: + +- :ref:`bool` **has_undo** **(** **)** + +Returns ``true`` if an "undo" action is available. + .. _class_UndoRedo_method_is_commiting_action: - :ref:`bool` **is_commiting_action** **(** **)** const +Returns ``true`` if the ``UndoRedo`` is currently committing the action, i.e. running its "do" method or property change (see :ref:`commit_action`). + .. _class_UndoRedo_method_redo: - :ref:`bool` **redo** **(** **)** -Redo last action. +Redo the last action. .. _class_UndoRedo_method_undo: - :ref:`bool` **undo** **(** **)** -Undo last action. +Undo the last action. diff --git a/classes/class_upnp.rst b/classes/class_upnp.rst index 1280e30da..a979ac8b3 100644 --- a/classes/class_upnp.rst +++ b/classes/class_upnp.rst @@ -143,7 +143,7 @@ enum **UPNPResult**: - **UPNP_RESULT_NO_PORT_MAPS_AVAILABLE** = **11** --- No port maps are available. May also be returned if port mapping functionality is not available. -- **UPNP_RESULT_CONFLICT_WITH_OTHER_MECHANISM** = **12** --- Conflict with other mechanism. May be returned instead of ``UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING`` if a port mapping conflicts with an existing one. +- **UPNP_RESULT_CONFLICT_WITH_OTHER_MECHANISM** = **12** --- Conflict with other mechanism. May be returned instead of :ref:`UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING` if a port mapping conflicts with an existing one. - **UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING** = **13** --- Conflict with an existing port mapping. @@ -182,6 +182,21 @@ Description Provides UPNP functionality to discover :ref:`UPNPDevice`\ s on the local network and execute commands on them, like managing port mappings (port forwarding) and querying the local and remote network IP address. Note that methods on this class are synchronous and block the calling thread. +To forward a specific port: + +:: + + const PORT = 7777 + var upnp = UPNP.new() + upnp.discover(2000, 2, "InternetGatewayDevice") + upnp.add_port_mapping(port) + +To close a specific port (e.g. after you have finished using it): + +:: + + upnp.delete_port_mapping(port) + Property Descriptions --------------------- diff --git a/classes/class_variant.rst b/classes/class_variant.rst index bf7b7b1d1..b6a8d0457 100644 --- a/classes/class_variant.rst +++ b/classes/class_variant.rst @@ -17,5 +17,5 @@ The most important data type in Godot. Description ----------- -A Variant takes up only 20 bytes and can store almost any engine datatype inside of it. Variants are rarely used to hold information for long periods of time, instead they are used mainly for communication, editing, serialization and moving data around. +A Variant takes up only 20 bytes and can store almost any engine datatype inside of it. Variants are rarely used to hold information for long periods of time. Instead, they are used mainly for communication, editing, serialization and moving data around. diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index 3eb294e50..a8b60a001 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -136,13 +136,13 @@ Property Descriptions - :ref:`float` **x** -The vector's x component. Also accessible by using the index position ``[0]``. +The vector's X component. Also accessible by using the index position ``[0]``. .. _class_Vector2_property_y: - :ref:`float` **y** -The vector's y component. Also accessible by using the index position ``[1]``. +The vector's Y component. Also accessible by using the index position ``[1]``. Method Descriptions ------------------- @@ -151,7 +151,7 @@ Method Descriptions - :ref:`Vector2` **Vector2** **(** :ref:`float` x, :ref:`float` y **)** -Constructs a new Vector2 from the given x and y. +Constructs a new Vector2 from the given ``x`` and ``y``. .. _class_Vector2_method_abs: @@ -163,9 +163,9 @@ Returns a new vector with all components in absolute values (i.e. positive). - :ref:`float` **angle** **(** **)** -Returns the vector's angle in radians with respect to the x-axis, or ``(1, 0)`` vector. +Returns the vector's angle in radians with respect to the X axis, or ``(1, 0)`` vector. -Equivalent to the result of atan2 when called with the vector's x and y as parameters: ``atan2(x, y)``. +Equivalent to the result of :ref:`@GDScript.atan2` when called with the vector's :ref:`x` and :ref:`y` as parameters: ``atan2(x, y)``. .. _class_Vector2_method_angle_to: @@ -177,13 +177,13 @@ Returns the angle in radians between the two vectors. - :ref:`float` **angle_to_point** **(** :ref:`Vector2` to **)** -Returns the angle in radians between the line connecting the two points and the x coordinate. +Returns the angle in radians between the line connecting the two points and the X coordinate. .. _class_Vector2_method_aspect: - :ref:`float` **aspect** **(** **)** -Returns the ratio of x to y. +Returns the ratio of :ref:`x` to :ref:`y`. .. _class_Vector2_method_bounce: @@ -207,13 +207,13 @@ Returns the vector with a maximum length. - :ref:`float` **cross** **(** :ref:`Vector2` with **)** -Returns the 2 dimensional analog of the cross product with the given vector. +Returns the 2-dimensional analog of the cross product with the given vector. .. _class_Vector2_method_cubic_interpolate: - :ref:`Vector2` **cubic_interpolate** **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` t **)** -Cubicly interpolates between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``t``. ``t`` is in the range of ``0.0 - 1.0``, representing the amount of interpolation. +Cubically interpolates between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``t``. ``t`` is in the range of ``0.0 - 1.0``, representing the amount of interpolation. .. _class_Vector2_method_direction_to: @@ -309,9 +309,9 @@ Returns the vector with all components rounded to the nearest integer, with half - :ref:`Vector2` **slerp** **(** :ref:`Vector2` b, :ref:`float` t **)** -Returns the result of SLERP between this vector and ``b``, by amount ``t``. ``t`` is in the range of ``0.0 - 1.0``, representing the amount of interpolation. +Returns the result of spherical linear interpolation between this vector and ``b``, by amount ``t``. ``t`` is in the range of ``0.0 - 1.0``, representing the amount of interpolation. -Both vectors need to be normalized. +**Note:** Both vectors must be normalized. .. _class_Vector2_method_slide: diff --git a/classes/class_vector3.rst b/classes/class_vector3.rst index cb8db3733..bf2466ab5 100644 --- a/classes/class_vector3.rst +++ b/classes/class_vector3.rst @@ -158,19 +158,19 @@ Property Descriptions - :ref:`float` **x** -The vector's x component. Also accessible by using the index position ``[0]``. +The vector's X component. Also accessible by using the index position ``[0]``. .. _class_Vector3_property_y: - :ref:`float` **y** -The vector's y component. Also accessible by using the index position ``[1]``. +The vector's Y component. Also accessible by using the index position ``[1]``. .. _class_Vector3_property_z: - :ref:`float` **z** -The vector's z component. Also accessible by using the index position ``[2]``. +The vector's Z component. Also accessible by using the index position ``[2]``. Method Descriptions ------------------- @@ -335,9 +335,9 @@ Returns the vector with all components rounded to the nearest integer, with half - :ref:`Vector3` **slerp** **(** :ref:`Vector3` b, :ref:`float` t **)** -Returns the result of SLERP between this vector and ``b``, by amount ``t``. ``t`` is in the range of ``0.0 - 1.0``, representing the amount of interpolation. +Returns the result of spherical linear interpolation between this vector and ``b``, by amount ``t``. ``t`` is in the range of ``0.0 - 1.0``, representing the amount of interpolation. -Both vectors need to be normalized. +**Note:** Both vectors must be normalized. .. _class_Vector3_method_slide: @@ -349,7 +349,7 @@ Returns the component of the vector along a plane defined by the given normal. - :ref:`Vector3` **snapped** **(** :ref:`Vector3` by **)** -Returns a copy of the vector, snapped to the lowest neared multiple. +Returns a copy of the vector snapped to the lowest neared multiple. .. _class_Vector3_method_to_diagonal_matrix: diff --git a/classes/class_vehiclebody.rst b/classes/class_vehiclebody.rst index 84b3e2a5b..6d18d866a 100644 --- a/classes/class_vehiclebody.rst +++ b/classes/class_vehiclebody.rst @@ -14,7 +14,7 @@ VehicleBody Brief Description ----------------- -Physics body that simulates the behaviour of a car. +Physics body that simulates the behavior of a car. Properties ---------- @@ -30,9 +30,9 @@ Properties Description ----------- -This nodes implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. You will need to add a :ref:`CollisionShape` for the main body of your vehicle and add :ref:`VehicleWheel` nodes for the wheels. You should also add a :ref:`MeshInstance` to this node for the 3D model of your car but this model should not include meshes for the wheels. You should control the vehicle by using the :ref:`brake`, :ref:`engine_force`, and :ref:`steering` properties and not change the position or orientation of this node directly. +This node implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. You will need to add a :ref:`CollisionShape` for the main body of your vehicle and add :ref:`VehicleWheel` nodes for the wheels. You should also add a :ref:`MeshInstance` to this node for the 3D model of your car but this model should not include meshes for the wheels. You should control the vehicle by using the :ref:`brake`, :ref:`engine_force`, and :ref:`steering` properties and not change the position or orientation of this node directly. -Note that the origin point of your VehicleBody will determine the center of gravity of your vehicle so it is better to keep this low and move the :ref:`CollisionShape` and :ref:`MeshInstance` upwards. +**Note:** The origin point of your VehicleBody will determine the center of gravity of your vehicle so it is better to keep this low and move the :ref:`CollisionShape` and :ref:`MeshInstance` upwards. Property Descriptions --------------------- @@ -59,7 +59,9 @@ Slows down the vehicle by applying a braking force. The vehicle is only slowed d | *Getter* | get_engine_force() | +----------+-------------------------+ -Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have :ref:`VehicleWheel.use_as_traction` set to ``true`` and are in contact with a surface. The :ref:`RigidBody.mass` of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. Note that the simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. +Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have :ref:`VehicleWheel.use_as_traction` set to ``true`` and are in contact with a surface. The :ref:`RigidBody.mass` of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. + +**Note:** The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. A negative value will result in the vehicle reversing. diff --git a/classes/class_vehiclewheel.rst b/classes/class_vehiclewheel.rst index ece739060..718f2389f 100644 --- a/classes/class_vehiclewheel.rst +++ b/classes/class_vehiclewheel.rst @@ -14,7 +14,7 @@ VehicleWheel Brief Description ----------------- -Physics object that simulates the behaviour of a wheel. +Physics object that simulates the behavior of a wheel. Properties ---------- @@ -57,7 +57,7 @@ Methods Description ----------- -This node needs to be used as a child node of :ref:`VehicleBody` and simulates the behaviour of one of its wheels. This node also acts as a collider to detect if the wheel is touching a surface. +This node needs to be used as a child node of :ref:`VehicleBody` and simulates the behavior of one of its wheels. This node also acts as a collider to detect if the wheel is touching a surface. Property Descriptions --------------------- @@ -84,7 +84,7 @@ The damping applied to the spring when the spring is being compressed. This valu | *Getter* | get_damping_relaxation() | +----------+-------------------------------+ -The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the :ref:`damping_compression` property. For a :ref:`damping_compression` value of 0.3, try a relaxation value of 0.5 +The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the :ref:`damping_compression` property. For a :ref:`damping_compression` value of 0.3, try a relaxation value of 0.5. .. _class_VehicleWheel_property_suspension_max_force: @@ -96,7 +96,7 @@ The damping applied to the spring when relaxing. This value should be between 0. | *Getter* | get_suspension_max_force() | +----------+---------------------------------+ -The maximum force the spring can resist. This value should be higher than a quarter of the :ref:`RigidBody.mass` of the :ref:`VehicleBody` or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3x to 4x this number. +The maximum force the spring can resist. This value should be higher than a quarter of the :ref:`RigidBody.mass` of the :ref:`VehicleBody` or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number. .. _class_VehicleWheel_property_suspension_stiffness: @@ -120,7 +120,7 @@ This value defines the stiffness of the suspension. Use a value lower than 50 fo | *Getter* | get_suspension_travel() | +----------+------------------------------+ -This is the distance the suspension can travel. As Godot measures are in meters keep this setting relatively low. Try a value between 0.1 and 0.3 depending on the type of car . +This is the distance the suspension can travel. As Godot units are equivalent to meters, keep this setting relatively low. Try a value between 0.1 and 0.3 depending on the type of car. .. _class_VehicleWheel_property_use_as_steering: @@ -132,7 +132,7 @@ This is the distance the suspension can travel. As Godot measures are in meters | *Getter* | is_used_as_steering() | +----------+----------------------------+ -If ``true`` this wheel will be turned when the car steers. +If ``true``, this wheel will be turned when the car steers. .. _class_VehicleWheel_property_use_as_traction: @@ -144,7 +144,7 @@ If ``true`` this wheel will be turned when the car steers. | *Getter* | is_used_as_traction() | +----------+----------------------------+ -If ``true`` this wheel transfers engine force to the ground to propel the vehicle forward. +If ``true``, this wheel transfers engine force to the ground to propel the vehicle forward. .. _class_VehicleWheel_property_wheel_friction_slip: @@ -194,7 +194,7 @@ This is the distance in meters the wheel is lowered from its origin point. Don't | *Getter* | get_roll_influence() | +----------+---------------------------+ -This value effects the roll of your vehicle. If set to 0.0 for all wheels your vehicle will be prone to rolling over while a value of 1.0 will resist body roll. +This value affects the roll of your vehicle. If set to 0.0 for all wheels, your vehicle will be prone to rolling over, while a value of 1.0 will resist body roll. Method Descriptions ------------------- diff --git a/classes/class_videoplayer.rst b/classes/class_videoplayer.rst index 2a67f1f48..3611edd6e 100644 --- a/classes/class_videoplayer.rst +++ b/classes/class_videoplayer.rst @@ -68,7 +68,7 @@ Emitted when playback is finished. Description ----------- -Control node for playing video streams. Supported formats are WebM and OGV Theora. +Control node for playing video streams. Supported formats are `WebM `_ and `Ogg Theora `_. Property Descriptions --------------------- diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index cd811b9f4..130890818 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -160,7 +160,7 @@ enum **UpdateMode**: - **UPDATE_DISABLED** = **0** --- Do not update the render target. -- **UPDATE_ONCE** = **1** --- Update the render target once, then switch to ``UPDATE_DISABLED``. +- **UPDATE_ONCE** = **1** --- Update the render target once, then switch to :ref:`UPDATE_DISABLED`. - **UPDATE_WHEN_VISIBLE** = **2** --- Update the render target only when it is visible. This is the default value. @@ -200,7 +200,7 @@ enum **ShadowAtlasQuadrantSubdiv**: - **SHADOW_ATLAS_QUADRANT_SUBDIV_1024** = **6** -- **SHADOW_ATLAS_QUADRANT_SUBDIV_MAX** = **7** --- Enum limiter. Do not use it directly. +- **SHADOW_ATLAS_QUADRANT_SUBDIV_MAX** = **7** --- Represents the size of the :ref:`ShadowAtlasQuadrantSubdiv` enum. .. _enum_Viewport_RenderInfo: @@ -232,7 +232,7 @@ enum **RenderInfo**: - **RENDER_INFO_DRAW_CALLS_IN_FRAME** = **5** --- Amount of draw calls in frame. -- **RENDER_INFO_MAX** = **6** --- Enum limiter. Do not use it directly. +- **RENDER_INFO_MAX** = **6** --- Represents the size of the :ref:`RenderInfo` enum. .. _enum_Viewport_DebugDraw: @@ -312,7 +312,7 @@ enum **ClearMode**: - **CLEAR_MODE_NEVER** = **1** --- Never clear the render target. -- **CLEAR_MODE_ONLY_NEXT_FRAME** = **2** --- Clear the render target next frame, then switch to ``CLEAR_MODE_NEVER``. +- **CLEAR_MODE_ONLY_NEXT_FRAME** = **2** --- Clear the render target next frame, then switch to :ref:`CLEAR_MODE_NEVER`. Description ----------- @@ -397,7 +397,7 @@ The canvas transform of the viewport, useful for changing the on-screen position | *Getter* | get_debug_draw() | +----------+-----------------------+ -The overlay mode for test rendered geometry in debug purposes. Default value: ``DEBUG_DRAW_DISABLED``. +The overlay mode for test rendered geometry in debug purposes. Default value: :ref:`DEBUG_DRAW_DISABLED`. .. _class_Viewport_property_disable_3d: @@ -491,7 +491,7 @@ If ``true``, the result after 3D rendering will not have a linear to sRGB color | *Getter* | get_msaa() | +----------+-----------------+ -The multisample anti-aliasing mode. Default value: ``MSAA_DISABLED``. +The multisample anti-aliasing mode. Default value: :ref:`MSAA_DISABLED`. .. _class_Viewport_property_own_world: @@ -539,7 +539,7 @@ If ``true``, renders the Viewport directly to the screen instead of to the root | *Getter* | get_clear_mode() | +----------+-----------------------+ -The clear mode when viewport used as a render target. Default value: ``CLEAR_MODE_ALWAYS``. +The clear mode when viewport used as a render target. Default value: :ref:`CLEAR_MODE_ALWAYS`. .. _class_Viewport_property_render_target_update_mode: @@ -551,7 +551,7 @@ The clear mode when viewport used as a render target. Default value: ``CLEAR_MOD | *Getter* | get_update_mode() | +----------+------------------------+ -The update mode when viewport used as a render target. Default value: ``UPDATE_WHEN_VISIBLE``. +The update mode when viewport used as a render target. Default value: :ref:`UPDATE_WHEN_VISIBLE`. .. _class_Viewport_property_render_target_v_flip: @@ -740,7 +740,9 @@ Returns the size override set with :ref:`set_size_override` **get_texture** **(** **)** const -Returns the viewport's texture. Note that due to the way OpenGL works, the resulting :ref:`ViewportTexture` is flipped vertically. You can use :ref:`Image.flip_y` on the result of :ref:`Texture.get_data` to flip it back, for example: +Returns the viewport's texture. + +**Note:** Due to the way OpenGL works, the resulting :ref:`ViewportTexture` is flipped vertically. You can use :ref:`Image.flip_y` on the result of :ref:`Texture.get_data` to flip it back, for example: :: diff --git a/classes/class_viewportcontainer.rst b/classes/class_viewportcontainer.rst index c7320b5b6..e722e3e81 100644 --- a/classes/class_viewportcontainer.rst +++ b/classes/class_viewportcontainer.rst @@ -43,7 +43,7 @@ Property Descriptions | *Getter* | is_stretch_enabled() | +----------+----------------------+ -If ``true``, the viewport will be scaled to the control's size. Default value:``false``. +If ``true``, the viewport will be scaled to the control's size. Default value: ``false``. .. _class_ViewportContainer_property_stretch_shrink: diff --git a/classes/class_visibilityenabler.rst b/classes/class_visibilityenabler.rst index a6d365bbb..fb16972ed 100644 --- a/classes/class_visibilityenabler.rst +++ b/classes/class_visibilityenabler.rst @@ -14,7 +14,7 @@ VisibilityEnabler Brief Description ----------------- -Enable certain nodes only when visible. +Enables certain nodes only when visible. Properties ---------- @@ -42,7 +42,7 @@ enum **Enabler**: - **ENABLER_FREEZE_BODIES** = **1** --- This enabler will freeze :ref:`RigidBody` nodes. -- **ENABLER_MAX** = **2** +- **ENABLER_MAX** = **2** --- Represents the size of the :ref:`Enabler` enum. Description ----------- diff --git a/classes/class_visibilityenabler2d.rst b/classes/class_visibilityenabler2d.rst index 4bb0b351c..570c3d1ca 100644 --- a/classes/class_visibilityenabler2d.rst +++ b/classes/class_visibilityenabler2d.rst @@ -14,7 +14,7 @@ VisibilityEnabler2D Brief Description ----------------- -Enable certain nodes only when visible. +Enables certain nodes only when visible. Properties ---------- @@ -66,7 +66,7 @@ enum **Enabler**: - **ENABLER_PAUSE_ANIMATED_SPRITES** = **5** -- **ENABLER_MAX** = **6** +- **ENABLER_MAX** = **6** --- Represents the size of the :ref:`Enabler` enum. Description ----------- diff --git a/classes/class_visibilitynotifier.rst b/classes/class_visibilitynotifier.rst index c4579c5c1..f22dbdfcf 100644 --- a/classes/class_visibilitynotifier.rst +++ b/classes/class_visibilitynotifier.rst @@ -88,5 +88,5 @@ Method Descriptions If ``true``, the bounding box is on the screen. -Note: It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return ``false`` right after it is instantiated, even if it will be on screen in the draw pass. +**Note:** It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return ``false`` right after it is instantiated, even if it will be on screen in the draw pass. diff --git a/classes/class_visibilitynotifier2d.rst b/classes/class_visibilitynotifier2d.rst index cabac18d2..8d7615e50 100644 --- a/classes/class_visibilitynotifier2d.rst +++ b/classes/class_visibilitynotifier2d.rst @@ -88,5 +88,5 @@ Method Descriptions If ``true``, the bounding rectangle is on the screen. -Note: It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return ``false`` right after it is instantiated, even if it will be on screen in the draw pass. +**Note:** It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return ``false`` right after it is instantiated, even if it will be on screen in the draw pass. diff --git a/classes/class_visualinstance.rst b/classes/class_visualinstance.rst index 0e3f1f368..9c9331b16 100644 --- a/classes/class_visualinstance.rst +++ b/classes/class_visualinstance.rst @@ -96,7 +96,7 @@ Transformed in this case means the :ref:`AABB` plus the position, ro Sets the base of the VisualInstance, which changes how the engine handles the VisualInstance under the hood. -It is recommended to only use set_base if you know what you're doing. +It is recommended to only use :ref:`set_base` if you know what you're doing. .. _class_VisualInstance_method_set_layer_mask_bit: diff --git a/classes/class_visualscript.rst b/classes/class_visualscript.rst index 90a358f1c..37f0f5d8d 100644 --- a/classes/class_visualscript.rst +++ b/classes/class_visualscript.rst @@ -255,7 +255,7 @@ Returns whether a variable is exported. - :ref:`Dictionary` **get_variable_info** **(** :ref:`String` name **)** const -Returns the info for a given variable as a dictionary. The information includes its name, type, hint and usage. +Returns the information for a given variable as a dictionary. The information includes its name, type, hint and usage. .. _class_VisualScript_method_has_custom_signal: diff --git a/classes/class_visualscriptbuiltinfunc.rst b/classes/class_visualscriptbuiltinfunc.rst index 8e8f0aba0..258dcea92 100644 --- a/classes/class_visualscriptbuiltinfunc.rst +++ b/classes/class_visualscriptbuiltinfunc.rst @@ -222,7 +222,7 @@ enum **BuiltinFunc**: - **MATH_MOVE_TOWARD** = **29** --- Moves the number toward a value, based on the third input. -- **MATH_DECTIME** = **30** --- Return the result of 'value' decreased by 'step' \* 'amount'. +- **MATH_DECTIME** = **30** --- Return the result of ``value`` decreased by ``step`` \* ``amount``. - **MATH_RANDOMIZE** = **31** --- Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time. @@ -244,9 +244,9 @@ enum **BuiltinFunc**: - **MATH_DB2LINEAR** = **40** --- Convert the input from decibel volume to linear volume. -- **MATH_POLAR2CARTESIAN** = **41** --- Converts a 2D point expressed in the polar coordinate system (a distance from the origin ``r`` and an angle ``th``) to the cartesian coordinate system (x and y axis). +- **MATH_POLAR2CARTESIAN** = **41** --- Converts a 2D point expressed in the polar coordinate system (a distance from the origin ``r`` and an angle ``th``) to the cartesian coordinate system (X and Y axis). -- **MATH_CARTESIAN2POLAR** = **42** --- Converts a 2D point expressed in the cartesian coordinate system (x and y axis) to the polar coordinate system (a distance from the origin and an angle). +- **MATH_CARTESIAN2POLAR** = **42** --- Converts a 2D point expressed in the cartesian coordinate system (X and Y axis) to the polar coordinate system (a distance from the origin and an angle). - **MATH_WRAP** = **43** @@ -282,22 +282,24 @@ enum **BuiltinFunc**: - **VAR_TO_STR** = **59** --- Serialize a :ref:`Variant` to a string. -- **STR_TO_VAR** = **60** --- Deserialize a :ref:`Variant` from a string serialized using ``VAR_TO_STR``. +- **STR_TO_VAR** = **60** --- Deserialize a :ref:`Variant` from a string serialized using :ref:`VAR_TO_STR`. - **VAR_TO_BYTES** = **61** --- Serialize a :ref:`Variant` to a :ref:`PoolByteArray`. -- **BYTES_TO_VAR** = **62** --- Deserialize a :ref:`Variant` from a :ref:`PoolByteArray` serialized using ``VAR_TO_BYTES``. +- **BYTES_TO_VAR** = **62** --- Deserialize a :ref:`Variant` from a :ref:`PoolByteArray` serialized using :ref:`VAR_TO_BYTES`. -- **COLORN** = **63** --- Return the :ref:`Color` with the given name and alpha ranging from 0 to 1. Note: names are defined in color_names.inc. +- **COLORN** = **63** --- Return the :ref:`Color` with the given name and alpha ranging from 0 to 1 -- **MATH_SMOOTHSTEP** = **64** --- Return a number smoothly interpolated between the first two inputs, based on the third input. Similar to ``MATH_LERP``, but interpolates faster at the beginning and slower at the end. Using Hermite interpolation formula: +**Note:** Names are defined in ``color_names.inc``. + +- **MATH_SMOOTHSTEP** = **64** --- Return a number smoothly interpolated between the first two inputs, based on the third input. Similar to :ref:`MATH_LERP`, but interpolates faster at the beginning and slower at the end. Using Hermite interpolation formula: :: var t = clamp((weight - from) / (to - from), 0.0, 1.0) return t * t * (3.0 - 2.0 * t) -- **FUNC_MAX** = **65** --- The maximum value the :ref:`function` property can have. +- **FUNC_MAX** = **65** --- Represents the size of the :ref:`BuiltinFunc` enum. Description ----------- diff --git a/classes/class_visualscriptcustomnode.rst b/classes/class_visualscriptcustomnode.rst index 518ba0dac..6c34fb0cc 100644 --- a/classes/class_visualscriptcustomnode.rst +++ b/classes/class_visualscriptcustomnode.rst @@ -131,7 +131,7 @@ Return the specified input port's name. - :ref:`int` **_get_input_value_port_type** **(** :ref:`int` idx **)** virtual -Return the specified input port's type. See the TYPE\_\* enum in :ref:`@GlobalScope`. +Return the specified input port's type. See the ``TYPE_*`` enum in :ref:`@GlobalScope`. .. _class_VisualScriptCustomNode_method__get_output_sequence_port_count: @@ -161,7 +161,7 @@ Return the specified output's name. - :ref:`int` **_get_output_value_port_type** **(** :ref:`int` idx **)** virtual -Return the specified output's type. See the TYPE\_\* enum in :ref:`@GlobalScope`. +Return the specified output's type. See the ``TYPE_*`` enum in :ref:`@GlobalScope`. .. _class_VisualScriptCustomNode_method__get_text: @@ -191,9 +191,9 @@ The ``inputs`` array contains the values of the input ports. ``outputs`` is an array whose indices should be set to the respective outputs. -The ``start_mode`` is usually ``START_MODE_BEGIN_SEQUENCE``, unless you have used the STEP\_\* constants. +The ``start_mode`` is usually :ref:`START_MODE_BEGIN_SEQUENCE`, unless you have used the ``STEP_*`` constants. ``working_mem`` is an array which can be used to persist information between runs of the custom node. -When returning, you can mask the returned value with one of the STEP\_\* constants. +When returning, you can mask the returned value with one of the ``STEP_*`` constants. diff --git a/classes/class_visualscriptmathconstant.rst b/classes/class_visualscriptmathconstant.rst index afbc9d436..90c93ba7c 100644 --- a/classes/class_visualscriptmathconstant.rst +++ b/classes/class_visualscriptmathconstant.rst @@ -64,7 +64,7 @@ enum **MathConstant**: - **MATH_CONSTANT_NAN** = **7** --- Not a number: ``nan`` -- **MATH_CONSTANT_MAX** = **8** +- **MATH_CONSTANT_MAX** = **8** --- Represents the size of the :ref:`MathConstant` enum. Description ----------- diff --git a/classes/class_visualscriptswitch.rst b/classes/class_visualscriptswitch.rst index 320e29420..f79b4698f 100644 --- a/classes/class_visualscriptswitch.rst +++ b/classes/class_visualscriptswitch.rst @@ -19,7 +19,7 @@ Branches program flow based on a given input's value. Description ----------- -Branches the flow based on an input's value. Use "Case Count" in the Inspector to set the number of branches and each comparison's optional type. +Branches the flow based on an input's value. Use **Case Count** in the Inspector to set the number of branches and each comparison's optional type. **Input Ports:** diff --git a/classes/class_visualserver.rst b/classes/class_visualserver.rst index e1e96ddcd..f0a212f32 100644 --- a/classes/class_visualserver.rst +++ b/classes/class_visualserver.rst @@ -823,23 +823,23 @@ enum **TextureType**: enum **TextureFlags**: -- **TEXTURE_FLAG_MIPMAPS** = **1** --- Generate mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. +- **TEXTURE_FLAG_MIPMAPS** = **1** --- Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. -- **TEXTURE_FLAG_REPEAT** = **2** --- Repeat (instead of clamp to edge). +- **TEXTURE_FLAG_REPEAT** = **2** --- Repeats the texture (instead of clamp to edge). -- **TEXTURE_FLAG_FILTER** = **4** --- Turn on magnifying filter, to enable smooth zooming in of the texture. +- **TEXTURE_FLAG_FILTER** = **4** --- Uses a magnifying filter, to enable smooth zooming in of the texture. -- **TEXTURE_FLAG_ANISOTROPIC_FILTER** = **8** --- Anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios. +- **TEXTURE_FLAG_ANISOTROPIC_FILTER** = **8** --- Uses anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios. -More effective on planes often shown going to the horrizon as those textures (Walls or Ground for example) get squashed in the viewport to different aspect ratios and regular mipmaps keep the aspect ratio so they don't optimize storage that well in those cases. +This results in better-looking textures when viewed from oblique angles. -- **TEXTURE_FLAG_CONVERT_TO_LINEAR** = **16** --- Converts texture to SRGB color space. +- **TEXTURE_FLAG_CONVERT_TO_LINEAR** = **16** --- Converts the texture to the sRGB color space. -- **TEXTURE_FLAG_MIRRORED_REPEAT** = **32** --- Repeat texture with alternate sections mirrored. +- **TEXTURE_FLAG_MIRRORED_REPEAT** = **32** --- Repeats the texture with alternate sections mirrored. - **TEXTURE_FLAG_USED_FOR_STREAMING** = **2048** --- Texture is a video surface. -- **TEXTURE_FLAGS_DEFAULT** = **7** --- Default flags. Generate mipmaps, repeat, and filter are enabled. +- **TEXTURE_FLAGS_DEFAULT** = **7** --- Default flags. :ref:`TEXTURE_FLAG_MIPMAPS`, :ref:`TEXTURE_FLAG_REPEAT` and :ref:`TEXTURE_FLAG_FILTER` are are enabled. .. _enum_VisualServer_ShaderMode: @@ -859,7 +859,7 @@ enum **ShaderMode**: - **SHADER_PARTICLES** = **2** --- Shader is a particle shader. -- **SHADER_MAX** = **3** --- Marks maximum of the shader types array. used internally. +- **SHADER_MAX** = **3** --- Represents the size of the :ref:`ShaderMode` enum. .. _enum_VisualServer_ArrayType: @@ -893,9 +893,9 @@ enum **ArrayType**: - **ARRAY_COLOR** = **3** --- Array is a color array. -- **ARRAY_TEX_UV** = **4** --- Array is a uv coordinates array. +- **ARRAY_TEX_UV** = **4** --- Array is an UV coordinates array. -- **ARRAY_TEX_UV2** = **5** --- Array is a uv coordinates array for the second uv coordinates. +- **ARRAY_TEX_UV2** = **5** --- Array is an UV coordinates array for the second UV coordinates. - **ARRAY_BONES** = **6** --- Array contains bone information. @@ -903,7 +903,7 @@ enum **ArrayType**: - **ARRAY_INDEX** = **8** --- Array is index array. -- **ARRAY_MAX** = **9** --- Marks the maximum of the array types. Used internally. +- **ARRAY_MAX** = **9** --- Represents the size of the :ref:`ArrayType` enum. .. _enum_VisualServer_ArrayFormat: @@ -959,15 +959,15 @@ enum **ArrayFormat**: - **ARRAY_FORMAT_COLOR** = **8** --- Flag used to mark a color array. -- **ARRAY_FORMAT_TEX_UV** = **16** --- Flag used to mark a uv coordinates array. +- **ARRAY_FORMAT_TEX_UV** = **16** --- Flag used to mark an UV coordinates array. -- **ARRAY_FORMAT_TEX_UV2** = **32** --- Flag used to mark a uv coordinates array for the second uv coordinates. +- **ARRAY_FORMAT_TEX_UV2** = **32** --- Flag used to mark an UV coordinates array for the second UV coordinates. - **ARRAY_FORMAT_BONES** = **64** --- Flag used to mark a bone information array. - **ARRAY_FORMAT_WEIGHTS** = **128** --- Flag used to mark a weights array. -- **ARRAY_FORMAT_INDEX** = **256** --- Flag used to mark a index array. +- **ARRAY_FORMAT_INDEX** = **256** --- Flag used to mark an index array. - **ARRAY_COMPRESS_VERTEX** = **512** --- Flag used to mark a compressed (half float) vertex array. @@ -977,9 +977,9 @@ enum **ArrayFormat**: - **ARRAY_COMPRESS_COLOR** = **4096** --- Flag used to mark a compressed (half float) color array. -- **ARRAY_COMPRESS_TEX_UV** = **8192** --- Flag used to mark a compressed (half float) uv coordinates array. +- **ARRAY_COMPRESS_TEX_UV** = **8192** --- Flag used to mark a compressed (half float) UV coordinates array. -- **ARRAY_COMPRESS_TEX_UV2** = **16384** --- Flag used to mark a compressed (half float) uv coordinates array for the second uv coordinates. +- **ARRAY_COMPRESS_TEX_UV2** = **16384** --- Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. - **ARRAY_COMPRESS_BONES** = **32768** @@ -989,9 +989,9 @@ enum **ArrayFormat**: - **ARRAY_FLAG_USE_2D_VERTICES** = **262144** --- Flag used to mark that the array contains 2D vertices. -- **ARRAY_FLAG_USE_16_BIT_BONES** = **524288** --- Flag used to mark that the array uses 16 bit bones instead of 8 bit. +- **ARRAY_FLAG_USE_16_BIT_BONES** = **524288** --- Flag used to mark that the array uses 16-bit bones instead of 8-bit. -- **ARRAY_COMPRESS_DEFAULT** = **97280** --- Used to set flags ARRAY_COMPRESS_VERTEX, ARRAY_COMPRESS_NORMAL, ARRAY_COMPRESS_TANGENT, ARRAY_COMPRESS_COLOR, ARRAY_COMPRESS_TEX_UV, ARRAY_COMPRESS_TEX_UV2 and ARRAY_COMPRESS_WEIGHTS quickly. +- **ARRAY_COMPRESS_DEFAULT** = **97280** --- Used to set flags :ref:`ARRAY_COMPRESS_VERTEX`, :ref:`ARRAY_COMPRESS_NORMAL`, :ref:`ARRAY_COMPRESS_TANGENT`, :ref:`ARRAY_COMPRESS_COLOR`, :ref:`ARRAY_COMPRESS_TEX_UV`, :ref:`ARRAY_COMPRESS_TEX_UV2` and :ref:`ARRAY_COMPRESS_WEIGHTS` quickly. .. _enum_VisualServer_PrimitiveType: @@ -1027,7 +1027,7 @@ enum **PrimitiveType**: - **PRIMITIVE_TRIANGLE_FAN** = **6** --- Primitive to draw consists of a triangle strip (the last 2 vertices are always combined with the first to make a triangle). -- **PRIMITIVE_MAX** = **7** --- Marks the primitive types endpoint. used internally. +- **PRIMITIVE_MAX** = **7** --- Represents the size of the :ref:`PrimitiveType` enum. .. _enum_VisualServer_BlendShapeMode: @@ -1053,9 +1053,9 @@ enum **LightType**: - **LIGHT_DIRECTIONAL** = **0** --- Is a directional (sun) light. -- **LIGHT_OMNI** = **1** --- is an omni light. +- **LIGHT_OMNI** = **1** --- Is an omni light. -- **LIGHT_SPOT** = **2** --- is an spot light. +- **LIGHT_SPOT** = **2** --- Is a spot light. .. _enum_VisualServer_LightParam: @@ -1119,7 +1119,7 @@ enum **LightParam**: - **LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE** = **14** -- **LIGHT_PARAM_MAX** = **15** --- The light parameters endpoint. Used internally. +- **LIGHT_PARAM_MAX** = **15** --- Represents the size of the :ref:`LightParam` enum. .. _enum_VisualServer_LightOmniShadowMode: @@ -1207,7 +1207,7 @@ enum **ViewportClearMode**: - **VIEWPORT_CLEAR_NEVER** = **1** --- The viewport is never cleared before drawing. -- **VIEWPORT_CLEAR_ONLY_NEXT_FRAME** = **2** --- The viewport is cleared once, then the clear mode is set to ``VIEWPORT_CLEAR_NEVER``. +- **VIEWPORT_CLEAR_ONLY_NEXT_FRAME** = **2** --- The viewport is cleared once, then the clear mode is set to :ref:`VIEWPORT_CLEAR_NEVER`. .. _enum_VisualServer_ViewportMSAA: @@ -1225,13 +1225,13 @@ enum **ViewportMSAA**: - **VIEWPORT_MSAA_DISABLED** = **0** --- Multisample antialiasing is disabled. -- **VIEWPORT_MSAA_2X** = **1** --- Multisample antialiasing is set to 2X. +- **VIEWPORT_MSAA_2X** = **1** --- Multisample antialiasing is set to 2×. -- **VIEWPORT_MSAA_4X** = **2** --- Multisample antialiasing is set to 4X. +- **VIEWPORT_MSAA_4X** = **2** --- Multisample antialiasing is set to 4×. -- **VIEWPORT_MSAA_8X** = **3** --- Multisample antialiasing is set to 8X. +- **VIEWPORT_MSAA_8X** = **3** --- Multisample antialiasing is set to 8×. -- **VIEWPORT_MSAA_16X** = **4** --- Multisample antialiasing is set to 16X. +- **VIEWPORT_MSAA_16X** = **4** --- Multisample antialiasing is set to 16×. .. _enum_VisualServer_ViewportUsage: @@ -1283,7 +1283,7 @@ enum **ViewportRenderInfo**: - **VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME** = **5** -- **VIEWPORT_RENDER_INFO_MAX** = **6** --- Marks end of VIEWPORT_RENDER_INFO\* constants. Used internally. +- **VIEWPORT_RENDER_INFO_MAX** = **6** --- Represents the size of the :ref:`ViewportRenderInfo` enum. .. _enum_VisualServer_ViewportDebugDraw: @@ -1369,7 +1369,7 @@ enum **InstanceType**: - **INSTANCE_LIGHTMAP_CAPTURE** = **8** -- **INSTANCE_MAX** = **9** --- The max value for INSTANCE\_\* constants, used internally. +- **INSTANCE_MAX** = **9** --- Represents the size of the :ref:`InstanceType` enum. - **INSTANCE_GEOMETRY_MASK** = **30** --- A combination of the flags of geometry instances (mesh, multimesh, immediate and particles). @@ -1387,7 +1387,7 @@ enum **InstanceFlags**: - **INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE** = **1** -- **INSTANCE_FLAG_MAX** = **2** +- **INSTANCE_FLAG_MAX** = **2** --- Represents the size of the :ref:`InstanceFlags` enum. .. _enum_VisualServer_ShadowCastingSetting: @@ -1525,9 +1525,9 @@ enum **RenderInfo**: - **INFO_DRAW_CALLS_IN_FRAME** = **5** --- The amount of draw calls in frame. -- **INFO_USAGE_VIDEO_MEM_TOTAL** = **6** +- **INFO_USAGE_VIDEO_MEM_TOTAL** = **6** --- Unimplemented in the GLES2 and GLES3 rendering backends, always returns 0. -- **INFO_VIDEO_MEM_USED** = **7** --- The amount of vertex memory and texture memory used. +- **INFO_VIDEO_MEM_USED** = **7** --- The amount of video memory used, i.e. texture and vertex memory combined. - **INFO_TEXTURE_MEM_USED** = **8** --- The amount of texture memory used. @@ -1647,7 +1647,7 @@ enum **EnvironmentBG**: - **ENV_BG_KEEP** = **5** -- **ENV_BG_MAX** = **7** +- **ENV_BG_MAX** = **7** --- Represents the size of the :ref:`EnvironmentBG` enum. .. _enum_VisualServer_EnvironmentDOFBlurQuality: @@ -1876,7 +1876,7 @@ See :ref:`NinePatchRect` for more explanation. - void **canvas_item_add_particles** **(** :ref:`RID` item, :ref:`RID` particles, :ref:`RID` texture, :ref:`RID` normal_map **)** -Adds a particles system to the :ref:`CanvasItem`'s draw commands. +Adds a particle system to the :ref:`CanvasItem`'s draw commands. .. _class_VisualServer_method_canvas_item_add_polygon: @@ -2030,13 +2030,13 @@ Sets if the canvas item (including its children) is visible. - void **canvas_item_set_z_as_relative_to_parent** **(** :ref:`RID` item, :ref:`bool` enabled **)** -If this is enabled, the z-index of the parent will be added to the children's z-index. +If this is enabled, the Z index of the parent will be added to the children's Z index. .. _class_VisualServer_method_canvas_item_set_z_index: - void **canvas_item_set_z_index** **(** :ref:`RID` item, :ref:`int` z_index **)** -Sets the :ref:`CanvasItem`'s z-index, i.e. its draw order (lower indexes are drawn first). +Sets the :ref:`CanvasItem`'s Z index, i.e. its draw order (lower indexes are drawn first). .. _class_VisualServer_method_canvas_light_attach_to_canvas: @@ -2072,7 +2072,7 @@ Enables or disables light occluder. - void **canvas_light_occluder_set_light_mask** **(** :ref:`RID` occluder, :ref:`int` mask **)** -The light mask. See :ref:`LightOccluder2D` for more information on light masks +The light mask. See :ref:`LightOccluder2D` for more information on light masks. .. _class_VisualServer_method_canvas_light_occluder_set_polygon: @@ -2114,13 +2114,13 @@ Sets a canvas light's height. - void **canvas_light_set_item_cull_mask** **(** :ref:`RID` light, :ref:`int` mask **)** -The light mask. See :ref:`LightOccluder2D` for more information on light masks +The light mask. See :ref:`LightOccluder2D` for more information on light masks. .. _class_VisualServer_method_canvas_light_set_item_shadow_cull_mask: - void **canvas_light_set_item_shadow_cull_mask** **(** :ref:`RID` light, :ref:`int` mask **)** -The shadow mask. binary about which layers this canvas light affects which canvas item's shadows. See :ref:`LightOccluder2D` for more information on light masks. +The binary mask used to determine which layers this canvas light's shadows affects. See :ref:`LightOccluder2D` for more information on light masks. .. _class_VisualServer_method_canvas_light_set_layer_range: @@ -2132,7 +2132,7 @@ The layer range that gets rendered with this light. - void **canvas_light_set_mode** **(** :ref:`RID` light, :ref:`CanvasLightMode` mode **)** -The mode of the light, see CANVAS_LIGHT_MODE\_\* constants. +The mode of the light, see ``CANVAS_LIGHT_MODE_*`` constants. .. _class_VisualServer_method_canvas_light_set_scale: @@ -2160,7 +2160,7 @@ Enables or disables the canvas light's shadow. - void **canvas_light_set_shadow_filter** **(** :ref:`RID` light, :ref:`CanvasLightShadowFilter` filter **)** -Sets the canvas light's shadow's filter, see CANVAS_LIGHT_SHADOW_FILTER\_\* constants. +Sets the canvas light's shadow's filter, see ``CANVAS_LIGHT_SHADOW_FILTER_*`` constants. .. _class_VisualServer_method_canvas_light_set_shadow_gradient_length: @@ -2172,7 +2172,7 @@ Sets the length of the shadow's gradient. - void **canvas_light_set_shadow_smooth** **(** :ref:`RID` light, :ref:`float` smooth **)** -Smoothens the shadow. The lower, the more smooth. +Smoothens the shadow. The lower, the smoother. .. _class_VisualServer_method_canvas_light_set_texture: @@ -2202,7 +2202,7 @@ Creates a new light occluder polygon. - void **canvas_occluder_polygon_set_cull_mode** **(** :ref:`RID` occluder_polygon, :ref:`CanvasOccluderPolygonCullMode` mode **)** -Sets an occluder polygons cull mode. See CANVAS_OCCLUDER_POLYGON_CULL_MODE\_\* constants. +Sets an occluder polygons cull mode. See ``CANVAS_OCCLUDER_POLYGON_CULL_MODE_*`` constants. .. _class_VisualServer_method_canvas_occluder_polygon_set_shape: @@ -2338,7 +2338,7 @@ Tries to free an object in the VisualServer. - :ref:`int` **get_render_info** **(** :ref:`RenderInfo` info **)** -Returns a certain information, see RENDER_INFO\_\* for options. +Returns a certain information, see ``RENDER_INFO_*`` for options. .. _class_VisualServer_method_get_test_cube: @@ -2616,6 +2616,10 @@ Initializes the visual server. - :ref:`Array` **instances_cull_ray** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`RID` scenario **)** const +Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as :ref:`MeshInstance` or :ref:`DirectionalLight`. Use :ref:`@GDScript.instance_from_id` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World` you want to query. + +**Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. + .. _class_VisualServer_method_light_directional_set_blend_splits: - void **light_directional_set_blend_splits** **(** :ref:`RID` light, :ref:`bool` enable **)** @@ -2750,19 +2754,19 @@ Returns the shader of a certain material's shader. Returns an empty RID if the m - void **material_set_line_width** **(** :ref:`RID` material, :ref:`float` width **)** -Sets a materials line width. +Sets a material's line width. .. _class_VisualServer_method_material_set_next_pass: - void **material_set_next_pass** **(** :ref:`RID` material, :ref:`RID` next_material **)** -Sets an objects next material. +Sets an object's next material. .. _class_VisualServer_method_material_set_param: - void **material_set_param** **(** :ref:`RID` material, :ref:`String` parameter, :ref:`Variant` value **)** -Sets a materials parameter. +Sets a material's parameter. .. _class_VisualServer_method_material_set_render_priority: @@ -2780,7 +2784,7 @@ Sets a shader material's shader. - void **mesh_add_surface_from_arrays** **(** :ref:`RID` mesh, :ref:`PrimitiveType` primtive, :ref:`Array` arrays, :ref:`Array` blend_shapes=[ ], :ref:`int` compress_format=97280 **)** -Adds a surface generated from the Arrays to a mesh. See PRIMITIVE_TYPE\_\* constants for types. +Adds a surface generated from the Arrays to a mesh. See ``PRIMITIVE_TYPE_*`` constants for types. .. _class_VisualServer_method_mesh_clear: @@ -2876,7 +2880,7 @@ Returns a mesh's surface's buffer arrays. - :ref:`Array` **mesh_surface_get_blend_shape_arrays** **(** :ref:`RID` mesh, :ref:`int` surface **)** const -Returns a mesh's surface's arrays for blend shapes +Returns a mesh's surface's arrays for blend shapes. .. _class_VisualServer_method_mesh_surface_get_format: @@ -3134,9 +3138,9 @@ Sets a mesh's surface's material. - void **request_frame_drawn_callback** **(** :ref:`Object` where, :ref:`String` method, :ref:`Variant` userdata **)** -Schedules a callback to the corresponding named 'method' on 'where' after a frame has been drawn. +Schedules a callback to the corresponding named ``method`` on ``where`` after a frame has been drawn. -The callback method must use only 1 argument which will be called with 'userdata'. +The callback method must use only 1 argument which will be called with ``userdata``. .. _class_VisualServer_method_scenario_create: @@ -3348,7 +3352,7 @@ Sets the texture's image data. If it's a CubeMap, it sets the image data at a cu - void **texture_set_flags** **(** :ref:`RID` texture, :ref:`int` flags **)** -Sets the texture's flags. See :ref:`TextureFlags` for options +Sets the texture's flags. See :ref:`TextureFlags` for options. .. _class_VisualServer_method_texture_set_path: @@ -3416,7 +3420,7 @@ Detaches the viewport from the screen. - :ref:`int` **viewport_get_render_info** **(** :ref:`RID` viewport, :ref:`ViewportRenderInfo` info **)** -Returns a viewport's render info. for options see VIEWPORT_RENDER_INFO\* constants. +Returns a viewport's render information. For options, see the ``VIEWPORT_RENDER_INFO*`` constants. .. _class_VisualServer_method_viewport_get_texture: @@ -3500,7 +3504,7 @@ If ``true``, the viewport's canvas is not rendered. - void **viewport_set_msaa** **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** -Sets the anti-aliasing mode. see :ref:`ViewportMSAA` for options. +Sets the anti-aliasing mode. See :ref:`ViewportMSAA` for options. .. _class_VisualServer_method_viewport_set_parent_viewport: diff --git a/classes/class_visualshader.rst b/classes/class_visualshader.rst index a61eb4c02..2c0e8dd3c 100644 --- a/classes/class_visualshader.rst +++ b/classes/class_visualshader.rst @@ -79,7 +79,7 @@ enum **Type**: - **TYPE_LIGHT** = **2** -- **TYPE_MAX** = **3** +- **TYPE_MAX** = **3** --- Represents the size of the :ref:`Type` enum. Constants --------- diff --git a/classes/class_vseparator.rst b/classes/class_vseparator.rst index 99590f92b..4f9e8e455 100644 --- a/classes/class_vseparator.rst +++ b/classes/class_vseparator.rst @@ -28,5 +28,5 @@ Theme Properties Description ----------- -Vertical version of :ref:`Separator`. It is used to separate objects horizontally, though (but it looks vertical!). +Vertical version of :ref:`Separator`. Even though it looks vertical, it is used to separate objects horizontally. diff --git a/classes/class_webrtcpeerconnection.rst b/classes/class_webrtcpeerconnection.rst index 127ef11e0..f9c306846 100644 --- a/classes/class_webrtcpeerconnection.rst +++ b/classes/class_webrtcpeerconnection.rst @@ -85,7 +85,7 @@ enum **ConnectionState**: - **STATE_NEW** = **0** --- The connection is new, data channels and an offer can be created in this state. -- **STATE_CONNECTING** = **1** --- The peer is connecting, ICE is in progress, non of the transports has failed. +- **STATE_CONNECTING** = **1** --- The peer is connecting, ICE is in progress, none of the transports has failed. - **STATE_CONNECTED** = **2** --- The peer is connected, all ICE transports are connected. @@ -104,7 +104,7 @@ Setting up a WebRTC connection between two peers from now on) may not seem a tri - The peer that wants to initiate the connection (``A`` from now on) creates an offer and send it to the other peer (``B`` from now on). -- ``B`` receives the offer, generate and answer, and sends it to ``B``). +- ``B`` receives the offer, generate and answer, and sends it to ``A``). - ``A`` and ``B`` then generates and exchange ICE candidates with each other. @@ -149,7 +149,7 @@ Valid ``options`` are: "protocol": "my-custom-protocol", # A custom sub-protocol string for this channel. } -NOTE: You must keep a reference to channels created this way, or it will be closed. +**Note:** You must keep a reference to channels created this way, or it will be closed. .. _class_WebRTCPeerConnection_method_create_offer: @@ -157,7 +157,7 @@ NOTE: You must keep a reference to channels created this way, or it will be clos Creates a new SDP offer to start a WebRTC connection with a remote peer. At least one :ref:`WebRTCDataChannel` must have been created before calling this method. -If this functions returns ``OK``, :ref:`session_description_created` will be called when the session is ready to be sent. +If this functions returns :ref:`@GlobalScope.OK`, :ref:`session_description_created` will be called when the session is ready to be sent. .. _class_WebRTCPeerConnection_method_get_connection_state: diff --git a/classes/class_websocketclient.rst b/classes/class_websocketclient.rst index 2308d9e17..2bd40ea95 100644 --- a/classes/class_websocketclient.rst +++ b/classes/class_websocketclient.rst @@ -14,7 +14,7 @@ WebSocketClient Brief Description ----------------- -A WebSocket client implementation +A WebSocket client implementation. Properties ---------- @@ -57,7 +57,9 @@ Emitted when a connection with the server is established, ``protocol`` will cont - **data_received** **(** **)** -Emitted when a WebSocket message is received. Note: This signal is NOT emitted when used as high level multiplayer peer. +Emitted when a WebSocket message is received. + +**Note:** This signal is *not* emitted when used as high-level multiplayer peer. .. _class_WebSocketClient_signal_server_close_request: @@ -68,13 +70,13 @@ Emitted when the server requests a clean close. You should keep polling until yo Description ----------- -This class implements a WebSocket client compatible with any RFC 6455 complaint WebSocket server. +This class implements a WebSocket client compatible with any RFC 6455-compliant WebSocket server. This client can be optionally used as a network peer for the :ref:`MultiplayerAPI`. After starting the client (:ref:`connect_to_url`), you will need to :ref:`NetworkedMultiplayerPeer.poll` it at regular intervals (e.g. inside :ref:`Node._process`). -You will received appropriate signals when connecting, disconnecting, or when new data is available. +You will receive appropriate signals when connecting, disconnecting, or when new data is available. Property Descriptions --------------------- @@ -89,7 +91,9 @@ Property Descriptions | *Getter* | is_verify_ssl_enabled() | +----------+-------------------------------+ -Enable or disable SSL certificate verification. Note: You must specify the certificates to be used in the project settings for it to work when exported. +If ``true``, SSL certificate verification is enabled. + +**Note:** You must specify the certificates to be used in the Project Settings for it to work when exported. Method Descriptions ------------------- @@ -98,9 +102,9 @@ Method Descriptions - :ref:`Error` **connect_to_url** **(** :ref:`String` url, :ref:`PoolStringArray` protocols=PoolStringArray( ), :ref:`bool` gd_mp_api=false **)** -Connect to the given URL requesting one of the given ``protocols`` as sub-protocol. +Connects to the given URL requesting one of the given ``protocols`` as sub-protocol. -If ``true`` is passed as ``gd_mp_api``, the client will behave like a network peer for the :ref:`MultiplayerAPI`, connections to non Godot servers will not work, and :ref:`data_received` will not be emitted. +If ``true`` is passed as ``gd_mp_api``, the client will behave like a network peer for the :ref:`MultiplayerAPI`, connections to non-Godot servers will not work, and :ref:`data_received` will not be emitted. If ``false`` is passed instead (default), you must call :ref:`PacketPeer` functions (``put_packet``, ``get_packet``, etc.) on the :ref:`WebSocketPeer` returned via ``get_peer(1)`` and not on this object directly (e.g. ``get_peer(1).put_packet(data)``). @@ -108,5 +112,5 @@ If ``false`` is passed instead (default), you must call :ref:`PacketPeer` code=1000, :ref:`String` reason="" **)** -Disconnect this client from the connected host. See :ref:`WebSocketPeer.close` for more info. +Disconnects this client from the connected host. See :ref:`WebSocketPeer.close` for more information. diff --git a/classes/class_websocketmultiplayerpeer.rst b/classes/class_websocketmultiplayerpeer.rst index 47cdafe51..99c8bf8fb 100644 --- a/classes/class_websocketmultiplayerpeer.rst +++ b/classes/class_websocketmultiplayerpeer.rst @@ -34,7 +34,9 @@ Signals - **peer_packet** **(** :ref:`int` peer_source **)** -Emitted when a packet is received from a peer. Note: this signal is only emitted when the client or server is configured to use Godot multiplayer API. +Emitted when a packet is received from a peer. + +**Note:** This signal is only emitted when the client or server is configured to use Godot multiplayer API. Description ----------- @@ -54,11 +56,11 @@ Returns the :ref:`WebSocketPeer` associated to the given `` - :ref:`Error` **set_buffers** **(** :ref:`int` input_buffer_size_kb, :ref:`int` input_max_packets, :ref:`int` output_buffer_size_kb, :ref:`int` output_max_packets **)** -Configure the buffers sizes for this WebSocket peer. Default values can be specified in project settings under ``network/limits``. For server, values are meant per connected peer. +Configures the buffer sizes for this WebSocket peer. Default values can be specified in the Project Settings under ``network/limits``. For server, values are meant per connected peer. The first two parameters define the size and queued packets limits of the input buffer, the last two of the output buffer. Buffer sizes are expressed in KiB, so ``4 = 2^12 = 4096 bytes``. All parameters will be rounded up to the nearest power of two. -NOTE: HTML5 exports only use the input buffer since the output one is managed by browsers. +**Note:** HTML5 exports only use the input buffer since the output one is managed by browsers. diff --git a/classes/class_websocketpeer.rst b/classes/class_websocketpeer.rst index 9e1fe5ac9..c3a1142ea 100644 --- a/classes/class_websocketpeer.rst +++ b/classes/class_websocketpeer.rst @@ -46,9 +46,9 @@ Enumerations enum **WriteMode**: -- **WRITE_MODE_TEXT** = **0** --- Specify that WebSockets messages should be transferred as text payload (only valid UTF-8 is allowed). +- **WRITE_MODE_TEXT** = **0** --- Specifies that WebSockets messages should be transferred as text payload (only valid UTF-8 is allowed). -- **WRITE_MODE_BINARY** = **1** --- Specify that WebSockets messages should be transferred as binary payload (any byte combination is allowed). +- **WRITE_MODE_BINARY** = **1** --- Specifies that WebSockets messages should be transferred as binary payload (any byte combination is allowed). Description ----------- @@ -64,29 +64,33 @@ Method Descriptions - void **close** **(** :ref:`int` code=1000, :ref:`String` reason="" **)** -Close this WebSocket connection. ``code`` is the status code for the closure (see RFC6455 section 7.4 for a list of valid status codes). ``reason`` is the human readable reason for closing the connection (can be any UTF8 string, must be less than 123 bytes). +Closes this WebSocket connection. ``code`` is the status code for the closure (see RFC 6455 section 7.4 for a list of valid status codes). ``reason`` is the human readable reason for closing the connection (can be any UTF-8 string that's smaller than 123 bytes). -Note: To achieve a clean close, you will need to keep polling until either :ref:`WebSocketClient.connection_closed` or :ref:`WebSocketServer.client_disconnected` is received. +**Note:** To achieve a clean close, you will need to keep polling until either :ref:`WebSocketClient.connection_closed` or :ref:`WebSocketServer.client_disconnected` is received. -Note: HTML5 export might not support all status codes. Please refer to browsers-specific documentation for more details. +**Note:** The HTML5 export might not support all status codes. Please refer to browser-specific documentation for more details. .. _class_WebSocketPeer_method_get_connected_host: - :ref:`String` **get_connected_host** **(** **)** const -Returns the IP Address of the connected peer. (Not available in HTML5 export) +Returns the IP address of the connected peer. + +**Note:** Not available in the HTML5 export. .. _class_WebSocketPeer_method_get_connected_port: - :ref:`int` **get_connected_port** **(** **)** const -Returns the remote port of the connected peer. (Not available in HTML5 export) +Returns the remote port of the connected peer. + +**Note:** Not available in the HTML5 export. .. _class_WebSocketPeer_method_get_write_mode: - :ref:`WriteMode` **get_write_mode** **(** **)** const -Get the current selected write mode. See :ref:`WriteMode`. +Gets the current selected write mode. See :ref:`WriteMode`. .. _class_WebSocketPeer_method_is_connected_to_host: diff --git a/classes/class_websocketserver.rst b/classes/class_websocketserver.rst index 604e76b56..e5243864d 100644 --- a/classes/class_websocketserver.rst +++ b/classes/class_websocketserver.rst @@ -14,7 +14,7 @@ WebSocketServer Brief Description ----------------- -A WebSocket server implementation +A WebSocket server implementation. Methods ------- @@ -60,16 +60,18 @@ Emitted when a client disconnects. ``was_clean_close`` will be ``true`` if the c - **data_received** **(** :ref:`int` id **)** -Emitted when a new message is received. Note: This signal is NOT emitted when used as high level multiplayer peer. +Emitted when a new message is received. + +**Note:** This signal is *not* emitted when used as high-level multiplayer peer. Description ----------- -This class implements a WebSocket server that can also support the high level multiplayer API. +This class implements a WebSocket server that can also support the high-level multiplayer API. After starting the server (:ref:`listen`), you will need to :ref:`NetworkedMultiplayerPeer.poll` it at regular intervals (e.g. inside :ref:`Node._process`). When clients connect, disconnect, or send data, you will receive the appropriate signal. -Note: This class will not work in HTML5 exports due to browser restrictions. +**Note:** This class will not work in HTML5 exports due to browser restrictions. Method Descriptions ------------------- @@ -78,7 +80,7 @@ Method Descriptions - void **disconnect_peer** **(** :ref:`int` id, :ref:`int` code=1000, :ref:`String` reason="" **)** -Disconnects the peer identified by ``id`` from the server. See :ref:`WebSocketPeer.close` for more info. +Disconnects the peer identified by ``id`` from the server. See :ref:`WebSocketPeer.close` for more information. .. _class_WebSocketServer_method_get_peer_address: @@ -108,17 +110,17 @@ Returns ``true`` if the server is actively listening on a port. - :ref:`Error` **listen** **(** :ref:`int` port, :ref:`PoolStringArray` protocols=PoolStringArray( ), :ref:`bool` gd_mp_api=false **)** -Start listening on the given port. +Starts listening on the given port. You can specify the desired subprotocols via the "protocols" array. If the list empty (default), "binary" will be used. -If ``true`` is passed as ``gd_mp_api``, the server will behave like a network peer for the :ref:`MultiplayerAPI`, connections from non Godot clients will not work, and :ref:`data_received` will not be emitted. +If ``true`` is passed as ``gd_mp_api``, the server will behave like a network peer for the :ref:`MultiplayerAPI`, connections from non-Godot clients will not work, and :ref:`data_received` will not be emitted. -If ``false`` is passed instead (default), you must call :ref:`PacketPeer` functions (``put_packet``, ``get_packet``, etc.), on the :ref:`WebSocketPeer` returned via ``get_peer(ID)`` to communicate with the peer with given ``ID`` (e.g. ``get_peer(ID).get_available_packet_count``). +If ``false`` is passed instead (default), you must call :ref:`PacketPeer` functions (``put_packet``, ``get_packet``, etc.), on the :ref:`WebSocketPeer` returned via ``get_peer(id)`` to communicate with the peer with given ``id`` (e.g. ``get_peer(id).get_available_packet_count``). .. _class_WebSocketServer_method_stop: - void **stop** **(** **)** -Stop the server and clear its state. +Stops the server and clear its state. diff --git a/classes/class_xmlparser.rst b/classes/class_xmlparser.rst index 956d83e6b..39804ad3f 100644 --- a/classes/class_xmlparser.rst +++ b/classes/class_xmlparser.rst @@ -14,7 +14,7 @@ XMLParser Brief Description ----------------- -Low-level class for creating parsers for XML files. +Low-level class for creating parsers for `XML `_ files. Methods ------- @@ -93,7 +93,7 @@ enum **NodeType**: Description ----------- -This class can serve as base to make custom XML parsers. Since XML is a very flexible standard, this interface is low level so it can be applied to any possible schema. +This class can serve as base to make custom XML parsers. Since XML is a very flexible standard, this interface is low-level so it can be applied to any possible schema. Method Descriptions ------------------- @@ -102,97 +102,97 @@ Method Descriptions - :ref:`int` **get_attribute_count** **(** **)** const -Get the amount of attributes in the current element. +Gets the amount of attributes in the current element. .. _class_XMLParser_method_get_attribute_name: - :ref:`String` **get_attribute_name** **(** :ref:`int` idx **)** const -Get the name of the attribute specified by the index in ``idx`` argument. +Gets the name of the attribute specified by the index in ``idx`` argument. .. _class_XMLParser_method_get_attribute_value: - :ref:`String` **get_attribute_value** **(** :ref:`int` idx **)** const -Get the value of the attribute specified by the index in ``idx`` argument. +Gets the value of the attribute specified by the index in ``idx`` argument. .. _class_XMLParser_method_get_current_line: - :ref:`int` **get_current_line** **(** **)** const -Get the current line in the parsed file (currently not implemented). +Gets the current line in the parsed file (currently not implemented). .. _class_XMLParser_method_get_named_attribute_value: - :ref:`String` **get_named_attribute_value** **(** :ref:`String` name **)** const -Get the value of a certain attribute of the current element by name. This will raise an error if the element has no such attribute. +Gets the value of a certain attribute of the current element by name. This will raise an error if the element has no such attribute. .. _class_XMLParser_method_get_named_attribute_value_safe: - :ref:`String` **get_named_attribute_value_safe** **(** :ref:`String` name **)** const -Get the value of a certain attribute of the current element by name. This will return an empty :ref:`String` if the attribute is not found. +Gets the value of a certain attribute of the current element by name. This will return an empty :ref:`String` if the attribute is not found. .. _class_XMLParser_method_get_node_data: - :ref:`String` **get_node_data** **(** **)** const -Get the contents of a text node. This will raise an error in any other type of node. +Gets the contents of a text node. This will raise an error in any other type of node. .. _class_XMLParser_method_get_node_name: - :ref:`String` **get_node_name** **(** **)** const -Get the name of the current element node. This will raise an error if the current node type is not ``NODE_ELEMENT`` nor ``NODE_ELEMENT_END`` +Gets the name of the current element node. This will raise an error if the current node type is neither :ref:`NODE_ELEMENT` nor :ref:`NODE_ELEMENT_END`. .. _class_XMLParser_method_get_node_offset: - :ref:`int` **get_node_offset** **(** **)** const -Get the byte offset of the current node since the beginning of the file or buffer. +Gets the byte offset of the current node since the beginning of the file or buffer. .. _class_XMLParser_method_get_node_type: - :ref:`NodeType` **get_node_type** **(** **)** -Get the type of the current node. Compare with ``NODE_*`` constants. +Gets the type of the current node. Compare with ``NODE_*`` constants. .. _class_XMLParser_method_has_attribute: - :ref:`bool` **has_attribute** **(** :ref:`String` name **)** const -Check whether or not the current element has a certain attribute. +Check whether the current element has a certain attribute. .. _class_XMLParser_method_is_empty: - :ref:`bool` **is_empty** **(** **)** const -Check whether the current element is empty (this only works for completely empty tags, e.g. ). +Check whether the current element is empty (this only works for completely empty tags, e.g. ````). .. _class_XMLParser_method_open: - :ref:`Error` **open** **(** :ref:`String` file **)** -Open a XML file for parsing. This returns an error code. +Opens an XML file for parsing. This returns an error code. .. _class_XMLParser_method_open_buffer: - :ref:`Error` **open_buffer** **(** :ref:`PoolByteArray` buffer **)** -Open a XML raw buffer for parsing. This returns an error code. +Opens an XML raw buffer for parsing. This returns an error code. .. _class_XMLParser_method_read: - :ref:`Error` **read** **(** **)** -Read the next node of the file. This returns an error code. +Reads the next node of the file. This returns an error code. .. _class_XMLParser_method_seek: - :ref:`Error` **seek** **(** :ref:`int` position **)** -Move the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code. +Moves the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code. .. _class_XMLParser_method_skip_section: