diff options
-rw-r--r-- | doc/classes/Environment.xml | 174 | ||||
-rw-r--r-- | doc/classes/GraphEdit.xml | 22 | ||||
-rw-r--r-- | doc/classes/GraphNode.xml | 23 | ||||
-rw-r--r-- | doc/classes/PopupMenu.xml | 2 | ||||
-rw-r--r-- | doc/classes/TextEdit.xml | 6 | ||||
-rw-r--r-- | editor/editor_themes.cpp | 2 | ||||
-rw-r--r-- | editor/filesystem_dock.cpp | 9 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/script_create_dialog.cpp | 13 | ||||
-rw-r--r-- | editor/script_create_dialog.h | 1 | ||||
-rw-r--r-- | modules/opensimplex/noise_texture.cpp | 12 | ||||
-rw-r--r-- | scene/gui/graph_edit.cpp | 10 | ||||
-rw-r--r-- | scene/gui/label.cpp | 1 | ||||
-rw-r--r-- | scene/gui/rich_text_label.cpp | 43 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 6 | ||||
-rw-r--r-- | scene/main/node.cpp | 3 | ||||
-rw-r--r-- | scene/register_scene_types.cpp | 44 | ||||
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 2 |
18 files changed, 223 insertions, 154 deletions
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 1feccec501..00a80a084b 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -21,6 +21,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns [code]true[/code] if the glow level [code]idx[/code] is specified, [code]false[/code] otherwise. </description> </method> <method name="set_glow_level"> @@ -31,132 +32,134 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Enables or disables the glow level at index [code]idx[/code]. The more glow levels are enabled, the slower the glow effect will be. </description> </method> </methods> <members> <member name="adjustment_brightness" type="float" setter="set_adjustment_brightness" getter="get_adjustment_brightness" default="1.0"> - Global brightness value of the rendered scene (default value is 1). + The global brightness value of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="adjustment_color_correction" type="Texture" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction"> - Applies the provided [Texture] resource to affect the global color aspect of the rendered scene. + Applies the provided [Texture] resource to affect the global color aspect of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="adjustment_contrast" type="float" setter="set_adjustment_contrast" getter="get_adjustment_contrast" default="1.0"> - Global contrast value of the rendered scene (default value is 1). + The global contrast value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="adjustment_enabled" type="bool" setter="set_adjustment_enable" getter="is_adjustment_enabled" default="false"> - Enables the [code]adjustment_*[/code] options provided by this resource. If [code]false[/code], adjustments modifications will have no effect on the rendered scene. + If [code]true[/code], enables the [code]adjustment_*[/code] properties provided by this resource. If [code]false[/code], modifications to the [code]adjustment_*[/code] properties will have no effect on the rendered scene. </member> <member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation" default="1.0"> - Global color saturation value of the rendered scene (default value is 1). + The global color saturation value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color" default="Color( 0, 0, 0, 1 )"> - [Color] of the ambient light. + The ambient light's [Color]. </member> <member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy" default="1.0"> - Energy of the ambient light. The higher the value, the stronger the light. + The ambient light's energy. The higher the value, the stronger the light. </member> <member name="ambient_light_sky_contribution" type="float" setter="set_ambient_light_sky_contribution" getter="get_ambient_light_sky_contribution" default="1.0"> Defines the amount of light that the sky brings on the scene. A value of 0 means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of 1 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene. + This value is multiplied by [member ambient_light_energy], so it must be set to a value higher than [code]0[/code] for changes to be visible when adjusting [member ambient_light_sky_contribution]. </member> <member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure" getter="get_tonemap_auto_exposure" default="false"> - Enables the tonemapping auto exposure mode of the scene renderer. If activated, the renderer will automatically determine the exposure setting to adapt to the illumination of the scene and the observed light. + If [code]true[/code], enables the tonemapping auto exposure mode of the scene renderer. If [code]true[/code], the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light. </member> <member name="auto_exposure_max_luma" type="float" setter="set_tonemap_auto_exposure_max" getter="get_tonemap_auto_exposure_max" default="8.0"> - Maximum luminance value for the auto exposure. + The maximum luminance value for the auto exposure. </member> <member name="auto_exposure_min_luma" type="float" setter="set_tonemap_auto_exposure_min" getter="get_tonemap_auto_exposure_min" default="0.05"> - Minimum luminance value for the auto exposure. + The minimum luminance value for the auto exposure. </member> <member name="auto_exposure_scale" type="float" setter="set_tonemap_auto_exposure_grey" getter="get_tonemap_auto_exposure_grey" default="0.4"> - Scale of the auto exposure effect. Affects the intensity of auto exposure. + The scale of the auto exposure effect. Affects the intensity of auto exposure. </member> <member name="auto_exposure_speed" type="float" setter="set_tonemap_auto_exposure_speed" getter="get_tonemap_auto_exposure_speed" default="0.5"> - Speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. + The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. </member> <member name="background_camera_feed_id" type="int" setter="set_camera_feed_id" getter="get_camera_feed_id" default="1"> - The id of the camera feed to show in the background. + The ID of the camera feed to show in the background. </member> <member name="background_canvas_max_layer" type="int" setter="set_canvas_max_layer" getter="get_canvas_max_layer" default="0"> - Maximum layer id (if using Layer background mode). + The maximum layer ID to display. Only effective when using the [constant BG_CANVAS] background mode. </member> <member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color( 0, 0, 0, 1 )"> - Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). + The [Color] displayed for clear areas of the scene. Only effective when using the [constant BG_COLOR] or [constant BG_COLOR_SKY] background modes). </member> <member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy" default="1.0"> - Power of light emitted by the background. + The power of the light emitted by the background. </member> <member name="background_mode" type="int" setter="set_background" getter="get_background" enum="Environment.BGMode" default="0"> - Defines the mode of background. + The background mode. See [enum BGMode] for possible values. </member> <member name="background_sky" type="Sky" setter="set_sky" getter="get_sky"> - [Sky] resource defined as background. + The [Sky] resource defined as background. </member> <member name="background_sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov" default="0.0"> - [Sky] resource's custom field of view. + The [Sky] resource's custom field of view. </member> <member name="background_sky_orientation" type="Basis" setter="set_sky_orientation" getter="get_sky_orientation" default="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )"> - [Sky] resource's rotation expressed as a [Basis]. + The [Sky] resource's rotation expressed as a [Basis]. </member> <member name="background_sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3( 0, 0, 0 )"> - [Sky] resource's rotation expressed as Euler angles in radians. + The [Sky] resource's rotation expressed as Euler angles in radians. </member> <member name="background_sky_rotation_degrees" type="Vector3" setter="set_sky_rotation_degrees" getter="get_sky_rotation_degrees" default="Vector3( 0, 0, 0 )"> - [Sky] resource's rotation expressed as Euler angles in degrees. + The [Sky] resource's rotation expressed as Euler angles in degrees. </member> <member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount" default="0.1"> - Amount of far blur. + The amount of far blur for the depth-of-field effect. </member> <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance" default="10.0"> - Distance from the camera where the far blur effect affects the rendering. + The distance from the camera where the far blur effect affects the rendering. </member> <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" default="false"> - Enables the far blur effect. + If [code]true[/code], enables the depth-of-field far blur effect. </member> <member name="dof_blur_far_quality" type="int" setter="set_dof_blur_far_quality" getter="get_dof_blur_far_quality" enum="Environment.DOFBlurQuality" default="1"> - Quality of the far blur quality. + The depth-of-field far blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower. </member> <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" default="5.0"> - Transition between no-blur area and far blur. + The length of the transition between the no-blur area and far blur. </member> <member name="dof_blur_near_amount" type="float" setter="set_dof_blur_near_amount" getter="get_dof_blur_near_amount" default="0.1"> - Amount of near blur. + The amount of near blur for the depth-of-field effect. </member> <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance" default="2.0"> Distance from the camera where the near blur effect affects the rendering. </member> <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" default="false"> - Enables the near blur effect. + If [code]true[/code], enables the depth-of-field near blur effect. </member> <member name="dof_blur_near_quality" type="int" setter="set_dof_blur_near_quality" getter="get_dof_blur_near_quality" enum="Environment.DOFBlurQuality" default="1"> - Quality of the near blur quality. + The depth-of-field near blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower. </member> <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" default="1.0"> - Transition between near blur and no-blur area. + The length of the transition between the near blur and no-blur area. </member> <member name="fog_color" type="Color" setter="set_fog_color" getter="get_fog_color" default="Color( 0.5, 0.6, 0.7, 1 )"> - Fog's [Color]. + The fog's [Color]. </member> <member name="fog_depth_begin" type="float" setter="set_fog_depth_begin" getter="get_fog_depth_begin" default="10.0"> - Fog's depth starting distance from the camera. + The fog's depth starting distance from the camera. </member> <member name="fog_depth_curve" type="float" setter="set_fog_depth_curve" getter="get_fog_depth_curve" default="1.0"> - Value defining the fog depth intensity. + The fog depth's intensity curve. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve. </member> <member name="fog_depth_enabled" type="bool" setter="set_fog_depth_enabled" getter="is_fog_depth_enabled" default="true"> - Enables the fog depth. + If [code]true[/code], the depth fog effect is enabled. When enabled, fog will appear in the distance (relative to the camera). </member> <member name="fog_depth_end" type="float" setter="set_fog_depth_end" getter="get_fog_depth_end" default="100.0"> - Fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's [member Camera.far] value. + The fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's [member Camera.far] value. </member> <member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled" default="false"> - Enables the fog. Needs [member fog_height_enabled] and/or [member fog_depth_enabled] to actually display fog. + If [code]true[/code], fog effects are enabled. [member fog_height_enabled] and/or [member fog_depth_enabled] must be set to [code]true[/code] to actually display fog. </member> <member name="fog_height_curve" type="float" setter="set_fog_height_curve" getter="get_fog_height_curve" default="1.0"> - Value defining the fog height intensity. + The height fog's intensity. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve. </member> <member name="fog_height_enabled" type="bool" setter="set_fog_height_enabled" getter="is_fog_height_enabled" default="false"> - Enables the fog height. + If [code]true[/code], the height fog effect is enabled. When enabled, fog will appear in a defined height range, regardless of the distance from the camera. This can be used to simulate "deep water" effects with a lower performance cost compared to a dedicated shader. </member> <member name="fog_height_max" type="float" setter="set_fog_height_max" getter="get_fog_height_max" default="0.0"> The Y coordinate where the height fog will be the most intense. If this value is greater than [member fog_height_min], fog will be displayed from bottom to top. Otherwise, it will be displayed from top to bottom. @@ -165,131 +168,151 @@ The Y coordinate where the height fog will be the least intense. If this value is greater than [member fog_height_max], fog will be displayed from top to bottom. Otherwise, it will be displayed from bottom to top. </member> <member name="fog_sun_amount" type="float" setter="set_fog_sun_amount" getter="get_fog_sun_amount" default="0.0"> - Amount of sun that affects the fog rendering. + The intensity of the depth fog color transition when looking towards the sun. The sun's direction is determined automatically using the DirectionalLight node in the scene. </member> <member name="fog_sun_color" type="Color" setter="set_fog_sun_color" getter="get_fog_sun_color" default="Color( 1, 0.9, 0.7, 1 )"> - Sun [Color]. + The depth fog's [Color] when looking towards the sun. </member> <member name="fog_transmit_curve" type="float" setter="set_fog_transmit_curve" getter="get_fog_transmit_curve" default="1.0"> - Amount of light that the fog transmits. + The intensity of the fog light transmittance effect. Amount of light that the fog transmits. </member> <member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled" default="false"> - Enables fog's light transmission. If enabled, lets reflections light to be transmitted by the fog. + Enables fog's light transmission effect. If [code]true[/code], light will be more visible in the fog to simulate light scattering as in real life. </member> <member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled" default="false"> - Smooths out blockiness created by sampling higher levels. + Smooths out the blockiness created by sampling higher levels, at the cost of performance. + [b]Note:[/b] Only available when using the GLES3 renderer. </member> <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode" default="2"> - Glow blending mode. + The glow blending mode. </member> <member name="glow_bloom" type="float" setter="set_glow_bloom" getter="get_glow_bloom" default="0.0"> - Bloom value (global glow). + The bloom's intensity. If set to a value higher than [code]0[/code], this will make glow visible in areas darker than the [member glow_hdr_threshold]. </member> <member name="glow_enabled" type="bool" setter="set_glow_enabled" getter="is_glow_enabled" default="false"> - Enables glow rendering. + If [code]true[/code], the glow effect is enabled. </member> <member name="glow_hdr_luminance_cap" type="float" setter="set_glow_hdr_luminance_cap" getter="get_glow_hdr_luminance_cap" default="12.0"> + The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect. </member> <member name="glow_hdr_scale" type="float" setter="set_glow_hdr_bleed_scale" getter="get_glow_hdr_bleed_scale" default="2.0"> - Bleed scale of the HDR glow. + The bleed scale of the HDR glow. </member> <member name="glow_hdr_threshold" type="float" setter="set_glow_hdr_bleed_threshold" getter="get_glow_hdr_bleed_threshold" default="1.0"> - Bleed threshold of the HDR glow. In GLES2, this needs to be below 1.0 in order for glow to be visible, a default value of 0.9 works well. + The lower threshold of the HDR glow. When using the GLES2 renderer (which doesn't support HDR), this needs to be below [code]1.0[/code] for glow to be visible. A value of [code]0.9[/code] works well in this case. </member> <member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity" default="0.8"> - Glow intensity. In GLES2, this should be increased to 1.5 by default to compensate for not using HDR. + The glow intensity. When using the GLES2 renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering. </member> <member name="glow_levels/1" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - First level of glow (most local). + If [code]true[/code], the 1st level of glow is enabled. This is the most "local" level (least blurry). </member> <member name="glow_levels/2" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Second level of glow. + If [code]true[/code], the 2th level of glow is enabled. </member> <member name="glow_levels/3" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="true"> - Third level of glow. + If [code]true[/code], the 3th level of glow is enabled. </member> <member name="glow_levels/4" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Fourth level of glow. + If [code]true[/code], the 4th level of glow is enabled. </member> <member name="glow_levels/5" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="true"> - Fifth level of glow. + If [code]true[/code], the 5th level of glow is enabled. </member> <member name="glow_levels/6" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Sixth level of glow. + If [code]true[/code], the 6th level of glow is enabled. </member> <member name="glow_levels/7" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Seventh level of glow (most global). + If [code]true[/code], the 7th level of glow is enabled. This is the most "global" level (blurriest). </member> <member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength" default="1.0"> - Glow strength. In GLES2, this should be increased to 1.3 by default to compensate for not using HDR. + The glow strength. When using the GLES2 renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering. </member> <member name="ss_reflections_depth_tolerance" type="float" setter="set_ssr_depth_tolerance" getter="get_ssr_depth_tolerance" default="0.2"> + The depth tolerance for screen-space reflections. </member> <member name="ss_reflections_enabled" type="bool" setter="set_ssr_enabled" getter="is_ssr_enabled" default="false"> + If [code]true[/code], screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [GIProbe]s or [ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others. </member> <member name="ss_reflections_fade_in" type="float" setter="set_ssr_fade_in" getter="get_ssr_fade_in" default="0.15"> + The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). </member> <member name="ss_reflections_fade_out" type="float" setter="set_ssr_fade_out" getter="get_ssr_fade_out" default="2.0"> + The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. </member> <member name="ss_reflections_max_steps" type="int" setter="set_ssr_max_steps" getter="get_ssr_max_steps" default="64"> + The maximum number of steps for screen-space reflections. Higher values are slower. </member> <member name="ss_reflections_roughness" type="bool" setter="set_ssr_rough" getter="is_ssr_rough" default="true"> + If [code]true[/code], screen-space reflections will take the material roughness into account. </member> <member name="ssao_ao_channel_affect" type="float" setter="set_ssao_ao_channel_affect" getter="get_ssao_ao_channel_affect" default="0.0"> + The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than [code]0[/code] will make the SSAO effect visible in areas darkened by AO textures. </member> <member name="ssao_bias" type="float" setter="set_ssao_bias" getter="get_ssao_bias" default="0.01"> + The screen-space ambient occlusion bias. This should be kept high enough to prevent "smooth" curves from being affected by ambient occlusion. </member> <member name="ssao_blur" type="int" setter="set_ssao_blur" getter="get_ssao_blur" enum="Environment.SSAOBlur" default="3"> + The screen-space ambient occlusion blur quality. See [enum SSAOBlur] for possible values. </member> <member name="ssao_color" type="Color" setter="set_ssao_color" getter="get_ssao_color" default="Color( 0, 0, 0, 1 )"> + The screen-space ambient occlusion color. </member> <member name="ssao_edge_sharpness" type="float" setter="set_ssao_edge_sharpness" getter="get_ssao_edge_sharpness" default="4.0"> + The screen-space ambient occlusion edge sharpness. </member> <member name="ssao_enabled" type="bool" setter="set_ssao_enabled" getter="is_ssao_enabled" default="false"> + If [code]true[/code], the screen-space ambient occlusion effect is enabled. This is a costly effect and should be disabled first when having performance issues. </member> <member name="ssao_intensity" type="float" setter="set_ssao_intensity" getter="get_ssao_intensity" default="1.0"> + The primary screen-space ambient occlusion intensity. See also [member ssao_radius]. </member> <member name="ssao_intensity2" type="float" setter="set_ssao_intensity2" getter="get_ssao_intensity2" default="1.0"> + The secondary screen-space ambient occlusion intensity. See also [member ssao_radius2]. </member> <member name="ssao_light_affect" type="float" setter="set_ssao_direct_light_affect" getter="get_ssao_direct_light_affect" default="0.0"> + The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than [code]0[/code] will make the SSAO effect visible in direct light. </member> <member name="ssao_quality" type="int" setter="set_ssao_quality" getter="get_ssao_quality" enum="Environment.SSAOQuality" default="1"> + The screen-space ambient occlusion quality. Higher qualities will make better use of small objects for ambient occlusion, but are slower. </member> <member name="ssao_radius" type="float" setter="set_ssao_radius" getter="get_ssao_radius" default="1.0"> + The primary screen-space ambient occlusion radius. </member> <member name="ssao_radius2" type="float" setter="set_ssao_radius2" getter="get_ssao_radius2" default="0.0"> + The secondary screen-space ambient occlusion radius. If set to a value higher than [code]0[/code], enables the secondary screen-space ambient occlusion effect which can be used to improve the effect's appearance (at the cost of performance). </member> <member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure" default="1.0"> - Default exposure for tonemap. + The default exposure used for tonemapping. </member> <member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" enum="Environment.ToneMapper" default="0"> - Tonemapping mode. + The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on a LDR display. (Godot doesn't support rendering on HDR displays yet.) </member> <member name="tonemap_white" type="float" setter="set_tonemap_white" getter="get_tonemap_white" default="1.0"> - White reference value for tonemap. + The white reference value for tonemapping. Only effective if the [member tonemap_mode] isn't set to [constant TONE_MAPPER_LINEAR]. </member> </members> <constants> <constant name="BG_KEEP" value="5" enum="BGMode"> - Keep on screen every pixel drawn in the background. + Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera. </constant> <constant name="BG_CLEAR_COLOR" value="0" enum="BGMode"> - Clear the background using the project's clear color. + Clears the background using the clear color defined in [member ProjectSettings.rendering/environment/default_clear_color]. </constant> <constant name="BG_COLOR" value="1" enum="BGMode"> - Clear the background using a custom clear color. + Clears the background using a custom clear color. </constant> <constant name="BG_SKY" value="2" enum="BGMode"> - Display a user-defined sky in the background. + Displays a user-defined sky in the background. </constant> <constant name="BG_COLOR_SKY" value="3" enum="BGMode"> - Clear the background using a custom clear color and allows defining a sky for shading and reflection. + Clears the background using a custom clear color and allows defining a sky for shading and reflection. This mode is slightly faster than [constant BG_SKY] and should be preferred in scenes where reflections can be visible, but the sky itself never is (e.g. top-down camera). </constant> <constant name="BG_CANVAS" value="4" enum="BGMode"> - Display a [CanvasLayer] in the background. + Displays a [CanvasLayer] in the background. </constant> <constant name="BG_CAMERA_FEED" value="6" enum="BGMode"> - Display a camera feed in the background. + Displays a camera feed in the background. </constant> <constant name="BG_MAX" value="7" enum="BGMode"> Represents the size of the [enum BGMode] enum. @@ -301,10 +324,10 @@ Screen glow blending mode. Increases brightness, used frequently with bloom. </constant> <constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="GlowBlendMode"> - Soft light glow blending mode. Modifies contrast, exposes shadows and highlights, vivid bloom. + Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom). </constant> <constant name="GLOW_BLEND_MODE_REPLACE" value="3" enum="GlowBlendMode"> - Replace glow blending mode. Replaces all pixels' color by the glow value. + Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness. </constant> <constant name="TONE_MAPPER_LINEAR" value="0" enum="ToneMapper"> Linear tonemapper operator. Reads the linear data and passes it on unmodified. @@ -319,27 +342,34 @@ Academy Color Encoding System tonemapper operator. </constant> <constant name="DOF_BLUR_QUALITY_LOW" value="0" enum="DOFBlurQuality"> - Low depth-of-field blur quality. + Low depth-of-field blur quality (fastest). </constant> <constant name="DOF_BLUR_QUALITY_MEDIUM" value="1" enum="DOFBlurQuality"> Medium depth-of-field blur quality. </constant> <constant name="DOF_BLUR_QUALITY_HIGH" value="2" enum="DOFBlurQuality"> - High depth-of-field blur quality. + High depth-of-field blur quality (slowest). </constant> <constant name="SSAO_BLUR_DISABLED" value="0" enum="SSAOBlur"> + No blur for the screen-space ambient occlusion effect (fastest). </constant> <constant name="SSAO_BLUR_1x1" value="1" enum="SSAOBlur"> + 1×1 blur for the screen-space ambient occlusion effect. </constant> <constant name="SSAO_BLUR_2x2" value="2" enum="SSAOBlur"> + 2×2 blur for the screen-space ambient occlusion effect. </constant> <constant name="SSAO_BLUR_3x3" value="3" enum="SSAOBlur"> + 3×3 blur for the screen-space ambient occlusion effect (slowest). </constant> <constant name="SSAO_QUALITY_LOW" value="0" enum="SSAOQuality"> + Low quality for the screen-space ambient occlusion effect (fastest). </constant> <constant name="SSAO_QUALITY_MEDIUM" value="1" enum="SSAOQuality"> + Low quality for the screen-space ambient occlusion effect. </constant> <constant name="SSAO_QUALITY_HIGH" value="2" enum="SSAOQuality"> + Low quality for the screen-space ambient occlusion effect (slowest). </constant> </constants> </class> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 3041a7cb7f..802134d3b6 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -160,6 +160,7 @@ <argument index="4" name="amount" type="float"> </argument> <description> + Sets the coloration of the connection between [code]from[/code]'s [code]from_port[/code] and [code]to[/code]'s [code]to_port[/code] with the color provided in the [code]activity[/code] theme property. </description> </method> <method name="set_selected"> @@ -194,12 +195,12 @@ <signals> <signal name="_begin_node_move"> <description> - Signal sent at the beginning of a GraphNode movement. + Emitted at the beginning of a GraphNode movement. </description> </signal> <signal name="_end_node_move"> <description> - Signal sent at the end of a GraphNode movement. + Emitted at the end of a GraphNode movement. </description> </signal> <signal name="connection_from_empty"> @@ -210,7 +211,7 @@ <argument index="2" name="release_position" type="Vector2"> </argument> <description> - Signal sent when user dragging connection from input port into empty space of the graph. + Emitted when user dragging connection from input port into empty space of the graph. </description> </signal> <signal name="connection_request"> @@ -223,7 +224,7 @@ <argument index="3" name="to_slot" type="int"> </argument> <description> - Signal sent to the GraphEdit when the connection between the [code]from_slot[/code] slot of the [code]from[/code] GraphNode and the [code]to_slot[/code] slot of the [code]to[/code] GraphNode is attempted to be created. + Emitted to the GraphEdit when the connection between the [code]from_slot[/code] slot of the [code]from[/code] GraphNode and the [code]to_slot[/code] slot of the [code]to[/code] GraphNode is attempted to be created. </description> </signal> <signal name="connection_to_empty"> @@ -234,17 +235,17 @@ <argument index="2" name="release_position" type="Vector2"> </argument> <description> - Signal sent when user dragging connection from output port into empty space of the graph. + Emitted when user dragging connection from output port into empty space of the graph. </description> </signal> <signal name="copy_nodes_request"> <description> - Signal sent when the user presses [code]Ctrl + C[/code]. + Emitted when the user presses [code]Ctrl + C[/code]. </description> </signal> <signal name="delete_nodes_request"> <description> - Signal sent when a GraphNode is attempted to be removed from the GraphEdit. + Emitted when a GraphNode is attempted to be removed from the GraphEdit. </description> </signal> <signal name="disconnection_request"> @@ -274,7 +275,7 @@ </signal> <signal name="paste_nodes_request"> <description> - Signal sent when the user presses [code]Ctrl + V[/code]. + Emitted when the user presses [code]Ctrl + V[/code]. </description> </signal> <signal name="popup_request"> @@ -288,6 +289,7 @@ <argument index="0" name="ofs" type="Vector2"> </argument> <description> + Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code. </description> </signal> </signals> @@ -316,6 +318,10 @@ </theme_item> <theme_item name="reset" type="Texture"> </theme_item> + <theme_item name="selection_fill" type="Color" default="Color( 1, 1, 1, 0.3 )"> + </theme_item> + <theme_item name="selection_stroke" type="Color" default="Color( 1, 1, 1, 0.8 )"> + </theme_item> <theme_item name="snap" type="Texture"> </theme_item> </theme_items> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 77b3eb1ca0..8fda9c20a5 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -170,12 +170,12 @@ <argument index="8" name="custom_right" type="Texture" default="null"> </argument> <description> - Sets properties of the slot with id [code]idx[/code]. + Sets properties of the slot with ID [code]idx[/code]. If [code]enable_left[/code]/[code]right[/code], a port will appear and the slot will be able to be connected from this side. [code]type_left[/code]/[code]right[/code] is an arbitrary type of the port. Only ports with the same type values can be connected. [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. + [b]Note:[/b] This method only sets properties of the slot. To create the slot, add a [Control]-derived child to the GraphNode. </description> </method> </methods> @@ -188,20 +188,27 @@ [b]Note:[/b] You cannot use position directly, as [GraphEdit] is a [Container]. </member> <member name="overlay" type="int" setter="set_overlay" getter="get_overlay" enum="GraphNode.Overlay" default="0"> + Sets the overlay shown above the GraphNode. See [enum Overlay]. </member> <member name="resizable" type="bool" setter="set_resizable" getter="is_resizable" default="false"> + If [code]true[/code], the user can resize the GraphNode. + [b]Note:[/b] Dragging the handle will only trigger the [signal resize_request] signal, the GraphNode needs to be resized manually. </member> <member name="selected" type="bool" setter="set_selected" getter="is_selected" default="false"> + If [code]true[/code], the GraphNode is selected. </member> <member name="show_close" type="bool" setter="set_show_close_button" getter="is_close_button_visible" default="false"> + If [code]true[/code], the close button will be visible. + [b]Note:[/b] Pressing it will only trigger the [signal close_request] signal, the GraphNode needs to be removed manually. </member> <member name="title" type="String" setter="set_title" getter="get_title" default=""""> + The text displayed in the GraphNode's title bar. </member> </members> <signals> <signal name="close_request"> <description> - Signal sent on closing the GraphNode. + Emitted when the GraphNode is requested to be closed. Happens on clicking the close button (see [member show_close]). </description> </signal> <signal name="dragged"> @@ -210,32 +217,36 @@ <argument index="1" name="to" type="Vector2"> </argument> <description> - Signal sent when the GraphNode is dragged. + Emitted when the GraphNode is dragged. </description> </signal> <signal name="offset_changed"> <description> - Signal sent when the GraphNode is moved. + Emitted when the GraphNode is moved. </description> </signal> <signal name="raise_request"> <description> - Signal sent when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode. + Emitted when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode. </description> </signal> <signal name="resize_request"> <argument index="0" name="new_minsize" type="Vector2"> </argument> <description> + Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see [member resizable]). </description> </signal> </signals> <constants> <constant name="OVERLAY_DISABLED" value="0" enum="Overlay"> + No overlay is shown. </constant> <constant name="OVERLAY_BREAKPOINT" value="1" enum="Overlay"> + Show overlay set in the [code]breakpoint[/code] theme property. </constant> <constant name="OVERLAY_POSITION" value="2" enum="Overlay"> + Show overlay set in the [code]position[/code] theme property. </constant> </constants> <theme_items> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index c920b52df6..89039eebda 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -521,6 +521,7 @@ <argument index="1" name="state" type="int"> </argument> <description> + Sets the state of an multistate item. See [method add_multistate_item] for details. </description> </method> <method name="set_item_shortcut"> @@ -595,6 +596,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Cycle to the next state of an multistate item. See [method add_multistate_item] for details. </description> </method> </methods> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 75fceac500..ad2cadb96b 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -459,6 +459,12 @@ <member name="wrap_enabled" type="bool" setter="set_wrap_enabled" getter="is_wrap_enabled" default="false"> If [code]true[/code], enables text wrapping when it goes beyond the edge of what is visible. </member> + <member name="scroll_vertical" type="float" setter="set_v_scroll" getter="get_v_scroll" default="0.0"> + The current vertical scroll value. + </member> + <member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0"> + The current horizontal scroll value. + </member> </members> <signals> <signal name="breakpoint_toggled"> diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 15fb6a9521..2cacc767c8 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -1012,6 +1012,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("grid_major", "GraphEdit", Color(0.0, 0.0, 0.0, 0.15)); theme->set_color("grid_minor", "GraphEdit", Color(0.0, 0.0, 0.0, 0.07)); } + theme->set_color("selection_fill", "GraphEdit", theme->get_color("box_selection_fill_color", "Editor")); + theme->set_color("selection_stroke", "GraphEdit", theme->get_color("box_selection_stroke_color", "Editor")); theme->set_color("activity", "GraphEdit", accent_color); theme->set_icon("minus", "GraphEdit", theme->get_icon("ZoomLess", "EditorIcons")); theme->set_icon("more", "GraphEdit", theme->get_icon("ZoomMore", "EditorIcons")); diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 1fecdfe555..fb5c2b25c9 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -90,6 +90,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory // Create all items for the files in the subdirectory. if (display_mode == DISPLAY_MODE_TREE_ONLY) { + String main_scene = ProjectSettings::get_singleton()->get("application/run/main_scene"); for (int i = 0; i < p_dir->get_file_count(); i++) { String file_type = p_dir->get_file_type(i); @@ -119,7 +120,6 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory file_item->select(0); file_item->set_as_cursor(0); } - String main_scene = ProjectSettings::get_singleton()->get("application/run/main_scene"); if (main_scene == file_metadata) { file_item->set_custom_color(0, get_color("accent_color", "Editor")); } @@ -750,6 +750,7 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) { } // Fills the ItemList control node from the FileInfos. + String main_scene = ProjectSettings::get_singleton()->get("application/run/main_scene"); String oi = "Object"; for (List<FileInfo>::Element *E = filelist.front(); E; E = E->next()) { FileInfo *finfo = &(E->get()); @@ -786,6 +787,10 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) { files->set_item_metadata(item_index, fpath); } + if (fpath == main_scene) { + files->set_item_custom_fg_color(item_index, get_color("accent_color", "Editor")); + } + // Generate the preview. if (!finfo->import_broken) { Array udata; @@ -1756,7 +1761,7 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected fpath = fpath.get_base_dir(); } make_script_dialog->config("Node", fpath.plus_file("new_script.gd"), false); - make_script_dialog->popup_centered(Size2(300, 300) * EDSCALE); + make_script_dialog->popup_centered(); } break; case FILE_COPY_PATH: { diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 335466b0c5..d0bd57d658 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1004,8 +1004,8 @@ void ScriptEditor::_menu_option(int p_option) { ScriptEditorBase *current = _get_current_editor(); switch (p_option) { case FILE_NEW: { - script_create_dialog->config("Node", "new_script"); - script_create_dialog->popup_centered(Size2(300, 300) * EDSCALE); + script_create_dialog->config("Node", "new_script", false); + script_create_dialog->popup_centered(); } break; case FILE_NEW_TEXTFILE: { file_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE); diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index e1f9ed497c..25bc13033c 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -678,6 +678,11 @@ void ScriptCreateDialog::_update_dialog() { } } + if (!_can_be_built_in()) { + internal->set_pressed(false); + } + internal->set_disabled(!_can_be_built_in()); + /* Is Script created or loaded from existing file */ if (is_built_in) { @@ -685,8 +690,6 @@ void ScriptCreateDialog::_update_dialog() { parent_name->set_editable(true); parent_search_button->set_disabled(false); parent_browse_button->set_disabled(!can_inherit_from_file); - internal->set_visible(_can_be_built_in()); - internal_label->set_visible(_can_be_built_in()); _msg_path_valid(true, TTR("Built-in script (into scene file).")); } else if (is_new_script_created) { // New Script Created @@ -694,8 +697,6 @@ void ScriptCreateDialog::_update_dialog() { parent_name->set_editable(true); parent_search_button->set_disabled(false); parent_browse_button->set_disabled(!can_inherit_from_file); - internal->set_visible(_can_be_built_in()); - internal_label->set_visible(_can_be_built_in()); if (is_path_valid) { _msg_path_valid(true, TTR("Will create a new script file.")); } @@ -705,7 +706,6 @@ void ScriptCreateDialog::_update_dialog() { parent_name->set_editable(false); parent_search_button->set_disabled(true); parent_browse_button->set_disabled(true); - internal->set_disabled(!_can_be_built_in()); if (is_path_valid) { _msg_path_valid(true, TTR("Will load an existing script file.")); } @@ -834,8 +834,7 @@ ScriptCreateDialog::ScriptCreateDialog() { internal = memnew(CheckBox); internal->set_text(TTR("On")); internal->connect("pressed", this, "_built_in_pressed"); - internal_label = memnew(Label(TTR("Built-in Script:"))); - gc->add_child(internal_label); + gc->add_child(memnew(Label(TTR("Built-in Script:")))); gc->add_child(internal); /* Path */ diff --git a/editor/script_create_dialog.h b/editor/script_create_dialog.h index 4d13bc9291..91d6315a78 100644 --- a/editor/script_create_dialog.h +++ b/editor/script_create_dialog.h @@ -58,7 +58,6 @@ class ScriptCreateDialog : public ConfirmationDialog { Button *path_button; EditorFileDialog *file_browse; CheckBox *internal; - Label *internal_label; VBoxContainer *path_vb; AcceptDialog *alert; CreateDialog *select_class; diff --git a/modules/opensimplex/noise_texture.cpp b/modules/opensimplex/noise_texture.cpp index e0cdfb33b4..aa1c822813 100644 --- a/modules/opensimplex/noise_texture.cpp +++ b/modules/opensimplex/noise_texture.cpp @@ -53,6 +53,10 @@ NoiseTexture::NoiseTexture() { NoiseTexture::~NoiseTexture() { VS::get_singleton()->free(texture); + if (noise_thread) { + Thread::wait_to_finish(noise_thread); + memdelete(noise_thread); + } } void NoiseTexture::_bind_methods() { @@ -73,6 +77,7 @@ void NoiseTexture::_bind_methods() { ClassDB::bind_method(D_METHOD("get_bump_strength"), &NoiseTexture::get_bump_strength); ClassDB::bind_method(D_METHOD("_update_texture"), &NoiseTexture::_update_texture); + ClassDB::bind_method(D_METHOD("_queue_update"), &NoiseTexture::_queue_update); ClassDB::bind_method(D_METHOD("_generate_texture"), &NoiseTexture::_generate_texture); ClassDB::bind_method(D_METHOD("_thread_done", "image"), &NoiseTexture::_thread_done); @@ -130,8 +135,6 @@ void NoiseTexture::_queue_update() { Ref<Image> NoiseTexture::_generate_texture() { - update_queued = false; - if (noise.is_null()) return Ref<Image>(); Ref<Image> image; @@ -171,17 +174,18 @@ void NoiseTexture::_update_texture() { Ref<Image> image = _generate_texture(); _set_texture_data(image); } + update_queued = false; } void NoiseTexture::set_noise(Ref<OpenSimplexNoise> p_noise) { if (p_noise == noise) return; if (noise.is_valid()) { - noise->disconnect(CoreStringNames::get_singleton()->changed, this, "_update_texture"); + noise->disconnect(CoreStringNames::get_singleton()->changed, this, "_queue_update"); } noise = p_noise; if (noise.is_valid()) { - noise->connect(CoreStringNames::get_singleton()->changed, this, "_update_texture"); + noise->connect(CoreStringNames::get_singleton()->changed, this, "_queue_update"); } _queue_update(); } diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index d1650fea1e..be465751b6 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -777,14 +777,8 @@ void GraphEdit::_top_layer_draw() { } if (box_selecting) { - top_layer->draw_rect( - box_selecting_rect, - get_color("box_selection_fill_color", "Editor")); - - top_layer->draw_rect( - box_selecting_rect, - get_color("box_selection_stroke_color", "Editor"), - false); + top_layer->draw_rect(box_selecting_rect, get_color("selection_fill")); + top_layer->draw_rect(box_selecting_rect, get_color("selection_stroke"), false); } } diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index df88b34f9d..6b12947651 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -224,6 +224,7 @@ void Label::_notification(int p_what) { return; } if (from->space_count) { + chars_total += from->space_count; /* spacing */ x_ofs += space_w * from->space_count; if (can_fill && align == ALIGN_FILL && spaces) { diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 5b7d7403ae..100c06955a 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -253,24 +253,25 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int & } \ } -#define ENSURE_WIDTH(m_width) \ - if (p_mode == PROCESS_CACHE) { \ - l.maximum_width = MAX(l.maximum_width, MIN(p_width, wofs + m_width)); \ - l.minimum_width = MAX(l.minimum_width, m_width); \ - } \ - if (wofs + m_width > p_width) { \ - line_wrapped = true; \ - if (p_mode == PROCESS_CACHE) { \ - if (spaces > 0) \ - spaces -= 1; \ - } \ - if (p_mode == PROCESS_POINTER && r_click_item && p_click_pos.y >= p_ofs.y + y && p_click_pos.y <= p_ofs.y + y + lh && p_click_pos.x > p_ofs.x + wofs) { \ - if (r_outside) *r_outside = true; \ - *r_click_item = it; \ - *r_click_char = rchar; \ - RETURN; \ - } \ - NEW_LINE \ +#define ENSURE_WIDTH(m_width) \ + if (p_mode == PROCESS_CACHE) { \ + l.maximum_width = MAX(l.maximum_width, MIN(p_width, wofs + m_width)); \ + l.minimum_width = MAX(l.minimum_width, m_width); \ + } \ + if (wofs + m_width > p_width) { \ + line_wrapped = true; \ + if (p_mode == PROCESS_CACHE) { \ + if (spaces > 0) \ + spaces -= 1; \ + } \ + const bool x_in_range = (p_click_pos.x > p_ofs.x + wofs) && (!p_frame->cell || p_click_pos.x < p_ofs.x + p_width); \ + if (p_mode == PROCESS_POINTER && r_click_item && p_click_pos.y >= p_ofs.y + y && p_click_pos.y <= p_ofs.y + y + lh && x_in_range) { \ + if (r_outside) *r_outside = true; \ + *r_click_item = it; \ + *r_click_char = rchar; \ + RETURN; \ + } \ + NEW_LINE \ } #define ADVANCE(m_width) \ @@ -1063,10 +1064,10 @@ Control::CursorShape RichTextLabel::get_cursor_shape(const Point2 &p_pos) const int line = 0; Item *item = NULL; + bool outside; + ((RichTextLabel *)(this))->_find_click(main, p_pos, &item, &line, &outside); - ((RichTextLabel *)(this))->_find_click(main, p_pos, &item, &line); - - if (item && ((RichTextLabel *)(this))->_find_meta(item, NULL)) + if (item && !outside && ((RichTextLabel *)(this))->_find_meta(item, NULL)) return CURSOR_POINTING_HAND; return CURSOR_ARROW; diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index d7e469ca26..6de2f0b570 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -7070,6 +7070,10 @@ void TextEdit::_bind_methods() { ClassDB::bind_method(D_METHOD("is_smooth_scroll_enabled"), &TextEdit::is_smooth_scroll_enabled); ClassDB::bind_method(D_METHOD("set_v_scroll_speed", "speed"), &TextEdit::set_v_scroll_speed); ClassDB::bind_method(D_METHOD("get_v_scroll_speed"), &TextEdit::get_v_scroll_speed); + ClassDB::bind_method(D_METHOD("set_v_scroll", "value"), &TextEdit::set_v_scroll); + ClassDB::bind_method(D_METHOD("get_v_scroll"), &TextEdit::get_v_scroll); + ClassDB::bind_method(D_METHOD("set_h_scroll", "value"), &TextEdit::set_h_scroll); + ClassDB::bind_method(D_METHOD("get_h_scroll"), &TextEdit::get_h_scroll); ClassDB::bind_method(D_METHOD("add_keyword_color", "keyword", "color"), &TextEdit::add_keyword_color); ClassDB::bind_method(D_METHOD("has_keyword_color", "keyword"), &TextEdit::has_keyword_color); @@ -7105,6 +7109,8 @@ void TextEdit::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "v_scroll_speed"), "set_v_scroll_speed", "get_v_scroll_speed"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hiding_enabled"), "set_hiding_enabled", "is_hiding_enabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "wrap_enabled"), "set_wrap_enabled", "is_wrap_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "scroll_vertical"), "set_v_scroll", "get_v_scroll"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "scroll_horizontal"), "set_h_scroll", "get_h_scroll"); ADD_GROUP("Minimap", "minimap_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "minimap_draw"), "draw_minimap", "is_drawing_minimap"); diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 1e2b7c094e..350959dcc3 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2680,7 +2680,8 @@ void Node::clear_internal_tree_resource_paths() { String Node::get_configuration_warning() const { - if (get_script_instance() && get_script_instance()->has_method("_get_configuration_warning")) { + if (get_script_instance() && get_script_instance()->get_script().is_valid() && + get_script_instance()->get_script()->is_tool() && get_script_instance()->has_method("_get_configuration_warning")) { return get_script_instance()->call("_get_configuration_warning"); } return String(); diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 21fc9ccf6a..09d4505458 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -372,6 +372,28 @@ void register_scene_types() { ClassDB::register_class<AnimationPlayer>(); ClassDB::register_class<Tween>(); + ClassDB::register_class<AnimationTreePlayer>(); + ClassDB::register_class<AnimationTree>(); + ClassDB::register_class<AnimationNode>(); + ClassDB::register_class<AnimationRootNode>(); + ClassDB::register_class<AnimationNodeBlendTree>(); + ClassDB::register_class<AnimationNodeBlendSpace1D>(); + ClassDB::register_class<AnimationNodeBlendSpace2D>(); + ClassDB::register_class<AnimationNodeStateMachine>(); + ClassDB::register_class<AnimationNodeStateMachinePlayback>(); + + ClassDB::register_class<AnimationNodeStateMachineTransition>(); + ClassDB::register_class<AnimationNodeOutput>(); + ClassDB::register_class<AnimationNodeOneShot>(); + ClassDB::register_class<AnimationNodeAnimation>(); + ClassDB::register_class<AnimationNodeAdd2>(); + ClassDB::register_class<AnimationNodeAdd3>(); + ClassDB::register_class<AnimationNodeBlend2>(); + ClassDB::register_class<AnimationNodeBlend3>(); + ClassDB::register_class<AnimationNodeTimeScale>(); + ClassDB::register_class<AnimationNodeTimeSeek>(); + ClassDB::register_class<AnimationNodeTransition>(); + OS::get_singleton()->yield(); //may take time to init #ifndef _3D_DISABLED @@ -399,7 +421,6 @@ void register_scene_types() { ClassDB::register_class<GIProbeData>(); ClassDB::register_class<BakedLightmap>(); ClassDB::register_class<BakedLightmapData>(); - ClassDB::register_class<AnimationTreePlayer>(); ClassDB::register_class<Particles>(); ClassDB::register_class<CPUParticles>(); ClassDB::register_class<Position3D>(); @@ -410,27 +431,6 @@ void register_scene_types() { ClassDB::register_class<RootMotionView>(); ClassDB::set_class_enabled("RootMotionView", false); //disabled by default, enabled by editor - ClassDB::register_class<AnimationTree>(); - ClassDB::register_class<AnimationNode>(); - ClassDB::register_class<AnimationRootNode>(); - ClassDB::register_class<AnimationNodeBlendTree>(); - ClassDB::register_class<AnimationNodeBlendSpace1D>(); - ClassDB::register_class<AnimationNodeBlendSpace2D>(); - ClassDB::register_class<AnimationNodeStateMachine>(); - ClassDB::register_class<AnimationNodeStateMachinePlayback>(); - - ClassDB::register_class<AnimationNodeStateMachineTransition>(); - ClassDB::register_class<AnimationNodeOutput>(); - ClassDB::register_class<AnimationNodeOneShot>(); - ClassDB::register_class<AnimationNodeAnimation>(); - ClassDB::register_class<AnimationNodeAdd2>(); - ClassDB::register_class<AnimationNodeAdd3>(); - ClassDB::register_class<AnimationNodeBlend2>(); - ClassDB::register_class<AnimationNodeBlend3>(); - ClassDB::register_class<AnimationNodeTimeScale>(); - ClassDB::register_class<AnimationNodeTimeSeek>(); - ClassDB::register_class<AnimationNodeTransition>(); - OS::get_singleton()->yield(); //may take time to init ClassDB::register_virtual_class<CollisionObject>(); diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 67351f07d2..cc76df62e5 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -851,6 +851,8 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_stylebox("bg", "GraphEdit", make_stylebox(tree_bg_png, 4, 4, 4, 5)); theme->set_color("grid_minor", "GraphEdit", Color(1, 1, 1, 0.05)); theme->set_color("grid_major", "GraphEdit", Color(1, 1, 1, 0.2)); + theme->set_color("selection_fill", "GraphEdit", Color(1, 1, 1, 0.3)); + theme->set_color("selection_stroke", "GraphEdit", Color(1, 1, 1, 0.8)); theme->set_color("activity", "GraphEdit", Color(1, 1, 1)); theme->set_constant("bezier_len_pos", "GraphEdit", 80 * scale); theme->set_constant("bezier_len_neg", "GraphEdit", 160 * scale); |