diff --git a/2d/particles/particles.tscn b/2d/particles/particles.tscn index 187687d4..b131247d 100644 --- a/2d/particles/particles.tscn +++ b/2d/particles/particles.tscn @@ -1,173 +1,119 @@ -[gd_scene load_steps=10 format=2] +[gd_scene load_steps=8 format=2] [ext_resource path="res://fire_particle.png" type="Texture" id=1] -[ext_resource path="res://smoke_particle.png" type="Texture" id=2] -[ext_resource path="res://spark_particle2.png" type="Texture" id=3] -[sub_resource type="Gradient" id=1] +[sub_resource type="CanvasItemMaterial" id=1] -offsets = PoolFloatArray( 0, 0.1, 1 ) -colors = PoolColorArray( 1, 1, 1, 0, 0.886275, 0.371681, 0, 1, 1, 0.99115, 1, 0 ) +blend_mode = 1 +light_mode = 0 [sub_resource type="Gradient" id=2] -offsets = PoolFloatArray( 0, 0.2, 1 ) -colors = PoolColorArray( 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0 ) +offsets = PoolFloatArray( 0, 0.0564972, 1 ) +colors = PoolColorArray( 0.916667, 0.92502, 1, 0, 0.920904, 0.466667, 0, 0.841686, 1, 0.541647, 0.283333, 0 ) -[sub_resource type="Gradient" id=3] +[sub_resource type="GradientTexture" id=3] -offsets = PoolFloatArray( 0, 0.1, 0.5, 1 ) -colors = PoolColorArray( 1, 1, 1, 0.870518, 1, 0.47451, 0.6, 1, 0.529412, 0.74902, 1, 1, 0, 1, 0.698039, 0 ) +gradient = SubResource( 2 ) +width = 2048 -[sub_resource type="Gradient" id=4] +[sub_resource type="Curve" id=4] -offsets = PoolFloatArray( 0, 0.1, 0.7, 1 ) -colors = PoolColorArray( 1, 1, 1, 0, 0.886275, 0.401015, 0, 1, 1, 0.679866, 0.432123, 0.12654, 0, 0, 0, 0 ) +min_value = 0.0 +max_value = 1.0 +bake_resolution = 100 +_data = [ Vector2( 0, 1 ), 0.0, 0.0, Vector2( 0.998617, 0.328125 ), 0.0, 0.0 ] + +[sub_resource type="CurveTexture" id=5] + +width = 2048 +curve = SubResource( 4 ) + +[sub_resource type="ParticlesMaterial" id=6] + +trail_divisor = 1 +emission_shape = 1 +emission_sphere_radius = 20.0 +flag_align_y = false +flag_rotate_y = false +flag_disable_z = true +spread = 0.0 +flatness = 0.0 +gravity = Vector3( 0, 0, 0 ) +initial_velocity = 109.87 +initial_velocity_random = 0.0 +angular_velocity = 158.27 +angular_velocity_random = 1.0 +orbit_velocity = 0.0 +orbit_velocity_random = 0.0 +linear_accel = 0.0 +linear_accel_random = 0.0 +radial_accel = 0.0 +radial_accel_random = 0.0 +tangential_accel = 0.0 +tangential_accel_random = 0.0 +damping = 0.0 +damping_random = 0.0 +angle = 0.0 +angle_random = 0.0 +scale = 1.0 +scale_random = 0.0 +scale_curve = SubResource( 5 ) +color_ramp = SubResource( 3 ) +hue_variation = 0.0 +hue_variation_random = 0.0 +anim_speed = 0.0 +anim_speed_random = 0.0 +anim_offset = 0.0 +anim_offset_random = 0.0 +anim_loop = false +_sections_unfolded = [ "Angular Velocity", "Color", "Emission Shape", "Gravity", "Initial Velocity", "Scale", "Spread" ] [node name="Node" type="Node"] +[node name="Fire" type="Particles2D" parent="."] -[node name="Fire" type="Node2D" parent="."] - -visibility/blend_mode = 1 +modulate = Color( 1, 1, 1, 0.801059 ) +material = SubResource( 1 ) position = Vector2( 165.787, 527.801 ) -rotation_deg = 179.791 -config/amount = 32 -config/lifetime = 1.0 -config/half_extents = Vector2( 15, 15 ) -config/local_space = false -config/texture = ExtResource( 1 ) -params/direction = 0.0 -params/spread = 0.0 -params/linear_velocity = 20.0 -params/spin_velocity = 0.0 -params/orbit_velocity = 0.0 -params/gravity_direction = 180.0 -params/gravity_strength = 80.0 -params/radial_accel = 0.0 -params/tangential_accel = 0.0 -params/damping = 0.0 -params/initial_angle = 180.0 -params/initial_size = 0.7 -params/final_size = 0.3 -params/hue_variation = 0.0 -params/anim_speed_scale = 1.0 -params/anim_initial_pos = 0.0 -randomness/initial_angle = 2.0 -color/color_ramp = SubResource( 1 ) +rotation = -1.5708 +emitting = true +amount = 16 +lifetime = 1.0 +one_shot = false +preprocess = 0.0 +speed_scale = 1.0 +explosiveness = 0.0 +randomness = 0.0 +fixed_fps = 0 +fract_delta = true +visibility_rect = Rect2( -100, -100, 200, 200 ) +local_coords = false +draw_order = 1 +process_material = SubResource( 6 ) +texture = ExtResource( 1 ) +normal_map = null +h_frames = 1 +v_frames = 1 +_sections_unfolded = [ "Drawing", "Material", "Process Material", "Textures", "Transform", "Visibility" ] [node name="Smoke" type="Node2D" parent="."] position = Vector2( 377.396, 543.147 ) -rotation_deg = -176.576 -config/amount = 32 -config/lifetime = 4.0 -config/local_space = false -config/texture = ExtResource( 2 ) -params/direction = 0.0 -params/spread = 20.9073 -params/linear_velocity = 47.1515 -params/spin_velocity = 1.0 -params/orbit_velocity = 0.0 -params/gravity_direction = 0.0 -params/gravity_strength = 0.0 -params/radial_accel = 0.0 -params/tangential_accel = 0.0 -params/damping = 0.0 -params/initial_angle = 180.0 -params/initial_size = 1.0 -params/final_size = 3.0 -params/hue_variation = 0.0 -params/anim_speed_scale = 1.0 -params/anim_initial_pos = 0.0 -randomness/spin_velocity = 1.0 -randomness/initial_angle = 1.0 -color/color_ramp = SubResource( 2 ) +rotation = -3.08183 [node name="Magic" type="Node2D" parent="."] position = Vector2( 593.848, 531.064 ) -config/amount = 32 -config/lifetime = 2.0 -config/half_extents = Vector2( 40, 40 ) -config/local_space = false -config/texture = ExtResource( 3 ) -params/direction = 0.0 -params/spread = 180.0 -params/linear_velocity = 20.0 -params/spin_velocity = 0.3 -params/orbit_velocity = 0.01 -params/gravity_direction = 0.0 -params/gravity_strength = 9.8 -params/radial_accel = 0.0 -params/tangential_accel = 15.5152 -params/damping = 0.0 -params/initial_angle = 45.0 -params/initial_size = 3.0 -params/final_size = 1.0 -params/hue_variation = 0.0 -params/anim_speed_scale = 1.0 -params/anim_initial_pos = 0.0 -randomness/spin_velocity = 1.0 -randomness/orbit_velocity = 100.0 -randomness/initial_angle = 1.0 -color/color_ramp = SubResource( 3 ) [node name="Explosion" type="Node2D" parent="."] show_behind_parent = true -visibility/blend_mode = 1 position = Vector2( 613.467, 182.62 ) -rotation_deg = 179.791 -config/amount = 32 -config/lifetime = 2.0 -config/time_scale = 2.0 -config/half_extents = Vector2( 15, 15 ) -config/local_space = false -config/explosiveness = 0.05 -config/texture = ExtResource( 2 ) -params/direction = 0.0 -params/spread = 180.0 -params/linear_velocity = 184.547 -params/spin_velocity = 0.0 -params/orbit_velocity = 0.0 -params/gravity_direction = 180.0 -params/gravity_strength = 80.0 -params/radial_accel = 0.0 -params/tangential_accel = 0.0 -params/damping = 366.3 -params/initial_angle = 1.0 -params/initial_size = 0.7 -params/final_size = 3.0 -params/hue_variation = 0.0 -params/anim_speed_scale = 1.0 -params/anim_initial_pos = 0.0 -color/color_ramp = SubResource( 4 ) +rotation = 3.13794 [node name="Mask" type="Node2D" parent="."] position = Vector2( 192.975, 141.598 ) -config/amount = 170 -config/lifetime = 0.1 -config/half_extents = Vector2( 128, 128 ) -config/local_space = false -config/texture = ExtResource( 3 ) -params/direction = 0.0 -params/spread = 180.0 -params/linear_velocity = 0.0 -params/spin_velocity = 2.0 -params/orbit_velocity = 0.0 -params/gravity_direction = 0.0 -params/gravity_strength = 0.0 -params/radial_accel = 0.0 -params/tangential_accel = 0.0 -params/damping = 0.0 -params/initial_angle = 1.0 -params/initial_size = 1.0 -params/final_size = 1.0 -params/hue_variation = 0.0 -params/anim_speed_scale = 1.0 -params/anim_initial_pos = 0.0 -randomness/spin_velocity = 1.0 -color/color = Color( 1, 0.477876, 0.60177, 1 ) -emission_points = PoolVector2Array( -0.125, -0.03125, 0.65625, -0.148438, 0.609375, 0.0234375, -0.757812, 0.375, 0.265625, 0.078125, 0.632812, 0.382812, 0.671875, 0.414062, 0.367188, -0.226562, 0.75, -0.125, 0.4375, 0.421875, 0.335938, -0.148438, -0.125, 0.257812, -0.171875, 0.359375, -0.601562, -0.265625, 0.375, 0.382812, -0.296875, 0.09375, -0.664062, -0.21875, -0.554688, -0.226562, -0.320312, 0.367188, -0.320312, -0.257812, 0, -0.257812, 0.578125, -0.25, -0.164062, 0.109375, -0.578125, -0.015625, -0.445312, 0, 0.273438, 0.101562, 0.320312, 0.03125, -0.125, 0.0703125, -0.570312, 0.289062, 0.257812, -0.09375, -0.585938, 0.179688, -0.664062, 0.0234375, -0.25, -0.0859375, 0.6875, -0.109375, 0.234375, 0, -0.5, -0.265625, 0.710938, 0.335938, 0.609375, -0.046875, 0.664062, -0.210938, -0.242188, -0.21875, -0.484375, -0.257812, -0.453125, 0.414062, 0.609375, -0.203125, 0.289062, 0.132812, -0.03125, -0.257812, -0.492188, -0.1875, 0.5625, -0.140625, -0.5625, 0.148438, -0.257812, -0.234375, -0.140625, 0.15625, -0.5625, 0.109375, 0.132812, 0.398438, -0.640625, -0.25, -0.585938, 0.304688, -0.328125, -0.257812, 0.226562, 0.148438, -0.546875, 0.210938, 0.625, 0.179688, 0.648438, -0.0078125, 0.367188, 0.328125, 0.265625, 0.0546875, -0.59375, -0.273438, -0.203125, 0.21875, 0.570312, -0.21875, -0.695312, 0.078125, -0.375, 0.03125, -0.164062, 0.0390625, 0.265625, 0.226562, -0.625, -0.109375, 0.203125, -0.132812, -0.671875, 0.328125, 0.625, -0.179688, -0.640625, 0.0859375, 0.65625, 0, -0.242188, 0.414062, 0.242188, 0.25, -0.148438, -0.0625, 0.390625, -0.25, 0.664062, 0.351562, 0.320312, 0.203125, -0.546875, 0.335938, 0.328125, -0.148438, 0.609375, -0.0625, -0.171875, 0.046875, -0.578125, 0.0546875, -0.304688, -0.28125, 0.734375, -0.0546875, 0.679688, 0.390625, -0.460938, 0.0859375, -0.703125, 0.101562, -0.140625, 0.234375, -0.507812, 0.078125, -0.25, 0.304688, -0.046875, 0.359375, 0.1875, 0.0703125, -0.570312, 0.242188, 0.65625, 0.0859375, -0.203125, -0.265625, -0.164062, -0.179688, 0.367188, -0.1875, -0.601562, -0.101562, -0.117188, -0.210938, -0.546875, 0.109375, -0.585938, -0.28125, -0.59375, -0.03125, 0.3125, -0.179688, 0.414062, 0.429688, -0.476562, -0.195312, -0.0703125, -0.21875, -0.5625, 0.304688, -0.609375, 0.226562, 0.429688, 0.429688, 0.203125, 0.242188, 0.078125, 0.367188, 0.242188, 0.03125, 0.601562, -0.0390625, 0.328125, 0.03125, -0.53125, -0.195312, -0.53125, -0.210938, 0.3125, -0.257812, 0.445312, -0.273438, 0.273438, -0.273438, -0.695312, -0.179688, 0.234375, -0.15625, -0.546875, -0.242188, -0.234375, -0.125, 0.734375, -0.226562, 0.367188, -0.234375, -0.15625, 0.046875, -0.445312, -0.226562, 0.625, 0.03125, -0.0859375, 0.210938, -0.648438, 0.296875, 0.335938, -0.109375, 0.625, -0.078125, 0.601562, 0.351562, 0.242188, 0.140625, 0.0234375, -0.273438, -0.679688, -0.109375, 0.640625, 0.15625, 0.171875, 0.0859375, -0.273438, -0.273438, -0.242188, 0.34375, 0.179688, 0.15625, -0.179688, -0.117188, 0.671875, 0.03125, -0.640625, 0.304688, 0.109375, -0.242188, -0.210938, 0.382812, -0.0859375, 0.0078125, -0.695312, 0.078125, 0.296875, 0.320312, 0.304688, -0.226562, 0.257812, -0.0234375, -0.203125, -0.015625, -0.648438, 0.335938, -0.703125, -0.132812, -0.273438, -0.210938, -0.15625, -0.273438, -0.0390625, 0.335938, 0.617188, 0.179688, 0.34375, 0.390625, -0.210938, -0.132812, -0.226562, -0.117188, 0.617188, -0.289062, 0.125, -0.21875, 0.71875, -0.164062, -0.570312, 0.1875, -0.1875, 0.382812, 0.640625, -0.296875, -0.125, 0.109375, 0.671875, 0.289062, -0.515625, 0.382812, 0.359375, -0.179688, 0.726562, -0.226562, 0.25, 0.320312, -0.328125, 0, -0.117188, -0.234375, -0.210938, -0.148438, -0.546875, -0.117188, 0.359375, 0.429688, -0.15625, -0.226562, 0.632812, -0.257812, -0.28125, -0.273438, 0.265625, 0.015625, -0.765625, 0.351562, 0.703125, 0.421875, -0.585938, 0.0078125, 0.28125, 0.109375, 0.304688, 0.171875, 0.65625, 0.421875, 0.078125, 0.382812, 0.179688, 0.25, -0.382812, 0.0703125, 0.585938, -0.140625, -0.109375, 0.382812, -0.59375, -0.09375, 0.4375, 0.398438, -0.132812, 0.0234375, -0.625, 0.0078125, -0.210938, -0.21875, -0.25, 0.257812, 0.257812, 0.398438, 0.625, 0.195312, 0.148438, -0.234375, -0.476562, 0.398438, -0.210938, 0.046875, 0.695312, -0.101562, 0.695312, 0.140625, -0.492188, -0.1875, 0.25, -0.09375, -0.195312, -0.195312, -0.328125, 0.0703125, -0.242188, -0.0625, 0.296875, 0.34375, -0.632812, 0.0078125, -0.265625, 0.09375, 0.421875, -0.203125, 0.171875, 0.03125, -0.09375, -0.0703125, 0.289062, 0.0859375, -0.609375, 0.390625, -0.554688, 0.257812, -0.6875, 0.0078125, 0.304688, 0.414062, 0.226562, 0.390625, -0.21875, -0.28125, 0.265625, 0.320312, -0.671875, 0.234375, -0.210938, 0.03125, 0.679688, -0.0234375, 0.359375, -0.203125, 0.3125, 0.289062, 0.671875, 0.140625, -0.78125, 0.414062, -0.546875, 0.40625, 0.625, 0.367188, 0.0859375, 0.421875, 0.1875, -0.09375, 0.617188, 0.40625, -0.078125, -0.0390625, 0.695312, 0.0859375, -0.6875, -0.265625, 0.421875, -0.265625, 0.601562, -0.0234375, -0.3125, -0.265625, -0.078125, 0.046875, 0.617188, 0.164062, 0.273438, -0.03125, -0.695312, -0.015625, -0.5625, 0.164062, -0.578125, 0.265625, -0.726562, 0.421875, -0.078125, -0.25, -0.171875, 0.171875, -0.234375, -0.0390625, 0.257812, 0.429688, -0.179688, -0.117188, 0.351562, -0.03125, -0.78125, -0.234375, -0.546875, -0.171875, -0.460938, -0.234375, -0.164062, 0.09375, -0.65625, 0.398438, -0.445312, 0.0859375, -0.71875, -0.226562, 0.671875, 0.101562, -0.46875, -0.195312, -0.71875, -0.265625, 0.617188, 0.125, -0.78125, -0.21875, -0.226562, -0.15625, 0.21875, 0.0234375, 0.289062, 0.101562, 0.648438, -0.171875, 0.390625, -0.273438, -0.257812, 0.078125, -0.21875, 0, 0.65625, -0.203125, -0.679688, 0.171875, -0.1875, 0.328125, -0.46875, -0.28125, 0.273438, 0, 0.664062, 0.296875, -0.140625, 0.335938, -0.625, 0.382812, -0.34375, -0.21875, -0.171875, -0.25, -0.546875, -0.117188, -0.117188, -0.203125, -0.1875, 0.351562, -0.585938, -0.109375, -0.203125, -0.0625, -0.570312, 0.03125, -0.5625, -0.109375, 0.601562, -0.195312, 0.3125, 0.140625, -0.101562, 0.25, 0.25, 0.3125, 0.125, -0.203125, -0.09375, -0.140625, -0.242188, 0.414062, 0.664062, -0.0625, -0.21875, -0.078125, 0.6875, -0.210938, -0.140625, 0.015625, -0.632812, -0.25, -0.109375, 0.234375, -0.695312, 0.015625, -0.3125, -0.28125, 0.296875, -0.0234375, 0.296875, 0.203125, -0.125, 0.234375, 0.570312, 0.390625, -0.554688, 0.203125, -0.5625, 0.351562, -0.15625, 0.21875, -0.375, 0.0390625, -0.226562, -0.140625, 0.695312, 0.164062, 0.632812, 0.367188, -0.328125, -0.210938, -0.59375, 0.34375, 0.304688, -0.242188, -0.34375, 0.0703125, -0.679688, -0.179688, 0.664062, 0.101562, 0.34375, 0.171875, -0.695312, -0.078125, -0.242188, -0.0546875, 0.304688, -0.234375, -0.0078125, -0.21875, -0.632812, 0.203125, 0.625, 0.03125, -0.414062, 0.015625, 0.273438, -0.078125, 0.695312, 0.28125, 0.34375, 0.101562, -0.164062, 0.289062, -0.1875, 0.273438, -0.203125, 0.0703125, 0.734375, -0.171875, -0.59375, 0.34375, -0.15625, 0.210938, 0.429688, 0.375, -0.234375, 0.34375, 0.617188, 0.101562, 0.703125, 0, -0.578125, 0.148438, 0.21875, -0.171875, -0.304688, 0.375, -0.65625, -0.09375, -0.101562, 0.25, -0.4375, 0.03125, -0.242188, 0.421875, -0.546875, 0.0625, -0.632812, -0.148438, -0.125, 0.179688, 0.179688, 0.304688, -0.265625, 0.078125, -0.289062, 0.421875, -0.585938, 0.1875, -0.289062, 0.34375, 0.273438, 0.367188, -0.109375, 0.117188, 0.34375, 0.046875, -0.0625, 0.320312, 0.6875, -0.234375, -0.523438, 0.320312, -0.09375, -0.242188, -0.65625, 0.25, -0.609375, -0.117188, -0.140625, 0.140625, 0.28125, -0.09375, -0.625, -0.28125, 0.34375, 0.328125, 0.265625, 0.109375, -0.609375, 0.0078125, -0.078125, -0.234375, -0.289062, -0.203125, 0.289062, 0.289062, -0.0859375, 0.0078125, -0.101562, -0.28125, -0.625, -0.101562, -0.546875, 0.382812, -0.539062, -0.195312, -0.210938, 0.046875, -0.492188, 0.390625, -0.664062, -0.0703125, 0.71875, -0.101562, -0.140625, -0.046875, 0.695312, 0.289062, -0.710938, 0.429688, -0.703125, 0.3125, -0.203125, 0.109375, 0.421875, -0.273438, 0.304688, 0.21875, 0.328125, 0.257812, -0.632812, -0.0703125, 0.320312, -0.140625, 0.265625, -0.203125, -0.109375, -0.179688, 0.25, -0.210938, 0.65625, 0.109375, -0.648438, -0.0625, -0.0859375, 0.375, -0.429688, 0.398438, 0.320312, 0.3125, -0.0703125, 0.265625, 0.648438, 0.0078125, 0.320312, 0.335938, 0.398438, 0.421875, -0.101562, -0.0625, -0.296875, 0.40625, 0.695312, -0.0390625, 0.335938, 0.21875, -0.546875, 0.117188, -0.476562, 0.390625, -0.648438, 0.117188, -0.078125, -0.28125, 0.328125, 0.289062, -0.226562, 0.179688, 0.226562, 0.375, -0.429688, 0.382812, -0.0546875, 0.34375, 0.59375, -0.125, 0.632812, 0.265625, 0.226562, 0.3125, -0.523438, -0.140625, -0.546875, 0.046875, 0.242188, -0.148438, -0.648438, 0.0234375, -0.289062, 0, -0.546875, 0.101562, -0.125, -0.0625, -0.492188, 0.367188, 0.328125, 0.15625, -0.351562, 0.0546875, -0.609375, 0.414062, -0.296875, 0.09375, 0.671875, -0.203125, -0.257812, -0.273438, -0.335938, 0.414062, 0.65625, -0.195312, -0.601562, -0.101562, -0.203125, -0.078125, 0.210938, 0.242188, 0.296875, 0.335938, -0.578125, 0.40625, -0.664062, -0.078125, -0.0859375, 0.390625, 0.171875, 0.304688, -0.6875, 0.390625, -0.554688, 0.0078125, -0.570312, -0.179688, -0.210938, -0.09375, 0.726562, -0.03125, -0.546875, -0.0859375, -0.265625, -0.171875, -0.65625, 0.179688, -0.171875, 0.257812, -0.164062, -0.171875, 0.203125, 0.335938, -0.640625, 0.21875, 0.390625, 0.375, 0.6875, -0.234375, 0.742188, 0.34375, -0.0546875, 0.351562, -0.632812, 0.195312, 0.671875, -0.21875, 0.195312, 0.015625, 0.226562, 0.117188, -0.507812, 0.078125, -0.140625, -0.15625, 0.703125, -0.28125, 0.226562, -0.140625, 0.328125, 0.421875, 0.3125, 0.1875, 0.703125, 0.078125, 0.351562, 0.289062, 0.21875, -0.242188, -0.328125, 0, 0.171875, 0.101562, -0.304688, -0.242188, -0.210938, 0.078125, 0.625, -0.0078125, 0.25, 0.242188, -0.664062, 0.117188, 0.203125, -0.140625, 0.226562, 0.429688, 0.328125, -0.203125, -0.679688, 0.0703125, -0.195312, -0.148438, -0.523438, 0.328125, 0.382812, -0.257812, 0.578125, -0.171875, 0.65625, 0.320312, -0.632812, -0.148438, 0.703125, 0.0703125, -0.53125, 0.398438, -0.414062, 0.03125, -0.0859375, 0.0546875, -0.53125, 0.335938, 0.304688, 0.429688, -0.234375, -0.148438, -0.375, 0.046875, -0.148438, 0.289062, -0.0390625, 0.421875, 0.226562, -0.125, -0.570312, 0.398438, -0.0703125, -0.0234375, 0.257812, -0.132812 ) + + diff --git a/2d/screen_space_shaders/screen_shaders.tscn b/2d/screen_space_shaders/screen_shaders.tscn index 51950ce9..9b7ae942 100644 --- a/2d/screen_space_shaders/screen_shaders.tscn +++ b/2d/screen_space_shaders/screen_shaders.tscn @@ -24,7 +24,7 @@ void fragment() { [sub_resource type="ShaderMaterial" id=2] -shader/shader = SubResource( 1 ) +shader = SubResource( 1 ) shader_param/vignette = ExtResource( 6 ) _sections_unfolded = [ "shader", "shader_param" ] @@ -41,7 +41,7 @@ void fragment() { [sub_resource type="ShaderMaterial" id=4] -shader/shader = SubResource( 3 ) +shader = SubResource( 3 ) shader_param/amount = 4.0 _sections_unfolded = [ "shader", "shader_param" ] @@ -62,7 +62,7 @@ void fragment() { [sub_resource type="ShaderMaterial" id=6] -shader/shader = SubResource( 5 ) +shader = SubResource( 5 ) shader_param/size_x = null shader_param/size_y = null _sections_unfolded = [ "shader" ] @@ -86,7 +86,7 @@ void fragment() { [sub_resource type="ShaderMaterial" id=8] -shader/shader = SubResource( 7 ) +shader = SubResource( 7 ) shader_param/rotation = null _sections_unfolded = [ "shader" ] @@ -109,7 +109,7 @@ void fragment() { [sub_resource type="ShaderMaterial" id=10] -shader/shader = SubResource( 9 ) +shader = SubResource( 9 ) shader_param/base = Color( 0.54451, 0.408353, 0.403137, 1 ) _sections_unfolded = [ "shader", "shader_param" ] @@ -127,7 +127,7 @@ void fragment() { [sub_resource type="ShaderMaterial" id=12] -shader/shader = SubResource( 11 ) +shader = SubResource( 11 ) _sections_unfolded = [ "shader" ] [sub_resource type="Shader" id=13] @@ -144,7 +144,7 @@ void fragment() { [sub_resource type="ShaderMaterial" id=14] -shader/shader = SubResource( 13 ) +shader = SubResource( 13 ) _sections_unfolded = [ "shader" ] [sub_resource type="Shader" id=15] @@ -159,7 +159,7 @@ void fragment() { [sub_resource type="ShaderMaterial" id=16] -shader/shader = SubResource( 15 ) +shader = SubResource( 15 ) _sections_unfolded = [ "shader" ] [sub_resource type="Shader" id=17] @@ -184,7 +184,7 @@ void fragment() { [sub_resource type="ShaderMaterial" id=18] -shader/shader = SubResource( 17 ) +shader = SubResource( 17 ) shader_param/brightness = null shader_param/contrast = null shader_param/saturation = null @@ -211,7 +211,7 @@ void fragment() { [sub_resource type="ShaderMaterial" id=20] -shader/shader = SubResource( 19 ) +shader = SubResource( 19 ) shader_param/frequency = null shader_param/depth = null _sections_unfolded = [ "shader" ] @@ -257,7 +257,7 @@ void fragment() { [sub_resource type="ShaderMaterial" id=22] -shader/shader = SubResource( 21 ) +shader = SubResource( 21 ) shader_param/base = Color( 0.450274, 0.361255, 0.335059, 1 ) shader_param/grain_strength = 0.3 shader_param/fps = 12 diff --git a/2d/screen_space_shaders/screen_shaders.tscn~ b/2d/screen_space_shaders/screen_shaders.tscn~ index 27073bfd..51950ce9 100644 --- a/2d/screen_space_shaders/screen_shaders.tscn~ +++ b/2d/screen_space_shaders/screen_shaders.tscn~ @@ -259,10 +259,10 @@ void fragment() { shader/shader = SubResource( 21 ) shader_param/base = Color( 0.450274, 0.361255, 0.335059, 1 ) -shader_param/grain_strength = null -shader_param/fps = null -shader_param/stretch = null -shader_param/flashing = null +shader_param/grain_strength = 0.3 +shader_param/fps = 12 +shader_param/stretch = 0.5 +shader_param/flashing = 0.01 shader_param/grain = ExtResource( 8 ) shader_param/vignette = ExtResource( 6 ) _sections_unfolded = [ "shader", "shader_param" ] @@ -510,6 +510,7 @@ _sections_unfolded = [ "Material" ] [node name="old_film" type="TextureRect" parent="effects"] +visible = false material = SubResource( 22 ) anchor_right = 1 anchor_bottom = 1 diff --git a/gui/drag_and_drop/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex b/gui/drag_and_drop/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex new file mode 100644 index 00000000..910e5ce4 Binary files /dev/null and b/gui/drag_and_drop/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex differ diff --git a/gui/drag_and_drop/drag_and_drop.scn b/gui/drag_and_drop/drag_and_drop.scn new file mode 100644 index 00000000..474b8e3a Binary files /dev/null and b/gui/drag_and_drop/drag_and_drop.scn differ diff --git a/gui/drag_and_drop/drag_drop_script.gd b/gui/drag_and_drop/drag_drop_script.gd new file mode 100644 index 00000000..59347365 --- /dev/null +++ b/gui/drag_and_drop/drag_drop_script.gd @@ -0,0 +1,20 @@ + +extends ColorPickerButton + + +func get_drag_data(pos): + # Use another colorpicker as drag preview + var cpb = ColorPickerButton.new() + cpb.color = color + cpb.rect_size = Vector2(50, 50) + set_drag_preview(cpb) + # Return color as drag data + return color + + +func can_drop_data(pos, data): + return typeof(data) == TYPE_COLOR + + +func drop_data(pos, data): + color=data diff --git a/gui/drag_and_drop/icon.png b/gui/drag_and_drop/icon.png new file mode 100644 index 00000000..f900d8d4 Binary files /dev/null and b/gui/drag_and_drop/icon.png differ diff --git a/gui/drag_and_drop/icon.png.import b/gui/drag_and_drop/icon.png.import new file mode 100644 index 00000000..627820bd --- /dev/null +++ b/gui/drag_and_drop/icon.png.import @@ -0,0 +1,23 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true diff --git a/gui/drag_and_drop/project.godot b/gui/drag_and_drop/project.godot new file mode 100644 index 00000000..3f928903 --- /dev/null +++ b/gui/drag_and_drop/project.godot @@ -0,0 +1,6 @@ +[application] + +icon = "res://icon.png" +main_scene = "res://drag_and_drop.scn" +name = "Drag & Drop (GUI)" + diff --git a/gui/input_mapping/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex b/gui/input_mapping/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex new file mode 100644 index 00000000..8ba01f0f Binary files /dev/null and b/gui/input_mapping/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex differ diff --git a/gui/input_mapping/controls.gd b/gui/input_mapping/controls.gd new file mode 100644 index 00000000..d1ba10d7 --- /dev/null +++ b/gui/input_mapping/controls.gd @@ -0,0 +1,56 @@ + +extends Control + +# Note for the reader: +# +# This demo conveniently uses the same names for actions and for the container nodes +# that hold each remapping button. This allow to get back to the button based simply +# on the name of the corresponding action, but it might not be so simple in your project. +# +# A better approach for large-scale input remapping might be to do the connections between +# buttons and wait_for_input through the code, passing as arguments both the name of the +# action and the node, e.g.: +# button.connect("pressed", self, "wait_for_input", [ button, action ]) + +# Member variables +var player_actions = [ "move_up", "move_down", "move_left", "move_right", "jump" ] +var action # To register the action the UI is currently handling +var button # Button node corresponding to the above action + + +func wait_for_input(action_bind): + action = action_bind + # See note at the beginning of the script + button = get_node("bindings").get_node(action).get_node("Button") + get_node("contextual_help").text="Press a key to assign to the '" + action + "' action." + set_process_input(true) + + +func _input(event): + # Handle the first pressed key + if (event is InputEventKey): + # Register the event as handled and stop polling + get_tree().set_input_as_handled() + set_process_input(false) + # Reinitialise the contextual help label + get_node("contextual_help").text="Click a key binding to reassign it, or press the Cancel action." + if (not event.is_action("ui_cancel")): + # Display the string corresponding to the pressed key + button.text=OS.get_scancode_string(event.scancode) + # Start by removing previously key binding(s) + for old_event in InputMap.get_action_list(action): + InputMap.action_erase_event(action, old_event) + # Add the new key binding + InputMap.action_add_event(action, event) + + +func _ready(): + # Initialise each button with the default key binding from InputMap + var input_event + for action in player_actions: + # We assume that the key binding that we want is the first one (0), if there are several + input_event = InputMap.get_action_list(action)[0] + # See note at the beginning of the script + var button = get_node("bindings").get_node(action).get_node("Button") + button.text=OS.get_scancode_string(input_event.scancode) + button.connect("pressed", self, "wait_for_input", [action]) diff --git a/gui/input_mapping/controls.scn b/gui/input_mapping/controls.scn new file mode 100644 index 00000000..d2a80d39 Binary files /dev/null and b/gui/input_mapping/controls.scn differ diff --git a/gui/input_mapping/icon.png b/gui/input_mapping/icon.png new file mode 100644 index 00000000..5a1abf4f Binary files /dev/null and b/gui/input_mapping/icon.png differ diff --git a/gui/input_mapping/icon.png.import b/gui/input_mapping/icon.png.import new file mode 100644 index 00000000..627820bd --- /dev/null +++ b/gui/input_mapping/icon.png.import @@ -0,0 +1,23 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true diff --git a/gui/input_mapping/project.godot b/gui/input_mapping/project.godot new file mode 100644 index 00000000..d863f8bd --- /dev/null +++ b/gui/input_mapping/project.godot @@ -0,0 +1,19 @@ +[application] + +icon = "res://icon.png" +main_scene = "res://controls.scn" +name = "Input Mapping GUI" + +[display] + +window/height = 480 +window/width = 640 + +[input] + +jump = [ InputEvent(KEY,32) ] +move_down = [ InputEvent(KEY,16777234) ] +move_left = [ InputEvent(KEY,16777231) ] +move_right = [ InputEvent(KEY,16777233) ] +move_up = [ InputEvent(KEY,16777232) ] + diff --git a/gui/rich_text_bbcode/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex b/gui/rich_text_bbcode/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex new file mode 100644 index 00000000..17131353 Binary files /dev/null and b/gui/rich_text_bbcode/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex differ diff --git a/gui/rich_text_bbcode/.import/unicorn_icon.png-7e6ed0493ce9bae1105057e782fcd0de.stex b/gui/rich_text_bbcode/.import/unicorn_icon.png-7e6ed0493ce9bae1105057e782fcd0de.stex new file mode 100644 index 00000000..20457ea0 Binary files /dev/null and b/gui/rich_text_bbcode/.import/unicorn_icon.png-7e6ed0493ce9bae1105057e782fcd0de.stex differ diff --git a/gui/rich_text_bbcode/SIL Open Font License.txt b/gui/rich_text_bbcode/SIL Open Font License.txt new file mode 100644 index 00000000..99deab69 --- /dev/null +++ b/gui/rich_text_bbcode/SIL Open Font License.txt @@ -0,0 +1,155 @@ +Copyright (c) 2008-2010, Accademia di Belle Arti di Urbino (www.campivisivi.net|direzione@accademiadiurbino.it), +with Reserved Font Name Titillium. + + +N: Luca Antonucci +W: http://www.campivisivi.net +D: Contributor + +N: Paola Bacchiocchi +W: http://www.campivisivi.net +D: Contributor + +N: Simone Bastianelli +W: http://www.campivisivi.net +D: Contributor + +N: Valerio Bosi +W: http://www.campivisivi.net +D: Contributor + +N: Fabio Cecchi +W: http://www.campivisivi.net +D: Contributor + +N: Giulia Di Grusa +W: http://www.campivisivi.net +D: Contributor + +N: Donatella Esposito +W: http://www.campivisivi.net +D: Contributor + +N: Giulia Giordani +W: http://www.campivisivi.net +D: Contributor + +N: Raffaele Mariotti +W: http://www.campivisivi.net +D: Contributor + +N: Leslie Ameto +W: http://www.campivisivi.net +D: Contributor + +N: Elisa Mearelli +W: http://www.campivisivi.net +D: Contributor + +N: Silvia Mengarelli +W: http://www.campivisivi.net +D: Contributor + +N: Roberto Mezzano +W: http://www.campivisivi.net +D: Contributor + +N: Valentina Mingucci +W: http://www.campivisivi.net +D: Contributor + +N: Andrea Monachesi +W: http://www.campivisivi.net +D: Contributor + +N: Manuel Pasini +W: http://www.campivisivi.net +D: Contributor + +N: David Pulga +W: http://www.campivisivi.net +D: Contributor + +N: Luca Silvestri +W: http://www.campivisivi.net +D: Contributor + +N: Paolo Tripodi +W: http://www.campivisivi.net +D: Contributor + +N: Fancesco Zamboni +W: http://www.campivisivi.net +D: Contributor + +N: Giuliano Chimenti +W: http://www.isiaurbino.it +D: Contributor + +N: Francesco Piarulli +W: http://www.isiaurbino.it +D: Contributor + +N: Ivan Abbattista +W: http://www.isiaurbino.it +D: Contributor + +N: Rita Colacicco +W: http://www.isiaurbino.it +D: Contributor + +N: Paolo Mazzetti +W: http://www.scriptype.net +D: Contributor + +N: Claudio Piccinini +W: http://www.tht.it/ +D: Contributor + +N: Luciano Perondi +E: luciano.perondi@campivisivi.net +W: http://www.campivisivi.net +D: Director of progect + + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. + +The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the copyright statement(s). + +"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. + +"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. + +5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. \ No newline at end of file diff --git a/gui/rich_text_bbcode/Titillium-Bold.otf b/gui/rich_text_bbcode/Titillium-Bold.otf new file mode 100644 index 00000000..a92497bb Binary files /dev/null and b/gui/rich_text_bbcode/Titillium-Bold.otf differ diff --git a/gui/rich_text_bbcode/Titillium-BoldItalic.otf b/gui/rich_text_bbcode/Titillium-BoldItalic.otf new file mode 100644 index 00000000..867a147e Binary files /dev/null and b/gui/rich_text_bbcode/Titillium-BoldItalic.otf differ diff --git a/gui/rich_text_bbcode/Titillium-Regular.otf b/gui/rich_text_bbcode/Titillium-Regular.otf new file mode 100644 index 00000000..3243bc14 Binary files /dev/null and b/gui/rich_text_bbcode/Titillium-Regular.otf differ diff --git a/gui/rich_text_bbcode/Titillium-RegularItalic.otf b/gui/rich_text_bbcode/Titillium-RegularItalic.otf new file mode 100644 index 00000000..db63b19b Binary files /dev/null and b/gui/rich_text_bbcode/Titillium-RegularItalic.otf differ diff --git a/gui/rich_text_bbcode/icon.png b/gui/rich_text_bbcode/icon.png new file mode 100644 index 00000000..6db48a3a Binary files /dev/null and b/gui/rich_text_bbcode/icon.png differ diff --git a/gui/rich_text_bbcode/icon.png.import b/gui/rich_text_bbcode/icon.png.import new file mode 100644 index 00000000..627820bd --- /dev/null +++ b/gui/rich_text_bbcode/icon.png.import @@ -0,0 +1,23 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true diff --git a/gui/rich_text_bbcode/project.godot b/gui/rich_text_bbcode/project.godot new file mode 100644 index 00000000..f7efa5cf --- /dev/null +++ b/gui/rich_text_bbcode/project.godot @@ -0,0 +1,10 @@ +config_version=3 +[application] + +name="Rich Text Label (BBCode)" +main_scene="res://rich_text_bbcode.tscn" +icon="res://icon.png" + +[memory] + +multithread/thread_rid_pool_prealloc=60 diff --git a/gui/rich_text_bbcode/rich_text_bbcode.gd b/gui/rich_text_bbcode/rich_text_bbcode.gd new file mode 100644 index 00000000..79a08c13 --- /dev/null +++ b/gui/rich_text_bbcode/rich_text_bbcode.gd @@ -0,0 +1,6 @@ + +extends Panel + + +func _on_RichTextLabel_meta_clicked(meta): + OS.shell_open(meta) diff --git a/gui/rich_text_bbcode/rich_text_bbcode.tscn b/gui/rich_text_bbcode/rich_text_bbcode.tscn new file mode 100644 index 00000000..8f75c584 --- /dev/null +++ b/gui/rich_text_bbcode/rich_text_bbcode.tscn @@ -0,0 +1,85 @@ +[gd_scene load_steps=10 format=2] + +[ext_resource path="res://rich_text_bbcode.gd" type="Script" id=1] +[ext_resource path="res://Titillium-BoldItalic.otf" type="DynamicFontData" id=2] +[ext_resource path="res://Titillium-RegularItalic.otf" type="DynamicFontData" id=3] +[ext_resource path="res://Titillium-Bold.otf" type="DynamicFontData" id=4] +[ext_resource path="res://Titillium-Regular.otf" type="DynamicFontData" id=5] + +[sub_resource type="DynamicFont" id=1] + +size = 20 +use_mipmaps = false +use_filter = false +font_data = ExtResource( 2 ) +_sections_unfolded = [ "Font", "Settings" ] + +[sub_resource type="DynamicFont" id=2] + +size = 20 +use_mipmaps = false +use_filter = false +font_data = ExtResource( 3 ) +_sections_unfolded = [ "Font", "Settings" ] + +[sub_resource type="DynamicFont" id=3] + +size = 20 +use_mipmaps = false +use_filter = false +font_data = ExtResource( 4 ) +_sections_unfolded = [ "Font", "Settings" ] + +[sub_resource type="DynamicFont" id=4] + +size = 20 +use_mipmaps = false +use_filter = false +font_data = ExtResource( 5 ) +_sections_unfolded = [ "Font", "Settings" ] + +[node name="Panel" type="Panel"] + +anchor_right = 1 +anchor_bottom = 1 +rect_clip_content = false +mouse_filter = 0 +size_flags_horizontal = 2 +size_flags_vertical = 2 +script = ExtResource( 1 ) +__meta__ = { +"__editor_plugin_screen__": "2D" +} + +[node name="RichTextLabel" type="RichTextLabel" parent="."] + +anchor_right = 1 +anchor_bottom = 1 +margin_left = 49.0 +margin_top = 55.0 +margin_right = 55.0 +margin_bottom = 44.0 +mouse_filter = 0 +size_flags_horizontal = 2 +size_flags_vertical = 2 +custom_fonts/bold_italics_font = SubResource( 1 ) +custom_fonts/italics_font = SubResource( 2 ) +custom_fonts/bold_font = SubResource( 3 ) +custom_fonts/normal_font = SubResource( 4 ) +bbcode_enabled = true +bbcode_text = "[b][u]Rich Text Test[/u][/b] + +RichTextLabel is a flexible way of adding text to your game, with support for [i]italics[/i], [b]bold[/b] and [i][b]both[/b][/i]. [u]Underline[/u] works too. +It is also possible to include [img]res://unicorn_icon.png[/img] custom images, as well as [color=aqua][url=http://www.google.com]Custom URLs[/url][/color]. + +Left alignment is default,[center]but center alignment is supported,[/center][right]as well as right alignment.[/right] +[fill]Fill alignment is also supported, and allows writing very long text that will end up fitting the horizontal space entirely with words of joy.[/fill] + +For full reference [color=aqua][url=https://github.com/godotengine/godot/wiki/richtext_bbcode]check the wiki.[/url][/color] +" +visible_characters = -1 +_sections_unfolded = [ "BBCode", "custom_fonts" ] + +[connection signal="meta_clicked" from="RichTextLabel" to="." method="_on_RichTextLabel_meta_clicked"] + + diff --git a/gui/rich_text_bbcode/unicorn_icon.png b/gui/rich_text_bbcode/unicorn_icon.png new file mode 100644 index 00000000..a14517e1 Binary files /dev/null and b/gui/rich_text_bbcode/unicorn_icon.png differ diff --git a/gui/rich_text_bbcode/unicorn_icon.png.import b/gui/rich_text_bbcode/unicorn_icon.png.import new file mode 100644 index 00000000..ce9c0fdd --- /dev/null +++ b/gui/rich_text_bbcode/unicorn_icon.png.import @@ -0,0 +1,23 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/unicorn_icon.png-7e6ed0493ce9bae1105057e782fcd0de.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true diff --git a/gui/translation/.import/flag_japan.png-e7284e6af3de26ab9c66cac9c4062038.stex b/gui/translation/.import/flag_japan.png-e7284e6af3de26ab9c66cac9c4062038.stex new file mode 100644 index 00000000..166246de Binary files /dev/null and b/gui/translation/.import/flag_japan.png-e7284e6af3de26ab9c66cac9c4062038.stex differ diff --git a/gui/translation/.import/flag_spain.png-fd2012b4e19487cfc4923df0c268553f.stex b/gui/translation/.import/flag_spain.png-fd2012b4e19487cfc4923df0c268553f.stex new file mode 100644 index 00000000..82993a9f Binary files /dev/null and b/gui/translation/.import/flag_spain.png-fd2012b4e19487cfc4923df0c268553f.stex differ diff --git a/gui/translation/.import/flag_uk.png-eb8a2b26ac36f4d0cf0d7345e577ec2c.stex b/gui/translation/.import/flag_uk.png-eb8a2b26ac36f4d0cf0d7345e577ec2c.stex new file mode 100644 index 00000000..c1b58e9d Binary files /dev/null and b/gui/translation/.import/flag_uk.png-eb8a2b26ac36f4d0cf0d7345e577ec2c.stex differ diff --git a/gui/translation/.import/hello_en.wav-27ed59f2d75c1ba813ab0abd069b6758.sample b/gui/translation/.import/hello_en.wav-27ed59f2d75c1ba813ab0abd069b6758.sample new file mode 100644 index 00000000..d8d24c67 Binary files /dev/null and b/gui/translation/.import/hello_en.wav-27ed59f2d75c1ba813ab0abd069b6758.sample differ diff --git a/gui/translation/.import/hello_es.wav-64fe245556f8642a1881ae257bd123f2.sample b/gui/translation/.import/hello_es.wav-64fe245556f8642a1881ae257bd123f2.sample new file mode 100644 index 00000000..bd0a9c5a Binary files /dev/null and b/gui/translation/.import/hello_es.wav-64fe245556f8642a1881ae257bd123f2.sample differ diff --git a/gui/translation/.import/hello_jp.wav-c31fbd7870b4b969789cb01f208809ac.sample b/gui/translation/.import/hello_jp.wav-c31fbd7870b4b969789cb01f208809ac.sample new file mode 100644 index 00000000..ca6a6f70 Binary files /dev/null and b/gui/translation/.import/hello_jp.wav-c31fbd7870b4b969789cb01f208809ac.sample differ diff --git a/gui/translation/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex b/gui/translation/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex new file mode 100644 index 00000000..af595e6a Binary files /dev/null and b/gui/translation/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex differ diff --git a/gui/translation/.import/speaker.png-045bf6684b83b55b088824f14e175d16.stex b/gui/translation/.import/speaker.png-045bf6684b83b55b088824f14e175d16.stex new file mode 100644 index 00000000..4acd3c04 Binary files /dev/null and b/gui/translation/.import/speaker.png-045bf6684b83b55b088824f14e175d16.stex differ diff --git a/gui/translation/LICENSE.DroidSans.txt b/gui/translation/LICENSE.DroidSans.txt new file mode 100644 index 00000000..636f1e29 --- /dev/null +++ b/gui/translation/LICENSE.DroidSans.txt @@ -0,0 +1,13 @@ +Copyright (C) 2008 The Android Open Source Project + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/gui/translation/controls.gd b/gui/translation/controls.gd new file mode 100644 index 00000000..ae2e2636 --- /dev/null +++ b/gui/translation/controls.gd @@ -0,0 +1,9 @@ + +extends Panel + + +func _on_back_pressed(): + var s = load("res://main.scn") + var si = s.instance() + get_parent().add_child(si) + queue_free() diff --git a/gui/translation/controls.scn b/gui/translation/controls.scn new file mode 100644 index 00000000..3df35170 Binary files /dev/null and b/gui/translation/controls.scn differ diff --git a/gui/translation/flag_japan.png b/gui/translation/flag_japan.png new file mode 100644 index 00000000..4cc8267a Binary files /dev/null and b/gui/translation/flag_japan.png differ diff --git a/gui/translation/flag_japan.png.import b/gui/translation/flag_japan.png.import new file mode 100644 index 00000000..68e09bc8 --- /dev/null +++ b/gui/translation/flag_japan.png.import @@ -0,0 +1,23 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/flag_japan.png-e7284e6af3de26ab9c66cac9c4062038.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true diff --git a/gui/translation/flag_spain.png b/gui/translation/flag_spain.png new file mode 100644 index 00000000..4d00f935 Binary files /dev/null and b/gui/translation/flag_spain.png differ diff --git a/gui/translation/flag_spain.png.import b/gui/translation/flag_spain.png.import new file mode 100644 index 00000000..b115c1db --- /dev/null +++ b/gui/translation/flag_spain.png.import @@ -0,0 +1,23 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/flag_spain.png-fd2012b4e19487cfc4923df0c268553f.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true diff --git a/gui/translation/flag_uk.png b/gui/translation/flag_uk.png new file mode 100644 index 00000000..53fbef3d Binary files /dev/null and b/gui/translation/flag_uk.png differ diff --git a/gui/translation/flag_uk.png.import b/gui/translation/flag_uk.png.import new file mode 100644 index 00000000..58f73fbe --- /dev/null +++ b/gui/translation/flag_uk.png.import @@ -0,0 +1,23 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/flag_uk.png-eb8a2b26ac36f4d0cf0d7345e577ec2c.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true diff --git a/gui/translation/font/DroidSans.ttf b/gui/translation/font/DroidSans.ttf new file mode 100644 index 00000000..767c63ad Binary files /dev/null and b/gui/translation/font/DroidSans.ttf differ diff --git a/gui/translation/font/DroidSansArabic.ttf b/gui/translation/font/DroidSansArabic.ttf new file mode 100644 index 00000000..660e2a99 Binary files /dev/null and b/gui/translation/font/DroidSansArabic.ttf differ diff --git a/gui/translation/font/DroidSansFallback.ttf b/gui/translation/font/DroidSansFallback.ttf new file mode 100644 index 00000000..206621fc Binary files /dev/null and b/gui/translation/font/DroidSansFallback.ttf differ diff --git a/gui/translation/font/DroidSansHebrew.ttf b/gui/translation/font/DroidSansHebrew.ttf new file mode 100644 index 00000000..8d77e3e4 Binary files /dev/null and b/gui/translation/font/DroidSansHebrew.ttf differ diff --git a/gui/translation/font/DroidSansJapanese.ttf b/gui/translation/font/DroidSansJapanese.ttf new file mode 100644 index 00000000..412fa3de Binary files /dev/null and b/gui/translation/font/DroidSansJapanese.ttf differ diff --git a/gui/translation/font/DroidSansThai.ttf b/gui/translation/font/DroidSansThai.ttf new file mode 100644 index 00000000..f849baef Binary files /dev/null and b/gui/translation/font/DroidSansThai.ttf differ diff --git a/gui/translation/font/droid_sans.tres b/gui/translation/font/droid_sans.tres new file mode 100644 index 00000000..40cbd207 --- /dev/null +++ b/gui/translation/font/droid_sans.tres @@ -0,0 +1,22 @@ +[gd_resource type="DynamicFont" load_steps=7 format=2] + +[ext_resource path="res://font/DroidSansArabic.ttf" type="DynamicFontData" id=1] +[ext_resource path="res://font/DroidSansFallback.ttf" type="DynamicFontData" id=2] +[ext_resource path="res://font/DroidSansHebrew.ttf" type="DynamicFontData" id=3] +[ext_resource path="res://font/DroidSansJapanese.ttf" type="DynamicFontData" id=4] +[ext_resource path="res://font/DroidSansThai.ttf" type="DynamicFontData" id=5] +[ext_resource path="res://font/DroidSans.ttf" type="DynamicFontData" id=6] + +[resource] + +size = 16 +use_mipmaps = false +use_filter = false +font_data = ExtResource( 6 ) +fallback/0 = ExtResource( 1 ) +fallback/1 = ExtResource( 2 ) +fallback/2 = ExtResource( 3 ) +fallback/3 = ExtResource( 4 ) +fallback/4 = ExtResource( 5 ) +_sections_unfolded = [ "Font", "Font/fallback" ] + diff --git a/gui/translation/hello_en.wav b/gui/translation/hello_en.wav new file mode 100644 index 00000000..6b727bfa Binary files /dev/null and b/gui/translation/hello_en.wav differ diff --git a/gui/translation/hello_en.wav.import b/gui/translation/hello_en.wav.import new file mode 100644 index 00000000..23bd8082 --- /dev/null +++ b/gui/translation/hello_en.wav.import @@ -0,0 +1,16 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/hello_en.wav-27ed59f2d75c1ba813ab0abd069b6758.sample" + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=true +edit/normalize=true +edit/loop=false +compress/mode=0 diff --git a/gui/translation/hello_es.wav b/gui/translation/hello_es.wav new file mode 100644 index 00000000..ae6d503d Binary files /dev/null and b/gui/translation/hello_es.wav differ diff --git a/gui/translation/hello_es.wav.import b/gui/translation/hello_es.wav.import new file mode 100644 index 00000000..211746f3 --- /dev/null +++ b/gui/translation/hello_es.wav.import @@ -0,0 +1,16 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/hello_es.wav-64fe245556f8642a1881ae257bd123f2.sample" + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=true +edit/normalize=true +edit/loop=false +compress/mode=0 diff --git a/gui/translation/hello_jp.wav b/gui/translation/hello_jp.wav new file mode 100644 index 00000000..3389601a Binary files /dev/null and b/gui/translation/hello_jp.wav differ diff --git a/gui/translation/hello_jp.wav.import b/gui/translation/hello_jp.wav.import new file mode 100644 index 00000000..ba5e44f1 --- /dev/null +++ b/gui/translation/hello_jp.wav.import @@ -0,0 +1,16 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/hello_jp.wav-c31fbd7870b4b969789cb01f208809ac.sample" + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=true +edit/normalize=true +edit/loop=false +compress/mode=0 diff --git a/gui/translation/icon.png b/gui/translation/icon.png new file mode 100644 index 00000000..4be5ac11 Binary files /dev/null and b/gui/translation/icon.png differ diff --git a/gui/translation/icon.png.import b/gui/translation/icon.png.import new file mode 100644 index 00000000..627820bd --- /dev/null +++ b/gui/translation/icon.png.import @@ -0,0 +1,23 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true diff --git a/gui/translation/main.gd b/gui/translation/main.gd new file mode 100644 index 00000000..825aad57 --- /dev/null +++ b/gui/translation/main.gd @@ -0,0 +1,19 @@ + +extends Panel + + + +func _on_english_pressed(): + TranslationServer.set_locale("en") + + +func _on_spanish_pressed(): + TranslationServer.set_locale("es") + + +func _on_japanese_pressed(): + TranslationServer.set_locale("ja") + + +func _on_play_pressed(): + get_node("audio").play() diff --git a/gui/translation/main.scn b/gui/translation/main.scn new file mode 100644 index 00000000..da50c0e4 Binary files /dev/null and b/gui/translation/main.scn differ diff --git a/gui/translation/noto.fnt b/gui/translation/noto.fnt new file mode 100644 index 00000000..ac206a63 Binary files /dev/null and b/gui/translation/noto.fnt differ diff --git a/gui/translation/project.godot b/gui/translation/project.godot new file mode 100644 index 00000000..a1c1d983 --- /dev/null +++ b/gui/translation/project.godot @@ -0,0 +1,20 @@ +config_version=3 +config_version=null + +[application] + +name="Translation Demo" +main_scene="res://main.scn" +icon="res://icon.png" + +[locale] + +translation_remaps={ +"res://flag_uk.png": [ "res://flag_spain.png:es", "res://flag_japan.png:ja" ], +"res://hello_en.wav": PoolStringArray( "res://hello_es.wav:es", "res://hello_jp.wav:ja" ) +} +translations=PoolStringArray( "res://text.en.translation", "res://text.es.translation", "res://text.ja.translation" ) + +[memory] + +multithread/thread_rid_pool_prealloc=60 diff --git a/gui/translation/speaker.png b/gui/translation/speaker.png new file mode 100644 index 00000000..7ac4b42b Binary files /dev/null and b/gui/translation/speaker.png differ diff --git a/gui/translation/speaker.png.import b/gui/translation/speaker.png.import new file mode 100644 index 00000000..3ac71c89 --- /dev/null +++ b/gui/translation/speaker.png.import @@ -0,0 +1,23 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/speaker.png-045bf6684b83b55b088824f14e175d16.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true diff --git a/gui/translation/text.csv b/gui/translation/text.csv new file mode 100644 index 00000000..655d7eb1 --- /dev/null +++ b/gui/translation/text.csv @@ -0,0 +1,3 @@ +,en,es,ja +KEY_HELLO,Hello!,Hola!,こんにちは +KEY_PUSH,Push Me!,Aprétame!,押す \ No newline at end of file diff --git a/gui/translation/text.csv.import b/gui/translation/text.csv.import new file mode 100644 index 00000000..fe36e404 --- /dev/null +++ b/gui/translation/text.csv.import @@ -0,0 +1,11 @@ +[remap] + +importer="csv_translation" +type="Translation" + +[gen] +files=[ "res://text.en.translation", "res://text.es.translation", "res://text.ja.translation" ] + +[params] + +compress=true diff --git a/gui/translation/text.en.translation b/gui/translation/text.en.translation new file mode 100644 index 00000000..c0e29b26 Binary files /dev/null and b/gui/translation/text.en.translation differ diff --git a/gui/translation/text.es.translation b/gui/translation/text.es.translation new file mode 100644 index 00000000..23220d14 Binary files /dev/null and b/gui/translation/text.es.translation differ diff --git a/gui/translation/text.ja.translation b/gui/translation/text.ja.translation new file mode 100644 index 00000000..588f4dff Binary files /dev/null and b/gui/translation/text.ja.translation differ diff --git a/old/gui/drag_and_drop/drag_and_drop.scn b/old/gui/drag_and_drop/drag_and_drop.scn index 9dec254e..944ccc73 100644 Binary files a/old/gui/drag_and_drop/drag_and_drop.scn and b/old/gui/drag_and_drop/drag_and_drop.scn differ diff --git a/old/gui/translation/main.scn b/old/gui/translation/main.scn index be833fcd..c92270a8 100644 Binary files a/old/gui/translation/main.scn and b/old/gui/translation/main.scn differ