From b8c4976a3a168b53e01ffcfde1b46888f5f8ae22 Mon Sep 17 00:00:00 2001 From: tpart Date: Mon, 19 Aug 2024 15:26:51 +0200 Subject: Add hint about performance --- client/menu/popup_message.gd | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'client/menu/popup_message.gd') 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.")) -- cgit v1.2.3-70-g09d2