aboutsummaryrefslogtreecommitdiff
path: root/client/gui/overlays/debug.gd
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-09-27 21:04:30 +0200
committermetamuffin <metamuffin@disroot.org>2025-09-27 21:04:35 +0200
commit721b2f4543c4bb656c053e0de162221ceb5d539f (patch)
tree72644b2d2b6bdef2d2b57ba5dc2385e964eaf46a /client/gui/overlays/debug.gd
parent11ec213359c38a0a064467fbf7585c4d8f4d76e5 (diff)
downloadhurrycurry-721b2f4543c4bb656c053e0de162221ceb5d539f.tar
hurrycurry-721b2f4543c4bb656c053e0de162221ceb5d539f.tar.bz2
hurrycurry-721b2f4543c4bb656c053e0de162221ceb5d539f.tar.zst
Add debug pie for node counts
Diffstat (limited to 'client/gui/overlays/debug.gd')
-rw-r--r--client/gui/overlays/debug.gd39
1 files changed, 0 insertions, 39 deletions
diff --git a/client/gui/overlays/debug.gd b/client/gui/overlays/debug.gd
deleted file mode 100644
index 3a37a1b7..00000000
--- a/client/gui/overlays/debug.gd
+++ /dev/null
@@ -1,39 +0,0 @@
-# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, version 3 of the License only.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <https://www.gnu.org/licenses/>.
-#
-extends RichTextLabel
-
-func _ready():
- Settings.hook_changed_init("graphics.debug_info", "main", func (v):
- visible = v
- RenderingServer.viewport_set_measure_render_time(get_viewport().get_viewport_rid(), visible)
- )
-
-func _process(_delta):
- if not visible: return
- var t = ""
- t += " Renderer: %s (%s)\n" % [RenderingServer.get_current_rendering_driver_name(), RenderingServer.get_video_adapter_name()]
- t += " Timing: %.01fms CPU; %.01fms GPU\n" % [
- RenderingServer.viewport_get_measured_render_time_cpu(get_viewport().get_viewport_rid()),
- RenderingServer.viewport_get_measured_render_time_gpu(get_viewport().get_viewport_rid())
- ]
- t += " Resolution: %dx%d\n" % [get_tree().root.size.x, get_tree().root.size.y]
- t += " FPS: %d\n" % Engine.get_frames_per_second()
- t += " Node count: %d\n" % get_tree().get_node_count()
- text = t
-
-func _input(_event):
- if Input.is_action_just_pressed("toggle_debug"):
- Settings.write("graphics.debug_info", not Settings.read("graphics.debug_info"))