aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/global.gd1
-rw-r--r--client/menu/popup_message.gd5
-rw-r--r--client/menu/popup_message.tscn5
3 files changed, 11 insertions, 0 deletions
diff --git a/client/global.gd b/client/global.gd
index be83057f..085674ef 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -34,6 +34,7 @@ var default_profile := {
"has_rotated": false,
"has_reset": false,
"has_zoomed": false,
+ "has_seen_performance": false,
"has_seen_join_while_running": false
}
}
diff --git a/client/menu/popup_message.gd b/client/menu/popup_message.gd
index 9293847b..86b0ee2b 100644
--- a/client/menu/popup_message.gd
+++ b/client/menu/popup_message.gd
@@ -155,3 +155,8 @@ func _on_join_while_running_timeout():
if not game.is_joined and not Global.get_hint("has_seen_join_while_running"):
Global.set_hint("has_seen_join_while_running", true)
display_hint_msg(tr("Press %s and click \"Join\" to join the game while it is running") % display_keybind(tr("ESCAPE"), tr("Menu button")))
+
+func _on_performance_timeout() -> void:
+ if not Global.get_hint("has_seen_performance") and Engine.get_frames_per_second() < DisplayServer.screen_get_refresh_rate() * 0.75:
+ Global.set_hint("has_seen_performance", true)
+ display_hint_msg(tr("Your framerate seems to be low. You can lower your graphics settings in the settings menu."))
diff --git a/client/menu/popup_message.tscn b/client/menu/popup_message.tscn
index 765ee345..ebaff05e 100644
--- a/client/menu/popup_message.tscn
+++ b/client/menu/popup_message.tscn
@@ -122,6 +122,10 @@ one_shot = true
wait_time = 2.0
one_shot = true
+[node name="Performance" type="Timer" parent="AutoHintTimers"]
+wait_time = 20.0
+one_shot = true
+
[node name="Boost" type="Timer" parent="AutoHintTimers"]
wait_time = 90.0
one_shot = true
@@ -153,6 +157,7 @@ one_shot = true
[connection signal="timeout" from="ServerTimer" to="." method="_on_server_timer_timeout"]
[connection signal="timeout" from="HintTimer" to="." method="_on_hint_timer_timeout"]
[connection signal="timeout" from="AutoHintTimers/Move" to="." method="_on_move_timeout"]
+[connection signal="timeout" from="AutoHintTimers/Performance" to="." method="_on_performance_timeout"]
[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"]