add network request tracking for fetch requests in devtools

This commit is contained in:
Aidan
2025-09-11 10:15:33 -05:00
parent 4d71e40a4a
commit 02c03473f3
4 changed files with 50 additions and 4 deletions

View File

@@ -27,12 +27,32 @@ func _ready():
func init(network_request: NetworkRequest, parent_tab: NetworkTab):
request = network_request
network_tab = parent_tab
update_display()
if is_node_ready():
update_display()
else:
call_deferred("update_display")
func update_display():
if not request:
return
if icon == null:
icon = get_node_or_null("HBoxContainer/IconContainer/Icon") as TextureRect
if name_label == null:
name_label = get_node_or_null("HBoxContainer/NameLabel") as Label
if status_label == null:
status_label = get_node_or_null("HBoxContainer/StatusLabel") as Label
if type_label == null:
type_label = get_node_or_null("HBoxContainer/TypeLabel") as Label
if size_label == null:
size_label = get_node_or_null("HBoxContainer/SizeLabel") as Label
if time_label == null:
time_label = get_node_or_null("HBoxContainer/TimeLabel") as Label
if icon == null or name_label == null or status_label == null or type_label == null or size_label == null or time_label == null:
call_deferred("update_display")
return
# Update icon
icon.texture = request.get_icon_texture()