From a438dd0938a2010fe66d474921ba5895243c4b9d Mon Sep 17 00:00:00 2001 From: TsubakiLoL <2789646812@qq.com> Date: Sun, 15 Dec 2024 19:58:42 +0800 Subject: [PATCH] add --- Robo-Bus-A31-HMI/Modules/setting.gd | 8 ++++++++ Robo-Bus-A31-HMI/Modules/setting.tscn | 19 ++++++++++++++----- Robo-Bus-A31-HMI/Modules/setting_tabs.gd | 2 +- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/Robo-Bus-A31-HMI/Modules/setting.gd b/Robo-Bus-A31-HMI/Modules/setting.gd index a24f03f..1af325c 100644 --- a/Robo-Bus-A31-HMI/Modules/setting.gd +++ b/Robo-Bus-A31-HMI/Modules/setting.gd @@ -122,3 +122,11 @@ func _on_update_accept_btn_on_click(_node: Variant) -> void: #当用户点击检查更新时触发 func _on_update_button_on_click(_node: Variant) -> void: pass # Replace with function body. + + +func _on_color_mode_on_click(_node: Variant) -> void: + pass # Replace with function body. + + +func _on_view_mode_on_click(_node: Variant) -> void: + pass # Replace with function body. diff --git a/Robo-Bus-A31-HMI/Modules/setting.tscn b/Robo-Bus-A31-HMI/Modules/setting.tscn index 442be00..efe46aa 100644 --- a/Robo-Bus-A31-HMI/Modules/setting.tscn +++ b/Robo-Bus-A31-HMI/Modules/setting.tscn @@ -425,7 +425,8 @@ theme_override_constants/separation = 0 layout_mode = 2 theme_override_constants/separation = 19 -[node name="Label" type="Label" parent="HBoxContainer/VBoxContainer/margin/VBoxContainer/HBoxContainer"] +[node name="Temperature" type="Label" parent="HBoxContainer/VBoxContainer/margin/VBoxContainer/HBoxContainer"] +unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 10 theme_override_font_sizes/font_size = 34 @@ -435,12 +436,14 @@ text = "25℃" custom_minimum_size = Vector2(86.18, 0) layout_mode = 2 -[node name="Label2" type="Label" parent="HBoxContainer/VBoxContainer/margin/VBoxContainer/HBoxContainer"] +[node name="Date" type="Label" parent="HBoxContainer/VBoxContainer/margin/VBoxContainer/HBoxContainer"] +unique_name_in_owner = true layout_mode = 2 theme_override_font_sizes/font_size = 34 text = "2024-04-27" -[node name="Label3" type="Label" parent="HBoxContainer/VBoxContainer/margin/VBoxContainer/HBoxContainer"] +[node name="Time" type="Label" parent="HBoxContainer/VBoxContainer/margin/VBoxContainer/HBoxContainer"] +unique_name_in_owner = true layout_mode = 2 theme_override_font_sizes/font_size = 34 text = "00:35:24" @@ -462,9 +465,11 @@ layout_mode = 2 theme_override_font_sizes/font_size = 33 text = "显示模式" -[node name="TextureRect" type="TextureRect" parent="HBoxContainer/VBoxContainer/margin/VBoxContainer/HBoxContainer2/VBoxContainer"] +[node name="ColorMode" type="TextureRect" parent="HBoxContainer/VBoxContainer/margin/VBoxContainer/HBoxContainer2/VBoxContainer"] layout_mode = 2 texture = ExtResource("6_xloj4") +script = ExtResource("15_od2fy") +is_Scale = true [node name="VBoxContainer2" type="VBoxContainer" parent="HBoxContainer/VBoxContainer/margin/VBoxContainer/HBoxContainer2"] layout_mode = 2 @@ -475,9 +480,11 @@ layout_mode = 2 theme_override_font_sizes/font_size = 33 text = "视图切换" -[node name="TextureRect" type="TextureRect" parent="HBoxContainer/VBoxContainer/margin/VBoxContainer/HBoxContainer2/VBoxContainer2"] +[node name="ViewMode" type="TextureRect" parent="HBoxContainer/VBoxContainer/margin/VBoxContainer/HBoxContainer2/VBoxContainer2"] layout_mode = 2 texture = ExtResource("7_vgc4b") +script = ExtResource("15_od2fy") +is_Scale = true [node name="tab2" type="Control" parent="HBoxContainer/VBoxContainer/margin/VBoxContainer"] custom_minimum_size = Vector2(0, 53) @@ -738,6 +745,8 @@ layout_mode = 2 [connection signal="on_click" from="HBoxContainer/margin/VBoxContainer/GridContainer/Download" to="." method="_on_download_on_click"] [connection signal="on_click" from="HBoxContainer/margin/VBoxContainer/GridContainer/Upload" to="." method="_on_upload_on_click"] [connection signal="Onclick" from="HBoxContainer/margin/VBoxContainer/GridContainer/Upload/uploadTabs" to="." method="_on_upload_tabs_onclick"] +[connection signal="on_click" from="HBoxContainer/VBoxContainer/margin/VBoxContainer/HBoxContainer2/VBoxContainer/ColorMode" to="." method="_on_color_mode_on_click"] +[connection signal="on_click" from="HBoxContainer/VBoxContainer/margin/VBoxContainer/HBoxContainer2/VBoxContainer2/ViewMode" to="." method="_on_view_mode_on_click"] [connection signal="Onclick" from="HBoxContainer/VBoxContainer/margin/VBoxContainer/HBoxContainer3/VBoxContainer/MarginContainer/LanguageTabs" to="." method="_on_language_tabs_onclick"] [connection signal="pressed" from="HBoxContainer/VBoxContainer/margin/VBoxContainer/HBoxContainer3/VBoxContainer2/HBoxContainer/WsConnectButton" to="." method="_on_ws_connect_button_pressed"] [connection signal="on_click" from="HBoxContainer/VBoxContainer/RightBottonPanel/VBoxContainer/HBoxContainer2/UpdateButton" to="." method="_on_update_button_on_click"] diff --git a/Robo-Bus-A31-HMI/Modules/setting_tabs.gd b/Robo-Bus-A31-HMI/Modules/setting_tabs.gd index 85ba30a..64bf6b8 100644 --- a/Robo-Bus-A31-HMI/Modules/setting_tabs.gd +++ b/Robo-Bus-A31-HMI/Modules/setting_tabs.gd @@ -33,6 +33,6 @@ func _ready() -> void: if !OnClickIsCooling: SelectNode = _node OnClickIsCooling = true - Onclick.emit(_node.get_child(0).index) + Onclick.emit(_node.get_child(0).get_index()) ) pass # Replace with function body.