diff options
author | tpart <tpart120@proton.me> | 2024-08-19 15:26:51 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-08-19 15:26:56 +0200 |
commit | b8c4976a3a168b53e01ffcfde1b46888f5f8ae22 (patch) | |
tree | 97d33522e7c2a8817e1bc7648d7f778cf4b7b33c /client/menu/popup_message.gd | |
parent | 0ce733f60b7c0eda126a33451ca34e5182e0ceda (diff) | |
download | hurrycurry-b8c4976a3a168b53e01ffcfde1b46888f5f8ae22.tar hurrycurry-b8c4976a3a168b53e01ffcfde1b46888f5f8ae22.tar.bz2 hurrycurry-b8c4976a3a168b53e01ffcfde1b46888f5f8ae22.tar.zst |
Add hint about performance
Diffstat (limited to 'client/menu/popup_message.gd')
-rw-r--r-- | client/menu/popup_message.gd | 5 |
1 files changed, 5 insertions, 0 deletions
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.")) |