diff options
-rw-r--r-- | client/global.gd | 3 | ||||
-rw-r--r-- | client/menu/popup_message.gd | 8 | ||||
-rw-r--r-- | client/menu/popup_message.tscn | 5 |
3 files changed, 15 insertions, 1 deletions
diff --git a/client/global.gd b/client/global.gd index 4a985e38..1683f9f9 100644 --- a/client/global.gd +++ b/client/global.gd @@ -30,7 +30,8 @@ var default_profile := { "has_boosted": false, "has_interacted": false, "has_rotated": false, - "has_reset": false + "has_reset": false, + "has_zoomed": false } var languages := [tr("System default"), "en", "de"] var using_joypad := false diff --git a/client/menu/popup_message.gd b/client/menu/popup_message.gd index 921e3647..83edba1e 100644 --- a/client/menu/popup_message.gd +++ b/client/menu/popup_message.gd @@ -95,6 +95,8 @@ func _input(_event): if not Global.get_profile("has_reset"): reset_timer.start() Global.set_profile("has_rotated", true) + if any_action_just_pressed(["zoom_in", "zoom_out"]): + Global.set_profile("has_zoomed", true) if Input.is_action_just_pressed("interact"): Global.set_profile("has_interacted", true) if Input.is_action_just_pressed("reset"): @@ -116,6 +118,10 @@ func _on_reset_timeout(): if not Global.get_profile("has_reset") and not Global.get_setting("touch_controls"): display_hint_msg(tr("Press %s to reset the camera view") % display_keybind("R", "Y")) +func _on_zoom_timeout(): + if not Global.get_profile("has_zoomed") and not Global.get_setting("touch_controls"): + display_hint_msg(tr("Use %s to zoom in/out") % display_keybind(tr("PageUp/PageDown"), "LT/RT")) + func display_keybind(keyboard: String, joypad: String, touch = null) -> String: if Global.using_joypad: return joypad + " (Joypad)" @@ -132,3 +138,5 @@ func any_action_just_pressed(actions: Array) -> bool: func _on_rotate_camera_timeout(): if not Global.get_setting("has_rotated") and not Global.get_setting("touch_controls"): display_hint_msg(tr("Use %s to reset the camera view") % display_keybind(tr("arrow keys"), tr("right stick"))) + + diff --git a/client/menu/popup_message.tscn b/client/menu/popup_message.tscn index 0f1cdffa..f4291c97 100644 --- a/client/menu/popup_message.tscn +++ b/client/menu/popup_message.tscn @@ -120,6 +120,10 @@ one_shot = true wait_time = 120.0 one_shot = true +[node name="Zoom" type="Timer" parent="AutoHintTimers"] +wait_time = 135.0 +one_shot = true + [node name="Reset" type="Timer" parent="."] wait_time = 10.0 one_shot = true @@ -130,4 +134,5 @@ one_shot = true [connection signal="timeout" from="AutoHintTimers/Boost" to="." method="_on_boost_timeout"] [connection signal="timeout" from="AutoHintTimers/Interact" to="." method="_on_interact_timeout"] [connection signal="timeout" from="AutoHintTimers/RotateCamera" to="." method="_on_rotate_camera_timeout"] +[connection signal="timeout" from="AutoHintTimers/Zoom" to="." method="_on_zoom_timeout"] [connection signal="timeout" from="Reset" to="." method="_on_reset_timeout"] |