add
This commit is contained in:
parent
5842e7d22c
commit
220738a3f4
BIN
Robo-Bus-A31-HMI/.DS_Store
vendored
Normal file
BIN
Robo-Bus-A31-HMI/.DS_Store
vendored
Normal file
Binary file not shown.
23
Robo-Bus-A31-HMI/Modules/SpeedGearAdjustment.gd
Normal file
23
Robo-Bus-A31-HMI/Modules/SpeedGearAdjustment.gd
Normal file
@ -0,0 +1,23 @@
|
||||
extends MarginContainer
|
||||
@onready var reduce: BaseControl = %Reduce
|
||||
@onready var increase: BaseControl = %Increase
|
||||
@onready var speedometer: TextureProgressBar = $Speedometer
|
||||
@onready var throttle_position_label: BaseControl = %ThrottlePositionLabel
|
||||
@onready var gear_texture_rect: BaseControl = $Speedometer/GearTextureRect
|
||||
|
||||
func _ready() -> void:
|
||||
ReviseThrottle(0)
|
||||
reduce.on_click.connect(func(node):
|
||||
ReviseThrottle(-1)
|
||||
)
|
||||
increase.on_click.connect(func(node):
|
||||
ReviseThrottle(1)
|
||||
)
|
||||
pass # Replace with function body.
|
||||
|
||||
func ReviseThrottle(value):
|
||||
speedometer._value += value
|
||||
speedometer._value = clampi(speedometer._value,0,30)
|
||||
throttle_position_label.onScale()
|
||||
gear_texture_rect.onScale()
|
||||
throttle_position_label.text = str(speedometer._value)
|
231
Robo-Bus-A31-HMI/Modules/margin_container_2.tscn
Normal file
231
Robo-Bus-A31-HMI/Modules/margin_container_2.tscn
Normal file
@ -0,0 +1,231 @@
|
||||
[gd_scene load_steps=15 format=3 uid="uid://ccp1epic52e7k"]
|
||||
|
||||
[ext_resource type="Script" path="res://Modules/SpeedGearAdjustment.gd" id="1_8ml6x"]
|
||||
[ext_resource type="Texture2D" uid="uid://pomyaut6jtnm" path="res://yuan.png" id="2_5b01c"]
|
||||
[ext_resource type="Script" path="res://code/speedometer.gd" id="3_xaims"]
|
||||
[ext_resource type="Texture2D" uid="uid://bgi2o6nm16ycn" path="res://pad_hmi_ui/home/l3_12.png" id="4_d48gs"]
|
||||
[ext_resource type="Texture2D" uid="uid://0car70lmas3a" path="res://pad_hmi_ui/home/speed_icon.png" id="5_qnams"]
|
||||
[ext_resource type="Texture2D" uid="uid://bbl68xb2d0ne2" path="res://pad_hmi_ui/home/minus_btn.png" id="6_0j1yn"]
|
||||
[ext_resource type="Script" path="res://common/base/base_control.gd" id="7_smylr"]
|
||||
[ext_resource type="Texture2D" uid="uid://py3v278ho7vt" path="res://pad_hmi_ui/home/plus_btn.png" id="8_kef14"]
|
||||
[ext_resource type="Script" path="res://code/path_follow_2d_por.gd" id="9_34b06"]
|
||||
|
||||
[sub_resource type="Shader" id="Shader_f57hx"]
|
||||
code = "shader_type canvas_item;
|
||||
|
||||
uniform float value : hint_range(0.0, 1.0) = 1.0;
|
||||
uniform int segments = 1;
|
||||
uniform float radius = 0.475;
|
||||
uniform float hollow_radius = 0.0;
|
||||
uniform float margin : hint_range(0.0, 1.0) = 0.0;
|
||||
uniform float rotation : hint_range(-1.0, 1.0);
|
||||
uniform float progress_rotation : hint_range(-1.0, 1.0);
|
||||
uniform sampler2D gradient : source_color;
|
||||
uniform bool use_value_gradient = false;
|
||||
uniform sampler2D radius_curve;
|
||||
|
||||
|
||||
vec4 get_gradient_color(sampler2D src, float position) {
|
||||
position = clamp(position, 0.01, 0.99); // Color at 0.0 and 1.0 get interpolated by both end
|
||||
return texture(src, vec2(position, 0.5));
|
||||
}
|
||||
|
||||
float map_range(float min1, float max1, float min2, float max2, float v) {
|
||||
float p = (v - min1) / (max1 - min1);
|
||||
return p * (max2 - min2) + min2;
|
||||
}
|
||||
|
||||
vec2 rotate_uv(vec2 uv, float p_rotation){
|
||||
float mid = 0.5;
|
||||
return vec2(
|
||||
cos(p_rotation) * (uv.x - mid) + sin(p_rotation) * (uv.y - mid) + mid,
|
||||
cos(p_rotation) * (uv.y - mid) - sin(p_rotation) * (uv.x - mid) + mid
|
||||
);
|
||||
}
|
||||
|
||||
float circle_shape(vec2 uv, float p_radius) {
|
||||
vec2 center = vec2(0.5, 0.5);
|
||||
return 1.0 - step(p_radius, distance(center, uv));
|
||||
}
|
||||
|
||||
float radial_shape(vec2 uv, int p_segments) {
|
||||
float radial = 0.0;
|
||||
uv -= 0.5;
|
||||
radial = atan(uv.y, uv.x);
|
||||
radial = map_range(-PI, PI, 0.0, float(p_segments), radial);
|
||||
radial = mod(radial, 1.0);
|
||||
|
||||
return radial;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 uv = UV;
|
||||
uv = rotate_uv(uv, PI/2.0); // Rotate 90 degrees, so origin pointing at north be default
|
||||
uv = rotate_uv(uv, rotation * PI);
|
||||
|
||||
float t = radial_shape(uv, 1);
|
||||
if (use_value_gradient) {
|
||||
t = value;
|
||||
}
|
||||
float radius_t = get_gradient_color(radius_curve, radial_shape(uv, 1)).r;
|
||||
|
||||
float shape = radial_shape(uv, segments);
|
||||
float border_size = (1.0-margin)/2.0;
|
||||
shape *= step(border_size, shape);
|
||||
shape *= step(shape, 1.0 - border_size);
|
||||
shape = step(shape, 0.0);
|
||||
|
||||
uv = rotate_uv(uv, progress_rotation * PI);
|
||||
float arc = radial_shape(uv, 1);
|
||||
arc = step(arc, value/1.*0.82);
|
||||
|
||||
float bounds = circle_shape(uv, radius * radius_t);
|
||||
float hollow = 1.0-circle_shape(uv, hollow_radius * radius_t);
|
||||
|
||||
shape = shape * arc * bounds * hollow;
|
||||
|
||||
vec4 gradient_color = get_gradient_color(gradient, t);
|
||||
vec4 color =texture(TEXTURE, UV) ;
|
||||
//COLOR = vec4(color.r,color.g,color.b,shape);
|
||||
COLOR = vec4(gradient_color.rgb, shape);
|
||||
}
|
||||
"
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_b6vfa"]
|
||||
offsets = PackedFloat32Array(0, 0.258706, 0.457711, 1)
|
||||
colors = PackedColorArray(0.968627, 0.686275, 0.945098, 1, 0.498039, 0.314018, 0.990752, 1, 0.443137, 0.270588, 0.996078, 1, 0.968627, 0.686275, 0.945098, 1)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_ghtxh"]
|
||||
gradient = SubResource("Gradient_b6vfa")
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_8xunu"]
|
||||
shader = SubResource("Shader_f57hx")
|
||||
shader_parameter/value = 0.0
|
||||
shader_parameter/segments = 1
|
||||
shader_parameter/radius = 0.5
|
||||
shader_parameter/hollow_radius = 0.465
|
||||
shader_parameter/margin = 0.0
|
||||
shader_parameter/rotation = 0.167
|
||||
shader_parameter/progress_rotation = -1.0
|
||||
shader_parameter/use_value_gradient = false
|
||||
shader_parameter/gradient = SubResource("GradientTexture1D_ghtxh")
|
||||
|
||||
[sub_resource type="Curve2D" id="Curve2D_8vhxy"]
|
||||
_data = {
|
||||
"points": PackedVector2Array(0, 0, 0, 0, 101, 370, 0, 0, 0, 0, 74, 352, 0, 0, 0, 0, 46, 323, 0, 0, 0, 0, 20, 279, 0, 0, 0, 0, 12, 260, 0, 0, 0, 0, 10, 249, 0, 0, 0, 0, 7, 229, 0, 0, 0, 0, 9, 179, 0, 0, 0, 0, 12, 156, 0, 0, 0, 0, 19, 132, 0, 0, 0, 0, 34, 102, 0, 0, 0, 0, 54, 75, 0, 0, 0, 0, 79, 52, 0, 0, 0, 0, 106, 33, 0, 0, 0, 0, 131, 22, 0, 0, 0, 0, 156, 12, 0, 0, 0, 0, 188, 6, 0, 0, 0, 0, 222, 5, 0, 0, 0, 0, 272, 18, 0, 0, 0, 0, 327, 48, 0, 0, 0, 0, 356, 79, 0, 0, 0, 0, 378, 114, 0, 0, 0, 0, 393, 154, 0, 0, 0, 0, 401, 192, 0, 0, 0, 0, 399, 223, 0, 0, 0, 0, 390, 268, 0, 0, 0, 0, 377, 299, 0, 0, 0, 0, 360, 325, 0, 0, 0, 0, 336, 352, 0, 0, 0, 0, 314, 365)
|
||||
}
|
||||
point_count = 30
|
||||
|
||||
[node name="MarginContainer2" type="MarginContainer"]
|
||||
theme_override_constants/margin_top = 59
|
||||
script = ExtResource("1_8ml6x")
|
||||
|
||||
[node name="Speedometer" type="TextureProgressBar" parent="."]
|
||||
material = SubResource("ShaderMaterial_8xunu")
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
value = 100.0
|
||||
fill_mode = 4
|
||||
radial_initial_angle = 180.0
|
||||
texture_progress = ExtResource("2_5b01c")
|
||||
script = ExtResource("3_xaims")
|
||||
_max_value = 30.0
|
||||
|
||||
[node name="TextureRect2" type="TextureRect" parent="Speedometer"]
|
||||
show_behind_parent = true
|
||||
layout_mode = 2
|
||||
offset_right = 406.0
|
||||
offset_bottom = 378.0
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
texture = ExtResource("4_d48gs")
|
||||
|
||||
[node name="GearTextureRect" type="TextureRect" parent="Speedometer"]
|
||||
layout_mode = 0
|
||||
offset_left = 84.0
|
||||
offset_top = 353.0
|
||||
offset_right = 118.0
|
||||
offset_bottom = 387.0
|
||||
texture = ExtResource("5_qnams")
|
||||
script = ExtResource("7_smylr")
|
||||
is_Scale = true
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Speedometer"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -91.0
|
||||
offset_top = -62.0
|
||||
offset_right = 96.0
|
||||
offset_bottom = 26.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
theme_override_constants/separation = 24
|
||||
|
||||
[node name="Reduce" type="TextureRect" parent="Speedometer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
texture = ExtResource("6_0j1yn")
|
||||
script = ExtResource("7_smylr")
|
||||
is_Scale = true
|
||||
size_max = 1.1
|
||||
is_OnClickScaleAwt = null
|
||||
|
||||
[node name="Increase" type="TextureRect" parent="Speedometer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
texture = ExtResource("8_kef14")
|
||||
script = ExtResource("7_smylr")
|
||||
is_Scale = true
|
||||
size_max = 1.1
|
||||
is_OnClickScaleAwt = null
|
||||
|
||||
[node name="Path2D" type="Path2D" parent="Speedometer"]
|
||||
curve = SubResource("Curve2D_8vhxy")
|
||||
|
||||
[node name="PathFollow2D" type="PathFollow2D" parent="Speedometer/Path2D" node_paths=PackedStringArray("textureProgressBar", "node")]
|
||||
position = Vector2(101, 370)
|
||||
rotation = -2.55359
|
||||
loop = false
|
||||
script = ExtResource("9_34b06")
|
||||
textureProgressBar = NodePath("../..")
|
||||
node = NodePath("../../GearTextureRect")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
theme_override_constants/separation = -17
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 18
|
||||
|
||||
[node name="ThrottlePositionLabel" type="Label" parent="VBoxContainer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 65
|
||||
text = "14"
|
||||
script = ExtResource("7_smylr")
|
||||
|
||||
[node name="Label2" type="Label" parent="VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 34
|
||||
text = "/"
|
||||
|
||||
[node name="Label3" type="Label" parent="VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 34
|
||||
text = "30"
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_override_font_sizes/font_size = 34
|
||||
text = "speed"
|
19
Robo-Bus-A31-HMI/Modules/volume_settings.gd
Normal file
19
Robo-Bus-A31-HMI/Modules/volume_settings.gd
Normal file
@ -0,0 +1,19 @@
|
||||
extends MarginContainer
|
||||
|
||||
@onready var h_slider: HSlider = $HSlider
|
||||
@onready var texture_rect: TextureRect = %TextureRect
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
h_slider.value = clampi(h_slider.value,40,140)
|
||||
if h_slider.value <= 40:
|
||||
texture_rect.texture = load("res://pad_hmi_ui/home/mute_icon.png")
|
||||
else:
|
||||
texture_rect.texture = load("res://pad_hmi_ui/home/sound_icon.png")
|
||||
|
||||
func _on_h_slider_drag_ended(value_changed: bool) -> void:
|
||||
pass # Replace with function body.
|
59
Robo-Bus-A31-HMI/Modules/volume_settings.tscn
Normal file
59
Robo-Bus-A31-HMI/Modules/volume_settings.tscn
Normal file
@ -0,0 +1,59 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://cffp3l0yvp4fg"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://qaq46brhnjbn" path="res://code/l3_7.png" id="1_q53pk"]
|
||||
[ext_resource type="Script" path="res://Modules/volume_settings.gd" id="1_weo36"]
|
||||
[ext_resource type="Texture2D" uid="uid://qmulrp786qvy" path="res://pad_hmi_ui/home/sound_bar.png" id="2_q2e4s"]
|
||||
[ext_resource type="Texture2D" uid="uid://c13prs00h2k3o" path="res://pad_hmi_ui/home/sound_icon.png" id="3_uwj1p"]
|
||||
|
||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_o8w8u"]
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_rir4m"]
|
||||
texture = ExtResource("1_q53pk")
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_h6qwb"]
|
||||
texture = ExtResource("2_q2e4s")
|
||||
texture_margin_left = 46.0
|
||||
texture_margin_right = 42.0
|
||||
expand_margin_top = 46.0
|
||||
expand_margin_bottom = 52.0
|
||||
|
||||
[node name="VolumeSettings" type="MarginContainer"]
|
||||
theme_override_constants/margin_left = 14
|
||||
script = ExtResource("1_weo36")
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="."]
|
||||
custom_minimum_size = Vector2(0, 103)
|
||||
layout_mode = 2
|
||||
theme_override_icons/grabber = SubResource("CompressedTexture2D_o8w8u")
|
||||
theme_override_icons/grabber_highlight = SubResource("CompressedTexture2D_o8w8u")
|
||||
theme_override_icons/grabber_disabled = SubResource("CompressedTexture2D_o8w8u")
|
||||
theme_override_icons/tick = ExtResource("1_q53pk")
|
||||
theme_override_styles/slider = SubResource("StyleBoxTexture_rir4m")
|
||||
theme_override_styles/grabber_area = SubResource("StyleBoxTexture_h6qwb")
|
||||
theme_override_styles/grabber_area_highlight = SubResource("StyleBoxTexture_h6qwb")
|
||||
max_value = 140.0
|
||||
value = 100.0
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="HSlider"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = 39.0
|
||||
offset_top = -23.5
|
||||
offset_right = 93.0
|
||||
offset_bottom = 23.5
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("3_uwj1p")
|
||||
stretch_mode = 6
|
||||
|
||||
[node name="TextureRect2" type="TextureRect" parent="HSlider"]
|
||||
show_behind_parent = true
|
||||
layout_mode = 0
|
||||
offset_top = 4.0
|
||||
offset_right = 576.0
|
||||
offset_bottom = 104.0
|
||||
texture = ExtResource("1_q53pk")
|
||||
|
||||
[connection signal="drag_ended" from="HSlider" to="." method="_on_h_slider_drag_ended"]
|
@ -8,7 +8,11 @@ extends BaseControl
|
||||
@onready var main_3d_vehicle_information: MarginContainer = %Main3DVehicleInformation
|
||||
@onready var _3d_vehicle_information: MarginContainer = %"3DVehicleInformation"
|
||||
@onready var pretend_main_3d_vehicle_information: MarginContainer = %PretendMain3DVehicleInformation
|
||||
|
||||
var isVolumeSettings = false:
|
||||
set(value):
|
||||
isVolumeSettings = value
|
||||
await get_tree().create_timer(0.5).timeout
|
||||
isVolumeSettings = false
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
#Engine.time_scale = 0.01
|
||||
@ -21,37 +25,39 @@ func _process(delta: float) -> void:
|
||||
|
||||
|
||||
func OnClick3DVehicle(_node: Variant) -> void:
|
||||
main_3d_vehicle.visible = true
|
||||
#main_3d_vehicle_background.visible = false
|
||||
pretend_main_3d_vehicle_information.modulate.a = 1
|
||||
main_3d_vehicle_background.modulate.a = 0
|
||||
main_3d_vehicle_information.modulate.a = 0
|
||||
data_panel.modulate.a = 1
|
||||
_3d_vehicle.modulate.a = 0
|
||||
_3d_vehicle_information.modulate.a = 1
|
||||
main_3d_vehicle_texture.modulate.a = 0
|
||||
await get_tree().process_frame
|
||||
await get_tree().process_frame
|
||||
#main_3d_vehicle.self_modulate.a = 0
|
||||
main_3d_vehicle_texture.modulate.a = 255
|
||||
main_3d_vehicle_texture.onStart()
|
||||
var tween0 = create_tween()
|
||||
tween0.set_parallel()
|
||||
tween0.tween_property(_3d_vehicle_information, "modulate", Color(1,1,1,0), 0.1)
|
||||
tween0.tween_property(pretend_main_3d_vehicle_information, "modulate", Color(1,1,1,0), 0.1)
|
||||
await get_tree().create_timer(0.3).timeout
|
||||
#main_3d_vehicle_background.visible = true
|
||||
var tween = create_tween()
|
||||
tween.set_parallel()
|
||||
tween.tween_property(main_3d_vehicle_background, "modulate", Color(1,1,1,1), 0.1)
|
||||
tween.tween_property(main_3d_vehicle_information, "modulate", Color(1,1,1,1), 0.05)
|
||||
tween.tween_property(data_panel, "modulate", Color(1,1,1,0), 0.1)
|
||||
main_3d_vehicle_information
|
||||
|
||||
_3d_vehicle.modulate.a = 1
|
||||
await get_tree().create_timer(0.1).timeout
|
||||
_3d_vehicle_information.modulate.a = 1
|
||||
data_panel.visible = false
|
||||
if !isVolumeSettings:
|
||||
isVolumeSettings = true
|
||||
main_3d_vehicle.visible = true
|
||||
#main_3d_vehicle_background.visible = false
|
||||
pretend_main_3d_vehicle_information.modulate.a = 1
|
||||
main_3d_vehicle_background.modulate.a = 0
|
||||
main_3d_vehicle_information.modulate.a = 0
|
||||
data_panel.modulate.a = 1
|
||||
_3d_vehicle.modulate.a = 0
|
||||
_3d_vehicle_information.modulate.a = 1
|
||||
main_3d_vehicle_texture.modulate.a = 0
|
||||
await get_tree().process_frame
|
||||
await get_tree().process_frame
|
||||
#main_3d_vehicle.self_modulate.a = 0
|
||||
main_3d_vehicle_texture.modulate.a = 255
|
||||
main_3d_vehicle_texture.onStart()
|
||||
var tween0 = create_tween()
|
||||
tween0.set_parallel()
|
||||
tween0.tween_property(_3d_vehicle_information, "modulate", Color(1,1,1,0), 0.1)
|
||||
tween0.tween_property(pretend_main_3d_vehicle_information, "modulate", Color(1,1,1,0), 0.1)
|
||||
await get_tree().create_timer(0.3).timeout
|
||||
#main_3d_vehicle_background.visible = true
|
||||
var tween = create_tween()
|
||||
tween.set_parallel()
|
||||
tween.tween_property(main_3d_vehicle_background, "modulate", Color(1,1,1,1), 0.1)
|
||||
tween.tween_property(main_3d_vehicle_information, "modulate", Color(1,1,1,1), 0.05)
|
||||
tween.tween_property(data_panel, "modulate", Color(1,1,1,0), 0.1)
|
||||
main_3d_vehicle_information
|
||||
|
||||
_3d_vehicle.modulate.a = 1
|
||||
await get_tree().create_timer(0.1).timeout
|
||||
_3d_vehicle_information.modulate.a = 1
|
||||
data_panel.visible = false
|
||||
#main_3d_vehicle.self_modulate.a = 1
|
||||
|
||||
pass # Replace with function body.""
|
||||
|
@ -5,5 +5,5 @@ extends PathFollow2D
|
||||
func _physics_process(delta: float) -> void:
|
||||
|
||||
progress_ratio = textureProgressBar._value / textureProgressBar._max_value
|
||||
node.global_position = global_position - node.size/2
|
||||
node.global_position = lerp(node.global_position,global_position - node.size/2,15*delta)
|
||||
pass
|
||||
|
@ -11,5 +11,4 @@ func _ready() -> void:
|
||||
func _process(delta: float) -> void:
|
||||
_value = clampf(_value,0,_max_value)
|
||||
material.set_shader_parameter("value",_value/_max_value)
|
||||
#value = float(_value) /float( _max_value) * float(max_value)
|
||||
pass
|
||||
|
@ -102,7 +102,6 @@ func _gui_input(event):
|
||||
#if event.position.distance_to(clickPosition)<2 :
|
||||
if mouse_filter == Control.MOUSE_FILTER_STOP :
|
||||
accept_event()
|
||||
print(diff)
|
||||
if diff < 800:
|
||||
emit_signal("on_click",self)
|
||||
if on_click_anim != null and baseAnimationPlayer != null :
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=141 format=4 uid="uid://cxqxr0p1wkkdy"]
|
||||
[gd_scene load_steps=131 format=4 uid="uid://cxqxr0p1wkkdy"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://vc7lcwu566lf" path="res://1.png" id="1_21tqn"]
|
||||
[ext_resource type="Texture2D" uid="uid://blakv4vhyfyro" path="res://pad_hmi_ui/home/home page_bg.png" id="1_brgxr"]
|
||||
@ -97,11 +97,9 @@
|
||||
[ext_resource type="Texture2D" uid="uid://chdu0kfu6c7o4" path="res://pad_hmi_ui/home/l3_6.png" id="70_q4778"]
|
||||
[ext_resource type="Texture2D" uid="uid://b45cdi4mrcfpk" path="res://pad_hmi_ui/setting/server_bg.png" id="70_xatqx"]
|
||||
[ext_resource type="Texture2D" uid="uid://0756pmg7xmpi" path="res://pad_hmi_ui/setting/upload_icon.png" id="71_63eaf"]
|
||||
[ext_resource type="Texture2D" uid="uid://qaq46brhnjbn" path="res://code/l3_7.png" id="72_iljbn"]
|
||||
[ext_resource type="Texture2D" uid="uid://pomyaut6jtnm" path="res://未标题-1.png" id="75_wvjcq"]
|
||||
[ext_resource type="Script" path="res://code/speedometer.gd" id="76_xwtvv"]
|
||||
[ext_resource type="PackedScene" uid="uid://cffp3l0yvp4fg" path="res://Modules/volume_settings.tscn" id="72_but3b"]
|
||||
[ext_resource type="PackedScene" uid="uid://ccp1epic52e7k" path="res://Modules/margin_container_2.tscn" id="75_8jlxq"]
|
||||
[ext_resource type="Script" path="res://common/base/base_control.gd" id="79_i36i4"]
|
||||
[ext_resource type="Script" path="res://code/path_follow_2d_por.gd" id="79_y43dn"]
|
||||
[ext_resource type="Script" path="res://pad_hmi_ui/Main3DVehicle.gd" id="89_r17wy"]
|
||||
|
||||
[sub_resource type="Image" id="Image_kgu7v"]
|
||||
@ -1015,124 +1013,6 @@ texture = ExtResource("51_i0v1y")
|
||||
spacing_glyph = 2
|
||||
spacing_space = 4
|
||||
|
||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_o8w8u"]
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_rir4m"]
|
||||
texture = ExtResource("72_iljbn")
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_h6qwb"]
|
||||
texture = ExtResource("23_rpeh3")
|
||||
texture_margin_left = 46.0
|
||||
texture_margin_right = 42.0
|
||||
expand_margin_top = 46.0
|
||||
expand_margin_bottom = 52.0
|
||||
|
||||
[sub_resource type="Shader" id="Shader_f57hx"]
|
||||
code = "shader_type canvas_item;
|
||||
|
||||
uniform float value : hint_range(0.0, 1.0) = 1.0;
|
||||
uniform int segments = 1;
|
||||
uniform float radius = 0.475;
|
||||
uniform float hollow_radius = 0.0;
|
||||
uniform float margin : hint_range(0.0, 1.0) = 0.0;
|
||||
uniform float rotation : hint_range(-1.0, 1.0);
|
||||
uniform float progress_rotation : hint_range(-1.0, 1.0);
|
||||
uniform sampler2D gradient : source_color;
|
||||
uniform bool use_value_gradient = false;
|
||||
uniform sampler2D radius_curve;
|
||||
|
||||
|
||||
vec4 get_gradient_color(sampler2D src, float position) {
|
||||
position = clamp(position, 0.01, 0.99); // Color at 0.0 and 1.0 get interpolated by both end
|
||||
return texture(src, vec2(position, 0.5));
|
||||
}
|
||||
|
||||
float map_range(float min1, float max1, float min2, float max2, float v) {
|
||||
float p = (v - min1) / (max1 - min1);
|
||||
return p * (max2 - min2) + min2;
|
||||
}
|
||||
|
||||
vec2 rotate_uv(vec2 uv, float p_rotation){
|
||||
float mid = 0.5;
|
||||
return vec2(
|
||||
cos(p_rotation) * (uv.x - mid) + sin(p_rotation) * (uv.y - mid) + mid,
|
||||
cos(p_rotation) * (uv.y - mid) - sin(p_rotation) * (uv.x - mid) + mid
|
||||
);
|
||||
}
|
||||
|
||||
float circle_shape(vec2 uv, float p_radius) {
|
||||
vec2 center = vec2(0.5, 0.5);
|
||||
return 1.0 - step(p_radius, distance(center, uv));
|
||||
}
|
||||
|
||||
float radial_shape(vec2 uv, int p_segments) {
|
||||
float radial = 0.0;
|
||||
uv -= 0.5;
|
||||
radial = atan(uv.y, uv.x);
|
||||
radial = map_range(-PI, PI, 0.0, float(p_segments), radial);
|
||||
radial = mod(radial, 1.0);
|
||||
|
||||
return radial;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 uv = UV;
|
||||
uv = rotate_uv(uv, PI/2.0); // Rotate 90 degrees, so origin pointing at north be default
|
||||
uv = rotate_uv(uv, rotation * PI);
|
||||
|
||||
float t = radial_shape(uv, 1);
|
||||
if (use_value_gradient) {
|
||||
t = value;
|
||||
}
|
||||
float radius_t = get_gradient_color(radius_curve, radial_shape(uv, 1)).r;
|
||||
|
||||
float shape = radial_shape(uv, segments);
|
||||
float border_size = (1.0-margin)/2.0;
|
||||
shape *= step(border_size, shape);
|
||||
shape *= step(shape, 1.0 - border_size);
|
||||
shape = step(shape, 0.0);
|
||||
|
||||
uv = rotate_uv(uv, progress_rotation * PI);
|
||||
float arc = radial_shape(uv, 1);
|
||||
arc = step(arc, value/1.*0.82);
|
||||
|
||||
float bounds = circle_shape(uv, radius * radius_t);
|
||||
float hollow = 1.0-circle_shape(uv, hollow_radius * radius_t);
|
||||
|
||||
shape = shape * arc * bounds * hollow;
|
||||
|
||||
vec4 gradient_color = get_gradient_color(gradient, t);
|
||||
vec4 color =texture(TEXTURE, UV) ;
|
||||
//COLOR = vec4(color.r,color.g,color.b,shape);
|
||||
COLOR = vec4(gradient_color.rgb, shape);
|
||||
}
|
||||
"
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_b6vfa"]
|
||||
offsets = PackedFloat32Array(0, 0.258706, 0.457711, 1)
|
||||
colors = PackedColorArray(0.968627, 0.686275, 0.945098, 1, 0.498039, 0.314018, 0.990752, 1, 0.443137, 0.270588, 0.996078, 1, 0.968627, 0.686275, 0.945098, 1)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_ghtxh"]
|
||||
gradient = SubResource("Gradient_b6vfa")
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_8xunu"]
|
||||
shader = SubResource("Shader_f57hx")
|
||||
shader_parameter/value = 0.553667
|
||||
shader_parameter/segments = 1
|
||||
shader_parameter/radius = 0.5
|
||||
shader_parameter/hollow_radius = 0.46
|
||||
shader_parameter/margin = 0.0
|
||||
shader_parameter/rotation = 0.167
|
||||
shader_parameter/progress_rotation = -1.0
|
||||
shader_parameter/use_value_gradient = false
|
||||
shader_parameter/gradient = SubResource("GradientTexture1D_ghtxh")
|
||||
|
||||
[sub_resource type="Curve2D" id="Curve2D_8vhxy"]
|
||||
_data = {
|
||||
"points": PackedVector2Array(0, 0, 0, 0, 101, 370, 0, 0, 0, 0, 74, 352, 0, 0, 0, 0, 46, 323, 0, 0, 0, 0, 20, 279, 0, 0, 0, 0, 12, 260, 0, 0, 0, 0, 10, 249, 0, 0, 0, 0, 7, 229, 0, 0, 0, 0, 9, 179, 0, 0, 0, 0, 12, 156, 0, 0, 0, 0, 19, 132, 0, 0, 0, 0, 34, 102, 0, 0, 0, 0, 54, 75, 0, 0, 0, 0, 79, 52, 0, 0, 0, 0, 106, 33, 0, 0, 0, 0, 131, 22, 0, 0, 0, 0, 156, 12, 0, 0, 0, 0, 188, 6, 0, 0, 0, 0, 222, 5, 0, 0, 0, 0, 272, 18, 0, 0, 0, 0, 327, 48, 0, 0, 0, 0, 356, 79, 0, 0, 0, 0, 378, 114, 0, 0, 0, 0, 393, 154, 0, 0, 0, 0, 401, 192, 0, 0, 0, 0, 399, 223, 0, 0, 0, 0, 389, 266, 0, 0, 0, 0, 374, 298, 0, 0, 0, 0, 357, 325, 0, 0, 0, 0, 333, 353, 0, 0, 0, 0, 312, 369)
|
||||
}
|
||||
point_count = 30
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_dyppf"]
|
||||
content_margin_left = 58.0
|
||||
|
||||
@ -1866,6 +1746,7 @@ theme_override_styles/normal = SubResource("StyleBoxFlat_46du7")
|
||||
text = "Autoware"
|
||||
script = ExtResource("79_i36i4")
|
||||
_pivot_offset = "CENTER_RIGHT"
|
||||
is_Scale = true
|
||||
is_OnClickScaleAwt = null
|
||||
|
||||
[node name="Button2" type="Button" parent="MarginContainer/HBoxContainer/Title/VBoxContainer/VBoxContainer"]
|
||||
@ -1878,6 +1759,7 @@ theme_override_styles/normal = SubResource("StyleBoxFlat_78bhk")
|
||||
text = "重启"
|
||||
script = ExtResource("79_i36i4")
|
||||
_pivot_offset = "CENTER_RIGHT"
|
||||
is_Scale = true
|
||||
is_OnClickScaleAwt = null
|
||||
|
||||
[node name="Button3" type="Button" parent="MarginContainer/HBoxContainer/Title/VBoxContainer/VBoxContainer"]
|
||||
@ -1890,6 +1772,7 @@ theme_override_styles/normal = SubResource("StyleBoxFlat_78bhk")
|
||||
text = "关机"
|
||||
script = ExtResource("79_i36i4")
|
||||
_pivot_offset = "CENTER_RIGHT"
|
||||
is_Scale = true
|
||||
is_OnClickScaleAwt = null
|
||||
|
||||
[node name="ShutdownIsScale" type="TextureRect" parent="MarginContainer/HBoxContainer/Title/VBoxContainer" node_paths=PackedStringArray("OnClickScaleArrNode")]
|
||||
@ -2331,8 +2214,6 @@ size_flags_vertical = 0
|
||||
mouse_filter = 0
|
||||
texture = ExtResource("5_npp0j")
|
||||
script = ExtResource("79_i36i4")
|
||||
is_Scale = true
|
||||
is_Rotation = true
|
||||
size_max = 2.0
|
||||
is_OnClickScaleAwt = null
|
||||
|
||||
@ -2343,8 +2224,6 @@ size_flags_vertical = 0
|
||||
mouse_filter = 0
|
||||
texture = ExtResource("15_0katk")
|
||||
script = ExtResource("79_i36i4")
|
||||
is_Scale = true
|
||||
is_Rotation = true
|
||||
size_max = 2.0
|
||||
is_OnClickScaleAwt = null
|
||||
|
||||
@ -2355,8 +2234,6 @@ size_flags_vertical = 8
|
||||
mouse_filter = 0
|
||||
texture = ExtResource("14_f3od3")
|
||||
script = ExtResource("79_i36i4")
|
||||
is_Scale = true
|
||||
is_Rotation = true
|
||||
size_max = 2.0
|
||||
is_OnClickScaleAwt = null
|
||||
|
||||
@ -2367,8 +2244,6 @@ size_flags_vertical = 8
|
||||
mouse_filter = 0
|
||||
texture = ExtResource("68_ryhsw")
|
||||
script = ExtResource("79_i36i4")
|
||||
is_Scale = true
|
||||
is_Rotation = true
|
||||
size_max = 2.0
|
||||
is_OnClickScaleAwt = null
|
||||
|
||||
@ -2434,143 +2309,14 @@ theme_override_fonts/font = SubResource("FontVariation_frbsn")
|
||||
theme_override_font_sizes/font_size = 31
|
||||
text = "2024-04-27 00:35:24"
|
||||
|
||||
[node name="MarginContainer6" type="MarginContainer" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer"]
|
||||
[node name="VolumeSettings" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer" instance=ExtResource("72_but3b")]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 14
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer6"]
|
||||
custom_minimum_size = Vector2(0, 103)
|
||||
[node name="HSlider" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/VolumeSettings" index="0"]
|
||||
value = 40.0
|
||||
|
||||
[node name="MarginContainer2" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer" instance=ExtResource("75_8jlxq")]
|
||||
layout_mode = 2
|
||||
theme_override_icons/grabber = SubResource("CompressedTexture2D_o8w8u")
|
||||
theme_override_icons/grabber_highlight = SubResource("CompressedTexture2D_o8w8u")
|
||||
theme_override_icons/grabber_disabled = SubResource("CompressedTexture2D_o8w8u")
|
||||
theme_override_icons/tick = ExtResource("72_iljbn")
|
||||
theme_override_styles/slider = SubResource("StyleBoxTexture_rir4m")
|
||||
theme_override_styles/grabber_area = SubResource("StyleBoxTexture_h6qwb")
|
||||
theme_override_styles/grabber_area_highlight = SubResource("StyleBoxTexture_h6qwb")
|
||||
max_value = 140.0
|
||||
value = 100.0
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer6/HSlider"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = 39.0
|
||||
offset_top = -23.5
|
||||
offset_right = 93.0
|
||||
offset_bottom = 23.5
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("24_gp0eu")
|
||||
|
||||
[node name="TextureRect2" type="TextureRect" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer6/HSlider"]
|
||||
show_behind_parent = true
|
||||
layout_mode = 0
|
||||
offset_top = 4.0
|
||||
offset_right = 576.0
|
||||
offset_bottom = 104.0
|
||||
texture = ExtResource("72_iljbn")
|
||||
|
||||
[node name="MarginContainer2" type="MarginContainer" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_top = 59
|
||||
|
||||
[node name="Speedometer" type="TextureProgressBar" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer2"]
|
||||
material = SubResource("ShaderMaterial_8xunu")
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
value = 100.0
|
||||
fill_mode = 4
|
||||
radial_initial_angle = 180.0
|
||||
texture_progress = ExtResource("75_wvjcq")
|
||||
script = ExtResource("76_xwtvv")
|
||||
_max_value = 30.0
|
||||
_value = 16.61
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer2/Speedometer"]
|
||||
layout_mode = 0
|
||||
offset_left = 233.584
|
||||
offset_top = -6.78809
|
||||
offset_right = 273.584
|
||||
offset_bottom = 33.2119
|
||||
texture = ExtResource("22_0yr2r")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer2/Speedometer"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -83.0
|
||||
offset_top = -62.0
|
||||
offset_right = 104.0
|
||||
offset_bottom = 26.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
theme_override_constants/separation = 24
|
||||
|
||||
[node name="Button" type="TextureRect" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer2/Speedometer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
texture = ExtResource("26_1pcmu")
|
||||
script = ExtResource("79_i36i4")
|
||||
is_Scale = true
|
||||
size_max = 1.5
|
||||
is_OnClickScaleAwt = null
|
||||
|
||||
[node name="Button2" type="TextureRect" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer2/Speedometer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
texture = ExtResource("27_8e6he")
|
||||
script = ExtResource("79_i36i4")
|
||||
is_Scale = true
|
||||
size_max = 1.5
|
||||
is_OnClickScaleAwt = null
|
||||
|
||||
[node name="Path2D" type="Path2D" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer2/Speedometer"]
|
||||
curve = SubResource("Curve2D_8vhxy")
|
||||
|
||||
[node name="PathFollow2D" type="PathFollow2D" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer2/Speedometer/Path2D" node_paths=PackedStringArray("textureProgressBar", "node")]
|
||||
position = Vector2(253.584, 13.2119)
|
||||
rotation = 0.254368
|
||||
progress = 561.67
|
||||
loop = false
|
||||
script = ExtResource("79_y43dn")
|
||||
textureProgressBar = NodePath("../..")
|
||||
node = NodePath("../../TextureRect")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer2"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
theme_override_constants/separation = -17
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer2/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 18
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer2/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 65
|
||||
text = "14"
|
||||
|
||||
[node name="Label2" type="Label" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer2/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 34
|
||||
text = "/"
|
||||
|
||||
[node name="Label3" type="Label" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer2/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 34
|
||||
text = "30"
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer2/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_override_font_sizes/font_size = 34
|
||||
text = "speed"
|
||||
|
||||
[node name="MarginContainer3" type="MarginContainer" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
@ -2617,19 +2363,25 @@ theme_override_constants/separation = 39
|
||||
|
||||
[node name="Button" type="Button" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer4/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "定位"
|
||||
icon = ExtResource("36_lcxa4")
|
||||
flat = true
|
||||
icon_alignment = 1
|
||||
script = ExtResource("79_i36i4")
|
||||
is_Scale = true
|
||||
|
||||
[node name="Button2" type="Button" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer4/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "下发"
|
||||
icon = ExtResource("36_lcxa4")
|
||||
flat = true
|
||||
icon_alignment = 1
|
||||
script = ExtResource("79_i36i4")
|
||||
is_Scale = true
|
||||
|
||||
[node name="MarginContainer5" type="MarginContainer" parent="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
@ -3461,3 +3213,5 @@ mouse_filter = 2
|
||||
[connection signal="on_click" from="MarginContainer/HBoxContainer/MarginContainer/DataPanel/MediumMenu/VBoxContainer/CarInfoDisplay/3DVehicle" to="MarginContainer" method="OnClick3DVehicle"]
|
||||
[connection signal="drag_ended" from="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer5/HSlider" to="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/MarginContainer5/HSlider" method="_on_drag_ended"]
|
||||
[connection signal="on_click" from="MarginContainer/HBoxContainer/MarginContainer/Main3DVehicle/MarginContainer/Main3DVehicleTexture" to="MarginContainer/HBoxContainer/MarginContainer/Main3DVehicle" method="_on_main_3d_vehicle_texture_on_click"]
|
||||
|
||||
[editable path="MarginContainer/HBoxContainer/MarginContainer/DataPanel/RightMenu/VBoxContainer/VolumeSettings"]
|
||||
|
BIN
Robo-Bus-A31-HMI/pad_hmi_ui/.DS_Store
vendored
BIN
Robo-Bus-A31-HMI/pad_hmi_ui/.DS_Store
vendored
Binary file not shown.
@ -7,18 +7,20 @@ extends BaseControl
|
||||
|
||||
|
||||
func _on_main_3d_vehicle_texture_on_click(_node: Variant) -> void:
|
||||
main_3d_vehicle_texture.onEnd()
|
||||
#data_panel.modulate.a = 0
|
||||
data_panel.visible = true
|
||||
data_panel.modulate.a = 1
|
||||
main_3d_vehicle_background.modulate.a = 0
|
||||
var tween = create_tween()
|
||||
tween.tween_property(main_3d_vehicle_information, "modulate", Color(1,1,1,0), 0.05)
|
||||
#tween.tween_property(data_panel, "modulate", Color(1,1,1,1), 0.1)
|
||||
await get_tree().create_timer(0.3).timeout
|
||||
visible = false
|
||||
#tween.set_parallel()
|
||||
#tween.tween_property(main_3d_vehicle_information, "modulate", Color(1,1,1,1), 0.1)
|
||||
var tween1 = create_tween()
|
||||
tween1.tween_property(data_panel, "modulate", Color(1,1,1,1), 0.1)
|
||||
if !$"../../..".isVolumeSettings:
|
||||
$"../../..".isVolumeSettings = true
|
||||
main_3d_vehicle_texture.onEnd()
|
||||
#data_panel.modulate.a = 0
|
||||
data_panel.visible = true
|
||||
data_panel.modulate.a = 1
|
||||
main_3d_vehicle_background.modulate.a = 0
|
||||
var tween = create_tween()
|
||||
tween.tween_property(main_3d_vehicle_information, "modulate", Color(1,1,1,0), 0.05)
|
||||
#tween.tween_property(data_panel, "modulate", Color(1,1,1,1), 0.1)
|
||||
await get_tree().create_timer(0.3).timeout
|
||||
visible = false
|
||||
#tween.set_parallel()
|
||||
#tween.tween_property(main_3d_vehicle_information, "modulate", Color(1,1,1,1), 0.1)
|
||||
var tween1 = create_tween()
|
||||
tween1.tween_property(data_panel, "modulate", Color(1,1,1,1), 0.1)
|
||||
pass # Replace with function body.
|
||||
|
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 131 KiB |
@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://pomyaut6jtnm"
|
||||
path="res://.godot/imported/未标题-1.png-e89f7c987f26cfa35ba9cd9670c598b4.ctex"
|
||||
path="res://.godot/imported/yuan.png-254a1787ef97ea33ab0b508f5a9896a4.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://未标题-1.png"
|
||||
dest_files=["res://.godot/imported/未标题-1.png-e89f7c987f26cfa35ba9cd9670c598b4.ctex"]
|
||||
source_file="res://yuan.png"
|
||||
dest_files=["res://.godot/imported/yuan.png-254a1787ef97ea33ab0b508f5a9896a4.ctex"]
|
||||
|
||||
[params]
|
||||
|
Loading…
Reference in New Issue
Block a user