initial commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
[gd_scene format=3 uid="uid://c1tptpc2xsvix"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://mt037slvxcey" path="res://widgets/network/scripts/network_widget_node.gd" id="1_fmbht"]
|
||||
|
||||
[node name="NetworkWidget" type="Node2D" unique_id=864131213]
|
||||
script = ExtResource("1_fmbht")
|
||||
metadata/_custom_type_script = "uid://mt037slvxcey"
|
||||
|
||||
[node name="Label" type="Label" parent="." unique_id=753359612]
|
||||
offset_right = 40.0
|
||||
offset_bottom = 23.0
|
||||
text = "Network
|
||||
Widget"
|
||||
@@ -0,0 +1,20 @@
|
||||
extends BaseWidgetNode
|
||||
class_name NetworkWidgetNode
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
var label = get_node("Label")
|
||||
var label_text: String = ''
|
||||
for address in IP.get_local_addresses():
|
||||
label_text += address + '\n'
|
||||
label.text = label_text
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
var label = get_node("Label")
|
||||
var label_text: String = ''
|
||||
for address in IP.get_local_addresses():
|
||||
label_text += address + '\n'
|
||||
label.text = label_text
|
||||
@@ -0,0 +1 @@
|
||||
uid://mt037slvxcey
|
||||
Reference in New Issue
Block a user