From: Eduardo Date: Tue, 3 Oct 2023 16:53:14 +0000 (+0200) Subject: add task dialog created (WIP) X-Git-Url: http://git.edufdez.es/?a=commitdiff_plain;h=20984245b127c781d8994501cc60e9eef3f0d07d;p=The%20Cutests%20To-Do%20List.git add task dialog created (WIP) --- diff --git a/scenes/todo_list/AddTaskDialog.tscn b/scenes/todo_list/AddTaskDialog.tscn new file mode 100644 index 0000000..d75fde8 --- /dev/null +++ b/scenes/todo_list/AddTaskDialog.tscn @@ -0,0 +1,37 @@ +[gd_scene load_steps=4 format=3 uid="uid://u5vcti10kvre"] + +[ext_resource type="Texture2D" uid="uid://cugiarpdi1x27" path="res://themes/default/resources/bunny_line.png" id="1_6kt5r"] +[ext_resource type="Shader" path="res://themes/default/backgrounds/AddTaskDialog.gdshader" id="2_lebfq"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_g3ii6"] +shader = ExtResource("2_lebfq") +shader_parameter/dots_color = Vector4(1, 0.86, 0.83, 1) +shader_parameter/radius = 0.07 + +[node name="AddTaskDialog" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="TextureRect" type="TextureRect" parent="."] +layout_mode = 0 +offset_right = 800.0 +offset_bottom = 250.0 +texture = ExtResource("1_6kt5r") +stretch_mode = 5 + +[node name="ColorRect" type="ColorRect" parent="."] +material = SubResource("ShaderMaterial_g3ii6") +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = 250.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(1, 0.776471, 0.729412, 1) diff --git a/themes/default/backgrounds/AddTaskDialog.gdshader b/themes/default/backgrounds/AddTaskDialog.gdshader new file mode 100644 index 0000000..15f1161 --- /dev/null +++ b/themes/default/backgrounds/AddTaskDialog.gdshader @@ -0,0 +1,20 @@ +shader_type canvas_item; + +uniform vec4 dots_color = vec4(1, 0.86, 0.83, 1); +uniform float radius: hint_range(0.0, 1.0, 0.01) = .07; + +void fragment() { + vec2 uv = (FRAGCOORD.xy - (1.0 / SCREEN_PIXEL_SIZE).xy) / min((1.0 / SCREEN_PIXEL_SIZE).x, (1.0 / SCREEN_PIXEL_SIZE).y) * 2.0 + 1.0; + + // circle + float c = length(uv); + float min_dist = min(c, 1.0); + + // anti-aliased + float d = length(uv); + float wd = fwidth(d); + float circle = smoothstep(radius + wd, radius - wd, min_dist); + + // colors + COLOR = mix(COLOR, dots_color, circle); +} \ No newline at end of file diff --git a/themes/default/resources/bunny_line.png b/themes/default/resources/bunny_line.png new file mode 100644 index 0000000..2f28178 Binary files /dev/null and b/themes/default/resources/bunny_line.png differ diff --git a/themes/default/resources/bunny_line.png.import b/themes/default/resources/bunny_line.png.import new file mode 100644 index 0000000..3993e65 --- /dev/null +++ b/themes/default/resources/bunny_line.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cugiarpdi1x27" +path="res://.godot/imported/bunny_line.png-c36307fab30c4a043461d1b1f9abf238.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/default/resources/bunny_line.png" +dest_files=["res://.godot/imported/bunny_line.png-c36307fab30c4a043461d1b1f9abf238.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1