mouse_filter = 2
script = ExtResource("1_yx80n")
metadata/_edit_vertical_guides_ = [540.0, 62.0, 1020.0, 490.0, 590.0]
-metadata/_edit_horizontal_guides_ = [940.0, 1340.0]
+metadata/_edit_horizontal_guides_ = [940.0, 1340.0, 62.0]
[node name="Background" type="ColorRect" parent="."]
material = SubResource("ShaderMaterial_v5r1v")
stretch_mode = 5
[node name="Label" type="Label" parent="."]
-layout_mode = 0
+layout_mode = 2
offset_left = 179.0
offset_top = 717.0
-offset_right = 250.0
+offset_right = 1138.0
offset_bottom = 837.0
theme_override_colors/font_color = Color(0, 0, 0, 1)
text = "
[node name="MenuButton" parent="." instance=ExtResource("5_qjr8j")]
layout_mode = 1
-offset_left = 93.0
-offset_top = 131.0
-offset_right = 93.0
-offset_bottom = 131.0
-scale = Vector2(1.5, 1.5)
+offset_left = 112.0
+offset_top = 103.0
+offset_right = 112.0
+offset_bottom = 103.0
+scale = Vector2(2, 2)
[connection signal="pressed" from="VBoxContainer/VSplitContainer/BottomCenterContainer/ToDoBtn/Button" to="." method="_on_to_do_button_pressed"]
[connection signal="pressed" from="VBoxContainer/VSplitContainer/BottomCenterContainer/CalendarBtn/Button" to="." method="_on_calendar_button_pressed"]
signal scene_changed(scene_name)
@onready var buttons = [$Button2, $Link, $Settings]
-
@export var menu_opened = false
-## Opens or closes the menu
-func _on_button_pressed():
- menu_opened = !menu_opened
- for b in buttons:
- b.visible = menu_opened
+func _on_container_gui_input(event):
+ if event is InputEventMouseButton:
+ if event.pressed == true:
+ toggle_menu()
+
+ if event is InputEventScreenTouch:
+ if event.canceled == false:
+ toggle_menu()
+
func _on_link_pressed():
OS.shell_open("https://backpain.fun")
func _on_settings_pressed():
emit_signal("scene_changed", "res://scenes/settings/Settings.tscn")
+## Opens or closes the menu
func toggle_menu():
- _on_button_pressed()
+ menu_opened = !menu_opened
+ for b in buttons:
+ b.visible = menu_opened
[ext_resource type="Script" path="res://themes/default/buttons/menu_button/MenuButton.gd" id="1_xr3em"]
[ext_resource type="Texture2D" uid="uid://gltlg33raqr6" path="res://themes/default/resources/vector_whiteIcons.svg" id="3_imhq0"]
-[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_8ugr1"]
-texture = ExtResource("3_imhq0")
-region_rect = Rect2(604, 0, 36, 32)
-modulate_color = Color(0, 0, 0, 1)
+[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_kocyh"]
+bg_color = Color(0.545098, 0.756863, 0.827451, 1)
+corner_radius_top_left = 60
+corner_radius_top_right = 60
+corner_radius_bottom_right = 60
+corner_radius_bottom_left = 60
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_phn6s"]
texture = ExtResource("3_imhq0")
anchors_preset = 0
script = ExtResource("1_xr3em")
-[node name="Button" type="Button" parent="."]
-layout_mode = 0
-offset_left = -32.0
-offset_top = -32.0
-offset_right = 32.0
-offset_bottom = 32.0
-theme_override_styles/normal = SubResource("StyleBoxTexture_8ugr1")
+[node name="Container" type="Control" parent="."]
+layout_mode = 1
+anchors_preset = 8
+anchor_left = 0.5
+anchor_top = 0.5
+anchor_right = 0.5
+anchor_bottom = 0.5
+offset_left = -25.0
+offset_top = -25.0
+offset_right = 25.0
+offset_bottom = 25.0
+grow_horizontal = 2
+grow_vertical = 2
+
+[node name="Panel" type="Panel" parent="Container"]
+layout_mode = 2
+offset_top = 5.0
+offset_right = 50.0
+offset_bottom = 15.0
+mouse_filter = 2
+theme_override_styles/panel = SubResource("StyleBoxFlat_kocyh")
+
+[node name="Panel2" type="Panel" parent="Container"]
+layout_mode = 2
+offset_top = 20.0
+offset_right = 50.0
+offset_bottom = 30.0
+mouse_filter = 2
+theme_override_styles/panel = SubResource("StyleBoxFlat_kocyh")
+
+[node name="Panel3" type="Panel" parent="Container"]
+layout_mode = 2
+offset_top = 35.0
+offset_right = 50.0
+offset_bottom = 45.0
+mouse_filter = 2
+theme_override_styles/panel = SubResource("StyleBoxFlat_kocyh")
[node name="Button2" type="Button" parent="."]
visible = false
offset_bottom = 256.0
theme_override_styles/normal = SubResource("StyleBoxTexture_jrhwr")
-[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
+[connection signal="gui_input" from="Container" to="." method="_on_container_gui_input"]
[connection signal="pressed" from="Link" to="." method="_on_link_pressed"]
[connection signal="pressed" from="Settings" to="." method="_on_settings_pressed"]