@@ -14,63 +14,120 @@ focus_mode = 2
14
14
script = ExtResource ("1" )
15
15
16
16
[node name ="VBoxContainer" type ="VBoxContainer" parent ="." ]
17
- layout_mode = 0
17
+ layout_mode = 1
18
+ anchors_preset = 14
18
19
anchor_top = 0.5
19
20
anchor_right = 1.0
20
21
anchor_bottom = 0.5
21
- offset_top = -47.0
22
- offset_bottom = 47.0
22
+ offset_top = -15.5
23
+ offset_bottom = 15.5
24
+ grow_horizontal = 2
25
+ grow_vertical = 2
23
26
size_flags_vertical = 4
24
27
theme_override_constants/separation = 20
25
28
26
29
[node name ="Quit" type ="Button" parent ="VBoxContainer" ]
27
30
unique_name_in_owner = true
28
31
layout_mode = 2
29
32
size_flags_horizontal = 4
30
- focus_neighbor_top = NodePath ("../HBoxContainer2 /Shutdown" )
33
+ focus_neighbor_top = NodePath ("../SystemButtons /Shutdown" )
31
34
text = "Quit Retrohub"
32
35
33
36
[node name ="AccessibilityFocus" type ="Node" parent ="VBoxContainer/Quit" ]
34
37
script = ExtResource ("2" )
35
- previous = NodePath ("../../HBoxContainer2 /Restart" )
38
+ previous = NodePath ("../../SystemButtons /Restart" )
36
39
37
- [node name ="HBoxContainer" type ="HBoxContainer" parent ="VBoxContainer" ]
40
+ [node name ="Separator" type ="HBoxContainer" parent ="VBoxContainer" ]
41
+ unique_name_in_owner = true
38
42
layout_mode = 2
39
43
40
- [node name ="HSeparator" type ="HSeparator" parent ="VBoxContainer/HBoxContainer " ]
44
+ [node name ="HSeparator" type ="HSeparator" parent ="VBoxContainer/Separator " ]
41
45
layout_mode = 2
42
46
size_flags_horizontal = 3
43
47
44
- [node name ="Label" type ="Label" parent ="VBoxContainer/HBoxContainer " ]
48
+ [node name ="Label" type ="Label" parent ="VBoxContainer/Separator " ]
45
49
layout_mode = 2
46
50
text = "or"
47
51
48
- [node name ="HSeparator2" type ="HSeparator" parent ="VBoxContainer/HBoxContainer " ]
52
+ [node name ="HSeparator2" type ="HSeparator" parent ="VBoxContainer/Separator " ]
49
53
layout_mode = 2
50
54
size_flags_horizontal = 3
51
55
52
- [node name ="HBoxContainer2" type ="HBoxContainer" parent ="VBoxContainer" ]
56
+ [node name ="SystemButtons" type ="HBoxContainer" parent ="VBoxContainer" ]
57
+ unique_name_in_owner = true
53
58
layout_mode = 2
54
59
theme_override_constants/separation = 20
55
60
56
- [node name ="Shutdown" type ="Button" parent ="VBoxContainer/HBoxContainer2 " ]
61
+ [node name ="Shutdown" type ="Button" parent ="VBoxContainer/SystemButtons " ]
57
62
unique_name_in_owner = true
58
63
layout_mode = 2
59
64
size_flags_horizontal = 10
60
65
focus_neighbor_bottom = NodePath ("../../Quit" )
61
- disabled = true
62
66
text = "Shutdown system"
63
67
64
- [node name ="Restart" type ="Button" parent ="VBoxContainer/HBoxContainer2" ]
68
+ [node name ="Confirmation" type ="ConfirmationDialog" parent ="VBoxContainer/SystemButtons/Shutdown" ]
69
+ title = "Shutdown"
70
+ initial_position = 1
71
+ size = Vector2i (350 , 200 )
72
+ ok_button_text = "Shutdown system"
73
+
74
+ [node name ="Label" type ="Label" parent ="VBoxContainer/SystemButtons/Shutdown/Confirmation" ]
75
+ anchors_preset = 15
76
+ anchor_right = 1.0
77
+ anchor_bottom = 1.0
78
+ offset_left = 8.0
79
+ offset_top = 8.0
80
+ offset_right = -8.0
81
+ offset_bottom = -49.0
82
+ grow_horizontal = 2
83
+ grow_vertical = 2
84
+ text = "Do you really wish to shutdown your system?"
85
+ horizontal_alignment = 1
86
+ vertical_alignment = 1
87
+ autowrap_mode = 2
88
+ text_overrun_behavior = 2
89
+
90
+ [node name ="AccessibilityFocus" type ="Node" parent ="VBoxContainer/SystemButtons/Shutdown/Confirmation/Label" ]
91
+ script = ExtResource ("2" )
92
+
93
+ [node name ="Restart" type ="Button" parent ="VBoxContainer/SystemButtons" ]
65
94
unique_name_in_owner = true
66
95
layout_mode = 2
67
96
size_flags_horizontal = 2
68
97
focus_neighbor_bottom = NodePath ("../../Quit" )
69
- disabled = true
70
98
text = "Restart system"
71
99
72
- [node name ="AccessibilityFocus" type ="Node" parent ="VBoxContainer/HBoxContainer2 /Restart" ]
100
+ [node name ="AccessibilityFocus" type ="Node" parent ="VBoxContainer/SystemButtons /Restart" ]
73
101
script = ExtResource ("2" )
74
102
next = NodePath ("../../../Quit" )
75
103
104
+ [node name ="Confirmation" type ="ConfirmationDialog" parent ="VBoxContainer/SystemButtons/Restart" ]
105
+ title = "Reboot"
106
+ initial_position = 1
107
+ size = Vector2i (350 , 200 )
108
+ ok_button_text = "Reboot system"
109
+
110
+ [node name ="Label" type ="Label" parent ="VBoxContainer/SystemButtons/Restart/Confirmation" ]
111
+ anchors_preset = 15
112
+ anchor_right = 1.0
113
+ anchor_bottom = 1.0
114
+ offset_left = 8.0
115
+ offset_top = 8.0
116
+ offset_right = -8.0
117
+ offset_bottom = -49.0
118
+ grow_horizontal = 2
119
+ grow_vertical = 2
120
+ text = "Do you really wish to reboot your system?"
121
+ horizontal_alignment = 1
122
+ vertical_alignment = 1
123
+ autowrap_mode = 2
124
+ text_overrun_behavior = 2
125
+
126
+ [node name ="AccessibilityFocus" type ="Node" parent ="VBoxContainer/SystemButtons/Restart/Confirmation/Label" ]
127
+ script = ExtResource ("2" )
128
+
76
129
[connection signal ="pressed" from ="VBoxContainer/Quit" to ="." method ="_on_Quit_pressed" ]
130
+ [connection signal ="pressed" from ="VBoxContainer/SystemButtons/Shutdown" to ="." method ="_on_shutdown_pressed" ]
131
+ [connection signal ="confirmed" from ="VBoxContainer/SystemButtons/Shutdown/Confirmation" to ="." method ="_on_shutdown_confirmed" ]
132
+ [connection signal ="pressed" from ="VBoxContainer/SystemButtons/Restart" to ="." method ="_on_restart_pressed" ]
133
+ [connection signal ="confirmed" from ="VBoxContainer/SystemButtons/Restart/Confirmation" to ="." method ="_on_restart_confirmed" ]
0 commit comments