initial commit
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
[gd_scene format=3 uid="uid://bosjd085m7dnh"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ck4h0hm0ob56p" path="res://widgets/rotation/scripts/pitch_widget_node.gd" id="1_875uw"]
|
||||
[ext_resource type="Texture2D" uid="uid://dlyvq43tjdaja" path="res://widgets/rotation/resources/crosstrek_left_outline.png" id="2_2b2r3"]
|
||||
[ext_resource type="Script" uid="uid://cr4y57bw6jfd1" path="res://MoveableControl.gd" id="3_xt4uc"]
|
||||
|
||||
[node name="PitchWidget" type="Node2D" unique_id=446468870]
|
||||
script = ExtResource("1_875uw")
|
||||
metadata/_custom_type_script = "uid://ck4h0hm0ob56p"
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=2072259568]
|
||||
scale = Vector2(0.1, 0.1)
|
||||
texture = ExtResource("2_2b2r3")
|
||||
|
||||
[node name="Line2D" type="Line2D" parent="Sprite2D" unique_id=789552281]
|
||||
points = PackedVector2Array(1500, 0, 2000, 0)
|
||||
default_color = Color(0.1254902, 0.1254902, 0.1254902, 1)
|
||||
|
||||
[node name="Line2D2" type="Line2D" parent="Sprite2D" unique_id=346829192]
|
||||
points = PackedVector2Array(-1500, 0, -2000, 0)
|
||||
default_color = Color(0.1254902, 0.1254902, 0.1254902, 1)
|
||||
|
||||
[node name="Label" type="Label" parent="." unique_id=1536224386]
|
||||
custom_minimum_size = Vector2(100, 0)
|
||||
offset_left = -50.0
|
||||
offset_top = -22.0
|
||||
offset_right = 50.0
|
||||
offset_bottom = 23.0
|
||||
theme_override_font_sizes/font_size = 32
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Line2D" type="Line2D" parent="." unique_id=1285997474]
|
||||
points = PackedVector2Array(150, 0, 225, 0)
|
||||
width = 1.0
|
||||
default_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="Line2D2" type="Line2D" parent="." unique_id=1217978761]
|
||||
points = PackedVector2Array(-150, 0, -225, 0)
|
||||
width = 1.0
|
||||
default_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="MovableControl" type="Control" parent="." unique_id=933534450 node_paths=PackedStringArray("move_target")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_left = -228.0
|
||||
offset_top = -45.0
|
||||
offset_right = 227.0
|
||||
offset_bottom = 46.0
|
||||
mouse_filter = 1
|
||||
script = ExtResource("3_xt4uc")
|
||||
move_target = NodePath("..")
|
||||
metadata/_custom_type_script = "uid://cr4y57bw6jfd1"
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b2lryykomcen"
|
||||
path="res://.godot/imported/corsstrek_back_outline.png-92f6d4b266c6998d35340bf8d0778b6e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://widgets/rotation/resources/corsstrek_back_outline.png"
|
||||
dest_files=["res://.godot/imported/corsstrek_back_outline.png-92f6d4b266c6998d35340bf8d0778b6e.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 159 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cm3djc4qf14bd"
|
||||
path="res://.godot/imported/crosstrek_front_outline.png-6479eaaf1adefbe7c6251ef8dd7f4797.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://widgets/rotation/resources/crosstrek_front_outline.png"
|
||||
dest_files=["res://.godot/imported/crosstrek_front_outline.png-6479eaaf1adefbe7c6251ef8dd7f4797.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 341 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dlyvq43tjdaja"
|
||||
path="res://.godot/imported/crosstrek_left_outline.png-e06999811d51aef7b3a2c0bfabe0ac44.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://widgets/rotation/resources/crosstrek_left_outline.png"
|
||||
dest_files=["res://.godot/imported/crosstrek_left_outline.png-e06999811d51aef7b3a2c0bfabe0ac44.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 341 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cweqvcg1h48bk"
|
||||
path="res://.godot/imported/crosstrek_right_outline.png-c84d4d5d654cd52cbbc156ef67c96d3b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://widgets/rotation/resources/crosstrek_right_outline.png"
|
||||
dest_files=["res://.godot/imported/crosstrek_right_outline.png-c84d4d5d654cd52cbbc156ef67c96d3b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@@ -0,0 +1,52 @@
|
||||
[gd_scene format=3 uid="uid://c61d1lcpgyld"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ckhpodvbko5y0" path="res://widgets/rotation/scripts/roll_widget_node.gd" id="1_pi8hj"]
|
||||
[ext_resource type="Texture2D" uid="uid://b2lryykomcen" path="res://widgets/rotation/resources/corsstrek_back_outline.png" id="2_fu8d0"]
|
||||
[ext_resource type="Script" uid="uid://cr4y57bw6jfd1" path="res://MoveableControl.gd" id="3_mrkoo"]
|
||||
|
||||
[node name="RollWidget" type="Node2D" unique_id=1446458625]
|
||||
script = ExtResource("1_pi8hj")
|
||||
metadata/_custom_type_script = "uid://ckhpodvbko5y0"
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=745045303]
|
||||
scale = Vector2(0.1, 0.1)
|
||||
texture = ExtResource("2_fu8d0")
|
||||
|
||||
[node name="Line2D" type="Line2D" parent="Sprite2D" unique_id=1741698222]
|
||||
points = PackedVector2Array(600, 0, 1000, 0)
|
||||
default_color = Color(0.1254902, 0.1254902, 0.1254902, 1)
|
||||
|
||||
[node name="Line2D2" type="Line2D" parent="Sprite2D" unique_id=662407004]
|
||||
points = PackedVector2Array(-600, 0, -1000, 0)
|
||||
default_color = Color(0.1254902, 0.1254902, 0.1254902, 1)
|
||||
|
||||
[node name="Label" type="Label" parent="." unique_id=1267850263]
|
||||
custom_minimum_size = Vector2(100, 0)
|
||||
offset_left = -50.0
|
||||
offset_top = -22.0
|
||||
offset_right = 50.0
|
||||
offset_bottom = 23.0
|
||||
theme_override_font_sizes/font_size = 32
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Line2D" type="Line2D" parent="." unique_id=1446923009]
|
||||
points = PackedVector2Array(60, 0, 120, 0)
|
||||
width = 1.0
|
||||
default_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="Line2D2" type="Line2D" parent="." unique_id=1131168134]
|
||||
points = PackedVector2Array(-60, 0, -120, 0)
|
||||
width = 1.0
|
||||
default_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="MovableControl" type="Control" parent="." unique_id=550168595 node_paths=PackedStringArray("move_target")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_left = -122.0
|
||||
offset_top = -45.0
|
||||
offset_right = 121.0
|
||||
offset_bottom = 44.0
|
||||
mouse_filter = 1
|
||||
script = ExtResource("3_mrkoo")
|
||||
move_target = NodePath("..")
|
||||
metadata/_custom_type_script = "uid://cr4y57bw6jfd1"
|
||||
@@ -0,0 +1,18 @@
|
||||
extends BaseWidgetNode
|
||||
|
||||
class_name PitchWidgetNode
|
||||
|
||||
var sprite: Sprite2D
|
||||
var label: Label
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
SensorSignals.pitch_updated.connect(_on_pitch_updated)
|
||||
sprite = get_node("Sprite2D")
|
||||
label = get_node("Label")
|
||||
var label_size = label.size
|
||||
|
||||
func _on_pitch_updated(sensor_ip: String, pitch_rad: float):
|
||||
sprite.rotation = pitch_rad
|
||||
label.text = str(round(rad_to_deg(pitch_rad)*10)/10) + " \u00B0"
|
||||
@@ -0,0 +1 @@
|
||||
uid://ck4h0hm0ob56p
|
||||
@@ -0,0 +1,17 @@
|
||||
extends BaseWidgetNode
|
||||
class_name RollWidgetNode
|
||||
|
||||
var sprite: Sprite2D
|
||||
var label: Label
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
SensorSignals.roll_updated.connect(_on_roll_updated)
|
||||
sprite = get_node("Sprite2D")
|
||||
label = get_node("Label")
|
||||
var label_size = label.size
|
||||
|
||||
func _on_roll_updated(sensor_ip: String, roll_rad: float):
|
||||
sprite.rotation = roll_rad
|
||||
label.text = str(round(rad_to_deg(abs(roll_rad))*10)/10) + " \u00B0"
|
||||
@@ -0,0 +1 @@
|
||||
uid://ckhpodvbko5y0
|
||||
Reference in New Issue
Block a user