diff --git a/scenes/combatUIScene.tscn b/scenes/combatUIScene.tscn index 3313a64..6345c79 100644 --- a/scenes/combatUIScene.tscn +++ b/scenes/combatUIScene.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=14 format=3 uid="uid://0h3dpe6fuhe8"] +[gd_scene load_steps=15 format=3 uid="uid://0h3dpe6fuhe8"] [ext_resource type="Script" path="res://scripts/combat_ui_scene.gd" id="1_p88l5"] [ext_resource type="Script" path="res://scripts/Player.gd" id="3_w71a3"] @@ -31,6 +31,8 @@ curve_z = SubResource("Curve_wmq0q") [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_6jnvr"] +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_co4b5"] + [node name="CombatUIScene" type="Control"] layout_mode = 3 anchors_preset = 15 @@ -297,6 +299,23 @@ size_flags_horizontal = 3 layout_mode = 2 theme = ExtResource("4_4e8vj") +[node name="UIRight" type="PanelContainer" parent="MarginContainer"] +layout_mode = 2 +size_flags_horizontal = 8 +theme_override_styles/panel = SubResource("StyleBoxEmpty_co4b5") + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/UIRight"] +layout_mode = 2 + +[node name="SystemClock" type="Label" parent="MarginContainer/UIRight/VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "HH:MM:SS" + +[node name="ClockTimer" type="Timer" parent="MarginContainer/UIRight/VBoxContainer/SystemClock"] +autostart = true + [connection signal="pressed" from="MarginContainer/UITop/ContinueButton" to="." method="_on_continue_button_pressed"] [connection signal="pressed" from="MarginContainer/UIBottom/UIBottomCenter/MenuButtons/DebugMenu/ButtonTest" to="." method="_on_button_test_pressed"] [connection signal="pressed" from="MarginContainer/UIBottom/UIBottomCenter/MenuButtons/DebugMenu/ButtonExit" to="." method="_on_button_exit_pressed"] +[connection signal="timeout" from="MarginContainer/UIRight/VBoxContainer/SystemClock/ClockTimer" to="." method="_on_clock_timer_timeout"] diff --git a/scripts/combat_ui_scene.gd b/scripts/combat_ui_scene.gd index cc5dff9..c31306f 100644 --- a/scripts/combat_ui_scene.gd +++ b/scripts/combat_ui_scene.gd @@ -76,3 +76,7 @@ func _on_quest_completed() -> void: func _on_continue_button_pressed() -> void: _go_next_area() + + +func _on_clock_timer_timeout() -> void: + %SystemClock.text = Time.get_time_string_from_system()