2018-07-27 08:49:54 +02:00
|
|
|
[gd_scene load_steps=4 format=2]
|
|
|
|
|
2018-09-03 21:35:44 +02:00
|
|
|
[ext_resource path="res://addons/material_maker/widgets/gradient_editor.gd" type="Script" id=1]
|
2018-07-27 08:49:54 +02:00
|
|
|
|
|
|
|
[sub_resource type="Shader" id=1]
|
|
|
|
|
|
|
|
code = "shader_type canvas_item;
|
|
|
|
vec3 gradient(float x) {
|
2018-07-28 21:21:05 +02:00
|
|
|
if (x < 0.000000000) {
|
|
|
|
return vec3(0.000000000,0.000000000,0.000000000);
|
|
|
|
} else if (x < 1.000000000) {
|
|
|
|
return vec3(0.000000000,0.000000000,0.000000000)+x*vec3(1.000000000,1.000000000,1.000000000);
|
|
|
|
}
|
|
|
|
return vec3(1.000000000,1.000000000,1.000000000);
|
2018-07-27 08:49:54 +02:00
|
|
|
}
|
2018-07-28 21:21:05 +02:00
|
|
|
void fragment() { COLOR = vec4(gradient((UV.x-0.041666667)*1.090909091), 1.0); }"
|
2018-07-27 08:49:54 +02:00
|
|
|
|
|
|
|
[sub_resource type="ShaderMaterial" id=2]
|
|
|
|
|
|
|
|
render_priority = 0
|
|
|
|
shader = SubResource( 1 )
|
|
|
|
|
|
|
|
[node name="Control" type="Control" index="0"]
|
|
|
|
|
|
|
|
anchor_left = 0.0
|
|
|
|
anchor_top = 0.0
|
|
|
|
anchor_right = 0.0
|
|
|
|
anchor_bottom = 0.0
|
|
|
|
margin_left = 24.0
|
|
|
|
margin_top = 14.0
|
|
|
|
margin_right = 144.0
|
|
|
|
margin_bottom = 44.0
|
2018-07-28 09:37:51 +02:00
|
|
|
rect_min_size = Vector2( 120, 30 )
|
2018-07-27 08:49:54 +02:00
|
|
|
rect_pivot_offset = Vector2( 0, 0 )
|
|
|
|
rect_clip_content = false
|
|
|
|
mouse_filter = 0
|
|
|
|
mouse_default_cursor_shape = 0
|
|
|
|
size_flags_horizontal = 1
|
|
|
|
size_flags_vertical = 1
|
|
|
|
script = ExtResource( 1 )
|
|
|
|
_sections_unfolded = [ "Rect" ]
|
|
|
|
|
|
|
|
[node name="Gradient" type="ColorRect" parent="." index="0"]
|
|
|
|
|
|
|
|
material = SubResource( 2 )
|
|
|
|
anchor_left = 0.0
|
|
|
|
anchor_top = 0.0
|
|
|
|
anchor_right = 0.0
|
|
|
|
anchor_bottom = 0.0
|
|
|
|
margin_right = 120.0
|
|
|
|
margin_bottom = 20.0
|
|
|
|
rect_min_size = Vector2( 120, 20 )
|
|
|
|
rect_pivot_offset = Vector2( 0, 0 )
|
|
|
|
rect_clip_content = false
|
|
|
|
mouse_filter = 0
|
|
|
|
mouse_default_cursor_shape = 0
|
|
|
|
size_flags_horizontal = 1
|
|
|
|
size_flags_vertical = 1
|
|
|
|
color = Color( 1, 1, 1, 1 )
|
|
|
|
_sections_unfolded = [ "Material" ]
|
|
|
|
|
|
|
|
[node name="Popup" type="Popup" parent="Gradient" index="0"]
|
|
|
|
|
|
|
|
visible = false
|
|
|
|
anchor_left = 0.0
|
|
|
|
anchor_top = 0.0
|
|
|
|
anchor_right = 0.0
|
|
|
|
anchor_bottom = 0.0
|
|
|
|
margin_left = 47.0
|
|
|
|
margin_top = 33.0
|
|
|
|
margin_right = 353.0
|
|
|
|
margin_bottom = 475.0
|
|
|
|
rect_pivot_offset = Vector2( 0, 0 )
|
|
|
|
rect_clip_content = false
|
|
|
|
mouse_filter = 0
|
|
|
|
mouse_default_cursor_shape = 0
|
|
|
|
size_flags_horizontal = 1
|
|
|
|
size_flags_vertical = 1
|
|
|
|
popup_exclusive = false
|
|
|
|
|
|
|
|
[node name="ColorPicker" type="ColorPicker" parent="Gradient/Popup" index="0"]
|
|
|
|
|
|
|
|
anchor_left = 0.0
|
|
|
|
anchor_top = 0.0
|
|
|
|
anchor_right = 0.0
|
|
|
|
anchor_bottom = 0.0
|
|
|
|
margin_left = 4.0
|
|
|
|
margin_top = 4.0
|
2018-08-04 08:05:34 +02:00
|
|
|
margin_right = 4.0
|
|
|
|
margin_bottom = 4.0
|
2018-07-27 08:49:54 +02:00
|
|
|
rect_scale = Vector2( 0.75, 0.75 )
|
|
|
|
rect_pivot_offset = Vector2( 0, 0 )
|
|
|
|
rect_clip_content = false
|
|
|
|
mouse_filter = 1
|
|
|
|
mouse_default_cursor_shape = 0
|
|
|
|
size_flags_horizontal = 1
|
|
|
|
size_flags_vertical = 1
|
|
|
|
alignment = 0
|
|
|
|
color = Color( 1, 1, 1, 1 )
|
|
|
|
edit_alpha = false
|
|
|
|
raw_mode = false
|
|
|
|
_sections_unfolded = [ "Rect" ]
|
|
|
|
|
|
|
|
[connection signal="popup_hide" from="Gradient/Popup" to="." method="_on_Popup_popup_hide"]
|
|
|
|
|
|
|
|
|