Added a connection status element that shows current link usage and packet loss.
This commit is contained in:
1 parent
26c29df4ad
commit
2d91487c6a
12 files changed
+415
No files matched your search
@@ -0,0 +1,103 @@
|
||||
[gd_scene format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/link_panel.gd" id="1"]
|
||||
[ext_resource type="PackedScene" path="res://components/link_rate.tscn" id="2"]
|
||||
[ext_resource type="Texture2D" path="res://assets/vector/status/link.svg" id="3"]
|
||||
|
||||
[node name="LinkPanel" type="PanelContainer"]
|
||||
custom_minimum_size = Vector2(360, 240)
|
||||
offset_right = 360.0
|
||||
offset_bottom = 240.0
|
||||
theme_type_variation = &"VehicleBackground"
|
||||
script = ExtResource("1")
|
||||
link_icon = ExtResource("3")
|
||||
|
||||
[node name="Backdrop" type="Control" parent="."]
|
||||
layout_mode = 2
|
||||
clip_contents = true
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="LinkIcon" type="TextureRect" parent="Backdrop"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchor_left = 0.65
|
||||
anchor_right = 0.65
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -90.0
|
||||
offset_right = 90.0
|
||||
offset_top = -90.0
|
||||
offset_bottom = 90.0
|
||||
rotation = -0.20943952
|
||||
pivot_offset = Vector2(90, 90)
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("3")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="Margin" type="MarginContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 16
|
||||
theme_override_constants/margin_right = 16
|
||||
theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_bottom = 10
|
||||
|
||||
[node name="Body" type="VBoxContainer" parent="Margin"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 4
|
||||
|
||||
[node name="Header" type="HBoxContainer" parent="Margin/Body"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Title" type="Label" parent="Margin/Body/Header"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_font_sizes/font_size = 18
|
||||
text = "LINK"
|
||||
|
||||
[node name="State" type="Label" parent="Margin/Body/Header"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 14
|
||||
text = "NO TELEMETRY"
|
||||
horizontal_alignment = 2
|
||||
|
||||
[node name="Rates" type="HBoxContainer" parent="Margin/Body"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 16
|
||||
|
||||
[node name="Downlink" parent="Margin/Body/Rates" instance=ExtResource("2")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Uplink" parent="Margin/Body/Rates" instance=ExtResource("2")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
direction = "↑ UPLINK"
|
||||
|
||||
[node name="Loss" type="HBoxContainer" parent="Margin/Body"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="Title" type="Label" parent="Margin/Body/Loss"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 14
|
||||
text = "PACKET LOSS"
|
||||
|
||||
[node name="LossValue" type="Label" parent="Margin/Body/Loss"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_font_sizes/font_size = 20
|
||||
text = "—"
|
||||
|
||||
[node name="LossWindow" type="Label" parent="Margin/Body/Loss"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"LinkMuted"
|
||||
theme_override_font_sizes/font_size = 14
|
||||
text = "10 s window"
|
||||
horizontal_alignment = 2
|
||||
@@ -0,0 +1,57 @@
|
||||
[gd_scene format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/link_rate.gd" id="1"]
|
||||
|
||||
[node name="LinkRate" type="Control"]
|
||||
custom_minimum_size = Vector2(140, 148)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="Readouts" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -70.0
|
||||
offset_right = 70.0
|
||||
offset_top = -44.0
|
||||
offset_bottom = 44.0
|
||||
theme_override_constants/separation = 0
|
||||
|
||||
[node name="Direction" type="Label" parent="Readouts"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"LinkRateNormal"
|
||||
theme_override_font_sizes/font_size = 15
|
||||
text = "↓ DOWNLINK"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Value" type="Label" parent="Readouts"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "—"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Units" type="Label" parent="Readouts"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 14
|
||||
text = "Gbps"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Capacity" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -62.0
|
||||
offset_right = 62.0
|
||||
offset_top = -23.0
|
||||
offset_bottom = -3.0
|
||||
theme_override_font_sizes/font_size = 14
|
||||
text = "10 Gbps max"
|
||||
horizontal_alignment = 1
|
||||
Reference in new issue
Block a user