changed todo button styles
authorEduardo <[email protected]>
Sat, 30 Sep 2023 23:22:48 +0000 (01:22 +0200)
committerEduardo <[email protected]>
Sat, 30 Sep 2023 23:22:48 +0000 (01:22 +0200)
scenes/todo_list/ToDoList.tscn
themes/default/buttons/to-do_button/ToDoButton.tscn [new file with mode: 0644]
themes/default/buttons/to-do_button/ToDoButtonTheme.tres [new file with mode: 0644]

index 19ea1fe2abd5d4ec59d1c02e4d3d389ae1c49dd7..2b27d801226f847ba5da89f9d3faec4b4ed7ac78 100644 (file)
@@ -2,9 +2,9 @@
 
 [ext_resource type="Script" path="res://scenes/todo_list/ToDoList.gd" id="1_733o8"]
 [ext_resource type="Shader" path="res://themes/default/backgrounds/to-do_list_screen_lines.gdshader" id="2_tsopu"]
-[ext_resource type="PackedScene" uid="uid://wcc3vm8lhbp6" path="res://custom_elements/buttons/AnimatedButton.tscn" id="2_xdr44"]
 [ext_resource type="Script" path="res://addons/ReorderableContainer/reorderable_vbox.gd" id="4_6gjj0"]
 [ext_resource type="PackedScene" uid="uid://cilxydvrxa3oj" path="res://custom_elements/todo_list_elements/todo_element.tscn" id="4_grm34"]
+[ext_resource type="PackedScene" uid="uid://dp401g6vkkrsh" path="res://themes/default/buttons/to-do_button/ToDoButton.tscn" id="6_dn6y8"]
 
 [sub_resource type="ShaderMaterial" id="ShaderMaterial_uiqg4"]
 shader = ExtResource("2_tsopu")
@@ -95,14 +95,15 @@ visible = true
 [node name="todo_element3" parent="ScrollContainer/MarginContainer/VBoxContainer/ReorderableVBox" instance=ExtResource("4_grm34")]
 layout_mode = 2
 
-[node name="AnimatedButton" parent="." instance=ExtResource("2_xdr44")]
+[node name="AddButton" parent="." instance=ExtResource("6_dn6y8")]
 anchors_preset = 3
 anchor_left = 1.0
 anchor_top = 1.0
+anchor_right = 1.0
 anchor_bottom = 1.0
-offset_left = -223.0
-offset_top = -249.0
-offset_right = -52.0
+offset_left = -201.0
+offset_top = -222.0
+offset_right = -51.0
 offset_bottom = -72.0
 grow_horizontal = 0
 grow_vertical = 0
diff --git a/themes/default/buttons/to-do_button/ToDoButton.tscn b/themes/default/buttons/to-do_button/ToDoButton.tscn
new file mode 100644 (file)
index 0000000..f04f884
--- /dev/null
@@ -0,0 +1,27 @@
+[gd_scene load_steps=3 format=3 uid="uid://dp401g6vkkrsh"]
+
+[ext_resource type="Script" path="res://custom_elements/buttons/AnimatedButton.gd" id="1_0pqh5"]
+[ext_resource type="Theme" uid="uid://bc4yvb88f0bct" path="res://themes/default/buttons/to-do_button/ToDoButtonTheme.tres" id="1_h4v0t"]
+
+[node name="AnimatedButton" type="Control"]
+layout_mode = 3
+anchor_right = 0.139
+anchor_bottom = 0.078
+offset_right = -0.12001
+offset_bottom = 0.23999
+grow_horizontal = 2
+theme = ExtResource("1_h4v0t")
+script = ExtResource("1_0pqh5")
+
+[node name="Button" type="Button" parent="."]
+layout_mode = 1
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+keep_pressed_outside = true
+text = "+"
+
+[connection signal="button_down" from="Button" to="." method="_on_button_button_down"]
+[connection signal="button_up" from="Button" to="." method="_on_button_button_up"]
diff --git a/themes/default/buttons/to-do_button/ToDoButtonTheme.tres b/themes/default/buttons/to-do_button/ToDoButtonTheme.tres
new file mode 100644 (file)
index 0000000..8352c2d
--- /dev/null
@@ -0,0 +1,26 @@
+[gd_resource type="Theme" load_steps=3 format=3 uid="uid://bc4yvb88f0bct"]
+
+[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_45c3g"]
+bg_color = Color(0.545098, 0.815686, 0.827451, 1)
+corner_radius_top_left = 45
+corner_radius_top_right = 45
+corner_radius_bottom_right = 45
+corner_radius_bottom_left = 45
+shadow_color = Color(1, 0.776471, 0.729412, 1)
+shadow_size = 2
+shadow_offset = Vector2(4, 4)
+
+[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1dn5x"]
+bg_color = Color(0.545098, 0.815686, 0.827451, 1)
+corner_radius_top_left = 45
+corner_radius_top_right = 45
+corner_radius_bottom_right = 45
+corner_radius_bottom_left = 45
+shadow_color = Color(1, 0.776471, 0.729412, 1)
+
+[resource]
+Button/styles/disabled = SubResource("StyleBoxFlat_45c3g")
+Button/styles/focus = SubResource("StyleBoxFlat_45c3g")
+Button/styles/hover = SubResource("StyleBoxFlat_45c3g")
+Button/styles/normal = SubResource("StyleBoxFlat_45c3g")
+Button/styles/pressed = SubResource("StyleBoxFlat_1dn5x")