diff options
Diffstat (limited to 'doc/classes')
27 files changed, 1300 insertions, 1211 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index af66a11fe5..e210fa8808 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -1393,7 +1393,7 @@ <constant name="KEY_SHIFT" value="16777237" enum="Key"> Shift key. </constant> - <constant name="KEY_CONTROL" value="16777238" enum="Key"> + <constant name="KEY_CTRL" value="16777238" enum="Key"> Control key. </constant> <constant name="KEY_META" value="16777239" enum="Key"> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 38b74cb436..624b51e463 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -258,6 +258,24 @@ [/codeblocks] </description> </method> + <method name="filter" qualifiers="const"> + <return type="Array"> + </return> + <argument index="0" name="method" type="Callable"> + </argument> + <description> + Calls the provided [Callable] on each element in the array and returns a new array with the elements for which the method returned [code]true[/code]. + The callable's method should take one [Variant] parameter (the current array element) and return a boolean value. + [codeblock] + func _ready(): + print([1, 2, 3].filter(remove_1)) # Prints [2, 3]. + print([1, 2, 3].filter(func(number): return number != 1)) # Same as above, but using lambda function. + + func remove_1(number): + return number != 1 + [/codeblock] + </description> + </method> <method name="find" qualifiers="const"> <return type="int"> </return> @@ -356,6 +374,24 @@ Returns [code]true[/code] if the array is empty. </description> </method> + <method name="map" qualifiers="const"> + <return type="Array"> + </return> + <argument index="0" name="method" type="Callable"> + </argument> + <description> + Calls the provided [Callable] for each element in the array and returns a new array filled with values returned by the method. + The callable's method should take one [Variant] parameter (the current array element) and can return any [Variant]. + [codeblock] + func _ready(): + print([1, 2, 3].map(negate)) # Prints [-1, -2, -3]. + print([1, 2, 3].map(func(number): return -number)) # Same as above, but using lambda function. + + func negate(number): + return -number + [/codeblock] + </description> + </method> <method name="max" qualifiers="const"> <return type="Variant"> </return> @@ -468,6 +504,26 @@ [b]Note:[/b] On large arrays, this method is much slower than [method push_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method push_front] will be. </description> </method> + <method name="reduce" qualifiers="const"> + <return type="Variant"> + </return> + <argument index="0" name="method" type="Callable"> + </argument> + <argument index="1" name="accum" type="Variant" default="null"> + </argument> + <description> + Calls the provided [Callable] for each element in array and accumulates the result in [code]accum[/code]. + The callable's method takes two arguments: the current value of [code]accum[/code] and the current array element. If [code]accum[/code] is [code]null[/code] (default value), the iteration will start from the second element, with the first one used as initial value of [code]accum[/code]. + [codeblock] + func _ready(): + print([1, 2, 3].reduce(sum, 10)) # Prints 16. + print([1, 2, 3].reduce(func(accum, number): return accum + number, 10)) # Same as above, but using lambda function. + + func sum(accum, number): + return accum + number + [/codeblock] + </description> + </method> <method name="remove"> <return type="void"> </return> diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml index afe364de63..917556fded 100644 --- a/doc/classes/AudioEffectPitchShift.xml +++ b/doc/classes/AudioEffectPitchShift.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFT_Size" default="3"> + <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFTSize" default="3"> </member> <member name="oversampling" type="int" setter="set_oversampling" getter="get_oversampling" default="4"> </member> @@ -21,18 +21,18 @@ </member> </members> <constants> - <constant name="FFT_SIZE_256" value="0" enum="FFT_Size"> + <constant name="FFT_SIZE_256" value="0" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_512" value="1" enum="FFT_Size"> + <constant name="FFT_SIZE_512" value="1" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_1024" value="2" enum="FFT_Size"> + <constant name="FFT_SIZE_1024" value="2" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_2048" value="3" enum="FFT_Size"> + <constant name="FFT_SIZE_2048" value="3" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_4096" value="4" enum="FFT_Size"> + <constant name="FFT_SIZE_4096" value="4" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_MAX" value="5" enum="FFT_Size"> - Represents the size of the [enum FFT_Size] enum. + <constant name="FFT_SIZE_MAX" value="5" enum="FFTSize"> + Represents the size of the [enum FFTSize] enum. </constant> </constants> </class> diff --git a/doc/classes/AudioEffectSpectrumAnalyzer.xml b/doc/classes/AudioEffectSpectrumAnalyzer.xml index 4c08b18f1d..79a8932e25 100644 --- a/doc/classes/AudioEffectSpectrumAnalyzer.xml +++ b/doc/classes/AudioEffectSpectrumAnalyzer.xml @@ -11,24 +11,24 @@ <members> <member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="2.0"> </member> - <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectSpectrumAnalyzer.FFT_Size" default="2"> + <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectSpectrumAnalyzer.FFTSize" default="2"> </member> <member name="tap_back_pos" type="float" setter="set_tap_back_pos" getter="get_tap_back_pos" default="0.01"> </member> </members> <constants> - <constant name="FFT_SIZE_256" value="0" enum="FFT_Size"> + <constant name="FFT_SIZE_256" value="0" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_512" value="1" enum="FFT_Size"> + <constant name="FFT_SIZE_512" value="1" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_1024" value="2" enum="FFT_Size"> + <constant name="FFT_SIZE_1024" value="2" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_2048" value="3" enum="FFT_Size"> + <constant name="FFT_SIZE_2048" value="3" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_4096" value="4" enum="FFT_Size"> + <constant name="FFT_SIZE_4096" value="4" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_MAX" value="5" enum="FFT_Size"> - Represents the size of the [enum FFT_Size] enum. + <constant name="FFT_SIZE_MAX" value="5" enum="FFTSize"> + Represents the size of the [enum FFTSize] enum. </constant> </constants> </class> diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml index 5aa2d699a8..0b31352611 100644 --- a/doc/classes/ButtonGroup.xml +++ b/doc/classes/ButtonGroup.xml @@ -28,6 +28,15 @@ <members> <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" /> </members> + <signals> + <signal name="pressed"> + <argument index="0" name="button" type="Object"> + </argument> + <description> + Emitted when one of the buttons of the group is pressed. + </description> + </signal> + </signals> <constants> </constants> </class> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index d645588af2..6133bb8d8c 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -564,442 +564,442 @@ </member> </members> <constants> - <constant name="aliceblue" value="Color( 0.94, 0.97, 1, 1 )"> + <constant name="ALICE_BLUE" value="Color( 0.94, 0.97, 1, 1 )"> Alice blue color. </constant> - <constant name="antiquewhite" value="Color( 0.98, 0.92, 0.84, 1 )"> + <constant name="ANTIQUE_WHITE" value="Color( 0.98, 0.92, 0.84, 1 )"> Antique white color. </constant> - <constant name="aqua" value="Color( 0, 1, 1, 1 )"> + <constant name="AQUA" value="Color( 0, 1, 1, 1 )"> Aqua color. </constant> - <constant name="aquamarine" value="Color( 0.5, 1, 0.83, 1 )"> + <constant name="AQUAMARINE" value="Color( 0.5, 1, 0.83, 1 )"> Aquamarine color. </constant> - <constant name="azure" value="Color( 0.94, 1, 1, 1 )"> + <constant name="AZURE" value="Color( 0.94, 1, 1, 1 )"> Azure color. </constant> - <constant name="beige" value="Color( 0.96, 0.96, 0.86, 1 )"> + <constant name="BEIGE" value="Color( 0.96, 0.96, 0.86, 1 )"> Beige color. </constant> - <constant name="bisque" value="Color( 1, 0.89, 0.77, 1 )"> + <constant name="BISQUE" value="Color( 1, 0.89, 0.77, 1 )"> Bisque color. </constant> - <constant name="black" value="Color( 0, 0, 0, 1 )"> + <constant name="BLACK" value="Color( 0, 0, 0, 1 )"> Black color. </constant> - <constant name="blanchedalmond" value="Color( 1, 0.92, 0.8, 1 )"> - Blanche almond color. + <constant name="BLANCHED_ALMOND" value="Color( 1, 0.92, 0.8, 1 )"> + Blanched almond color. </constant> - <constant name="blue" value="Color( 0, 0, 1, 1 )"> + <constant name="BLUE" value="Color( 0, 0, 1, 1 )"> Blue color. </constant> - <constant name="blueviolet" value="Color( 0.54, 0.17, 0.89, 1 )"> + <constant name="BLUE_VIOLET" value="Color( 0.54, 0.17, 0.89, 1 )"> Blue violet color. </constant> - <constant name="brown" value="Color( 0.65, 0.16, 0.16, 1 )"> + <constant name="BROWN" value="Color( 0.65, 0.16, 0.16, 1 )"> Brown color. </constant> - <constant name="burlywood" value="Color( 0.87, 0.72, 0.53, 1 )"> - Burly wood color. + <constant name="BURLYWOOD" value="Color( 0.87, 0.72, 0.53, 1 )"> + Burlywood color. </constant> - <constant name="cadetblue" value="Color( 0.37, 0.62, 0.63, 1 )"> + <constant name="CADET_BLUE" value="Color( 0.37, 0.62, 0.63, 1 )"> Cadet blue color. </constant> - <constant name="chartreuse" value="Color( 0.5, 1, 0, 1 )"> + <constant name="CHARTREUSE" value="Color( 0.5, 1, 0, 1 )"> Chartreuse color. </constant> - <constant name="chocolate" value="Color( 0.82, 0.41, 0.12, 1 )"> + <constant name="CHOCOLATE" value="Color( 0.82, 0.41, 0.12, 1 )"> Chocolate color. </constant> - <constant name="coral" value="Color( 1, 0.5, 0.31, 1 )"> + <constant name="CORAL" value="Color( 1, 0.5, 0.31, 1 )"> Coral color. </constant> - <constant name="cornflower" value="Color( 0.39, 0.58, 0.93, 1 )"> - Cornflower color. + <constant name="CORNFLOWER_BLUE" value="Color( 0.39, 0.58, 0.93, 1 )"> + Cornflower blue color. </constant> - <constant name="cornsilk" value="Color( 1, 0.97, 0.86, 1 )"> - Corn silk color. + <constant name="CORNSILK" value="Color( 1, 0.97, 0.86, 1 )"> + Cornsilk color. </constant> - <constant name="crimson" value="Color( 0.86, 0.08, 0.24, 1 )"> + <constant name="CRIMSON" value="Color( 0.86, 0.08, 0.24, 1 )"> Crimson color. </constant> - <constant name="cyan" value="Color( 0, 1, 1, 1 )"> + <constant name="CYAN" value="Color( 0, 1, 1, 1 )"> Cyan color. </constant> - <constant name="darkblue" value="Color( 0, 0, 0.55, 1 )"> + <constant name="DARK_BLUE" value="Color( 0, 0, 0.55, 1 )"> Dark blue color. </constant> - <constant name="darkcyan" value="Color( 0, 0.55, 0.55, 1 )"> + <constant name="DARK_CYAN" value="Color( 0, 0.55, 0.55, 1 )"> Dark cyan color. </constant> - <constant name="darkgoldenrod" value="Color( 0.72, 0.53, 0.04, 1 )"> + <constant name="DARK_GOLDENROD" value="Color( 0.72, 0.53, 0.04, 1 )"> Dark goldenrod color. </constant> - <constant name="darkgray" value="Color( 0.66, 0.66, 0.66, 1 )"> + <constant name="DARK_GRAY" value="Color( 0.66, 0.66, 0.66, 1 )"> Dark gray color. </constant> - <constant name="darkgreen" value="Color( 0, 0.39, 0, 1 )"> + <constant name="DARK_GREEN" value="Color( 0, 0.39, 0, 1 )"> Dark green color. </constant> - <constant name="darkkhaki" value="Color( 0.74, 0.72, 0.42, 1 )"> + <constant name="DARK_KHAKI" value="Color( 0.74, 0.72, 0.42, 1 )"> Dark khaki color. </constant> - <constant name="darkmagenta" value="Color( 0.55, 0, 0.55, 1 )"> + <constant name="DARK_MAGENTA" value="Color( 0.55, 0, 0.55, 1 )"> Dark magenta color. </constant> - <constant name="darkolivegreen" value="Color( 0.33, 0.42, 0.18, 1 )"> + <constant name="DARK_OLIVE_GREEN" value="Color( 0.33, 0.42, 0.18, 1 )"> Dark olive green color. </constant> - <constant name="darkorange" value="Color( 1, 0.55, 0, 1 )"> + <constant name="DARK_ORANGE" value="Color( 1, 0.55, 0, 1 )"> Dark orange color. </constant> - <constant name="darkorchid" value="Color( 0.6, 0.2, 0.8, 1 )"> + <constant name="DARK_ORCHID" value="Color( 0.6, 0.2, 0.8, 1 )"> Dark orchid color. </constant> - <constant name="darkred" value="Color( 0.55, 0, 0, 1 )"> + <constant name="DARK_RED" value="Color( 0.55, 0, 0, 1 )"> Dark red color. </constant> - <constant name="darksalmon" value="Color( 0.91, 0.59, 0.48, 1 )"> + <constant name="DARK_SALMON" value="Color( 0.91, 0.59, 0.48, 1 )"> Dark salmon color. </constant> - <constant name="darkseagreen" value="Color( 0.56, 0.74, 0.56, 1 )"> + <constant name="DARK_SEA_GREEN" value="Color( 0.56, 0.74, 0.56, 1 )"> Dark sea green color. </constant> - <constant name="darkslateblue" value="Color( 0.28, 0.24, 0.55, 1 )"> + <constant name="DARK_SLATE_BLUE" value="Color( 0.28, 0.24, 0.55, 1 )"> Dark slate blue color. </constant> - <constant name="darkslategray" value="Color( 0.18, 0.31, 0.31, 1 )"> + <constant name="DARK_SLATE_GRAY" value="Color( 0.18, 0.31, 0.31, 1 )"> Dark slate gray color. </constant> - <constant name="darkturquoise" value="Color( 0, 0.81, 0.82, 1 )"> + <constant name="DARK_TURQUOISE" value="Color( 0, 0.81, 0.82, 1 )"> Dark turquoise color. </constant> - <constant name="darkviolet" value="Color( 0.58, 0, 0.83, 1 )"> + <constant name="DARK_VIOLET" value="Color( 0.58, 0, 0.83, 1 )"> Dark violet color. </constant> - <constant name="deeppink" value="Color( 1, 0.08, 0.58, 1 )"> + <constant name="DEEP_PINK" value="Color( 1, 0.08, 0.58, 1 )"> Deep pink color. </constant> - <constant name="deepskyblue" value="Color( 0, 0.75, 1, 1 )"> + <constant name="DEEP_SKY_BLUE" value="Color( 0, 0.75, 1, 1 )"> Deep sky blue color. </constant> - <constant name="dimgray" value="Color( 0.41, 0.41, 0.41, 1 )"> + <constant name="DIM_GRAY" value="Color( 0.41, 0.41, 0.41, 1 )"> Dim gray color. </constant> - <constant name="dodgerblue" value="Color( 0.12, 0.56, 1, 1 )"> + <constant name="DODGER_BLUE" value="Color( 0.12, 0.56, 1, 1 )"> Dodger blue color. </constant> - <constant name="firebrick" value="Color( 0.7, 0.13, 0.13, 1 )"> + <constant name="FIREBRICK" value="Color( 0.7, 0.13, 0.13, 1 )"> Firebrick color. </constant> - <constant name="floralwhite" value="Color( 1, 0.98, 0.94, 1 )"> + <constant name="FLORAL_WHITE" value="Color( 1, 0.98, 0.94, 1 )"> Floral white color. </constant> - <constant name="forestgreen" value="Color( 0.13, 0.55, 0.13, 1 )"> + <constant name="FOREST_GREEN" value="Color( 0.13, 0.55, 0.13, 1 )"> Forest green color. </constant> - <constant name="fuchsia" value="Color( 1, 0, 1, 1 )"> + <constant name="FUCHSIA" value="Color( 1, 0, 1, 1 )"> Fuchsia color. </constant> - <constant name="gainsboro" value="Color( 0.86, 0.86, 0.86, 1 )"> + <constant name="GAINSBORO" value="Color( 0.86, 0.86, 0.86, 1 )"> Gainsboro color. </constant> - <constant name="ghostwhite" value="Color( 0.97, 0.97, 1, 1 )"> + <constant name="GHOST_WHITE" value="Color( 0.97, 0.97, 1, 1 )"> Ghost white color. </constant> - <constant name="gold" value="Color( 1, 0.84, 0, 1 )"> + <constant name="GOLD" value="Color( 1, 0.84, 0, 1 )"> Gold color. </constant> - <constant name="goldenrod" value="Color( 0.85, 0.65, 0.13, 1 )"> + <constant name="GOLDENROD" value="Color( 0.85, 0.65, 0.13, 1 )"> Goldenrod color. </constant> - <constant name="gray" value="Color( 0.75, 0.75, 0.75, 1 )"> + <constant name="GRAY" value="Color( 0.75, 0.75, 0.75, 1 )"> Gray color. </constant> - <constant name="green" value="Color( 0, 1, 0, 1 )"> + <constant name="GREEN" value="Color( 0, 1, 0, 1 )"> Green color. </constant> - <constant name="greenyellow" value="Color( 0.68, 1, 0.18, 1 )"> + <constant name="GREEN_YELLOW" value="Color( 0.68, 1, 0.18, 1 )"> Green yellow color. </constant> - <constant name="honeydew" value="Color( 0.94, 1, 0.94, 1 )"> + <constant name="HONEYDEW" value="Color( 0.94, 1, 0.94, 1 )"> Honeydew color. </constant> - <constant name="hotpink" value="Color( 1, 0.41, 0.71, 1 )"> + <constant name="HOT_PINK" value="Color( 1, 0.41, 0.71, 1 )"> Hot pink color. </constant> - <constant name="indianred" value="Color( 0.8, 0.36, 0.36, 1 )"> + <constant name="INDIAN_RED" value="Color( 0.8, 0.36, 0.36, 1 )"> Indian red color. </constant> - <constant name="indigo" value="Color( 0.29, 0, 0.51, 1 )"> + <constant name="INDIGO" value="Color( 0.29, 0, 0.51, 1 )"> Indigo color. </constant> - <constant name="ivory" value="Color( 1, 1, 0.94, 1 )"> + <constant name="IVORY" value="Color( 1, 1, 0.94, 1 )"> Ivory color. </constant> - <constant name="khaki" value="Color( 0.94, 0.9, 0.55, 1 )"> + <constant name="KHAKI" value="Color( 0.94, 0.9, 0.55, 1 )"> Khaki color. </constant> - <constant name="lavender" value="Color( 0.9, 0.9, 0.98, 1 )"> + <constant name="LAVENDER" value="Color( 0.9, 0.9, 0.98, 1 )"> Lavender color. </constant> - <constant name="lavenderblush" value="Color( 1, 0.94, 0.96, 1 )"> + <constant name="LAVENDER_BLUSH" value="Color( 1, 0.94, 0.96, 1 )"> Lavender blush color. </constant> - <constant name="lawngreen" value="Color( 0.49, 0.99, 0, 1 )"> + <constant name="LAWN_GREEN" value="Color( 0.49, 0.99, 0, 1 )"> Lawn green color. </constant> - <constant name="lemonchiffon" value="Color( 1, 0.98, 0.8, 1 )"> + <constant name="LEMON_CHIFFON" value="Color( 1, 0.98, 0.8, 1 )"> Lemon chiffon color. </constant> - <constant name="lightblue" value="Color( 0.68, 0.85, 0.9, 1 )"> + <constant name="LIGHT_BLUE" value="Color( 0.68, 0.85, 0.9, 1 )"> Light blue color. </constant> - <constant name="lightcoral" value="Color( 0.94, 0.5, 0.5, 1 )"> + <constant name="LIGHT_CORAL" value="Color( 0.94, 0.5, 0.5, 1 )"> Light coral color. </constant> - <constant name="lightcyan" value="Color( 0.88, 1, 1, 1 )"> + <constant name="LIGHT_CYAN" value="Color( 0.88, 1, 1, 1 )"> Light cyan color. </constant> - <constant name="lightgoldenrod" value="Color( 0.98, 0.98, 0.82, 1 )"> + <constant name="LIGHT_GOLDENROD" value="Color( 0.98, 0.98, 0.82, 1 )"> Light goldenrod color. </constant> - <constant name="lightgray" value="Color( 0.83, 0.83, 0.83, 1 )"> + <constant name="LIGHT_GRAY" value="Color( 0.83, 0.83, 0.83, 1 )"> Light gray color. </constant> - <constant name="lightgreen" value="Color( 0.56, 0.93, 0.56, 1 )"> + <constant name="LIGHT_GREEN" value="Color( 0.56, 0.93, 0.56, 1 )"> Light green color. </constant> - <constant name="lightpink" value="Color( 1, 0.71, 0.76, 1 )"> + <constant name="LIGHT_PINK" value="Color( 1, 0.71, 0.76, 1 )"> Light pink color. </constant> - <constant name="lightsalmon" value="Color( 1, 0.63, 0.48, 1 )"> + <constant name="LIGHT_SALMON" value="Color( 1, 0.63, 0.48, 1 )"> Light salmon color. </constant> - <constant name="lightseagreen" value="Color( 0.13, 0.7, 0.67, 1 )"> + <constant name="LIGHT_SEA_GREEN" value="Color( 0.13, 0.7, 0.67, 1 )"> Light sea green color. </constant> - <constant name="lightskyblue" value="Color( 0.53, 0.81, 0.98, 1 )"> + <constant name="LIGHT_SKY_BLUE" value="Color( 0.53, 0.81, 0.98, 1 )"> Light sky blue color. </constant> - <constant name="lightslategray" value="Color( 0.47, 0.53, 0.6, 1 )"> + <constant name="LIGHT_SLATE_GRAY" value="Color( 0.47, 0.53, 0.6, 1 )"> Light slate gray color. </constant> - <constant name="lightsteelblue" value="Color( 0.69, 0.77, 0.87, 1 )"> + <constant name="LIGHT_STEEL_BLUE" value="Color( 0.69, 0.77, 0.87, 1 )"> Light steel blue color. </constant> - <constant name="lightyellow" value="Color( 1, 1, 0.88, 1 )"> + <constant name="LIGHT_YELLOW" value="Color( 1, 1, 0.88, 1 )"> Light yellow color. </constant> - <constant name="lime" value="Color( 0, 1, 0, 1 )"> + <constant name="LIME" value="Color( 0, 1, 0, 1 )"> Lime color. </constant> - <constant name="limegreen" value="Color( 0.2, 0.8, 0.2, 1 )"> + <constant name="LIME_GREEN" value="Color( 0.2, 0.8, 0.2, 1 )"> Lime green color. </constant> - <constant name="linen" value="Color( 0.98, 0.94, 0.9, 1 )"> + <constant name="LINEN" value="Color( 0.98, 0.94, 0.9, 1 )"> Linen color. </constant> - <constant name="magenta" value="Color( 1, 0, 1, 1 )"> + <constant name="MAGENTA" value="Color( 1, 0, 1, 1 )"> Magenta color. </constant> - <constant name="maroon" value="Color( 0.69, 0.19, 0.38, 1 )"> + <constant name="MAROON" value="Color( 0.69, 0.19, 0.38, 1 )"> Maroon color. </constant> - <constant name="mediumaquamarine" value="Color( 0.4, 0.8, 0.67, 1 )"> + <constant name="MEDIUM_AQUAMARINE" value="Color( 0.4, 0.8, 0.67, 1 )"> Medium aquamarine color. </constant> - <constant name="mediumblue" value="Color( 0, 0, 0.8, 1 )"> + <constant name="MEDIUM_BLUE" value="Color( 0, 0, 0.8, 1 )"> Medium blue color. </constant> - <constant name="mediumorchid" value="Color( 0.73, 0.33, 0.83, 1 )"> + <constant name="MEDIUM_ORCHID" value="Color( 0.73, 0.33, 0.83, 1 )"> Medium orchid color. </constant> - <constant name="mediumpurple" value="Color( 0.58, 0.44, 0.86, 1 )"> + <constant name="MEDIUM_PURPLE" value="Color( 0.58, 0.44, 0.86, 1 )"> Medium purple color. </constant> - <constant name="mediumseagreen" value="Color( 0.24, 0.7, 0.44, 1 )"> + <constant name="MEDIUM_SEA_GREEN" value="Color( 0.24, 0.7, 0.44, 1 )"> Medium sea green color. </constant> - <constant name="mediumslateblue" value="Color( 0.48, 0.41, 0.93, 1 )"> + <constant name="MEDIUM_SLATE_BLUE" value="Color( 0.48, 0.41, 0.93, 1 )"> Medium slate blue color. </constant> - <constant name="mediumspringgreen" value="Color( 0, 0.98, 0.6, 1 )"> + <constant name="MEDIUM_SPRING_GREEN" value="Color( 0, 0.98, 0.6, 1 )"> Medium spring green color. </constant> - <constant name="mediumturquoise" value="Color( 0.28, 0.82, 0.8, 1 )"> + <constant name="MEDIUM_TURQUOISE" value="Color( 0.28, 0.82, 0.8, 1 )"> Medium turquoise color. </constant> - <constant name="mediumvioletred" value="Color( 0.78, 0.08, 0.52, 1 )"> + <constant name="MEDIUM_VIOLET_RED" value="Color( 0.78, 0.08, 0.52, 1 )"> Medium violet red color. </constant> - <constant name="midnightblue" value="Color( 0.1, 0.1, 0.44, 1 )"> + <constant name="MIDNIGHT_BLUE" value="Color( 0.1, 0.1, 0.44, 1 )"> Midnight blue color. </constant> - <constant name="mintcream" value="Color( 0.96, 1, 0.98, 1 )"> + <constant name="MINT_CREAM" value="Color( 0.96, 1, 0.98, 1 )"> Mint cream color. </constant> - <constant name="mistyrose" value="Color( 1, 0.89, 0.88, 1 )"> + <constant name="MISTY_ROSE" value="Color( 1, 0.89, 0.88, 1 )"> Misty rose color. </constant> - <constant name="moccasin" value="Color( 1, 0.89, 0.71, 1 )"> + <constant name="MOCCASIN" value="Color( 1, 0.89, 0.71, 1 )"> Moccasin color. </constant> - <constant name="navajowhite" value="Color( 1, 0.87, 0.68, 1 )"> + <constant name="NAVAJO_WHITE" value="Color( 1, 0.87, 0.68, 1 )"> Navajo white color. </constant> - <constant name="navyblue" value="Color( 0, 0, 0.5, 1 )"> + <constant name="NAVY_BLUE" value="Color( 0, 0, 0.5, 1 )"> Navy blue color. </constant> - <constant name="oldlace" value="Color( 0.99, 0.96, 0.9, 1 )"> + <constant name="OLD_LACE" value="Color( 0.99, 0.96, 0.9, 1 )"> Old lace color. </constant> - <constant name="olive" value="Color( 0.5, 0.5, 0, 1 )"> + <constant name="OLIVE" value="Color( 0.5, 0.5, 0, 1 )"> Olive color. </constant> - <constant name="olivedrab" value="Color( 0.42, 0.56, 0.14, 1 )"> + <constant name="OLIVE_DRAB" value="Color( 0.42, 0.56, 0.14, 1 )"> Olive drab color. </constant> - <constant name="orange" value="Color( 1, 0.65, 0, 1 )"> + <constant name="ORANGE" value="Color( 1, 0.65, 0, 1 )"> Orange color. </constant> - <constant name="orangered" value="Color( 1, 0.27, 0, 1 )"> + <constant name="ORANGE_RED" value="Color( 1, 0.27, 0, 1 )"> Orange red color. </constant> - <constant name="orchid" value="Color( 0.85, 0.44, 0.84, 1 )"> + <constant name="ORCHID" value="Color( 0.85, 0.44, 0.84, 1 )"> Orchid color. </constant> - <constant name="palegoldenrod" value="Color( 0.93, 0.91, 0.67, 1 )"> + <constant name="PALE_GOLDENROD" value="Color( 0.93, 0.91, 0.67, 1 )"> Pale goldenrod color. </constant> - <constant name="palegreen" value="Color( 0.6, 0.98, 0.6, 1 )"> + <constant name="PALE_GREEN" value="Color( 0.6, 0.98, 0.6, 1 )"> Pale green color. </constant> - <constant name="paleturquoise" value="Color( 0.69, 0.93, 0.93, 1 )"> + <constant name="PALE_TURQUOISE" value="Color( 0.69, 0.93, 0.93, 1 )"> Pale turquoise color. </constant> - <constant name="palevioletred" value="Color( 0.86, 0.44, 0.58, 1 )"> + <constant name="PALE_VIOLET_RED" value="Color( 0.86, 0.44, 0.58, 1 )"> Pale violet red color. </constant> - <constant name="papayawhip" value="Color( 1, 0.94, 0.84, 1 )"> + <constant name="PAPAYA_WHIP" value="Color( 1, 0.94, 0.84, 1 )"> Papaya whip color. </constant> - <constant name="peachpuff" value="Color( 1, 0.85, 0.73, 1 )"> + <constant name="PEACH_PUFF" value="Color( 1, 0.85, 0.73, 1 )"> Peach puff color. </constant> - <constant name="peru" value="Color( 0.8, 0.52, 0.25, 1 )"> + <constant name="PERU" value="Color( 0.8, 0.52, 0.25, 1 )"> Peru color. </constant> - <constant name="pink" value="Color( 1, 0.75, 0.8, 1 )"> + <constant name="PINK" value="Color( 1, 0.75, 0.8, 1 )"> Pink color. </constant> - <constant name="plum" value="Color( 0.87, 0.63, 0.87, 1 )"> + <constant name="PLUM" value="Color( 0.87, 0.63, 0.87, 1 )"> Plum color. </constant> - <constant name="powderblue" value="Color( 0.69, 0.88, 0.9, 1 )"> + <constant name="POWDER_BLUE" value="Color( 0.69, 0.88, 0.9, 1 )"> Powder blue color. </constant> - <constant name="purple" value="Color( 0.63, 0.13, 0.94, 1 )"> + <constant name="PURPLE" value="Color( 0.63, 0.13, 0.94, 1 )"> Purple color. </constant> - <constant name="rebeccapurple" value="Color( 0.4, 0.2, 0.6, 1 )"> + <constant name="REBECCA_PURPLE" value="Color( 0.4, 0.2, 0.6, 1 )"> Rebecca purple color. </constant> - <constant name="red" value="Color( 1, 0, 0, 1 )"> + <constant name="RED" value="Color( 1, 0, 0, 1 )"> Red color. </constant> - <constant name="rosybrown" value="Color( 0.74, 0.56, 0.56, 1 )"> + <constant name="ROSY_BROWN" value="Color( 0.74, 0.56, 0.56, 1 )"> Rosy brown color. </constant> - <constant name="royalblue" value="Color( 0.25, 0.41, 0.88, 1 )"> + <constant name="ROYAL_BLUE" value="Color( 0.25, 0.41, 0.88, 1 )"> Royal blue color. </constant> - <constant name="saddlebrown" value="Color( 0.55, 0.27, 0.07, 1 )"> + <constant name="SADDLE_BROWN" value="Color( 0.55, 0.27, 0.07, 1 )"> Saddle brown color. </constant> - <constant name="salmon" value="Color( 0.98, 0.5, 0.45, 1 )"> + <constant name="SALMON" value="Color( 0.98, 0.5, 0.45, 1 )"> Salmon color. </constant> - <constant name="sandybrown" value="Color( 0.96, 0.64, 0.38, 1 )"> + <constant name="SANDY_BROWN" value="Color( 0.96, 0.64, 0.38, 1 )"> Sandy brown color. </constant> - <constant name="seagreen" value="Color( 0.18, 0.55, 0.34, 1 )"> + <constant name="SEA_GREEN" value="Color( 0.18, 0.55, 0.34, 1 )"> Sea green color. </constant> - <constant name="seashell" value="Color( 1, 0.96, 0.93, 1 )"> + <constant name="SEASHELL" value="Color( 1, 0.96, 0.93, 1 )"> Seashell color. </constant> - <constant name="sienna" value="Color( 0.63, 0.32, 0.18, 1 )"> + <constant name="SIENNA" value="Color( 0.63, 0.32, 0.18, 1 )"> Sienna color. </constant> - <constant name="silver" value="Color( 0.75, 0.75, 0.75, 1 )"> + <constant name="SILVER" value="Color( 0.75, 0.75, 0.75, 1 )"> Silver color. </constant> - <constant name="skyblue" value="Color( 0.53, 0.81, 0.92, 1 )"> + <constant name="SKY_BLUE" value="Color( 0.53, 0.81, 0.92, 1 )"> Sky blue color. </constant> - <constant name="slateblue" value="Color( 0.42, 0.35, 0.8, 1 )"> + <constant name="SLATE_BLUE" value="Color( 0.42, 0.35, 0.8, 1 )"> Slate blue color. </constant> - <constant name="slategray" value="Color( 0.44, 0.5, 0.56, 1 )"> + <constant name="SLATE_GRAY" value="Color( 0.44, 0.5, 0.56, 1 )"> Slate gray color. </constant> - <constant name="snow" value="Color( 1, 0.98, 0.98, 1 )"> + <constant name="SNOW" value="Color( 1, 0.98, 0.98, 1 )"> Snow color. </constant> - <constant name="springgreen" value="Color( 0, 1, 0.5, 1 )"> + <constant name="SPRING_GREEN" value="Color( 0, 1, 0.5, 1 )"> Spring green color. </constant> - <constant name="steelblue" value="Color( 0.27, 0.51, 0.71, 1 )"> + <constant name="STEEL_BLUE" value="Color( 0.27, 0.51, 0.71, 1 )"> Steel blue color. </constant> - <constant name="tan" value="Color( 0.82, 0.71, 0.55, 1 )"> + <constant name="TAN" value="Color( 0.82, 0.71, 0.55, 1 )"> Tan color. </constant> - <constant name="teal" value="Color( 0, 0.5, 0.5, 1 )"> + <constant name="TEAL" value="Color( 0, 0.5, 0.5, 1 )"> Teal color. </constant> - <constant name="thistle" value="Color( 0.85, 0.75, 0.85, 1 )"> + <constant name="THISTLE" value="Color( 0.85, 0.75, 0.85, 1 )"> Thistle color. </constant> - <constant name="tomato" value="Color( 1, 0.39, 0.28, 1 )"> + <constant name="TOMATO" value="Color( 1, 0.39, 0.28, 1 )"> Tomato color. </constant> - <constant name="transparent" value="Color( 1, 1, 1, 0 )"> - Transparent color (white with no alpha). + <constant name="TRANSPARENT" value="Color( 1, 1, 1, 0 )"> + Transparent color (white with zero alpha). </constant> - <constant name="turquoise" value="Color( 0.25, 0.88, 0.82, 1 )"> + <constant name="TURQUOISE" value="Color( 0.25, 0.88, 0.82, 1 )"> Turquoise color. </constant> - <constant name="violet" value="Color( 0.93, 0.51, 0.93, 1 )"> + <constant name="VIOLET" value="Color( 0.93, 0.51, 0.93, 1 )"> Violet color. </constant> - <constant name="webgray" value="Color( 0.5, 0.5, 0.5, 1 )"> + <constant name="WEB_GRAY" value="Color( 0.5, 0.5, 0.5, 1 )"> Web gray color. </constant> - <constant name="webgreen" value="Color( 0, 0.5, 0, 1 )"> + <constant name="WEB_GREEN" value="Color( 0, 0.5, 0, 1 )"> Web green color. </constant> - <constant name="webmaroon" value="Color( 0.5, 0, 0, 1 )"> + <constant name="WEB_MAROON" value="Color( 0.5, 0, 0, 1 )"> Web maroon color. </constant> - <constant name="webpurple" value="Color( 0.5, 0, 0.5, 1 )"> + <constant name="WEB_PURPLE" value="Color( 0.5, 0, 0.5, 1 )"> Web purple color. </constant> - <constant name="wheat" value="Color( 0.96, 0.87, 0.7, 1 )"> + <constant name="WHEAT" value="Color( 0.96, 0.87, 0.7, 1 )"> Wheat color. </constant> - <constant name="white" value="Color( 1, 1, 1, 1 )"> + <constant name="WHITE" value="Color( 1, 1, 1, 1 )"> White color. </constant> - <constant name="whitesmoke" value="Color( 0.96, 0.96, 0.96, 1 )"> + <constant name="WHITE_SMOKE" value="Color( 0.96, 0.96, 0.96, 1 )"> White smoke color. </constant> - <constant name="yellow" value="Color( 1, 1, 0, 1 )"> + <constant name="YELLOW" value="Color( 1, 1, 0, 1 )"> Yellow color. </constant> - <constant name="yellowgreen" value="Color( 0.6, 0.8, 0.2, 1 )"> + <constant name="YELLOW_GREEN" value="Color( 0.6, 0.8, 0.2, 1 )"> Yellow green color. </constant> </constants> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index c0f918a01f..a9a230b78f 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -462,10 +462,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. + Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. [codeblocks] [gdscript] func _ready(): @@ -485,10 +485,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. + Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. </description> </method> <method name="get_theme_font" qualifiers="const"> @@ -496,10 +496,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. + Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. </description> </method> <method name="get_theme_font_size" qualifiers="const"> @@ -507,10 +507,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a font size from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. + Returns a font size from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. </description> </method> <method name="get_theme_icon" qualifiers="const"> @@ -518,10 +518,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. + Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. </description> </method> <method name="get_theme_stylebox" qualifiers="const"> @@ -529,10 +529,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. + Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. </description> </method> <method name="get_tooltip" qualifiers="const"> @@ -593,10 +593,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_color_override" qualifiers="const"> @@ -613,10 +613,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_constant_override" qualifiers="const"> @@ -633,10 +633,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_font_override" qualifiers="const"> @@ -653,10 +653,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if font size with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if font size with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_font_size_override" qualifiers="const"> @@ -673,10 +673,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_icon_override" qualifiers="const"> @@ -693,10 +693,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_stylebox_override" qualifiers="const"> @@ -1173,7 +1173,12 @@ Tells the parent [Container] nodes how they should resize and place the node on the Y axis. Use one of the [enum SizeFlags] constants to change the flags. See the constants to learn what each does. </member> <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> - Changing this property replaces the current [Theme] resource this node and all its [Control] children use. + The [Theme] resource this node and all its [Control] children use. If a child node has its own [Theme] resource set, theme items are merged with child's definitions having higher priority. + </member> + <member name="theme_custom_type" type="StringName" setter="set_theme_custom_type" getter="get_theme_custom_type" default="@"""> + The type name used by this [Control] to look up its own theme items. By default, the class name of the node is used (e.g. [code]Button[/code] for the [Button] control), as well as the class names of all parent classes (in order of inheritance). Setting this property gives the highest priority to the type of the specified name, then falls back on the class names. + [b]Note:[/b] To look up [Control]'s own items use various [code]get_theme_*[/code] methods without specifying [code]theme_type[/code]. + [b]Note:[/b] Theme items are looked for in the tree order, from branch to root, where each [Control] node is checked for its [member theme] property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last. </member> </members> <signals> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 91e90d051d..0c9df071a7 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -469,46 +469,6 @@ <description> </description> </method> - <method name="native_video_is_playing" qualifiers="const"> - <return type="bool"> - </return> - <description> - </description> - </method> - <method name="native_video_pause"> - <return type="void"> - </return> - <description> - </description> - </method> - <method name="native_video_play"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="volume" type="float"> - </argument> - <argument index="2" name="audio_track" type="String"> - </argument> - <argument index="3" name="subtitle_track" type="String"> - </argument> - <argument index="4" name="screen" type="int"> - </argument> - <description> - </description> - </method> - <method name="native_video_stop"> - <return type="void"> - </return> - <description> - </description> - </method> - <method name="native_video_unpause"> - <return type="void"> - </return> - <description> - </description> - </method> <method name="process_events"> <return type="void"> </return> @@ -1065,25 +1025,23 @@ </constant> <constant name="FEATURE_CUSTOM_CURSOR_SHAPE" value="8" enum="Feature"> </constant> - <constant name="FEATURE_NATIVE_VIDEO" value="9" enum="Feature"> - </constant> - <constant name="FEATURE_NATIVE_DIALOG" value="10" enum="Feature"> + <constant name="FEATURE_NATIVE_DIALOG" value="9" enum="Feature"> </constant> - <constant name="FEATURE_CONSOLE_WINDOW" value="11" enum="Feature"> + <constant name="FEATURE_CONSOLE_WINDOW" value="10" enum="Feature"> </constant> - <constant name="FEATURE_IME" value="12" enum="Feature"> + <constant name="FEATURE_IME" value="11" enum="Feature"> </constant> - <constant name="FEATURE_WINDOW_TRANSPARENCY" value="13" enum="Feature"> + <constant name="FEATURE_WINDOW_TRANSPARENCY" value="12" enum="Feature"> </constant> - <constant name="FEATURE_HIDPI" value="14" enum="Feature"> + <constant name="FEATURE_HIDPI" value="13" enum="Feature"> </constant> - <constant name="FEATURE_ICON" value="15" enum="Feature"> + <constant name="FEATURE_ICON" value="14" enum="Feature"> </constant> - <constant name="FEATURE_NATIVE_ICON" value="16" enum="Feature"> + <constant name="FEATURE_NATIVE_ICON" value="15" enum="Feature"> </constant> - <constant name="FEATURE_ORIENTATION" value="17" enum="Feature"> + <constant name="FEATURE_ORIENTATION" value="16" enum="Feature"> </constant> - <constant name="FEATURE_SWAP_BUFFERS" value="18" enum="Feature"> + <constant name="FEATURE_SWAP_BUFFERS" value="17" enum="Feature"> </constant> <constant name="MOUSE_MODE_VISIBLE" value="0" enum="MouseMode"> </constant> diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml new file mode 100644 index 0000000000..e31a681b8b --- /dev/null +++ b/doc/classes/EditorResourcePicker.xml @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorResourcePicker" inherits="HBoxContainer" version="4.0"> + <brief_description> + Godot editor's control for selecting [Resource] type properties. + </brief_description> + <description> + This is a [Control] node similar to the one used in the Inspector dock when editing [Resource]s. It provides options for creating, loading, saving and converting resources. + [b]Note:[/b] It does not include an editor for the resource. + </description> + <tutorials> + </tutorials> + <methods> + <method name="can_drop_data_fw" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="position" type="Vector2"> + </argument> + <argument index="1" name="data" type="Variant"> + </argument> + <argument index="2" name="from" type="Control"> + </argument> + <description> + </description> + </method> + <method name="drop_data_fw"> + <return type="void"> + </return> + <argument index="0" name="position" type="Vector2"> + </argument> + <argument index="1" name="data" type="Variant"> + </argument> + <argument index="2" name="from" type="Control"> + </argument> + <description> + </description> + </method> + <method name="get_allowed_types" qualifiers="const"> + <return type="PackedStringArray"> + </return> + <description> + Returns a list of all allowed types and subtypes corresponding to the [member base_type]. If the [member base_type] is empty, an empty list is returned. + </description> + </method> + <method name="get_drag_data_fw"> + <return type="Variant"> + </return> + <argument index="0" name="position" type="Vector2"> + </argument> + <argument index="1" name="from" type="Control"> + </argument> + <description> + </description> + </method> + </methods> + <members> + <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default=""""> + The base type of allowed resource types. Can be a comma-separated list of several options. + </member> + <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true"> + If [code]true[/code], the value can be selected and edited. + </member> + <member name="edited_resource" type="Resource" setter="set_edited_resource" getter="get_edited_resource"> + The edited resource value. + </member> + </members> + <signals> + <signal name="resource_changed"> + <argument index="0" name="resource" type="Resource"> + </argument> + <description> + Emitted when the value of the edited resource was changed. + </description> + </signal> + <signal name="resource_selected"> + <argument index="0" name="resource" type="Resource"> + </argument> + <description> + Emitted when the resource value was set and user clicked to edit it. + </description> + </signal> + </signals> + <constants> + </constants> +</class> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index aae3126c0f..82ba45f11a 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -40,7 +40,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the color of the input connection [code]idx[/code]. + Returns the [Color] of the input connection [code]idx[/code]. </description> </method> <method name="get_connection_input_count"> @@ -74,7 +74,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the color of the output connection [code]idx[/code]. + Returns the [Color] of the output connection [code]idx[/code]. </description> </method> <method name="get_connection_output_count"> @@ -117,7 +117,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the color set to [code]idx[/code] left (input) slot. + Returns the left (input) [Color] of the slot [code]idx[/code]. </description> </method> <method name="get_slot_color_right" qualifiers="const"> @@ -126,7 +126,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the color set to [code]idx[/code] right (output) slot. + Returns the right (output) [Color] of the slot [code]idx[/code]. </description> </method> <method name="get_slot_type_left" qualifiers="const"> @@ -135,7 +135,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the (integer) type of left (input) [code]idx[/code] slot. + Returns the left (input) type of the slot [code]idx[/code]. </description> </method> <method name="get_slot_type_right" qualifiers="const"> @@ -144,7 +144,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the (integer) type of right (output) [code]idx[/code] slot. + Returns the right (output) type of the slot [code]idx[/code]. </description> </method> <method name="is_slot_enabled_left" qualifiers="const"> @@ -153,7 +153,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns [code]true[/code] if left (input) slot [code]idx[/code] is enabled, [code]false[/code] otherwise. + Returns [code]true[/code] if left (input) side of the slot [code]idx[/code] is enabled. </description> </method> <method name="is_slot_enabled_right" qualifiers="const"> @@ -162,7 +162,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns [code]true[/code] if right (output) slot [code]idx[/code] is enabled, [code]false[/code] otherwise. + Returns [code]true[/code] if right (output) side of the slot [code]idx[/code] is enabled. </description> </method> <method name="set_opentype_feature"> @@ -204,6 +204,73 @@ [code]color_left[/code]/[code]right[/code] is the tint of the port's icon on this side. [code]custom_left[/code]/[code]right[/code] is a custom texture for this side's port. [b]Note:[/b] This method only sets properties of the slot. To create the slot, add a [Control]-derived child to the GraphNode. + Individual properties can be set using one of the [code]set_slot_*[/code] methods. You must enable at least one side of the slot to do so. + </description> + </method> + <method name="set_slot_color_left"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="color_left" type="Color"> + </argument> + <description> + Sets the [Color] of the left (input) side of the slot [code]idx[/code] to [code]color_left[/code]. + </description> + </method> + <method name="set_slot_color_right"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="color_right" type="Color"> + </argument> + <description> + Sets the [Color] of the right (output) side of the slot [code]idx[/code] to [code]color_right[/code]. + </description> + </method> + <method name="set_slot_enabled_left"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="enable_left" type="bool"> + </argument> + <description> + Toggles the left (input) side of the slot [code]idx[/code]. If [code]enable_left[/code] is [code]true[/code], a port will appear on the left side and the slot will be able to be connected from this side. + </description> + </method> + <method name="set_slot_enabled_right"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="enable_right" type="bool"> + </argument> + <description> + Toggles the right (output) side of the slot [code]idx[/code]. If [code]enable_right[/code] is [code]true[/code], a port will appear on the right side and the slot will be able to be connected from this side. + </description> + </method> + <method name="set_slot_type_left"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="type_left" type="int"> + </argument> + <description> + Sets the left (input) type of the slot [code]idx[/code] to [code]type_left[/code]. + </description> + </method> + <method name="set_slot_type_right"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="type_right" type="int"> + </argument> + <description> + Sets the right (output) type of the slot [code]idx[/code] to [code]type_right[/code]. </description> </method> </methods> diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml index 849f036bbd..44da913492 100644 --- a/doc/classes/IP.xml +++ b/doc/classes/IP.xml @@ -4,7 +4,7 @@ Internet protocol (IP) support functions such as DNS resolution. </brief_description> <description> - IP contains support functions for the Internet Protocol (IP). TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides DNS hostname resolution support, both blocking and threaded. + IP contains support functions for the Internet Protocol (IP). TCP/IP support is in different classes (see [StreamPeerTCP] and [TCPServer]). IP provides DNS hostname resolution support, both blocking and threaded. </description> <tutorials> </tutorials> diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml index dd782209e5..3beea7f9a0 100644 --- a/doc/classes/InputEventWithModifiers.xml +++ b/doc/classes/InputEventWithModifiers.xml @@ -12,23 +12,23 @@ <methods> </methods> <members> - <member name="alt" type="bool" setter="set_alt" getter="get_alt" default="false"> + <member name="alt_pressed" type="bool" setter="set_alt_pressed" getter="is_alt_pressed" default="false"> State of the [kbd]Alt[/kbd] modifier. </member> - <member name="command" type="bool" setter="set_command" getter="get_command" default="false"> + <member name="command_pressed" type="bool" setter="set_command_pressed" getter="is_command_pressed" default="false"> State of the [kbd]Cmd[/kbd] modifier. </member> - <member name="control" type="bool" setter="set_control" getter="get_control" default="false"> + <member name="ctrl_pressed" type="bool" setter="set_ctrl_pressed" getter="is_ctrl_pressed" default="false"> State of the [kbd]Ctrl[/kbd] modifier. </member> - <member name="meta" type="bool" setter="set_metakey" getter="get_metakey" default="false"> + <member name="meta_pressed" type="bool" setter="set_meta_pressed" getter="is_meta_pressed" default="false"> State of the [kbd]Meta[/kbd] modifier. </member> - <member name="shift" type="bool" setter="set_shift" getter="get_shift" default="false"> + <member name="shift_pressed" type="bool" setter="set_shift_pressed" getter="is_shift_pressed" default="false"> State of the [kbd]Shift[/kbd] modifier. </member> <member name="store_command" type="bool" setter="set_store_command" getter="is_storing_command" default="true"> - If [code]true[/code], pressing [kbd]Cmd[/kbd] on macOS or [kbd]Ctrl[/kbd] on all other platforms will both be serialized as [member command]. If [code]false[/code], those same keys will be serialized as [member meta] on macOS and [member control] on all other platforms. + If [code]true[/code], pressing [kbd]Cmd[/kbd] on macOS or [kbd]Ctrl[/kbd] on all other platforms will both be serialized as [member command_pressed]. If [code]false[/code], those same keys will be serialized as [member meta_pressed] on macOS and [member ctrl_pressed] on all other platforms. This aids with cross-platform compatibility when developing e.g. on Windows for macOS, or vice-versa. </member> </members> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 8c90108aef..cb95deb9a0 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -143,7 +143,7 @@ Returns the command-line arguments passed to the engine. Command-line arguments can be written in any form, including both [code]--key value[/code] and [code]--key=value[/code] forms so they can be properly parsed, as long as custom command-line arguments do not conflict with engine arguments. You can also incorporate environment variables using the [method get_environment] method. - You can set [code]editor/main_run_args[/code] in the Project Settings to define command-line arguments to be passed by the editor when running the project. + You can set [member ProjectSettings.editor/run/main_run_args] to define command-line arguments to be passed by the editor when running the project. Here's a minimal example on how to parse command-line arguments into a dictionary using the [code]--key=value[/code] form for arguments: [codeblocks] [gdscript] @@ -348,6 +348,7 @@ </return> <description> Returns a string that is unique to the device. + [b]Note:[/b] This string may change without notice if the user reinstalls/upgrades their operating system or changes their hardware. This means it should generally not be used to encrypt persistent data as the data saved prior to an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by [method get_unique_id] for security purposes. [b]Note:[/b] Returns an empty string on HTML5 and UWP, as this method isn't implemented on those platforms yet. </description> </method> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index b3994b83fd..b3813e6ca2 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -542,6 +542,14 @@ <member name="editor/node_naming/name_num_separator" type="int" setter="" getter="" default="0"> What to use to separate node name from number. This is mostly an editor setting. </member> + <member name="editor/run/main_run_args" type="String" setter="" getter="" default=""""> + The command-line arguments to append to Godot's own command line when running the project. This doesn't affect the editor itself. + It is possible to make another executable run Godot by using the [code]%command%[/code] placeholder. The placeholder will be replaced with Godot's own command line. Program-specific arguments should be placed [i]before[/i] the placeholder, whereas Godot-specific arguments should be placed [i]after[/i] the placeholder. + For example, this can be used to force the project to run on the dedicated GPU in a NVIDIA Optimus system on Linux: + [codeblock] + prime-run %command% + [/codeblock] + </member> <member name="editor/script/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( "gd", "shader" )"> Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. [code]tscn[/code] if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files. </member> @@ -1189,12 +1197,6 @@ The CA certificates bundle to use for SSL connections. If this is set to a non-empty value, this will [i]override[/i] Godot's default [url=https://github.com/godotengine/godot/blob/master/thirdparty/certs/ca-certificates.crt]Mozilla certificate bundle[/url]. If left empty, the default certificate bundle will be used. If in doubt, leave this setting empty. </member> - <member name="physics/2d/bp_hash_table_size" type="int" setter="" getter="" default="4096"> - Size of the hash table used for the broad-phase 2D hash grid algorithm. - </member> - <member name="physics/2d/cell_size" type="int" setter="" getter="" default="128"> - Cell size used for the broad-phase 2D hash grid algorithm (in pixels). - </member> <member name="physics/2d/default_angular_damp" type="float" setter="" getter="" default="1.0"> The default angular damp in 2D. [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration. @@ -1231,9 +1233,6 @@ The default linear damp in 2D. [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> - <member name="physics/2d/large_object_surface_threshold_in_cells" type="int" setter="" getter="" default="512"> - Threshold defining the surface size that constitutes a large object with regard to cells in the broad-phase 2D hash grid algorithm. - </member> <member name="physics/2d/physics_engine" type="String" setter="" getter="" default=""DEFAULT""> Sets which physics engine to use for 2D physics. "DEFAULT" and "GodotPhysics2D" are the same, as there is currently no alternative 2D physics server implemented. diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml index ee498de302..e5c4c32450 100644 --- a/doc/classes/ScriptEditorBase.xml +++ b/doc/classes/ScriptEditorBase.xml @@ -18,6 +18,13 @@ Adds a [EditorSyntaxHighlighter] to the open script. </description> </method> + <method name="get_base_editor" qualifiers="const"> + <return type="Control"> + </return> + <description> + Returns the underlying [Control] used for editing scripts. This can be either [CodeEdit] (for text scripts) or [GraphEdit] (for visual scripts). + </description> + </method> </methods> <signals> <signal name="edited_script_changed"> diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index c6dd6fb142..0b278d7d25 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -91,6 +91,15 @@ Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual "global" transform of the bone. </description> </method> + <method name="get_bone_global_pose_no_override" qualifiers="const"> + <return type="Transform"> + </return> + <argument index="0" name="bone_idx" type="int"> + </argument> + <description> + Returns the overall transform of the specified bone, with respect to the skeleton, but without any global pose overrides. Being relative to the skeleton frame, this is not the actual "global" transform of the bone. + </description> + </method> <method name="get_bone_name" qualifiers="const"> <return type="String"> </return> diff --git a/doc/classes/TCP_Server.xml b/doc/classes/TCPServer.xml index ec91d75d47..28f06ad3ae 100644 --- a/doc/classes/TCP_Server.xml +++ b/doc/classes/TCPServer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TCP_Server" inherits="Reference" version="4.0"> +<class name="TCPServer" inherits="Reference" version="4.0"> <brief_description> A TCP server. </brief_description> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 088bcd1c3c..b97728ccd4 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -5,6 +5,7 @@ </brief_description> <description> TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo. + [b]Note:[/b] When holding down [kbd]Alt[/kbd], the vertical scroll wheel will scroll 5 times as fast as it would normally do. This also works in the Godot script editor. </description> <tutorials> </tutorials> @@ -282,6 +283,13 @@ Returns the selection end line. </description> </method> + <method name="get_visible_line_count" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the number of visible lines, including wrapped text. + </description> + </method> <method name="get_word_under_cursor" qualifiers="const"> <return type="String"> </return> @@ -714,10 +722,10 @@ If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added. </member> <member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0"> - If there is a horizontal scrollbar this determines the current horizontal scroll value in pixels. + If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels. </member> <member name="scroll_vertical" type="float" setter="set_v_scroll" getter="get_v_scroll" default="0.0"> - If there is a vertical scrollbar this determines the current vertical scroll value in line numbers, starting at 0 for the top line. + If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line. </member> <member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true"> If [code]true[/code], text can be selected. diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index 3173dddb42..7448697df3 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -23,10 +23,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears the [Color] at [code]name[/code] if the theme has [code]node_type[/code]. + Clears the [Color] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_constant"> @@ -34,10 +34,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears the constant at [code]name[/code] if the theme has [code]node_type[/code]. + Clears the constant at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_font"> @@ -45,10 +45,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears the [Font] at [code]name[/code] if the theme has [code]node_type[/code]. + Clears the [Font] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_font_size"> @@ -56,10 +56,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears the font size [code]name[/code] if the theme has [code]node_type[/code]. + Clears the font size [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_icon"> @@ -67,10 +67,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears the icon at [code]name[/code] if the theme has [code]node_type[/code]. + Clears the icon at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_stylebox"> @@ -78,10 +78,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears [StyleBox] at [code]name[/code] if the theme has [code]node_type[/code]. + Clears [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_theme_item"> @@ -91,10 +91,10 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Clears the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]node_type[/code]. + Clears the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="copy_default_theme"> @@ -118,19 +118,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the [Color] at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the [Color] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_color_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]node_type[/code]. + Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_color_type_list" qualifiers="const"> @@ -145,19 +145,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the constant at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the constant at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_constant_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]node_type[/code]. + Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_constant_type_list" qualifiers="const"> @@ -172,19 +172,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the [Font] at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_font_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]node_type[/code]. + Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_font_size" qualifiers="const"> @@ -192,19 +192,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the font size at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_font_size_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the font sizes as a [PackedStringArray] filled with each font size name, for use in [method get_font_size], if the theme has [code]node_type[/code]. + Returns all the font sizes as a [PackedStringArray] filled with each font size name, for use in [method get_font_size], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_font_size_type_list" qualifiers="const"> @@ -226,19 +226,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_icon_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]node_type[/code]. + Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_icon_type_list" qualifiers="const"> @@ -253,21 +253,21 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the [StyleBox] at [code]name[/code] if the theme has [code]node_type[/code]. - Valid [code]name[/code]s may be found using [method get_stylebox_list]. Valid [code]node_type[/code]s may be found using [method get_stylebox_type_list]. + Returns the [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code]. + Valid [code]name[/code]s may be found using [method get_stylebox_list]. Valid [code]theme_type[/code]s may be found using [method get_stylebox_type_list]. </description> </method> <method name="get_stylebox_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]node_type[/code]. - Valid [code]node_type[/code]s may be found using [method get_stylebox_type_list]. + Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]theme_type[/code]. + Valid [code]theme_type[/code]s may be found using [method get_stylebox_type_list]. </description> </method> <method name="get_stylebox_type_list" qualifiers="const"> @@ -284,11 +284,11 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Returns the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]node_type[/code]. - Valid [code]name[/code]s may be found using [method get_theme_item_list] or a data type specific method. Valid [code]node_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method. + Returns the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code]. + Valid [code]name[/code]s may be found using [method get_theme_item_list] or a data type specific method. Valid [code]theme_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method. </description> </method> <method name="get_theme_item_list" qualifiers="const"> @@ -296,11 +296,11 @@ </return> <argument index="0" name="data_type" type="int" enum="Theme.DataType"> </argument> - <argument index="1" name="node_type" type="String"> + <argument index="1" name="theme_type" type="String"> </argument> <description> - Returns all the theme items of [code]data_type[/code] as a [PackedStringArray] filled with each theme items's name, for use in [method get_theme_item] or a data type specific method, if the theme has [code]node_type[/code]. - Valid [code]node_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method. + Returns all the theme items of [code]data_type[/code] as a [PackedStringArray] filled with each theme items's name, for use in [method get_theme_item] or a data type specific method, if the theme has [code]theme_type[/code]. + Valid [code]theme_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method. </description> </method> <method name="get_theme_item_type_list" qualifiers="const"> @@ -324,11 +324,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_constant" qualifiers="const"> @@ -336,11 +336,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if constant with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if constant with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_font" qualifiers="const"> @@ -348,11 +348,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_font_size" qualifiers="const"> @@ -360,11 +360,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if font size with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_icon" qualifiers="const"> @@ -372,11 +372,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_stylebox" qualifiers="const"> @@ -384,11 +384,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_theme_item" qualifiers="const"> @@ -398,11 +398,11 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if a theme item of [code]data_type[/code] with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if a theme item of [code]data_type[/code] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="rename_color"> @@ -412,10 +412,10 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Renames the [Color] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails. + Renames the [Color] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_constant"> @@ -425,10 +425,10 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Renames the constant at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails. + Renames the constant at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_font"> @@ -438,10 +438,10 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Renames the [Font] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails. + Renames the [Font] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_font_size"> @@ -451,10 +451,10 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Renames the font size [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails. + Renames the font size [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_icon"> @@ -464,10 +464,10 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Renames the icon at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails. + Renames the icon at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_stylebox"> @@ -477,10 +477,10 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Renames [StyleBox] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails. + Renames [StyleBox] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_theme_item"> @@ -492,10 +492,10 @@ </argument> <argument index="2" name="name" type="StringName"> </argument> - <argument index="3" name="node_type" type="StringName"> + <argument index="3" name="theme_type" type="StringName"> </argument> <description> - Renames the theme item of [code]data_type[/code] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails. + Renames the theme item of [code]data_type[/code] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="set_color"> @@ -503,13 +503,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="color" type="Color"> </argument> <description> - Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]node_type[/code]. - Creates [code]node_type[/code] if the theme does not have it. + Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_constant"> @@ -517,13 +517,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="constant" type="int"> </argument> <description> - Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]node_type[/code]. - Creates [code]node_type[/code] if the theme does not have it. + Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_font"> @@ -531,13 +531,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="font" type="Font"> </argument> <description> - Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]node_type[/code]. - Creates [code]node_type[/code] if the theme does not have it. + Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_font_size"> @@ -545,13 +545,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="font_size" type="int"> </argument> <description> - Sets the theme's font size to [code]font_size[/code] at [code]name[/code] in [code]node_type[/code]. - Creates [code]node_type[/code] if the theme does not have it. + Sets the theme's font size to [code]font_size[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_icon"> @@ -559,13 +559,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="texture" type="Texture2D"> </argument> <description> - Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]node_type[/code]. - Creates [code]node_type[/code] if the theme does not have it. + Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_stylebox"> @@ -573,13 +573,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="texture" type="StyleBox"> </argument> <description> - Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]node_type[/code]. - Creates [code]node_type[/code] if the theme does not have it. + Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_theme_item"> @@ -589,14 +589,14 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <argument index="3" name="value" type="Variant"> </argument> <description> - Sets the theme item of [code]data_type[/code] to [code]value[/code] at [code]name[/code] in [code]node_type[/code]. + Sets the theme item of [code]data_type[/code] to [code]value[/code] at [code]name[/code] in [code]theme_type[/code]. Does nothing if the [code]value[/code] type does not match [code]data_type[/code]. - Creates [code]node_type[/code] if the theme does not have it. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> </methods> diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml new file mode 100644 index 0000000000..e3bc910ab6 --- /dev/null +++ b/doc/classes/TileData.xml @@ -0,0 +1,245 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="TileData" inherits="Object" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_collision_shape"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_collision_shape_one_way_margin" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shape_index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_collision_shape_shape" qualifiers="const"> + <return type="Shape2D"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shape_index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_collision_shapes_count" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_custom_data" qualifiers="const"> + <return type="Variant"> + </return> + <argument index="0" name="layer_name" type="String"> + </argument> + <description> + </description> + </method> + <method name="get_custom_data_by_layer_id" qualifiers="const"> + <return type="Variant"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_navigation_polygon" qualifiers="const"> + <return type="NavigationPolygon"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_occluder" qualifiers="const"> + <return type="OccluderPolygon2D"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_peering_bit_terrain" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor"> + </argument> + <description> + </description> + </method> + <method name="is_collision_shape_one_way" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shape_index" type="int"> + </argument> + <description> + </description> + </method> + <method name="remove_collision_shape"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shape_index" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_collision_shape_one_way"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shape_index" type="int"> + </argument> + <argument index="2" name="one_way" type="bool"> + </argument> + <description> + </description> + </method> + <method name="set_collision_shape_one_way_margin"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shape_index" type="int"> + </argument> + <argument index="2" name="one_way_margin" type="float"> + </argument> + <description> + </description> + </method> + <method name="set_collision_shape_shape"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shape_index" type="int"> + </argument> + <argument index="2" name="shape" type="Shape2D"> + </argument> + <description> + </description> + </method> + <method name="set_collision_shapes_count"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shapes_count" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_custom_data"> + <return type="void"> + </return> + <argument index="0" name="layer_name" type="String"> + </argument> + <argument index="1" name="value" type="Variant"> + </argument> + <description> + </description> + </method> + <method name="set_custom_data_by_layer_id"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="value" type="Variant"> + </argument> + <description> + </description> + </method> + <method name="set_navigation_polygon"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="navigation_polygon" type="NavigationPolygon"> + </argument> + <description> + </description> + </method> + <method name="set_occluder"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="occluder_polygon" type="OccluderPolygon2D"> + </argument> + <description> + </description> + </method> + <method name="set_peering_bit_terrain"> + <return type="void"> + </return> + <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor"> + </argument> + <argument index="1" name="terrain" type="int"> + </argument> + <description> + </description> + </method> + <method name="tile_get_material" qualifiers="const"> + <return type="ShaderMaterial"> + </return> + <description> + </description> + </method> + <method name="tile_set_material"> + <return type="void"> + </return> + <argument index="0" name="material" type="ShaderMaterial"> + </argument> + <description> + </description> + </method> + </methods> + <members> + <member name="flip_h" type="bool" setter="set_flip_h" getter="get_flip_h" default="false"> + </member> + <member name="flip_v" type="bool" setter="set_flip_v" getter="get_flip_v" default="false"> + </member> + <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )"> + </member> + <member name="probability" type="float" setter="set_probability" getter="get_probability" default="1.0"> + </member> + <member name="terrain_set" type="int" setter="set_terrain_set" getter="get_terrain_set" default="-1"> + </member> + <member name="texture_offset" type="Vector2i" setter="set_texture_offset" getter="get_texture_offset" default="Vector2i( 0, 0 )"> + </member> + <member name="transpose" type="bool" setter="set_transpose" getter="get_transpose" default="false"> + </member> + <member name="y_sort_origin" type="Vector2i" setter="set_y_sort_origin" getter="get_y_sort_origin" default="Vector2i( 0, 0 )"> + </member> + <member name="z_index" type="int" setter="set_z_index" getter="get_z_index" default="0"> + </member> + </members> + <signals> + <signal name="changed"> + <description> + </description> + </signal> + </signals> + <constants> + </constants> +</class> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 205b342ba8..fd52a28486 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -31,53 +31,46 @@ Clears cells that do not exist in the tileset. </description> </method> - <method name="get_cell" qualifiers="const"> + <method name="get_cell_alternative_tile" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> + <argument index="0" name="coords" type="Vector2i"> </argument> <description> - Returns the tile index of the given cell. If no tile exists in the cell, returns [constant INVALID_CELL]. </description> </method> - <method name="get_cell_autotile_coord" qualifiers="const"> - <return type="Vector2"> + <method name="get_cell_atlas_coords" qualifiers="const"> + <return type="Vector2i"> </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> + <argument index="0" name="coords" type="Vector2i"> </argument> <description> - Returns the coordinate (subtile column and row) of the autotile variation in the tileset. Returns a zero vector if the cell doesn't have autotiling. </description> </method> - <method name="get_cellv" qualifiers="const"> + <method name="get_cell_source_id" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="position" type="Vector2"> + <argument index="0" name="coords" type="Vector2i"> </argument> <description> - Returns the tile index of the cell given by a Vector2. If no tile exists in the cell, returns [constant INVALID_CELL]. </description> </method> - <method name="get_collision_layer_bit" qualifiers="const"> - <return type="bool"> + <method name="get_neighbor_cell" qualifiers="const"> + <return type="Vector2i"> </return> - <argument index="0" name="bit" type="int"> + <argument index="0" name="coords" type="Vector2i"> + </argument> + <argument index="1" name="neighbor" type="int" enum="TileSet.CellNeighbor"> </argument> <description> - Returns [code]true[/code] if the given collision layer bit is set. </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> - <return type="bool"> + <method name="get_surrounding_tiles"> + <return type="Vector2i[]"> </return> - <argument index="0" name="bit" type="int"> + <argument index="0" name="coords" type="Vector2i"> </argument> <description> - Returns [code]true[/code] if the given collision mask bit is set. </description> </method> <method name="get_used_cells" qualifiers="const"> @@ -87,15 +80,6 @@ Returns a [Vector2] array with the positions of all cells containing a tile from the tileset (i.e. a tile index different from [code]-1[/code]). </description> </method> - <method name="get_used_cells_by_index" qualifiers="const"> - <return type="Vector2i[]"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <description> - Returns an array of all cells with the given tile [code]index[/code]. - </description> - </method> <method name="get_used_rect"> <return type="Rect2"> </return> @@ -103,155 +87,28 @@ Returns a rectangle enclosing the used (non-empty) tiles of the map. </description> </method> - <method name="is_cell_transposed" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> - <description> - Returns [code]true[/code] if the given cell is transposed, i.e. the X and Y axes are swapped. - </description> - </method> - <method name="is_cell_x_flipped" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> - <description> - Returns [code]true[/code] if the given cell is flipped in the X axis. - </description> - </method> - <method name="is_cell_y_flipped" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> - <description> - Returns [code]true[/code] if the given cell is flipped in the Y axis. - </description> - </method> <method name="map_to_world" qualifiers="const"> <return type="Vector2"> </return> - <argument index="0" name="map_position" type="Vector2"> - </argument> - <argument index="1" name="ignore_half_ofs" type="bool" default="false"> + <argument index="0" name="map_position" type="Vector2i"> </argument> <description> Returns the local position corresponding to the given tilemap (grid-based) coordinates. - Optionally, the tilemap's half offset can be ignored. </description> </method> <method name="set_cell"> <return type="void"> </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> - <argument index="2" name="tile" type="int"> - </argument> - <argument index="3" name="flip_x" type="bool" default="false"> - </argument> - <argument index="4" name="flip_y" type="bool" default="false"> - </argument> - <argument index="5" name="transpose" type="bool" default="false"> - </argument> - <argument index="6" name="autotile_coord" type="Vector2" default="Vector2( 0, 0 )"> - </argument> - <description> - Sets the tile index for the cell given by a Vector2. - An index of [code]-1[/code] clears the cell. - Optionally, the tile can also be flipped, transposed, or given autotile coordinates. The autotile coordinate refers to the column and row of the subtile. - [b]Note:[/b] 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 [method update_dirty_quadrants]. - Overriding this method also overrides it internally, allowing custom logic to be implemented when tiles are placed/removed: - [codeblocks] - [gdscript] - func set_cell(x, y, tile, flip_x=false, flip_y=false, transpose=false, autotile_coord=Vector2()): - # Write your custom logic here. - # To call the default method: - .set_cell(x, y, tile, flip_x, flip_y, transpose, autotile_coord) - [/gdscript] - [csharp] - public void SetCell(int x, int y, int tile, bool flipX = false, bool flipY = false, bool transpose = false, Vector2 autotileCoord = new Vector2()) - { - // Write your custom logic here. - // To call the default method: - base.SetCell(x, y, tile, flipX, flipY, transpose, autotileCoord); - } - [/csharp] - [/codeblocks] - </description> - </method> - <method name="set_cellv"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <argument index="1" name="tile" type="int"> - </argument> - <argument index="2" name="flip_x" type="bool" default="false"> - </argument> - <argument index="3" name="flip_y" type="bool" default="false"> - </argument> - <argument index="4" name="transpose" type="bool" default="false"> - </argument> - <description> - Sets the tile index for the given cell. - An index of [code]-1[/code] clears the cell. - Optionally, the tile can also be flipped or transposed. - [b]Note:[/b] 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 [method update_dirty_quadrants]. - </description> - </method> - <method name="set_collision_layer_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> - <description> - Sets the given collision layer bit. - </description> - </method> - <method name="set_collision_mask_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> + <argument index="0" name="coords" type="Vector2i"> </argument> - <argument index="1" name="value" type="bool"> + <argument index="1" name="source_id" type="int" default="-1"> </argument> - <description> - Sets the given collision mask bit. - </description> - </method> - <method name="update_bitmask_area"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <description> - Applies autotiling rules to the cell (and its adjacent cells) referenced by its grid-based X and Y coordinates. - </description> - </method> - <method name="update_bitmask_region"> - <return type="void"> - </return> - <argument index="0" name="start" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="2" name="atlas_coords" type="Vector2i" default="Vector2i( -1, -1 )"> </argument> - <argument index="1" name="end" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="3" name="alternative_tile" type="int" default="-1"> </argument> <description> - 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. + Sets the tile index for the cell given by a Vector2i. </description> </method> <method name="update_dirty_quadrants"> @@ -262,7 +119,7 @@ </description> </method> <method name="world_to_map" qualifiers="const"> - <return type="Vector2"> + <return type="Vector2i"> </return> <argument index="0" name="world_position" type="Vector2"> </argument> @@ -272,110 +129,20 @@ </method> </methods> <members> - <member name="bake_navigation" type="bool" setter="set_bake_navigation" getter="is_baking_navigation" default="false"> - If [code]true[/code], this TileMap bakes a navigation region. - </member> - <member name="cell_clip_uv" type="bool" setter="set_clip_uv" getter="get_clip_uv" default="false"> - If [code]true[/code], the cell's UVs will be clipped. - </member> - <member name="cell_custom_transform" type="Transform2D" setter="set_custom_transform" getter="get_custom_transform" default="Transform2D( 64, 0, 0, 64, 0, 0 )"> - The custom [Transform2D] to be applied to the TileMap's cells. - </member> - <member name="cell_half_offset" type="int" setter="set_half_offset" getter="get_half_offset" enum="TileMap.HalfOffset" default="2"> - Amount to offset alternating tiles. See [enum HalfOffset] for possible values. - </member> <member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size" default="16"> The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. </member> - <member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size" default="Vector2( 64, 64 )"> - The TileMap's cell size. - </member> - <member name="cell_tile_origin" type="int" setter="set_tile_origin" getter="get_tile_origin" enum="TileMap.TileOrigin" default="0"> - Position for tile origin. See [enum TileOrigin] for possible values. - </member> - <member name="cell_y_sort" type="bool" setter="set_y_sort_enabled" getter="is_y_sort_enabled" default="false"> - If [code]true[/code], the TileMap's direct children will be drawn in order of their Y coordinate. - </member> - <member name="centered_textures" type="bool" setter="set_centered_textures" getter="is_centered_textures_enabled" default="false"> - If [code]true[/code], the textures will be centered in the middle of each tile. This is useful for certain isometric or top-down modes when textures are made larger or smaller than the tiles (e.g. to avoid flickering on tile edges). The offset is still applied, but from the center of the tile. If used, [member compatibility_mode] is ignored. - If [code]false[/code], the texture position start in the top-left corner unless [member compatibility_mode] is enabled. - </member> - <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0"> - Bounce value for static body collisions (see [code]collision_use_kinematic[/code]). - </member> - <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" default="1.0"> - Friction value for static body collisions (see [code]collision_use_kinematic[/code]). - </member> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> - The collision layer(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. - </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The collision mask(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. - </member> - <member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic" default="false"> - If [code]true[/code], TileMap collisions will be handled as a kinematic body. If [code]false[/code], collisions will be handled as static body. - </member> - <member name="collision_use_parent" type="bool" setter="set_collision_use_parent" getter="get_collision_use_parent" default="false"> - If [code]true[/code], this tilemap's collision shape will be added to the collision shape of the parent. The parent has to be a [CollisionObject2D]. - </member> - <member name="compatibility_mode" type="bool" setter="set_compatibility_mode" getter="is_compatibility_mode_enabled" default="false"> - If [code]true[/code], the compatibility with the tilemaps made in Godot 3.1 or earlier is maintained (textures move when the tile origin changes and rotate if the texture size is not homogeneous). This mode presents problems when doing [code]flip_h[/code], [code]flip_v[/code] and [code]transpose[/code] tile operations on non-homogeneous isometric tiles (e.g. 2:1), in which the texture could not coincide with the collision, thus it is not recommended for isometric or non-square tiles. - If [code]false[/code], the textures do not move when doing [code]flip_h[/code], [code]flip_v[/code] operations if no offset is used, nor when changing the tile origin. - The compatibility mode doesn't work with the [member centered_textures] option, because displacing textures with the [member cell_tile_origin] option or in irregular tiles is not relevant when centering those textures. - </member> - <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="TileMap.Mode" default="0"> - The TileMap orientation mode. See [enum Mode] for possible values. - </member> - <member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" default="1"> - The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s). - </member> <member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset"> The assigned [TileSet]. </member> </members> <signals> - <signal name="settings_changed"> + <signal name="changed"> <description> - Emitted when a tilemap setting has changed. + Emitted when the [TileSet] of this TileMap changes. </description> </signal> </signals> <constants> - <constant name="INVALID_CELL" value="-1"> - Returned when a cell doesn't exist. - </constant> - <constant name="MODE_SQUARE" value="0" enum="Mode"> - Orthogonal orientation mode. - </constant> - <constant name="MODE_ISOMETRIC" value="1" enum="Mode"> - Isometric orientation mode. - </constant> - <constant name="MODE_CUSTOM" value="2" enum="Mode"> - Custom orientation mode. - </constant> - <constant name="HALF_OFFSET_X" value="0" enum="HalfOffset"> - Half offset on the X coordinate. - </constant> - <constant name="HALF_OFFSET_Y" value="1" enum="HalfOffset"> - Half offset on the Y coordinate. - </constant> - <constant name="HALF_OFFSET_DISABLED" value="2" enum="HalfOffset"> - Half offset disabled. - </constant> - <constant name="HALF_OFFSET_NEGATIVE_X" value="3" enum="HalfOffset"> - Half offset on the X coordinate (negative). - </constant> - <constant name="HALF_OFFSET_NEGATIVE_Y" value="4" enum="HalfOffset"> - Half offset on the Y coordinate (negative). - </constant> - <constant name="TILE_ORIGIN_TOP_LEFT" value="0" enum="TileOrigin"> - Tile origin at its top-left corner. - </constant> - <constant name="TILE_ORIGIN_CENTER" value="1" enum="TileOrigin"> - Tile origin at its center. - </constant> - <constant name="TILE_ORIGIN_BOTTOM_LEFT" value="2" enum="TileOrigin"> - Tile origin at its bottom-left corner. - </constant> </constants> </class> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index adc5880c71..ff68a017a1 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -17,752 +17,350 @@ <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> </tutorials> <methods> - <method name="_forward_atlas_subtile_selection" qualifiers="virtual"> - <return type="Vector2"> - </return> - <argument index="0" name="atlastile_id" type="int"> - </argument> - <argument index="1" name="tilemap" type="Object"> - </argument> - <argument index="2" name="tile_location" type="Vector2"> - </argument> - <description> - </description> - </method> - <method name="_forward_subtile_selection" qualifiers="virtual"> - <return type="Vector2"> - </return> - <argument index="0" name="autotile_id" type="int"> - </argument> - <argument index="1" name="bitmask" type="int"> - </argument> - <argument index="2" name="tilemap" type="Object"> - </argument> - <argument index="3" name="tile_location" type="Vector2"> - </argument> - <description> - </description> - </method> - <method name="_is_tile_bound" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="drawn_id" type="int"> - </argument> - <argument index="1" name="neighbor_id" type="int"> - </argument> - <description> - Determines when the auto-tiler should consider two different auto-tile IDs to be bound together. - [b]Note:[/b] [code]neighbor_id[/code] will be [code]-1[/code] ([constant TileMap.INVALID_CELL]) when checking a tile against an empty neighbor tile. - </description> - </method> - <method name="autotile_clear_bitmask_map"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Clears all bitmask information of the autotile. - </description> - </method> - <method name="autotile_get_bitmask"> + <method name="add_source"> <return type="int"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> + <argument index="0" name="atlas_source_id_override" type="TileSetAtlasSource"> </argument> - <description> - Returns the bitmask of the subtile from an autotile given its coordinates. - The value is the sum of the values in [enum AutotileBindings] present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right). - </description> - </method> - <method name="autotile_get_bitmask_mode" qualifiers="const"> - <return type="int" enum="TileSet.BitmaskMode"> - </return> - <argument index="0" name="id" type="int"> + <argument index="1" name="arg1" type="int" default="-1"> </argument> <description> - Returns the [enum BitmaskMode] of the autotile. </description> </method> - <method name="autotile_get_icon_coordinate" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - 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 information is incomplete. It will also be used to represent it in the TileSet editor. - </description> - </method> - <method name="autotile_get_light_occluder" qualifiers="const"> - <return type="OccluderPolygon2D"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> - </argument> - <description> - Returns the light occluder of the subtile from an atlas/autotile given its coordinates. - </description> - </method> - <method name="autotile_get_navigation_polygon" qualifiers="const"> - <return type="NavigationPolygon"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> - </argument> - <description> - Returns the navigation polygon of the subtile from an atlas/autotile given its coordinates. - </description> - </method> - <method name="autotile_get_size" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the size of the subtiles in an atlas/autotile. - </description> - </method> - <method name="autotile_get_spacing" qualifiers="const"> + <method name="get_navigation_layer_layers" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> <description> - Returns the spacing between subtiles of the atlas/autotile. </description> </method> - <method name="autotile_get_subtile_priority"> + <method name="get_next_source_id" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> - </argument> <description> - Returns the priority of the subtile from an autotile given its coordinates. - When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked. </description> </method> - <method name="autotile_get_z_index"> + <method name="get_occlusion_layer_light_mask" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> + <argument index="0" name="arg0" type="int"> </argument> <description> - Returns the drawing index of the subtile from an atlas/autotile given its coordinates. </description> </method> - <method name="autotile_set_bitmask"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="bitmask" type="Vector2"> - </argument> - <argument index="2" name="flag" type="int"> - </argument> - <description> - Sets the bitmask of the subtile from an autotile given its coordinates. - The value is the sum of the values in [enum AutotileBindings] present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right). - </description> - </method> - <method name="autotile_set_bitmask_mode"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="mode" type="int" enum="TileSet.BitmaskMode"> - </argument> - <description> - Sets the [enum BitmaskMode] of the autotile. - </description> - </method> - <method name="autotile_set_icon_coordinate"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> - </argument> - <description> - 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 information is incomplete. It will also be used to represent it in the TileSet editor. - </description> - </method> - <method name="autotile_set_light_occluder"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="light_occluder" type="OccluderPolygon2D"> - </argument> - <argument index="2" name="coord" type="Vector2"> - </argument> - <description> - Sets the light occluder of the subtile from an atlas/autotile given its coordinates. - </description> - </method> - <method name="autotile_set_navigation_polygon"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="navigation_polygon" type="NavigationPolygon"> - </argument> - <argument index="2" name="coord" type="Vector2"> - </argument> - <description> - Sets the navigation polygon of the subtile from an atlas/autotile given its coordinates. - </description> - </method> - <method name="autotile_set_size"> - <return type="void"> + <method name="get_occlusion_layer_sdf_collision" qualifiers="const"> + <return type="bool"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="size" type="Vector2"> + <argument index="0" name="arg0" type="int"> </argument> <description> - Sets the size of the subtiles in an atlas/autotile. </description> </method> - <method name="autotile_set_spacing"> - <return type="void"> + <method name="get_physics_layer_collision_layer" qualifiers="const"> + <return type="int"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="spacing" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> <description> - Sets the spacing between subtiles of the atlas/autotile. </description> </method> - <method name="autotile_set_subtile_priority"> - <return type="void"> + <method name="get_physics_layer_collision_mask" qualifiers="const"> + <return type="int"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> - </argument> - <argument index="2" name="priority" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> <description> - Sets the priority of the subtile from an autotile given its coordinates. - When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked. </description> </method> - <method name="autotile_set_z_index"> - <return type="void"> + <method name="get_physics_layer_physics_material" qualifiers="const"> + <return type="PhysicsMaterial"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> - </argument> - <argument index="2" name="z_index" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> <description> - Sets the drawing index of the subtile from an atlas/autotile given its coordinates. </description> </method> - <method name="clear"> - <return type="void"> + <method name="get_source" qualifiers="const"> + <return type="TileSetSource"> </return> - <description> - Clears all tiles. - </description> - </method> - <method name="create_tile"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="index" type="int"> </argument> <description> - Creates a new tile with the given ID. </description> </method> - <method name="find_tile_by_name" qualifiers="const"> + <method name="get_source_count" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="name" type="String"> - </argument> <description> - Returns the first tile matching the given name. </description> </method> - <method name="get_last_unused_tile_id" qualifiers="const"> + <method name="get_source_id" qualifiers="const"> <return type="int"> </return> - <description> - Returns the ID following the last currently used ID, useful when creating a new tile. - </description> - </method> - <method name="get_tiles_ids" qualifiers="const"> - <return type="Array"> - </return> - <description> - Returns an array of all currently used tile IDs. - </description> - </method> - <method name="remove_tile"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="index" type="int"> </argument> <description> - Removes the given tile ID. </description> </method> - <method name="tile_add_shape"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape" type="Shape2D"> - </argument> - <argument index="2" name="shape_transform" type="Transform2D"> - </argument> - <argument index="3" name="one_way" type="bool" default="false"> - </argument> - <argument index="4" name="autotile_coord" type="Vector2" default="Vector2( 0, 0 )"> - </argument> - <description> - Adds a shape to the tile. - </description> - </method> - <method name="tile_get_light_occluder" qualifiers="const"> - <return type="OccluderPolygon2D"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the tile's light occluder. - </description> - </method> - <method name="tile_get_material" qualifiers="const"> - <return type="ShaderMaterial"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the tile's material. - </description> - </method> - <method name="tile_get_modulate" qualifiers="const"> + <method name="get_terrain_color" qualifiers="const"> <return type="Color"> </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the tile's modulation color. - </description> - </method> - <method name="tile_get_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the tile's name. - </description> - </method> - <method name="tile_get_navigation_polygon" qualifiers="const"> - <return type="NavigationPolygon"> - </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> - <description> - Returns the navigation polygon of the tile. - </description> - </method> - <method name="tile_get_navigation_polygon_offset" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="id" type="int"> + <argument index="1" name="terrain_index" type="int"> </argument> <description> - Returns the offset of the tile's navigation polygon. </description> </method> - <method name="tile_get_occluder_offset" qualifiers="const"> - <return type="Vector2"> + <method name="get_terrain_name" qualifiers="const"> + <return type="String"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> - <description> - Returns the offset of the tile's light occluder. - </description> - </method> - <method name="tile_get_region" qualifiers="const"> - <return type="Rect2"> - </return> - <argument index="0" name="id" type="int"> + <argument index="1" name="terrain_index" type="int"> </argument> <description> - Returns the tile sub-region in the texture. </description> </method> - <method name="tile_get_shape" qualifiers="const"> - <return type="Shape2D"> + <method name="get_terrain_set_mode" qualifiers="const"> + <return type="int" enum="TileSet.TerrainMode"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> <description> - Returns a tile's given shape. </description> </method> - <method name="tile_get_shape_count" qualifiers="const"> + <method name="get_terrains_count" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the number of shapes assigned to a tile. - </description> - </method> - <method name="tile_get_shape_offset" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> <description> - Returns the offset of a tile's shape. </description> </method> - <method name="tile_get_shape_one_way" qualifiers="const"> + <method name="has_source" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> - </argument> - <description> - Returns the one-way collision value of a tile's shape. - </description> - </method> - <method name="tile_get_shape_one_way_margin" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> - </argument> - <description> - </description> - </method> - <method name="tile_get_shape_transform" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> - </argument> - <description> - Returns the [Transform2D] of a tile's shape. - </description> - </method> - <method name="tile_get_shapes" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns an array of dictionaries describing the tile's shapes. - [b]Dictionary structure in the array returned by this method:[/b] - [codeblock] - { - "autotile_coord": Vector2, - "one_way": bool, - "one_way_margin": int, - "shape": CollisionShape2D, - "shape_transform": Transform2D, - } - [/codeblock] - </description> - </method> - <method name="tile_get_texture" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the tile's texture. - </description> - </method> - <method name="tile_get_texture_offset" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the texture offset of the tile. - </description> - </method> - <method name="tile_get_tile_mode" qualifiers="const"> - <return type="int" enum="TileSet.TileMode"> - </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="index" type="int"> </argument> <description> - Returns the tile's [enum TileMode]. </description> </method> - <method name="tile_get_z_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the tile's Z index (drawing layer). - </description> - </method> - <method name="tile_set_light_occluder"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="light_occluder" type="OccluderPolygon2D"> - </argument> - <description> - Sets a light occluder for the tile. - </description> - </method> - <method name="tile_set_material"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="material" type="ShaderMaterial"> - </argument> - <description> - Sets the tile's material. - </description> - </method> - <method name="tile_set_modulate"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> - <description> - Sets the tile's modulation color. - </description> - </method> - <method name="tile_set_name"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="name" type="String"> - </argument> - <description> - Sets the tile's name. - </description> - </method> - <method name="tile_set_navigation_polygon"> + <method name="remove_source"> <return type="void"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="navigation_polygon" type="NavigationPolygon"> + <argument index="0" name="source_id" type="int"> </argument> <description> - Sets the tile's navigation polygon. </description> </method> - <method name="tile_set_navigation_polygon_offset"> + <method name="set_navigation_layer_layers"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> - <argument index="1" name="navigation_polygon_offset" type="Vector2"> + <argument index="1" name="layers" type="int"> </argument> <description> - Sets an offset for the tile's navigation polygon. </description> </method> - <method name="tile_set_occluder_offset"> + <method name="set_occlusion_layer_light_mask"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> - <argument index="1" name="occluder_offset" type="Vector2"> + <argument index="1" name="light_mask" type="int"> </argument> <description> - Sets an offset for the tile's light occluder. </description> </method> - <method name="tile_set_region"> + <method name="set_occlusion_layer_sdf_collision"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> - <argument index="1" name="region" type="Rect2"> + <argument index="1" name="sdf_collision" type="int"> </argument> <description> - Sets the tile's sub-region in the texture. This is common in texture atlases. </description> </method> - <method name="tile_set_shape"> + <method name="set_physics_layer_collision_layer"> <return type="void"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> - <argument index="2" name="shape" type="Shape2D"> + <argument index="1" name="layer" type="int"> </argument> <description> - Sets a shape for the tile, enabling collision. </description> </method> - <method name="tile_set_shape_offset"> + <method name="set_physics_layer_collision_mask"> <return type="void"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> - <argument index="2" name="shape_offset" type="Vector2"> + <argument index="1" name="mask" type="int"> </argument> <description> - Sets the offset of a tile's shape. </description> </method> - <method name="tile_set_shape_one_way"> + <method name="set_physics_layer_physics_material"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> - <argument index="1" name="shape_id" type="int"> - </argument> - <argument index="2" name="one_way" type="bool"> + <argument index="1" name="physics_material" type="PhysicsMaterial"> </argument> <description> - Enables one-way collision on a tile's shape. </description> </method> - <method name="tile_set_shape_one_way_margin"> + <method name="set_source_id"> <return type="void"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> + <argument index="0" name="source_id" type="int"> </argument> - <argument index="2" name="one_way" type="float"> + <argument index="1" name="arg1" type="int"> </argument> <description> </description> </method> - <method name="tile_set_shape_transform"> + <method name="set_terrain_color"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> - <argument index="1" name="shape_id" type="int"> + <argument index="1" name="terrain_index" type="int"> </argument> - <argument index="2" name="shape_transform" type="Transform2D"> + <argument index="2" name="color" type="Color"> </argument> <description> - Sets a [Transform2D] on a tile's shape. </description> </method> - <method name="tile_set_shapes"> + <method name="set_terrain_name"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> - <argument index="1" name="shapes" type="Array"> - </argument> - <description> - Sets an array of shapes for the tile, enabling collision. - </description> - </method> - <method name="tile_set_texture"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> - <description> - Sets the tile's texture. - </description> - </method> - <method name="tile_set_texture_offset"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> + <argument index="1" name="terrain_index" type="int"> </argument> - <argument index="1" name="texture_offset" type="Vector2"> + <argument index="2" name="name" type="String"> </argument> <description> - Sets the tile's texture offset. </description> </method> - <method name="tile_set_tile_mode"> + <method name="set_terrain_set_mode"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> - <argument index="1" name="tilemode" type="int" enum="TileSet.TileMode"> + <argument index="1" name="mode" type="int" enum="TileSet.TerrainMode"> </argument> <description> - Sets the tile's [enum TileMode]. </description> </method> - <method name="tile_set_z_index"> + <method name="set_terrains_count"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> - <argument index="1" name="z_index" type="int"> + <argument index="1" name="terrains_count" type="int"> </argument> <description> - Sets the tile's drawing index. </description> </method> </methods> + <members> + <member name="custom_data_layers_count" type="int" setter="set_custom_data_layers_count" getter="get_custom_data_layers_count" default="0"> + </member> + <member name="navigation_layers_count" type="int" setter="set_navigation_layers_count" getter="get_navigation_layers_count" default="0"> + </member> + <member name="occlusion_layers_count" type="int" setter="set_occlusion_layers_count" getter="get_occlusion_layers_count" default="0"> + </member> + <member name="physics_layers_count" type="int" setter="set_physics_layers_count" getter="get_physics_layers_count" default="0"> + </member> + <member name="terrains_sets_count" type="int" setter="set_terrain_sets_count" getter="get_terrain_sets_count" default="0"> + </member> + <member name="tile_layout" type="int" setter="set_tile_layout" getter="get_tile_layout" enum="TileSet.TileLayout" default="0"> + </member> + <member name="tile_offset_axis" type="int" setter="set_tile_offset_axis" getter="get_tile_offset_axis" enum="TileSet.TileOffsetAxis" default="0"> + </member> + <member name="tile_shape" type="int" setter="set_tile_shape" getter="get_tile_shape" enum="TileSet.TileShape" default="0"> + </member> + <member name="tile_size" type="Vector2i" setter="set_tile_size" getter="get_tile_size" default="Vector2i( 16, 16 )"> + </member> + <member name="tile_skew" type="Vector2" setter="set_tile_skew" getter="get_tile_skew" default="Vector2( 0, 0 )"> + </member> + <member name="uv_clipping" type="bool" setter="set_uv_clipping" getter="is_uv_clipping" default="false"> + </member> + <member name="y_sorting" type="bool" setter="set_y_sorting" getter="is_y_sorting" default="false"> + </member> + </members> <constants> - <constant name="BITMASK_2X2" value="0" enum="BitmaskMode"> + <constant name="TILE_SHAPE_SQUARE" value="0" enum="TileShape"> + Orthogonal orientation mode. + </constant> + <constant name="TILE_SHAPE_ISOMETRIC" value="1" enum="TileShape"> + Isometric orientation mode. + </constant> + <constant name="TILE_SHAPE_HALF_OFFSET_SQUARE" value="2" enum="TileShape"> + </constant> + <constant name="TILE_SHAPE_HEXAGON" value="3" enum="TileShape"> + Hexagon orientation mode. + </constant> + <constant name="TILE_LAYOUT_STACKED" value="0" enum="TileLayout"> + </constant> + <constant name="TILE_LAYOUT_STACKED_OFFSET" value="1" enum="TileLayout"> + </constant> + <constant name="TILE_LAYOUT_STAIRS_RIGHT" value="2" enum="TileLayout"> + </constant> + <constant name="TILE_LAYOUT_STAIRS_DOWN" value="3" enum="TileLayout"> + </constant> + <constant name="TILE_LAYOUT_DIAMOND_RIGHT" value="4" enum="TileLayout"> + </constant> + <constant name="TILE_LAYOUT_DIAMOND_DOWN" value="5" enum="TileLayout"> + </constant> + <constant name="TILE_OFFSET_AXIS_HORIZONTAL" value="0" enum="TileOffsetAxis"> + </constant> + <constant name="TILE_OFFSET_AXIS_VERTICAL" value="1" enum="TileOffsetAxis"> + </constant> + <constant name="TileSet::CELL_NEIGHBOR_RIGHT_SIDE" value="0" enum="CellNeighbor"> + </constant> + <constant name="TileSet::CELL_NEIGHBOR_RIGHT_CORNER" value="1" enum="CellNeighbor"> + </constant> + <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE" value="2" enum="CellNeighbor"> + </constant> + <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER" value="3" enum="CellNeighbor"> + </constant> + <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_SIDE" value="4" enum="CellNeighbor"> </constant> - <constant name="BITMASK_3X3_MINIMAL" value="1" enum="BitmaskMode"> + <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_CORNER" value="5" enum="CellNeighbor"> </constant> - <constant name="BITMASK_3X3" value="2" enum="BitmaskMode"> + <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_LEFT_SIDE" value="6" enum="CellNeighbor"> </constant> - <constant name="BIND_TOPLEFT" value="1" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_LEFT_CORNER" value="7" enum="CellNeighbor"> </constant> - <constant name="BIND_TOP" value="2" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_LEFT_SIDE" value="8" enum="CellNeighbor"> </constant> - <constant name="BIND_TOPRIGHT" value="4" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_LEFT_CORNER" value="9" enum="CellNeighbor"> </constant> - <constant name="BIND_LEFT" value="8" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_TOP_LEFT_SIDE" value="10" enum="CellNeighbor"> </constant> - <constant name="BIND_CENTER" value="16" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_TOP_LEFT_CORNER" value="11" enum="CellNeighbor"> </constant> - <constant name="BIND_RIGHT" value="32" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_TOP_SIDE" value="12" enum="CellNeighbor"> </constant> - <constant name="BIND_BOTTOMLEFT" value="64" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_TOP_CORNER" value="13" enum="CellNeighbor"> </constant> - <constant name="BIND_BOTTOM" value="128" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_TOP_RIGHT_SIDE" value="14" enum="CellNeighbor"> </constant> - <constant name="BIND_BOTTOMRIGHT" value="256" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_TOP_RIGHT_CORNER" value="15" enum="CellNeighbor"> </constant> - <constant name="SINGLE_TILE" value="0" enum="TileMode"> + <constant name="TERRAIN_MODE_MATCH_CORNERS_AND_SIDES" value="0" enum="TerrainMode"> </constant> - <constant name="AUTO_TILE" value="1" enum="TileMode"> + <constant name="TERRAIN_MODE_MATCH_CORNERS" value="1" enum="TerrainMode"> </constant> - <constant name="ATLAS_TILE" value="2" enum="TileMode"> + <constant name="TERRAIN_MODE_MATCH_SIDES" value="2" enum="TerrainMode"> </constant> </constants> </class> diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml new file mode 100644 index 0000000000..a7a304ca27 --- /dev/null +++ b/doc/classes/TileSetAtlasSource.xml @@ -0,0 +1,207 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="TileSetAtlasSource" inherits="TileSetSource" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="can_move_tile_in_atlas" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i( -1, -1 )"> + </argument> + <argument index="2" name="new_size" type="Vector2i" default="Vector2i( -1, -1 )"> + </argument> + <description> + </description> + </method> + <method name="clear_tiles_outside_texture"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="create_alternative_tile"> + <return type="int"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="alternative_id_override" type="int" default="-1"> + </argument> + <description> + </description> + </method> + <method name="create_tile"> + <return type="void"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="size" type="Vector2i" default="Vector2i( 1, 1 )"> + </argument> + <description> + </description> + </method> + <method name="get_alternative_tile_id" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_alternative_tiles_count" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="get_atlas_grid_size" qualifiers="const"> + <return type="Vector2i"> + </return> + <description> + </description> + </method> + <method name="get_next_alternative_tile_id" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="get_tile_at_coords" qualifiers="const"> + <return type="Vector2i"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="get_tile_data" qualifiers="const"> + <return type="Object"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_tile_id" qualifiers="const"> + <return type="Vector2i"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_tile_size_in_atlas" qualifiers="const"> + <return type="Vector2i"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="get_tile_texture_region" qualifiers="const"> + <return type="Rect2i"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="get_tiles_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="has_alternative_tile" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="alternative_tile" type="int"> + </argument> + <description> + </description> + </method> + <method name="has_tile" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="has_tiles_outside_texture"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="move_tile_in_atlas"> + <return type="void"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i( -1, -1 )"> + </argument> + <argument index="2" name="new_size" type="Vector2i" default="Vector2i( -1, -1 )"> + </argument> + <description> + </description> + </method> + <method name="remove_alternative_tile"> + <return type="void"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="alternative_tile" type="int"> + </argument> + <description> + </description> + </method> + <method name="remove_tile"> + <return type="void"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="set_alternative_tile_id"> + <return type="void"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="alternative_tile" type="int"> + </argument> + <argument index="2" name="new_id" type="int"> + </argument> + <description> + </description> + </method> + </methods> + <members> + <member name="margins" type="Vector2i" setter="set_margins" getter="get_margins" default="Vector2i( 0, 0 )"> + </member> + <member name="separation" type="Vector2i" setter="set_separation" getter="get_separation" default="Vector2i( 0, 0 )"> + </member> + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> + </member> + <member name="tile_size" type="Vector2i" setter="set_texture_region_size" getter="get_texture_region_size" default="Vector2i( 16, 16 )"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/TileSetSource.xml b/doc/classes/TileSetSource.xml new file mode 100644 index 0000000000..6a3029bb3f --- /dev/null +++ b/doc/classes/TileSetSource.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="TileSetSource" inherits="Resource" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index a09f1bf470..27b26801f3 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -30,7 +30,7 @@ } [/csharp] [/codeblocks] - To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_children] after getting the root through [method get_root]. You can use [method Object.free] on a [TreeItem] to remove it from the [Tree]. + To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_first_child] after getting the root through [method get_root]. You can use [method Object.free] on a [TreeItem] to remove it from the [Tree]. </description> <tutorials> </tutorials> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index add23c2ce6..7d37580504 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -63,6 +63,16 @@ Removes all OpenType features. </description> </method> + <method name="create_child"> + <return type="TreeItem"> + </return> + <argument index="0" name="idx" type="int" default="-1"> + </argument> + <description> + Creates an item and adds it as a child. + The new item will be inserted as position [code]idx[/code] (the default value [code]-1[/code] means the last position), or it will be the last child if [code]idx[/code] is higher than the child count. + </description> + </method> <method name="deselect"> <return type="void"> </return> @@ -123,11 +133,28 @@ Returns the column's cell mode. </description> </method> - <method name="get_children"> + <method name="get_child"> <return type="TreeItem"> </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + Returns a child item by its index (see [method get_child_count]). This method is often used for iterating all children of an item. + Negative indices access the children from the last one. + </description> + </method> + <method name="get_child_count"> + <return type="int"> + </return> <description> - Returns the TreeItem's first child item or a null object if there is none. + Returns the number of child items. + </description> + </method> + <method name="get_children"> + <return type="Array"> + </return> + <description> + Returns an array of references to the item's children. </description> </method> <method name="get_custom_bg_color" qualifiers="const"> @@ -157,6 +184,13 @@ Returns [code]true[/code] if [code]expand_right[/code] is set. </description> </method> + <method name="get_first_child"> + <return type="TreeItem"> + </return> + <description> + Returns the TreeItem's first child. + </description> + </method> <method name="get_icon" qualifiers="const"> <return type="Texture2D"> </return> @@ -193,6 +227,13 @@ Returns the icon [Texture2D] region as [Rect2]. </description> </method> + <method name="get_index"> + <return type="int"> + </return> + <description> + Returns the node's order in the tree. For example, if called on the first child item the position is [code]0[/code]. + </description> + </method> <method name="get_language" qualifiers="const"> <return type="String"> </return> @@ -342,6 +383,13 @@ Returns the given column's tooltip. </description> </method> + <method name="get_tree"> + <return type="Tree"> + </return> + <description> + Returns the [Tree] that owns this TreeItem. + </description> + </method> <method name="is_button_disabled" qualifiers="const"> <return type="bool"> </return> @@ -397,18 +445,24 @@ Returns [code]true[/code] if column [code]column[/code] is selected. </description> </method> - <method name="move_to_bottom"> + <method name="move_after"> <return type="void"> </return> + <argument index="0" name="item" type="Object"> + </argument> <description> - Moves this TreeItem to the bottom in the [Tree] hierarchy. + Moves this TreeItem right after the given [code]item[/code]. + [b]Note:[/b] You can't move to the root or move the root. </description> </method> - <method name="move_to_top"> + <method name="move_before"> <return type="void"> </return> + <argument index="0" name="item" type="Object"> + </argument> <description> - Moves this TreeItem to the top in the [Tree] hierarchy. + Moves this TreeItem right before the given [code]item[/code]. + [b]Note:[/b] You can't move to the root or move the root. </description> </method> <method name="remove_child"> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index b99a251a11..37709753bc 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -45,7 +45,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -55,7 +55,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -65,10 +65,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns the [Font] at [code]name[/code] if the theme has [code]type[/code]. + Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_theme_font_size" qualifiers="const"> @@ -76,10 +76,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns the font size at [code]name[/code] if the theme has [code]type[/code]. + Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_theme_icon" qualifiers="const"> @@ -87,7 +87,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -97,7 +97,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -119,7 +119,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -129,7 +129,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -139,11 +139,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the theme does not have [code]type[/code]. + Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_theme_font_size" qualifiers="const"> @@ -151,11 +151,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if font size with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the theme does not have [code]type[/code]. + Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_theme_icon" qualifiers="const"> @@ -163,7 +163,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -173,7 +173,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -340,6 +340,8 @@ </member> <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> </member> + <member name="theme_custom_type" type="StringName" setter="set_theme_custom_type" getter="get_theme_custom_type" default="@"""> + </member> <member name="title" type="String" setter="set_title" getter="get_title" default=""""> </member> <member name="transient" type="bool" setter="set_transient" getter="is_transient" default="false"> |