home buttons styles and positions
authorEduardo Fernandez <[email protected]>
Sun, 24 Sep 2023 19:54:08 +0000 (21:54 +0200)
committerEduardo Fernandez <[email protected]>
Sun, 24 Sep 2023 19:54:08 +0000 (21:54 +0200)
buttons/AnimatedButton.gd
scenes/main_menu/MainMenu.tscn
themes/default/Default_theme.tres

index e52fa3c4447d4c5d260ec81a82083defc23aecf4..345679f62e9e21c57e45016182017fd5ffa737f0 100644 (file)
@@ -9,16 +9,13 @@ func _on_button_button_up():
        animate_button_up()
 
 func animate_button_down():
-       var new_size = Vector2(button.size.x, button.size.y - 10)
-       var new_position = Vector2(button.position.x, button.position.y + 10)
-       animate_button(new_size, new_position)
+       var new_position = Vector2(button.position.x + 8, button.position.y + 8)
+       animate_button(new_position)
 
 func animate_button_up():
-       var new_size = Vector2(button.size.x, button.size.y + 10)
-       var new_position = Vector2(button.position.x, button.position.y - 10)
-       animate_button(new_size, new_position)
+       var new_position = Vector2(button.position.x - 8, button.position.y - 8)
+       animate_button(new_position)
 
-func animate_button(b_size: Vector2, b_position: Vector2):
+func animate_button(b_position: Vector2):
        var tween = get_tree().create_tween().set_parallel(true)
-       tween.tween_property(button, "size", b_size, 0.05)
        tween.tween_property(button, "position", b_position, 0.05)
index 761775c4503d704aab63e66e6093dc9ddaa0938c..3a80247ff20174e73352088b083884a7eeb526b2 100644 (file)
@@ -24,7 +24,8 @@ grow_horizontal = 2
 grow_vertical = 2
 mouse_filter = 2
 script = ExtResource("1_yx80n")
-metadata/_edit_vertical_guides_ = [540.0, 62.0, 1020.0]
+metadata/_edit_vertical_guides_ = [540.0, 62.0, 1020.0, 490.0, 590.0]
+metadata/_edit_horizontal_guides_ = [940.0, 1340.0]
 
 [node name="Background" type="ColorRect" parent="."]
 material = SubResource("ShaderMaterial_v5r1v")
@@ -73,10 +74,10 @@ anchor_left = 0.5
 anchor_top = 0.5
 anchor_right = 0.5
 anchor_bottom = 0.5
-offset_left = -479.5
-offset_top = -810.0
-offset_right = 479.5
-offset_bottom = -20.0
+offset_left = -480.0
+offset_top = -860.0
+offset_right = 479.0
+offset_bottom = -70.0
 grow_horizontal = 2
 grow_vertical = 2
 
@@ -101,10 +102,10 @@ size_flags_vertical = 4
 layout_mode = 2
 
 [node name="Button" parent="VBoxContainer/VSplitContainer/BottomCenterContainer/ToDoBtn" index="0"]
-offset_left = -439.5
-offset_top = 97.0
-offset_right = -83.5
-offset_bottom = 388.0
+offset_left = -418.0
+offset_top = 50.0
+offset_right = -49.0
+offset_bottom = 404.0
 text = "To-Do"
 
 [node name="CalendarBtn" parent="VBoxContainer/VSplitContainer/BottomCenterContainer" instance=ExtResource("4_71840")]
@@ -114,10 +115,10 @@ layout_mode = 2
 anchors_preset = 0
 anchor_right = 0.0
 anchor_bottom = 0.0
-offset_left = 79.0
-offset_top = 97.0
-offset_right = 434.0
-offset_bottom = 388.0
+offset_left = 51.0
+offset_top = 50.0
+offset_right = 420.0
+offset_bottom = 404.0
 grow_horizontal = 1
 grow_vertical = 1
 text = "Calendar"
@@ -126,20 +127,20 @@ text = "Calendar"
 layout_mode = 2
 
 [node name="Button" parent="VBoxContainer/VSplitContainer/BottomCenterContainer/StoreBtn" index="0"]
-offset_left = -439.5
-offset_top = 502.0
-offset_right = -83.5
-offset_bottom = 793.0
+offset_left = -418.0
+offset_top = 450.0
+offset_right = -49.0
+offset_bottom = 804.0
 text = "Store"
 
 [node name="StoreBtn2" parent="VBoxContainer/VSplitContainer/BottomCenterContainer" instance=ExtResource("4_71840")]
 layout_mode = 2
 
 [node name="Button" parent="VBoxContainer/VSplitContainer/BottomCenterContainer/StoreBtn2" index="0"]
-offset_left = 79.5
-offset_top = 502.0
-offset_right = 435.5
-offset_bottom = 793.0
+offset_left = 51.0
+offset_top = 450.0
+offset_right = 420.0
+offset_bottom = 804.0
 text = "Store"
 
 [node name="MenuButton" parent="." instance=ExtResource("5_qjr8j")]
index 6c5e589e3e1bf077c177bbd09cc6ac823b7fe550..e05331cbe6996d7a0b9c5f1201137f236bb196ef 100644 (file)
@@ -2,32 +2,34 @@
 
 [ext_resource type="FontFile" uid="uid://cek5417mq2pbt" path="res://themes/default/fonts/BunnyCute-Regular.otf" id="1_ab6ib"]
 
-[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_l5yqt"]
-bg_color = Color(0.286275, 0.647059, 0.8, 1)
-border_width_bottom = 10
-border_color = Color(0.168627, 0.458824, 0.580392, 1)
-corner_radius_top_left = 30
-corner_radius_top_right = 30
-corner_radius_bottom_right = 30
-corner_radius_bottom_left = 30
-anti_aliasing = false
-
 [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bk2rt"]
-bg_color = Color(0.286275, 0.647059, 0.8, 1)
-border_width_bottom = 20
-border_color = Color(0.168627, 0.458824, 0.580392, 1)
-corner_radius_top_left = 30
-corner_radius_top_right = 30
-corner_radius_bottom_right = 30
-corner_radius_bottom_left = 30
-anti_aliasing = false
+bg_color = Color(0.545098, 0.815686, 0.827451, 1)
+border_color = Color(1, 0.776471, 0.729412, 1)
+corner_radius_top_left = 90
+corner_radius_top_right = 90
+corner_radius_bottom_right = 90
+corner_radius_bottom_left = 90
+shadow_color = Color(1, 0.776471, 0.729412, 1)
+shadow_size = 6
+shadow_offset = Vector2(12, 12)
+
+[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rqaqj"]
+bg_color = Color(0.545098, 0.815686, 0.827451, 1)
+border_color = Color(1, 0.776471, 0.729412, 1)
+corner_radius_top_left = 90
+corner_radius_top_right = 90
+corner_radius_bottom_right = 90
+corner_radius_bottom_left = 90
+shadow_color = Color(1, 0.776471, 0.729412, 1)
+shadow_size = 6
+shadow_offset = Vector2(4, 4)
 
 [resource]
 Button/font_sizes/font_size = 64
-Button/styles/disabled = SubResource("StyleBoxFlat_l5yqt")
+Button/styles/disabled = SubResource("StyleBoxFlat_bk2rt")
 Button/styles/hover = SubResource("StyleBoxFlat_bk2rt")
 Button/styles/normal = SubResource("StyleBoxFlat_bk2rt")
-Button/styles/pressed = SubResource("StyleBoxFlat_l5yqt")
+Button/styles/pressed = SubResource("StyleBoxFlat_rqaqj")
 Fonts/fonts/large = ExtResource("1_ab6ib")
 Fonts/fonts/normal = ExtResource("1_ab6ib")
 Label/font_sizes/font_size = 64