mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-23 17:17:31 -04:00
gate not responding popup
This commit is contained in:
parent
4fc2d7aeb9
commit
08708f2b59
14 changed files with 205 additions and 13 deletions
|
@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/Inter-Bold.otf-fed3606970d0d1ec228f8cbb3326ce
|
||||||
Rendering=null
|
Rendering=null
|
||||||
antialiasing=1
|
antialiasing=1
|
||||||
generate_mipmaps=false
|
generate_mipmaps=false
|
||||||
|
disable_embedded_bitmaps=true
|
||||||
multichannel_signed_distance_field=false
|
multichannel_signed_distance_field=false
|
||||||
msdf_pixel_range=8
|
msdf_pixel_range=8
|
||||||
msdf_size=48
|
msdf_size=48
|
||||||
|
|
|
@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/Inter-BoldItalic.otf-fc2a2d62a96e28426d3bc0af
|
||||||
Rendering=null
|
Rendering=null
|
||||||
antialiasing=1
|
antialiasing=1
|
||||||
generate_mipmaps=false
|
generate_mipmaps=false
|
||||||
|
disable_embedded_bitmaps=true
|
||||||
multichannel_signed_distance_field=false
|
multichannel_signed_distance_field=false
|
||||||
msdf_pixel_range=8
|
msdf_pixel_range=8
|
||||||
msdf_size=48
|
msdf_size=48
|
||||||
|
|
|
@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/Inter-Italic.otf-a2ee68ef97ef9010eaa7272e19db
|
||||||
Rendering=null
|
Rendering=null
|
||||||
antialiasing=1
|
antialiasing=1
|
||||||
generate_mipmaps=false
|
generate_mipmaps=false
|
||||||
|
disable_embedded_bitmaps=true
|
||||||
multichannel_signed_distance_field=false
|
multichannel_signed_distance_field=false
|
||||||
msdf_pixel_range=8
|
msdf_pixel_range=8
|
||||||
msdf_size=48
|
msdf_size=48
|
||||||
|
|
|
@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/Inter-Regular.otf-f352c7616b1c2d50404f5bb3f48
|
||||||
Rendering=null
|
Rendering=null
|
||||||
antialiasing=1
|
antialiasing=1
|
||||||
generate_mipmaps=false
|
generate_mipmaps=false
|
||||||
|
disable_embedded_bitmaps=true
|
||||||
multichannel_signed_distance_field=false
|
multichannel_signed_distance_field=false
|
||||||
msdf_pixel_range=8
|
msdf_pixel_range=8
|
||||||
msdf_size=48
|
msdf_size=48
|
||||||
|
@ -27,7 +28,12 @@ Fallbacks=null
|
||||||
fallbacks=[]
|
fallbacks=[]
|
||||||
Compress=null
|
Compress=null
|
||||||
compress=true
|
compress=true
|
||||||
preload=[]
|
preload=[{
|
||||||
|
"chars": [],
|
||||||
|
"glyphs": [],
|
||||||
|
"name": "New Configuration",
|
||||||
|
"size": Vector2i(16, 0)
|
||||||
|
}]
|
||||||
language_support={}
|
language_support={}
|
||||||
script_support={}
|
script_support={}
|
||||||
opentype_features={}
|
opentype_features={}
|
||||||
|
|
|
@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/Monospace.ttf-84d18bc2b9fbca262f60d9ae15d1ff1
|
||||||
Rendering=null
|
Rendering=null
|
||||||
antialiasing=1
|
antialiasing=1
|
||||||
generate_mipmaps=false
|
generate_mipmaps=false
|
||||||
|
disable_embedded_bitmaps=true
|
||||||
multichannel_signed_distance_field=false
|
multichannel_signed_distance_field=false
|
||||||
msdf_pixel_range=8
|
msdf_pixel_range=8
|
||||||
msdf_size=48
|
msdf_size=48
|
||||||
|
|
|
@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/MonospaceBold.ttf-85e6bb30ac22368fdf6bd988771
|
||||||
Rendering=null
|
Rendering=null
|
||||||
antialiasing=1
|
antialiasing=1
|
||||||
generate_mipmaps=false
|
generate_mipmaps=false
|
||||||
|
disable_embedded_bitmaps=true
|
||||||
multichannel_signed_distance_field=false
|
multichannel_signed_distance_field=false
|
||||||
msdf_pixel_range=8
|
msdf_pixel_range=8
|
||||||
msdf_size=48
|
msdf_size=48
|
||||||
|
@ -27,7 +28,12 @@ Fallbacks=null
|
||||||
fallbacks=[]
|
fallbacks=[]
|
||||||
Compress=null
|
Compress=null
|
||||||
compress=true
|
compress=true
|
||||||
preload=[]
|
preload=[{
|
||||||
|
"chars": [],
|
||||||
|
"glyphs": [],
|
||||||
|
"name": "New Configuration",
|
||||||
|
"size": Vector2i(16, 0)
|
||||||
|
}]
|
||||||
language_support={}
|
language_support={}
|
||||||
script_support={}
|
script_support={}
|
||||||
opentype_features={}
|
opentype_features={}
|
||||||
|
|
117
app/scenes/components/not_responding.tscn
Normal file
117
app/scenes/components/not_responding.tscn
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
[gd_scene load_steps=6 format=3 uid="uid://c7571vjq7l0jp"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/ui/world/not_responding.gd" id="1_feqd7"]
|
||||||
|
[ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="2_8u6e2"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://do40418waa8w3" path="res://assets/fonts/Inter-Regular.otf" id="2_ugt55"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_htqsi"]
|
||||||
|
bg_color = Color(0, 0, 0, 0.5)
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_s6kym"]
|
||||||
|
bg_color = Color(0.156863, 0.156863, 0.156863, 1)
|
||||||
|
corner_radius_top_left = 16
|
||||||
|
corner_radius_top_right = 16
|
||||||
|
corner_radius_bottom_right = 16
|
||||||
|
corner_radius_bottom_left = 16
|
||||||
|
shadow_color = Color(0, 0, 0, 0.25)
|
||||||
|
shadow_size = 16
|
||||||
|
|
||||||
|
[node name="NotResponding" type="Control" node_paths=PackedStringArray("root")]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
mouse_filter = 2
|
||||||
|
script = ExtResource("1_feqd7")
|
||||||
|
gate_events = ExtResource("2_8u6e2")
|
||||||
|
root = NodePath("TextureButton")
|
||||||
|
|
||||||
|
[node name="TextureButton" type="TextureButton" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="Panel" type="Panel" parent="TextureButton"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_htqsi")
|
||||||
|
|
||||||
|
[node name="Popup" type="Control" parent="TextureButton"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -229.0
|
||||||
|
offset_top = -116.0
|
||||||
|
offset_right = 229.0
|
||||||
|
offset_bottom = 116.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="Panel" type="Panel" parent="TextureButton/Popup"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_s6kym")
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="TextureButton/Popup"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 10
|
||||||
|
anchor_right = 1.0
|
||||||
|
offset_top = 29.0
|
||||||
|
offset_bottom = 68.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
theme_override_fonts/font = ExtResource("2_ugt55")
|
||||||
|
theme_override_font_sizes/font_size = 32
|
||||||
|
text = "Gate is not responding"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="TextureButton/Popup"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 10
|
||||||
|
anchor_right = 1.0
|
||||||
|
offset_left = 59.0
|
||||||
|
offset_top = 96.0
|
||||||
|
offset_right = -53.0
|
||||||
|
offset_bottom = 166.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
theme_override_colors/font_color = Color(0.621524, 0.621524, 0.621524, 1)
|
||||||
|
theme_override_constants/line_spacing = -2
|
||||||
|
theme_override_fonts/font = ExtResource("2_ugt55")
|
||||||
|
theme_override_font_sizes/font_size = 20
|
||||||
|
text = "Restart the page or try to wait if it responses"
|
||||||
|
autowrap_mode = 3
|
||||||
|
|
||||||
|
[node name="LinkButton" type="LinkButton" parent="TextureButton/Popup"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 7
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = -34.0
|
||||||
|
offset_top = -50.0
|
||||||
|
offset_right = 34.0
|
||||||
|
offset_bottom = -25.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 0
|
||||||
|
theme_override_fonts/font = ExtResource("2_ugt55")
|
||||||
|
theme_override_font_sizes/font_size = 20
|
||||||
|
text = "Get help!"
|
||||||
|
uri = "https://forms.gle/A44qmWkcE9f6cD81A"
|
|
@ -1,6 +1,7 @@
|
||||||
[gd_scene load_steps=21 format=3 uid="uid://ctam0fxigbefk"]
|
[gd_scene load_steps=22 format=3 uid="uid://ctam0fxigbefk"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/ui/search.gd" id="1_7ivk2"]
|
[ext_resource type="Script" path="res://scripts/ui/search.gd" id="1_7ivk2"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://do40418waa8w3" path="res://assets/fonts/Inter-Regular.otf" id="1_cimak"]
|
||||||
[ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="2_13io8"]
|
[ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="2_13io8"]
|
||||||
[ext_resource type="Texture2D" uid="uid://c28surtqjf4st" path="res://assets/textures/search.svg" id="3_1rllf"]
|
[ext_resource type="Texture2D" uid="uid://c28surtqjf4st" path="res://assets/textures/search.svg" id="3_1rllf"]
|
||||||
[ext_resource type="Script" path="res://scripts/ui/search/search_status.gd" id="3_3p1re"]
|
[ext_resource type="Script" path="res://scripts/ui/search/search_status.gd" id="3_3p1re"]
|
||||||
|
@ -48,6 +49,7 @@ corner_radius_bottom_left = 6
|
||||||
corner_detail = 10
|
corner_detail = 10
|
||||||
|
|
||||||
[node name="Search" type="LineEdit" node_paths=PackedStringArray("prompt_panel")]
|
[node name="Search" type="LineEdit" node_paths=PackedStringArray("prompt_panel")]
|
||||||
|
auto_translate_mode = 2
|
||||||
custom_minimum_size = Vector2(1000, 40)
|
custom_minimum_size = Vector2(1000, 40)
|
||||||
anchors_preset = 8
|
anchors_preset = 8
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
|
@ -60,15 +62,15 @@ offset_right = 500.0
|
||||||
offset_bottom = 20.0
|
offset_bottom = 20.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
auto_translate = false
|
|
||||||
localize_numeral_system = false
|
localize_numeral_system = false
|
||||||
focus_next = NodePath("Prompt")
|
focus_next = NodePath("Prompt")
|
||||||
focus_mode = 1
|
focus_mode = 1
|
||||||
theme_override_colors/font_color = Color(1, 1, 1, 0.8)
|
|
||||||
theme_override_colors/font_placeholder_color = Color(1, 1, 1, 0.498039)
|
theme_override_colors/font_placeholder_color = Color(1, 1, 1, 0.498039)
|
||||||
|
theme_override_colors/font_color = Color(1, 1, 1, 0.8)
|
||||||
|
theme_override_fonts/font = ExtResource("1_cimak")
|
||||||
theme_override_font_sizes/font_size = 20
|
theme_override_font_sizes/font_size = 20
|
||||||
theme_override_styles/normal = SubResource("StyleBoxFlat_hyysn")
|
|
||||||
theme_override_styles/focus = SubResource("StyleBoxFlat_hyysn")
|
theme_override_styles/focus = SubResource("StyleBoxFlat_hyysn")
|
||||||
|
theme_override_styles/normal = SubResource("StyleBoxFlat_hyysn")
|
||||||
placeholder_text = "Search or enter address"
|
placeholder_text = "Search or enter address"
|
||||||
script = ExtResource("1_7ivk2")
|
script = ExtResource("1_7ivk2")
|
||||||
gate_events = ExtResource("2_13io8")
|
gate_events = ExtResource("2_13io8")
|
||||||
|
@ -153,6 +155,8 @@ process_mode = 0
|
||||||
process_priority = 0
|
process_priority = 0
|
||||||
process_physics_priority = 0
|
process_physics_priority = 0
|
||||||
process_thread_group = 0
|
process_thread_group = 0
|
||||||
|
physics_interpolation_mode = 2
|
||||||
|
auto_translate_mode = 1
|
||||||
editor_description = ""
|
editor_description = ""
|
||||||
visible = false
|
visible = false
|
||||||
modulate = Color(1, 1, 1, 1)
|
modulate = Color(1, 1, 1, 1)
|
||||||
|
@ -190,7 +194,6 @@ pivot_offset = Vector2(20, 20)
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 1
|
size_flags_vertical = 1
|
||||||
size_flags_stretch_ratio = 1.0
|
size_flags_stretch_ratio = 1.0
|
||||||
auto_translate = true
|
|
||||||
localize_numeral_system = true
|
localize_numeral_system = true
|
||||||
tooltip_text = ""
|
tooltip_text = ""
|
||||||
focus_neighbor_left = NodePath("")
|
focus_neighbor_left = NodePath("")
|
||||||
|
@ -254,6 +257,8 @@ process_mode = 0
|
||||||
process_priority = 0
|
process_priority = 0
|
||||||
process_physics_priority = 0
|
process_physics_priority = 0
|
||||||
process_thread_group = 0
|
process_thread_group = 0
|
||||||
|
physics_interpolation_mode = 2
|
||||||
|
auto_translate_mode = 1
|
||||||
editor_description = ""
|
editor_description = ""
|
||||||
visible = true
|
visible = true
|
||||||
modulate = Color(1, 1, 1, 1)
|
modulate = Color(1, 1, 1, 1)
|
||||||
|
@ -291,7 +296,6 @@ pivot_offset = Vector2(0, 0)
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 1
|
size_flags_vertical = 1
|
||||||
size_flags_stretch_ratio = 1.0
|
size_flags_stretch_ratio = 1.0
|
||||||
auto_translate = true
|
|
||||||
localize_numeral_system = true
|
localize_numeral_system = true
|
||||||
tooltip_text = ""
|
tooltip_text = ""
|
||||||
focus_neighbor_left = NodePath("")
|
focus_neighbor_left = NodePath("")
|
||||||
|
@ -335,6 +339,8 @@ process_mode = 0
|
||||||
process_priority = 0
|
process_priority = 0
|
||||||
process_physics_priority = 0
|
process_physics_priority = 0
|
||||||
process_thread_group = 0
|
process_thread_group = 0
|
||||||
|
physics_interpolation_mode = 2
|
||||||
|
auto_translate_mode = 1
|
||||||
editor_description = ""
|
editor_description = ""
|
||||||
visible = false
|
visible = false
|
||||||
modulate = Color(1, 1, 1, 1)
|
modulate = Color(1, 1, 1, 1)
|
||||||
|
@ -372,7 +378,6 @@ pivot_offset = Vector2(0, 0)
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 1
|
size_flags_vertical = 1
|
||||||
size_flags_stretch_ratio = 1.0
|
size_flags_stretch_ratio = 1.0
|
||||||
auto_translate = true
|
|
||||||
localize_numeral_system = true
|
localize_numeral_system = true
|
||||||
tooltip_text = ""
|
tooltip_text = ""
|
||||||
focus_neighbor_left = NodePath("")
|
focus_neighbor_left = NodePath("")
|
||||||
|
|
|
@ -421,7 +421,6 @@ texture = ExtResource("1_d6dhb")
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
|
|
||||||
[node name="Search" parent="VBoxContainer/Top/MenuNavigation" instance=ExtResource("5_li2do")]
|
[node name="Search" parent="VBoxContainer/Top/MenuNavigation" instance=ExtResource("5_li2do")]
|
||||||
auto_translate_mode = 2
|
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=34 format=3 uid="uid://kywrsqro3d5i"]
|
[gd_scene load_steps=35 format=3 uid="uid://kywrsqro3d5i"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/loading/gate_loader.gd" id="1_uxhy6"]
|
[ext_resource type="Script" path="res://scripts/loading/gate_loader.gd" id="1_uxhy6"]
|
||||||
[ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="2_q7cvi"]
|
[ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="2_q7cvi"]
|
||||||
|
@ -21,6 +21,7 @@
|
||||||
[ext_resource type="FontFile" uid="uid://do40418waa8w3" path="res://assets/fonts/Inter-Regular.otf" id="15_1gk43"]
|
[ext_resource type="FontFile" uid="uid://do40418waa8w3" path="res://assets/fonts/Inter-Regular.otf" id="15_1gk43"]
|
||||||
[ext_resource type="Script" path="res://scripts/ui/world/release_focus.gd" id="16_8emm0"]
|
[ext_resource type="Script" path="res://scripts/ui/world/release_focus.gd" id="16_8emm0"]
|
||||||
[ext_resource type="FontFile" uid="uid://c14w1y1r54wgi" path="res://assets/fonts/Inter-Bold.otf" id="16_m0ubw"]
|
[ext_resource type="FontFile" uid="uid://c14w1y1r54wgi" path="res://assets/fonts/Inter-Bold.otf" id="16_m0ubw"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c7571vjq7l0jp" path="res://scenes/components/not_responding.tscn" id="17_kwbm3"]
|
||||||
[ext_resource type="FontFile" uid="uid://b3xb1fpllhnf4" path="res://assets/fonts/Inter-Italic.otf" id="17_s7ouj"]
|
[ext_resource type="FontFile" uid="uid://b3xb1fpllhnf4" path="res://assets/fonts/Inter-Italic.otf" id="17_s7ouj"]
|
||||||
[ext_resource type="FontFile" uid="uid://tfj3o1e1wytn" path="res://assets/fonts/Inter-BoldItalic.otf" id="18_qgdgb"]
|
[ext_resource type="FontFile" uid="uid://tfj3o1e1wytn" path="res://assets/fonts/Inter-BoldItalic.otf" id="18_qgdgb"]
|
||||||
[ext_resource type="Script" path="res://scripts/ui/fullscreen_animation.gd" id="18_sx3kr"]
|
[ext_resource type="Script" path="res://scripts/ui/fullscreen_animation.gd" id="18_sx3kr"]
|
||||||
|
@ -467,4 +468,8 @@ script = ExtResource("18_sx3kr")
|
||||||
ui_events = ExtResource("9_ir58h")
|
ui_events = ExtResource("9_ir58h")
|
||||||
gate_events = ExtResource("2_q7cvi")
|
gate_events = ExtResource("2_q7cvi")
|
||||||
|
|
||||||
|
[node name="NotResponding" parent="." instance=ExtResource("17_kwbm3")]
|
||||||
|
visible = false
|
||||||
|
layout_mode = 1
|
||||||
|
|
||||||
[connection signal="pressed" from="HBoxContainer/WorldCanvas/RenderResult/HideOnPress" to="." method="hide_ui"]
|
[connection signal="pressed" from="HBoxContainer/WorldCanvas/RenderResult/HideOnPress" to="." method="hide_ui"]
|
||||||
|
|
|
@ -29,10 +29,12 @@ func on_ui_mode_changed(mode: UiEvents.UiMode) -> void:
|
||||||
should_send = mode == UiEvents.UiMode.FULL_SCREEN
|
should_send = mode == UiEvents.UiMode.FULL_SCREEN
|
||||||
|
|
||||||
|
|
||||||
func _input(event: InputEvent) -> void:
|
func _input(_event: InputEvent) -> void:
|
||||||
if input_sync == null or not should_send: return
|
if input_sync == null or not should_send: return
|
||||||
|
|
||||||
|
var event = _event
|
||||||
if event is InputEventMouse:
|
if event is InputEventMouse:
|
||||||
|
event = _event.duplicate()
|
||||||
event.position = get_scaled_mouse_pos(event.position)
|
event.position = get_scaled_mouse_pos(event.position)
|
||||||
event.global_position = get_scaled_mouse_pos(event.global_position)
|
event.global_position = get_scaled_mouse_pos(event.global_position)
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ extends Node
|
||||||
# Timeout interval for child process responsiveness
|
# Timeout interval for child process responsiveness
|
||||||
const BOOTUP_INTERVAL = 30
|
const BOOTUP_INTERVAL = 30
|
||||||
const HEARTBEAT_INTERVAL = 5
|
const HEARTBEAT_INTERVAL = 5
|
||||||
const WAIT_INTERVAL = 30
|
const WAIT_INTERVAL = 20
|
||||||
|
|
||||||
var timer: Timer
|
var timer: Timer
|
||||||
|
|
||||||
|
|
47
app/scripts/ui/world/not_responding.gd
Normal file
47
app/scripts/ui/world/not_responding.gd
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
const SHOWN = Color(1, 1, 1, 1)
|
||||||
|
const HIDDEN = Color(1, 1, 1, 0)
|
||||||
|
|
||||||
|
@export var gate_events: GateEvents
|
||||||
|
@export var root: TextureButton
|
||||||
|
@export var fade_in: float = 1.0
|
||||||
|
@export var fade_out: float = 0.2
|
||||||
|
|
||||||
|
var tween: Tween
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
gate_events.not_responding.connect(show_message)
|
||||||
|
root.pressed.connect(hide_message)
|
||||||
|
|
||||||
|
visible = true
|
||||||
|
root.hide()
|
||||||
|
root.modulate = HIDDEN
|
||||||
|
root.mouse_filter = Control.MOUSE_FILTER_PASS
|
||||||
|
|
||||||
|
|
||||||
|
func show_message() -> void:
|
||||||
|
if root.visible: return
|
||||||
|
|
||||||
|
root.show()
|
||||||
|
|
||||||
|
if is_instance_valid(tween): tween.stop()
|
||||||
|
tween = get_tree().create_tween()
|
||||||
|
tween.tween_property(root, "modulate", SHOWN, fade_in)
|
||||||
|
await tween.finished
|
||||||
|
|
||||||
|
root.mouse_filter = Control.MOUSE_FILTER_STOP
|
||||||
|
|
||||||
|
|
||||||
|
func hide_message() -> void:
|
||||||
|
if not root.visible: return
|
||||||
|
|
||||||
|
root.mouse_filter = Control.MOUSE_FILTER_PASS
|
||||||
|
|
||||||
|
if is_instance_valid(tween): tween.stop()
|
||||||
|
tween = get_tree().create_tween()
|
||||||
|
tween.tween_property(root, "modulate", HIDDEN, fade_out)
|
||||||
|
await tween.finished
|
||||||
|
|
||||||
|
root.hide()
|
|
@ -11,6 +11,7 @@ var _visible: bool = true
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
command_events.set_mouse_mode.connect(set_mouse_mode)
|
command_events.set_mouse_mode.connect(set_mouse_mode)
|
||||||
|
gate_events.not_responding.connect(func(): set_mouse_mode(Input.MOUSE_MODE_VISIBLE))
|
||||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue