实训调整
This commit is contained in:
parent
214e7d4cbc
commit
66c8d668b8
BIN
Assets/重来重新开始_浅.png
Normal file
BIN
Assets/重来重新开始_浅.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
34
Assets/重来重新开始_浅.png.import
Normal file
34
Assets/重来重新开始_浅.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://x4cnaa1ay6so"
|
||||
path="res://.godot/imported/重来重新开始_浅.png-01608ce8ba9a4fa7dda2743af1d481ee.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/重来重新开始_浅.png"
|
||||
dest_files=["res://.godot/imported/重来重新开始_浅.png-01608ce8ba9a4fa7dda2743af1d481ee.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
BIN
Assets/重来重新开始_深.png
Normal file
BIN
Assets/重来重新开始_深.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
34
Assets/重来重新开始_深.png.import
Normal file
34
Assets/重来重新开始_深.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://0txfneuxl2yq"
|
||||
path="res://.godot/imported/重来重新开始_深.png-4a8f5a48e528f8baf4e997b0eaa9ccca.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/重来重新开始_深.png"
|
||||
dest_files=["res://.godot/imported/重来重新开始_深.png-4a8f5a48e528f8baf4e997b0eaa9ccca.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
16
trainings/stepTip/PanelContainer.gd
Normal file
16
trainings/stepTip/PanelContainer.gd
Normal file
@ -0,0 +1,16 @@
|
||||
extends PanelContainer
|
||||
|
||||
@export var operationTip = "操作描述"
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
$VBoxContainer/Control2/Label.text = operationTip
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
func updateOperationTip(desc):
|
||||
operationTip = desc
|
||||
$VBoxContainer/Control2/Label.text = desc
|
48
trainings/stepTip/stepTip.tscn
Normal file
48
trainings/stepTip/stepTip.tscn
Normal file
@ -0,0 +1,48 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://yhr1n6e2m2b6"]
|
||||
|
||||
[ext_resource type="Script" path="res://trainings/stepTip/PanelContainer.gd" id="1_2t0ge"]
|
||||
|
||||
[node name="StepTip" type="Node"]
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="."]
|
||||
offset_right = 300.0
|
||||
offset_bottom = 180.0
|
||||
script = ExtResource("1_2t0ge")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Control" type="Control" parent="PanelContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="PanelContainer/VBoxContainer/Control"]
|
||||
layout_mode = 0
|
||||
offset_right = 300.0
|
||||
offset_bottom = 30.0
|
||||
color = Color(0.0509804, 0.388235, 0.752941, 1)
|
||||
|
||||
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/Control"]
|
||||
layout_mode = 2
|
||||
offset_right = 300.0
|
||||
offset_bottom = 30.0
|
||||
text = "操作提示"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Control2" type="Control" parent="PanelContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
size_flags_stretch_ratio = 5.0
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="PanelContainer/VBoxContainer/Control2"]
|
||||
layout_mode = 0
|
||||
offset_right = 300.0
|
||||
offset_bottom = 150.0
|
||||
color = Color(0.0509804, 0.388235, 0.752941, 0.447059)
|
||||
|
||||
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/Control2"]
|
||||
layout_mode = 0
|
||||
offset_top = 4.0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 27.0
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://b5yffodicwqm4"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://b5yffodicwqm4"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://qh8b3g6n3k2u" path="res://trainings/training_desc_dialog.tscn" id="1_efkp6"]
|
||||
[ext_resource type="Script" path="res://trainings/trainingCloseDoorFault/trainingCloseDoorFault.gd" id="1_iggb0"]
|
||||
@ -8,6 +8,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://b41vwoibfy5c6" path="res://trainings/stepJudgment.tscn" id="6_5gg1t"]
|
||||
[ext_resource type="PackedScene" uid="uid://b3whbe3mau53w" path="res://trainings/confirmDialog/confirmDialog.tscn" id="7_yeye4"]
|
||||
[ext_resource type="PackedScene" uid="uid://bsb3nyi8xaqwh" path="res://trainings/trainingPanel/trainingPanel.tscn" id="8_axom0"]
|
||||
[ext_resource type="PackedScene" uid="uid://yhr1n6e2m2b6" path="res://trainings/stepTip/stepTip.tscn" id="9_3cm1b"]
|
||||
|
||||
[node name="TrainingCloseDoorFault" type="Node"]
|
||||
script = ExtResource("1_iggb0")
|
||||
@ -31,6 +32,8 @@ visible = false
|
||||
|
||||
[node name="TrainingPanel" parent="." instance=ExtResource("8_axom0")]
|
||||
|
||||
[node name="StepTip" parent="." instance=ExtResource("9_3cm1b")]
|
||||
|
||||
[connection signal="StartTraining" from="TrainingDescDialog" to="." method="_on_training_desc_dialog_start_training"]
|
||||
[connection signal="currentClickCheckSignal" from="total" to="." method="_on_total_current_click_check_signal"]
|
||||
[connection signal="screenDoorCloseConfirmSignal" from="total" to="." method="_on_total_screen_door_close_confirm_signal"]
|
||||
|
@ -10,15 +10,14 @@ func _ready():
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
func _on_button_button_down():
|
||||
func _on_restart_button_down():
|
||||
$"../ConfirmDialog".show_confirm('此操作将重新开始实训,是否确认?')
|
||||
get_tree().paused = true
|
||||
|
||||
|
||||
|
||||
func _on_button_mouse_entered():
|
||||
$PanelContainer/MarginContainer/Button.set_default_cursor_shape(Control.CursorShape.CURSOR_POINTING_HAND)
|
||||
func _on_restart_mouse_entered():
|
||||
$PanelContainer/MarginContainer/Restart.set_default_cursor_shape(Control.CursorShape.CURSOR_POINTING_HAND)
|
||||
|
||||
func _on_button_focus_exited():
|
||||
$PanelContainer/MarginContainer/Button.set_default_cursor_shape(Control.CursorShape.CURSOR_ARROW)
|
||||
|
||||
func _on_restart_mouse_exited():
|
||||
$PanelContainer/MarginContainer/Restart.set_default_cursor_shape(Control.CursorShape.CURSOR_ARROW)
|
||||
|
@ -1,22 +1,19 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://bsb3nyi8xaqwh"]
|
||||
|
||||
[ext_resource type="Script" path="res://trainings/trainingPanel/trainingPanel.gd" id="1_fka8c"]
|
||||
[ext_resource type="Texture2D" uid="uid://bofkcocgrdjyp" path="res://Assets/trainingPanel.png" id="1_ors0d"]
|
||||
[ext_resource type="Texture2D" uid="uid://bwplpfjfev8qm" path="res://Assets/button.png" id="2_uf1t5"]
|
||||
[ext_resource type="Texture2D" uid="uid://x4cnaa1ay6so" path="res://Assets/重来重新开始_浅.png" id="2_db1sa"]
|
||||
[ext_resource type="Texture2D" uid="uid://0txfneuxl2yq" path="res://Assets/重来重新开始_深.png" id="3_0sd5r"]
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_24d16"]
|
||||
texture = ExtResource("1_ors0d")
|
||||
texture_margin_left = 20.0
|
||||
texture_margin_top = 25.0
|
||||
texture_margin_right = 20.0
|
||||
texture_margin_bottom = 20.0
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_l2bt2"]
|
||||
bg_color = Color(0.189249, 0.649753, 0.849873, 1)
|
||||
border_width_left = 4
|
||||
border_width_top = 4
|
||||
border_width_right = 4
|
||||
border_width_bottom = 4
|
||||
border_color = Color(0.00784314, 0.466667, 0.835294, 1)
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_r813r"]
|
||||
content_margin_left = 20.0
|
||||
content_margin_top = 13.0
|
||||
content_margin_right = 20.0
|
||||
content_margin_bottom = 12.0
|
||||
texture = ExtResource("2_uf1t5")
|
||||
[sub_resource type="Theme" id="Theme_kqpcn"]
|
||||
Button/styles/normal = SubResource("StyleBoxFlat_l2bt2")
|
||||
|
||||
[node name="TrainingPanel" type="Node"]
|
||||
script = ExtResource("1_fka8c")
|
||||
@ -25,31 +22,30 @@ script = ExtResource("1_fka8c")
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -200.0
|
||||
offset_right = 300.0
|
||||
offset_left = 60.9691
|
||||
offset_top = -80.3169
|
||||
offset_right = 118.969
|
||||
offset_bottom = -24.3169
|
||||
grow_vertical = 0
|
||||
theme_override_styles/panel = SubResource("StyleBoxTexture_24d16")
|
||||
scale = Vector2(0.8, 0.8)
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 10
|
||||
theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 10
|
||||
theme_override_constants/margin_bottom = 10
|
||||
theme_override_constants/margin_left = 2
|
||||
theme_override_constants/margin_top = 2
|
||||
theme_override_constants/margin_right = 2
|
||||
theme_override_constants/margin_bottom = 2
|
||||
|
||||
[node name="Button" type="Button" parent="PanelContainer/MarginContainer"]
|
||||
[node name="Restart" type="TextureButton" parent="PanelContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
theme_override_colors/font_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_hover_color = Color(0, 0, 1, 1)
|
||||
theme_override_styles/normal = SubResource("StyleBoxTexture_r813r")
|
||||
theme_override_styles/hover = SubResource("StyleBoxTexture_r813r")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxTexture_r813r")
|
||||
theme_override_styles/disabled = SubResource("StyleBoxTexture_r813r")
|
||||
theme_override_styles/focus = SubResource("StyleBoxTexture_r813r")
|
||||
text = "重新开始"
|
||||
theme = SubResource("Theme_kqpcn")
|
||||
texture_normal = ExtResource("2_db1sa")
|
||||
texture_hover = ExtResource("3_0sd5r")
|
||||
stretch_mode = 5
|
||||
|
||||
[connection signal="button_down" from="PanelContainer/MarginContainer/Button" to="." method="_on_button_button_down"]
|
||||
[connection signal="focus_exited" from="PanelContainer/MarginContainer/Button" to="." method="_on_button_focus_exited"]
|
||||
[connection signal="mouse_entered" from="PanelContainer/MarginContainer/Button" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="button_down" from="PanelContainer/MarginContainer/Restart" to="." method="_on_restart_button_down"]
|
||||
[connection signal="mouse_entered" from="PanelContainer/MarginContainer/Restart" to="." method="_on_restart_mouse_entered"]
|
||||
[connection signal="mouse_exited" from="PanelContainer/MarginContainer/Restart" to="." method="_on_restart_mouse_exited"]
|
||||
|
Loading…
Reference in New Issue
Block a user