diff --git a/Modules/ButtonItem.gd b/Modules/ButtonItem.gd index d7e8fa7..628ce89 100644 --- a/Modules/ButtonItem.gd +++ b/Modules/ButtonItem.gd @@ -16,8 +16,4 @@ var is_select:bool=false: is_select=value func _ready() -> void: super._ready() - self.pressed.connect(click) self.focus_mode=Control.FOCUS_NONE - -func click(): - is_select=!is_select diff --git a/Modules/language_panel_horizontal.tscn b/Modules/language_panel_horizontal.tscn new file mode 100644 index 0000000..cfe83f4 --- /dev/null +++ b/Modules/language_panel_horizontal.tscn @@ -0,0 +1,75 @@ +[gd_scene load_steps=9 format=3 uid="uid://b1v18ra6fsxt5"] + +[ext_resource type="Texture2D" uid="uid://odtdv6uuxul6" path="res://res/mask/overlay_ad_mask_semi_transparent.png" id="1_5ld7q"] +[ext_resource type="PackedScene" uid="uid://bb8i20x4xutp5" path="res://Modules/LanguageButton.tscn" id="2_vy48t"] +[ext_resource type="Texture2D" uid="uid://drcukx1rmjs77" path="res://res/icon/icon_English_default.png" id="3_e76dh"] +[ext_resource type="Texture2D" uid="uid://dfktl3007ojxk" path="res://res/icon/icon_English_hover.png" id="4_smhi3"] +[ext_resource type="Texture2D" uid="uid://ocudv2g8r1s7" path="res://res/icon/icon_Japanese_default.png" id="5_u3wwn"] +[ext_resource type="Texture2D" uid="uid://b84pps636wbya" path="res://res/icon/icon_Japanese_hover.png" id="6_0vsll"] +[ext_resource type="Texture2D" uid="uid://xr6duvavyfg8" path="res://res/icon/icon_language_close_default.png" id="7_dpc12"] +[ext_resource type="Texture2D" uid="uid://bqnjclc8biqve" path="res://res/icon/icon_language_close_hover.png" id="8_to5hf"] + +[node name="LanguagePanelHorizontal" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="mask2" type="TextureRect" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("1_5ld7q") + +[node name="HBoxContainer2" type="HBoxContainer" parent="."] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -919.0 +offset_top = -63.5 +offset_right = 919.0 +offset_bottom = 63.5 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 177 + +[node name="Button" parent="HBoxContainer2" instance=ExtResource("2_vy48t")] +layout_mode = 2 +IconTextureNormal = ExtResource("3_e76dh") +IconTextureSelected = ExtResource("4_smhi3") +Text = "English" + +[node name="Button2" parent="HBoxContainer2" instance=ExtResource("2_vy48t")] +layout_mode = 2 + +[node name="Button3" parent="HBoxContainer2" instance=ExtResource("2_vy48t")] +layout_mode = 2 +IconTextureNormal = ExtResource("5_u3wwn") +IconTextureSelected = ExtResource("6_0vsll") +Text = "日本語" + +[node name="CloseButton" type="TextureButton" parent="."] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = 997.0 +offset_top = -176.0 +offset_right = 1054.0 +offset_bottom = -119.0 +grow_horizontal = 2 +grow_vertical = 2 +focus_mode = 0 +texture_normal = ExtResource("7_dpc12") +texture_pressed = ExtResource("8_to5hf") +texture_focused = ExtResource("8_to5hf") diff --git a/Modules/language_panel_vertical.tscn b/Modules/language_panel_vertical.tscn new file mode 100644 index 0000000..5b29b5e --- /dev/null +++ b/Modules/language_panel_vertical.tscn @@ -0,0 +1,75 @@ +[gd_scene load_steps=9 format=3 uid="uid://bk6628qw2j15m"] + +[ext_resource type="Texture2D" uid="uid://odtdv6uuxul6" path="res://res/mask/overlay_ad_mask_semi_transparent.png" id="1_5cktv"] +[ext_resource type="PackedScene" uid="uid://bb8i20x4xutp5" path="res://Modules/LanguageButton.tscn" id="2_wisce"] +[ext_resource type="Texture2D" uid="uid://drcukx1rmjs77" path="res://res/icon/icon_English_default.png" id="3_4hfoc"] +[ext_resource type="Texture2D" uid="uid://dfktl3007ojxk" path="res://res/icon/icon_English_hover.png" id="4_dchfe"] +[ext_resource type="Texture2D" uid="uid://ocudv2g8r1s7" path="res://res/icon/icon_Japanese_default.png" id="5_8sfll"] +[ext_resource type="Texture2D" uid="uid://b84pps636wbya" path="res://res/icon/icon_Japanese_hover.png" id="6_0e4ua"] +[ext_resource type="Texture2D" uid="uid://xr6duvavyfg8" path="res://res/icon/icon_language_close_default.png" id="7_serui"] +[ext_resource type="Texture2D" uid="uid://bqnjclc8biqve" path="res://res/icon/icon_language_close_hover.png" id="8_7tp56"] + +[node name="LanguageVertical" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="mask2" type="TextureRect" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("1_5cktv") + +[node name="VBoxContainer2" type="VBoxContainer" parent="."] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -294.0 +offset_top = -227.5 +offset_right = 294.0 +offset_bottom = 227.5 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 37 + +[node name="Button" parent="VBoxContainer2" instance=ExtResource("2_wisce")] +layout_mode = 2 +IconTextureNormal = ExtResource("3_4hfoc") +IconTextureSelected = ExtResource("4_dchfe") +Text = "English" + +[node name="Button2" parent="VBoxContainer2" instance=ExtResource("2_wisce")] +layout_mode = 2 + +[node name="Button3" parent="VBoxContainer2" instance=ExtResource("2_wisce")] +layout_mode = 2 +IconTextureNormal = ExtResource("5_8sfll") +IconTextureSelected = ExtResource("6_0e4ua") +Text = "日本語" + +[node name="CloseButton" type="TextureButton" parent="."] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = 358.0 +offset_top = -271.0 +offset_right = 415.0 +offset_bottom = -214.0 +grow_horizontal = 2 +grow_vertical = 2 +focus_mode = 0 +texture_normal = ExtResource("7_serui") +texture_pressed = ExtResource("8_7tp56") +texture_focused = ExtResource("8_7tp56") diff --git a/Modules/scroll_label.gd b/Modules/scroll_label.gd new file mode 100644 index 0000000..e427387 --- /dev/null +++ b/Modules/scroll_label.gd @@ -0,0 +1,82 @@ +@tool +extends ScrollContainer + +@export var text:String="": + set(value): + if is_scroll: + %text.text=value + else: + %text.text=get_text_not_scroll(value) + text=value + + +@export var margin_left:float=0: + set(value): + + %tab_left.custom_minimum_size.x=value + margin_left=value + pass + +@export var margin_right:float=0: + set(value): + + %tab_right.custom_minimum_size.x=value + margin_right=value + pass + +@export var scroll_speed:float=300 + +var scroll_value:float: + set(value): + var scroll_max_value:float=get_h_scroll_bar().max_value + if value>scroll_max_value: + scroll_value=0 + else: + scroll_value=value + set_deferred("scroll_horizontal",value) + +@export var font_size:int: + set(value): + font_size=value + %text.add_theme_font_size_override("font_size",value) + +@export var is_scroll:bool=false: + set(value): + if not value: + scroll_value=0 + %text.text=get_text_not_scroll(text) + else: + %text.text=text + is_scroll=value + pass + +@export var view_font_num_not_scroll:int=7: + set(value): + view_font_num_not_scroll=value + if not is_scroll: + %text.text=get_text_not_scroll(text) + + +func _ready() -> void: + %text.add_theme_font_size_override("font_size",font_size) + %tab_left.custom_minimum_size.x=margin_left + %tab_right.custom_minimum_size.x=margin_right + if is_scroll: + %text.text=text + else: + set_deferred("scroll_horizontal",0) + %text.text=get_text_not_scroll(text) + + pass + + +func _process(delta: float) -> void: + if is_scroll: + scroll_value+=(scroll_speed*delta) + + +func get_text_not_scroll(str:String)->String: + if str.length()<=view_font_num_not_scroll: + return str + else: + return str.left(view_font_num_not_scroll)+"..." diff --git a/Modules/scroll_label.tscn b/Modules/scroll_label.tscn new file mode 100644 index 0000000..7ee8ae2 --- /dev/null +++ b/Modules/scroll_label.tscn @@ -0,0 +1,36 @@ +[gd_scene load_steps=2 format=3 uid="uid://cjb0kd8p16kas"] + +[ext_resource type="Script" path="res://Modules/scroll_label.gd" id="1_ie1o0"] + +[node name="ScrollLabel" type="ScrollContainer"] +offset_left = 344.0 +offset_top = 323.0 +offset_right = 1222.0 +offset_bottom = 550.0 +horizontal_scroll_mode = 3 +vertical_scroll_mode = 0 +script = ExtResource("1_ie1o0") + +[node name="scroll" type="HBoxContainer" parent="."] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 3 +theme_override_constants/separation = 0 + +[node name="tab_left" type="Control" parent="scroll"] +unique_name_in_owner = true +layout_mode = 2 + +[node name="text" type="Label" parent="scroll"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme_override_font_sizes/font_size = 100 +text = "测试文本111111111111ssssssssssssssssssssssssssssssssssssssssssssssssssss到底啦" +vertical_alignment = 1 + +[node name="tab_right" type="Control" parent="scroll"] +unique_name_in_owner = true +layout_mode = 2 diff --git a/Modules/station_view.gd b/Modules/station_view.gd new file mode 100644 index 0000000..467056c --- /dev/null +++ b/Modules/station_view.gd @@ -0,0 +1,123 @@ +extends TextureRect + +var station_array:Array[String]=["测试站点1","测试站点2","测试站点3","测试站点4","测试站点5","测试站点6"] + +@export var scroll_text_tscn:PackedScene + +@export var StationIndicatorIcon:Texture2D + +var StationInsicatorScale:Array[float]=[1,0.85,0.65,0.45] + +@export var StationIndicatorNode:Array[Control]=[] + +@export var StationIndicatorText:Array[Control]=[] +var indicator_node:Array=[null,null,null,null] + +#当前下一站指向的station_index +var now_index:int=0 + + +var animation_time:float=0.5 +#通过给的station arr完成初始化 +func init(): + for i in indicator_node.size(): + if indicator_node[i]!=null: + indicator_node[i][0].queue_free() + indicator_node[i][1].queue_free() + indicator_node[i]=null + + if station_array.size()>=4: + for i in 4: + + var new_sprite=Sprite2D.new() + new_sprite.scale=Vector2(1,1)*StationInsicatorScale[i] + new_sprite.global_position=StationIndicatorNode[i].global_position + var new_text=scroll_text_tscn.instantiate() + new_text.global_position=StationIndicatorText[i].global_position + new_text.size=StationIndicatorText[i].size + new_text.text=station_array[i] + if i==0: + new_text.font_size=60 + else: + new_text.font_size=50 + new_sprite.texture=StationIndicatorIcon + add_child(new_sprite) + add_child(new_text) + indicator_node[i]=[new_sprite,new_text] + now_index=0 + +func _ready() -> void: + init() + +func next(): + var now_next_station_index:int=now_index+1 + if now_next_station_index>=station_array.size(): + return + if indicator_node[3]!=null: + var sprite=indicator_node[3][0] + var text=indicator_node[3][1] + var tween=create_tween() + tween.set_parallel().tween_property(sprite,"global_position",StationIndicatorNode[2].global_position,animation_time) + tween.set_parallel().tween_property(sprite,"scale",Vector2(1,1)*StationInsicatorScale[2],animation_time) + tween.set_parallel().tween_property(text,"global_position",StationIndicatorText[2].global_position,animation_time) + tween.set_parallel().tween_property(text,"size",StationIndicatorText[2].size,animation_time) + if indicator_node[2]!=null: + var sprite=indicator_node[2][0] + var text=indicator_node[2][1] + var tween=create_tween() + tween.set_parallel().tween_property(sprite,"global_position",StationIndicatorNode[1].global_position,animation_time) + tween.set_parallel().tween_property(sprite,"scale",Vector2(1,1)*StationInsicatorScale[1],animation_time) + tween.set_parallel().tween_property(text,"global_position",StationIndicatorText[1].global_position,animation_time) + tween.set_parallel().tween_property(text,"size",StationIndicatorText[1].size,animation_time) + if indicator_node[1]!=null: + var sprite=indicator_node[1][0] + var text=indicator_node[1][1] + var tween=create_tween() + + tween.set_parallel().tween_property(sprite,"global_position",StationIndicatorNode[0].global_position,animation_time) + tween.set_parallel().tween_property(sprite,"scale",Vector2(1,1)*StationInsicatorScale[0],animation_time) + tween.set_parallel().tween_property(text,"global_position",StationIndicatorText[0].global_position,animation_time) + tween.set_parallel().tween_property(text,"font_size",60,animation_time) + tween.set_parallel().tween_property(text,"size",StationIndicatorText[0].size,animation_time) + if indicator_node[0]!=null: + var sprite=indicator_node[0][0] + var text=indicator_node[0][1] + var tween=create_tween() + tween.set_parallel().tween_property(sprite,"global_position",%mark_bottom.global_position,animation_time) + tween.set_parallel().tween_property(text,"global_position",%text_mark_bottom.global_position,animation_time) + tween.set_parallel().tween_property(text,"size",%text_mark_bottom.size,animation_time) + tween.set_parallel(false).tween_callback(sprite.queue_free) + tween.set_parallel(false).tween_callback(text.queue_free) + var need_new_station_index:int=now_index+4 + if need_new_station_index void: + next() + pass # Replace with function body. diff --git a/Modules/station_view.tscn b/Modules/station_view.tscn new file mode 100644 index 0000000..dd67560 --- /dev/null +++ b/Modules/station_view.tscn @@ -0,0 +1,198 @@ +[gd_scene load_steps=6 format=3 uid="uid://cniqn7t5ddowq"] + +[ext_resource type="Texture2D" uid="uid://cbmjjcfmyc8wt" path="res://res/bg/bg_station_path_gradient.png" id="1_5asal"] +[ext_resource type="Texture2D" uid="uid://dlpmgixgugrfl" path="res://res/icon/icon_station_indicator_large_flashing_next.png" id="2_mr8n1"] +[ext_resource type="Script" path="res://Modules/station_view.gd" id="2_pxqqr"] +[ext_resource type="Texture2D" uid="uid://bmv5quilkypgr" path="res://res/preview/chinese.png" id="3_6a0no"] +[ext_resource type="PackedScene" uid="uid://cjb0kd8p16kas" path="res://Modules/scroll_label.tscn" id="3_t4xdc"] + +[node name="StationView" type="TextureRect" node_paths=PackedStringArray("StationIndicatorNode", "StationIndicatorText")] +clip_contents = true +offset_right = 758.0 +offset_bottom = 809.0 +texture = ExtResource("1_5asal") +script = ExtResource("2_pxqqr") +scroll_text_tscn = ExtResource("3_t4xdc") +StationIndicatorIcon = ExtResource("2_mr8n1") +StationIndicatorNode = [NodePath("mark1"), NodePath("mark2"), NodePath("mark3"), NodePath("mark4")] +StationIndicatorText = [NodePath("text_mark_1"), NodePath("text_mark_2"), NodePath("text_mark_3"), NodePath("text_mark_4")] + +[node name="mark1" type="Control" parent="."] +unique_name_in_owner = true +layout_mode = 1 +anchor_left = 0.0831135 +anchor_top = 0.922126 +anchor_right = 0.0831135 +anchor_bottom = 0.922126 +grow_horizontal = 2 +grow_vertical = 2 +metadata/_edit_use_anchors_ = true + +[node name="Sprite2D" type="Sprite2D" parent="mark1"] +visible = false +texture = ExtResource("2_mr8n1") + +[node name="mark2" type="Control" parent="."] +unique_name_in_owner = true +layout_mode = 1 +anchor_left = 0.126649 +anchor_top = 0.558715 +anchor_right = 0.126649 +anchor_bottom = 0.558715 +offset_top = -3.05176e-05 +offset_bottom = -3.05176e-05 +grow_horizontal = 2 +grow_vertical = 2 +metadata/_edit_use_anchors_ = true + +[node name="Sprite2D" type="Sprite2D" parent="mark2"] +visible = false +scale = Vector2(0.85, 0.85) +texture = ExtResource("2_mr8n1") + +[node name="mark3" type="Control" parent="."] +unique_name_in_owner = true +layout_mode = 1 +anchor_left = 0.234829 +anchor_top = 0.264524 +anchor_right = 0.234829 +anchor_bottom = 0.264524 +grow_horizontal = 2 +grow_vertical = 2 +metadata/_edit_use_anchors_ = true + +[node name="Sprite2D" type="Sprite2D" parent="mark3"] +visible = false +scale = Vector2(0.65, 0.65) +texture = ExtResource("2_mr8n1") + +[node name="mark4" type="Control" parent="."] +unique_name_in_owner = true +layout_mode = 1 +anchor_left = 0.364116 +anchor_top = 0.065513 +anchor_right = 0.364116 +anchor_bottom = 0.065513 +grow_horizontal = 2 +grow_vertical = 2 +metadata/_edit_use_anchors_ = true + +[node name="Sprite2D" type="Sprite2D" parent="mark4"] +visible = false +scale = Vector2(0.45, 0.45) +texture = ExtResource("2_mr8n1") + +[node name="mark_bottom" type="Control" parent="."] +unique_name_in_owner = true +layout_mode = 1 +anchor_left = 0.0501319 +anchor_top = 1.22744 +anchor_right = 0.0501319 +anchor_bottom = 1.22744 +grow_horizontal = 2 +grow_vertical = 2 +metadata/_edit_use_anchors_ = true + +[node name="Sprite2D" type="Sprite2D" parent="mark_bottom"] +visible = false +texture = ExtResource("2_mr8n1") + +[node name="mark_top" type="Control" parent="."] +unique_name_in_owner = true +layout_mode = 1 +anchor_left = 0.503958 +anchor_top = -0.0679852 +anchor_right = 0.503958 +anchor_bottom = -0.0679852 +grow_horizontal = 2 +grow_vertical = 2 +metadata/_edit_use_anchors_ = true + +[node name="Sprite2D" type="Sprite2D" parent="mark_top"] +visible = false +texture = ExtResource("2_mr8n1") + +[node name="text_mark_1" type="Control" parent="."] +layout_mode = 1 +anchor_left = 0.245383 +anchor_top = 0.854141 +anchor_right = 0.901055 +anchor_bottom = 0.998764 +offset_left = 1.52588e-05 +grow_horizontal = 2 +grow_vertical = 2 +metadata/_edit_use_anchors_ = true + +[node name="text_mark_2" type="Control" parent="."] +layout_mode = 1 +anchor_left = 0.317942 +anchor_top = 0.50309 +anchor_right = 0.903694 +anchor_bottom = 0.647713 +offset_left = 1.52588e-05 +grow_horizontal = 2 +grow_vertical = 2 +metadata/_edit_use_anchors_ = true + +[node name="text_mark_3" type="Control" parent="."] +layout_mode = 1 +anchor_left = 0.422164 +anchor_top = 0.205192 +anchor_right = 0.901055 +anchor_bottom = 0.349815 +offset_left = 1.52588e-05 +grow_horizontal = 2 +grow_vertical = 2 +metadata/_edit_use_anchors_ = true + +[node name="text_mark_4" type="Control" parent="."] +layout_mode = 1 +anchor_left = 0.502639 +anchor_top = -0.00618047 +anchor_right = 0.901055 +anchor_bottom = 0.138443 +offset_left = 1.52588e-05 +grow_horizontal = 2 +grow_vertical = 2 +metadata/_edit_use_anchors_ = true + +[node name="text_mark_bottom" type="Control" parent="."] +unique_name_in_owner = true +layout_mode = 1 +anchor_left = 0.21504 +anchor_top = 1.15575 +anchor_right = 0.870712 +anchor_bottom = 1.30037 +grow_horizontal = 2 +grow_vertical = 2 +metadata/_edit_use_anchors_ = true + +[node name="text_mark_top" type="Control" parent="."] +unique_name_in_owner = true +layout_mode = 1 +anchor_left = 0.585752 +anchor_top = -0.150803 +anchor_right = 1.24142 +anchor_bottom = -0.00618055 +grow_horizontal = 2 +grow_vertical = 2 +metadata/_edit_use_anchors_ = true + +[node name="TextureRect" type="TextureRect" parent="."] +visible = false +self_modulate = Color(1, 1, 1, 0.403922) +layout_mode = 2 +offset_left = -88.0 +offset_top = -146.0 +offset_right = 3752.0 +offset_bottom = 934.0 +texture = ExtResource("3_6a0no") + +[node name="Button" type="Button" parent="."] +layout_mode = 0 +offset_left = 86.0 +offset_top = 11.0 +offset_right = 478.0 +offset_bottom = 127.0 + +[connection signal="pressed" from="Button" to="." method="_on_button_pressed"] diff --git a/main.gd b/main.gd new file mode 100644 index 0000000..a284f98 --- /dev/null +++ b/main.gd @@ -0,0 +1,7 @@ +extends Control + + +func _on_more_option_pressed() -> void: + %MoreOption.is_select=not %MoreOption.is_select + %MoreOptionPanel.visibility_layer=%MoreOption.is_select + pass # Replace with function body. diff --git a/main.tscn b/main.tscn index bf90cc5..de7e19f 100644 --- a/main.tscn +++ b/main.tscn @@ -1,29 +1,23 @@ [gd_scene load_steps=19 format=3 uid="uid://dwv63mpx0y857"] +[ext_resource type="Script" path="res://main.gd" id="1_7mntx"] [ext_resource type="Texture2D" uid="uid://ctqyt5yh6uy78" path="res://res/bg/bg_dropdown_menu_active.png" id="1_rrn5x"] [ext_resource type="Texture2D" uid="uid://bkau0qkht0c8j" path="res://res/icon/icon_more_option_default.png" id="2_kb1k2"] [ext_resource type="Texture2D" uid="uid://bjhn4gko31i06" path="res://res/icon/icon_language_setting_default.png" id="2_nfbe6"] [ext_resource type="Texture2D" uid="uid://bnl4wc12yukw0" path="res://res/icon/icon_terminal_default.png" id="3_2tet8"] [ext_resource type="Script" path="res://Modules/ButtonItem.gd" id="3_8cofn"] [ext_resource type="Texture2D" uid="uid://bmv5quilkypgr" path="res://res/preview/chinese.png" id="3_kegs1"] -[ext_resource type="Texture2D" uid="uid://cbmjjcfmyc8wt" path="res://res/bg/bg_station_path_gradient.png" id="4_d7o7v"] [ext_resource type="Texture2D" uid="uid://cblh0mxrlrw3s" path="res://res/icon/icon_hide_video_default.png" id="4_dco67"] [ext_resource type="Texture2D" uid="uid://d31dauellifod" path="res://res/icon/icon_language_setting_hover.png" id="4_ew1by"] -[ext_resource type="Texture2D" uid="uid://odtdv6uuxul6" path="res://res/mask/overlay_ad_mask_semi_transparent.png" id="5_6mape"] +[ext_resource type="Texture2D" uid="uid://cvv784xu4xhoe" path="res://res/icon/icon_terminal_hover.png" id="6_vioyi"] [ext_resource type="Texture2D" uid="uid://c4jhgcdnltalm" path="res://res/icon/icon_more_option_hover.png" id="8_5t1lf"] -[ext_resource type="PackedScene" uid="uid://bb8i20x4xutp5" path="res://Modules/LanguageButton.tscn" id="11_d1sdq"] -[ext_resource type="Texture2D" uid="uid://drcukx1rmjs77" path="res://res/icon/icon_English_default.png" id="12_drwbu"] -[ext_resource type="Texture2D" uid="uid://dfktl3007ojxk" path="res://res/icon/icon_English_hover.png" id="13_n2aax"] -[ext_resource type="Texture2D" uid="uid://ocudv2g8r1s7" path="res://res/icon/icon_Japanese_default.png" id="14_5xi5c"] -[ext_resource type="Texture2D" uid="uid://b84pps636wbya" path="res://res/icon/icon_Japanese_hover.png" id="15_nay10"] - -[sub_resource type="Curve2D" id="Curve2D_weg51"] -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 322.5, -1.5, 0, 0, 0, 0, 182.5, 210.5, 0, 0, 0, 0, 95.5, 434.5, 0, 0, 0, 0, 59.5, 747.5, 0, 0, 0, 0, 59.5, 972.5) -} -point_count = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_sbyit"] +[ext_resource type="Texture2D" uid="uid://uaj4hq8l4sfr" path="res://res/icon/icon_hide_video_hover.png" id="8_ahwag"] +[ext_resource type="Texture2D" uid="uid://dnpguw2kxiycr" path="res://res/bg/bg_info_panel_time_default.png" id="12_bp84h"] +[ext_resource type="PackedScene" uid="uid://b1v18ra6fsxt5" path="res://Modules/language_panel_horizontal.tscn" id="12_g3kjd"] +[ext_resource type="PackedScene" uid="uid://cniqn7t5ddowq" path="res://Modules/station_view.tscn" id="12_ltcn0"] +[ext_resource type="PackedScene" uid="uid://bk6628qw2j15m" path="res://Modules/language_panel_vertical.tscn" id="13_ec1yh"] +[ext_resource type="Texture2D" uid="uid://ncxqcxrll4gn" path="res://res/bg/bg_info_panel_speed_safebelt_default.png" id="13_ko5d5"] +[ext_resource type="Texture2D" uid="uid://bkftfoedt3036" path="res://res/icon/icon_safebelt_yes.png" id="14_1xl0y"] [node name="Control" type="Control"] layout_mode = 3 @@ -32,6 +26,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +script = ExtResource("1_7mntx") [node name="Background" type="ColorRect" parent="."] layout_mode = 1 @@ -62,12 +57,13 @@ theme_override_constants/separation = 31 layout_mode = 2 theme_override_constants/separation = 27 -[node name="TextureRect" type="TextureRect" parent="MarginContainer/VBoxContainer/HBoxContainer"] +[node name="MoreOptionPanel" type="TextureRect" parent="MarginContainer/VBoxContainer/HBoxContainer"] +unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 10 texture = ExtResource("1_rrn5x") -[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer/TextureRect"] +[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer/MoreOptionPanel"] layout_mode = 1 anchors_preset = -1 anchor_left = 0.030303 @@ -77,7 +73,7 @@ grow_horizontal = 2 grow_vertical = 2 metadata/_edit_use_anchors_ = true -[node name="Language" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer/TextureRect/HBoxContainer"] +[node name="Language" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer/MoreOptionPanel/HBoxContainer"] layout_mode = 2 size_flags_horizontal = 3 flat = true @@ -86,7 +82,7 @@ TextureNormal = ExtResource("2_nfbe6") TextureSelected = ExtResource("4_ew1by") is_Scale = true -[node name="TextureRect" type="TextureRect" parent="MarginContainer/VBoxContainer/HBoxContainer/TextureRect/HBoxContainer/Language"] +[node name="TextureRect" type="TextureRect" parent="MarginContainer/VBoxContainer/HBoxContainer/MoreOptionPanel/HBoxContainer/Language"] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -101,21 +97,54 @@ grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("2_nfbe6") -[node name="Tunnel" type="TextureRect" parent="MarginContainer/VBoxContainer/HBoxContainer/TextureRect/HBoxContainer"] +[node name="Tunnel" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer/MoreOptionPanel/HBoxContainer"] layout_mode = 2 size_flags_horizontal = 3 -size_flags_vertical = 4 -texture = ExtResource("3_2tet8") -stretch_mode = 5 +flat = true +script = ExtResource("3_8cofn") +TextureNormal = ExtResource("3_2tet8") +TextureSelected = ExtResource("6_vioyi") -[node name="TextureRect3" type="TextureRect" parent="MarginContainer/VBoxContainer/HBoxContainer/TextureRect/HBoxContainer"] +[node name="TextureRect" type="TextureRect" parent="MarginContainer/VBoxContainer/HBoxContainer/MoreOptionPanel/HBoxContainer/Tunnel"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -20.0 +offset_top = -20.0 +offset_right = 20.0 +offset_bottom = 20.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("3_2tet8") + +[node name="ADView" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer/MoreOptionPanel/HBoxContainer"] layout_mode = 2 size_flags_horizontal = 3 -size_flags_vertical = 4 +flat = true +script = ExtResource("3_8cofn") +TextureNormal = ExtResource("4_dco67") +TextureSelected = ExtResource("8_ahwag") + +[node name="TextureRect" type="TextureRect" parent="MarginContainer/VBoxContainer/HBoxContainer/MoreOptionPanel/HBoxContainer/ADView"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -20.0 +offset_top = -20.0 +offset_right = 20.0 +offset_bottom = 20.0 +grow_horizontal = 2 +grow_vertical = 2 texture = ExtResource("4_dco67") -stretch_mode = 5 [node name="MoreOption" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer"] +unique_name_in_owner = true custom_minimum_size = Vector2(39, 0) layout_mode = 2 size_flags_horizontal = 4 @@ -139,23 +168,152 @@ layout_mode = 2 size_flags_vertical = 3 theme_override_constants/separation = 68 -[node name="TextureRect" type="TextureRect" parent="MarginContainer/VBoxContainer/HBoxContainer2"] +[node name="StationView" parent="MarginContainer/VBoxContainer/HBoxContainer2" instance=ExtResource("12_ltcn0")] layout_mode = 2 -texture = ExtResource("4_d7o7v") -[node name="Path2D" type="Path2D" parent="MarginContainer/VBoxContainer/HBoxContainer2/TextureRect"] -curve = SubResource("Curve2D_weg51") - -[node name="Panel" type="Panel" parent="MarginContainer/VBoxContainer/HBoxContainer2"] +[node name="StatePanel" type="Panel" parent="MarginContainer/VBoxContainer/HBoxContainer2"] custom_minimum_size = Vector2(1346, 0) layout_mode = 2 -theme_override_styles/panel = SubResource("StyleBoxFlat_sbyit") +size_flags_horizontal = 3 -[node name="Panel2" type="Panel" parent="MarginContainer/VBoxContainer/HBoxContainer2"] +[node name="StateView" type="Control" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView"] +layout_mode = 0 +offset_left = 50.5 +offset_top = 77.5 +offset_right = 393.5 +offset_bottom = 375.5 +theme_override_constants/separation = 20 + +[node name="Time" type="TextureRect" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer"] +layout_mode = 2 +texture = ExtResource("12_bp84h") + +[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer/Time"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 30 +theme_override_constants/margin_right = 30 + +[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer/Time/MarginContainer"] +layout_mode = 2 + +[node name="Time" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer/Time/MarginContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +theme_override_colors/font_color = Color(0.952941, 0.952941, 0.952941, 1) +theme_override_font_sizes/font_size = 36 +text = "16:40" + +[node name="Date" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer/Time/MarginContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +theme_override_colors/font_color = Color(0.952941, 0.952941, 0.952941, 1) +theme_override_font_sizes/font_size = 36 +text = "11月5日" +horizontal_alignment = 2 + +[node name="Speed" type="TextureRect" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer"] +layout_mode = 2 +texture = ExtResource("13_ko5d5") + +[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer/Speed"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_top = 30 +theme_override_constants/margin_bottom = 30 + +[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer/Speed/MarginContainer"] +layout_mode = 2 +theme_override_constants/separation = 0 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer/Speed/MarginContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer/Speed/MarginContainer/HBoxContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_colors/font_color = Color(0.584314, 0.584314, 0.584314, 1) +theme_override_font_sizes/font_size = 28 +text = "时速" +horizontal_alignment = 1 + +[node name="Label3" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer/Speed/MarginContainer/HBoxContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_colors/font_color = Color(0.952941, 0.952941, 0.952941, 1) +theme_override_font_sizes/font_size = 40 +text = "40 +" +horizontal_alignment = 1 +vertical_alignment = 2 + +[node name="Label2" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer/Speed/MarginContainer/HBoxContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_colors/font_color = Color(0.584314, 0.584314, 0.584314, 1) +theme_override_font_sizes/font_size = 28 +text = "km/h" +horizontal_alignment = 1 +vertical_alignment = 2 + +[node name="VBoxContainer2" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer/Speed/MarginContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer/Speed/MarginContainer/HBoxContainer/VBoxContainer2"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_colors/font_color = Color(0.584314, 0.584314, 0.584314, 1) +theme_override_font_sizes/font_size = 28 +text = "安全带" +horizontal_alignment = 1 + +[node name="SafetyBeltTexture" type="TextureRect" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer/Speed/MarginContainer/HBoxContainer/VBoxContainer2"] +layout_mode = 2 +size_flags_vertical = 3 +texture = ExtResource("14_1xl0y") +expand_mode = 1 +stretch_mode = 5 + +[node name="SafetyBeltText" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel/StateView/VBoxContainer/Speed/MarginContainer/HBoxContainer/VBoxContainer2"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_colors/font_color = Color(0.584314, 0.584314, 0.584314, 1) +theme_override_font_sizes/font_size = 28 +text = "已系好" +horizontal_alignment = 1 +vertical_alignment = 2 + +[node name="LanguagePanelHorizontal" parent="MarginContainer/VBoxContainer/HBoxContainer2/StatePanel" instance=ExtResource("12_g3kjd")] +visible = false +layout_mode = 1 + +[node name="ADPanel" type="Panel" parent="MarginContainer/VBoxContainer/HBoxContainer2"] custom_minimum_size = Vector2(1426, 0) layout_mode = 2 -[node name="LanguagePanel" type="Control" parent="MarginContainer/VBoxContainer/HBoxContainer2/Panel2"] +[node name="LanguageVertical" parent="MarginContainer/VBoxContainer/HBoxContainer2/ADPanel" instance=ExtResource("13_ec1yh")] +visible = false +layout_mode = 1 + +[node name="TunnelPanel" type="Control" parent="MarginContainer/VBoxContainer/HBoxContainer2/ADPanel"] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -163,45 +321,6 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -[node name="mask" type="TextureRect" parent="MarginContainer/VBoxContainer/HBoxContainer2/Panel2/LanguagePanel"] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -texture = ExtResource("5_6mape") - -[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer2/Panel2/LanguagePanel"] -layout_mode = 1 -anchors_preset = 8 -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -offset_left = -20.0 -offset_top = -20.0 -offset_right = 20.0 -offset_bottom = 20.0 -grow_horizontal = 2 -grow_vertical = 2 -theme_override_constants/separation = 37 - -[node name="Button" parent="MarginContainer/VBoxContainer/HBoxContainer2/Panel2/LanguagePanel/VBoxContainer" instance=ExtResource("11_d1sdq")] -layout_mode = 2 -IconTextureNormal = ExtResource("12_drwbu") -IconTextureSelected = ExtResource("13_n2aax") -Text = "English" - -[node name="Button2" parent="MarginContainer/VBoxContainer/HBoxContainer2/Panel2/LanguagePanel/VBoxContainer" instance=ExtResource("11_d1sdq")] -layout_mode = 2 - -[node name="Button3" parent="MarginContainer/VBoxContainer/HBoxContainer2/Panel2/LanguagePanel/VBoxContainer" instance=ExtResource("11_d1sdq")] -layout_mode = 2 -IconTextureNormal = ExtResource("14_5xi5c") -IconTextureSelected = ExtResource("15_nay10") -Text = "日本語" - [node name="TextureRect" type="TextureRect" parent="."] visible = false modulate = Color(1, 1, 1, 0.345098) @@ -212,3 +331,5 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("3_kegs1") + +[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/MoreOption" to="." method="_on_more_option_pressed"]