about summary refs log tree commit diff stats
path: root/client/archipelago.tscn
diff options
context:
space:
mode:
Diffstat (limited to 'client/archipelago.tscn')
-rw-r--r--client/archipelago.tscn281
1 files changed, 136 insertions, 145 deletions
diff --git a/client/archipelago.tscn b/client/archipelago.tscn index 40dd46f..1c156a3 100644 --- a/client/archipelago.tscn +++ b/client/archipelago.tscn
@@ -1,162 +1,153 @@
1[gd_scene load_steps=11 format=2] 1[gd_scene load_steps=3 format=3 uid="uid://b5mj3cq2bcesd"]
2 2
3[ext_resource path="user://maps/Archipelago/settings_buttons.gd" type="Script" id=4] 3[ext_resource type="Theme" uid="uid://7w454egydi41" path="res://assets/themes/baseUI.tres" id="1_mw3f1"]
4[ext_resource path="user://maps/Archipelago/settings_screen.gd" type="Script" id=5] 4
5[ext_resource path="res://images/unchecked.png" type="Texture" id=7] 5[sub_resource id=2 type="GDScript"]
6[ext_resource path="res://images/checked.png" type="Texture" id=8] 6script/source = "extends Node2D
7[ext_resource type="Theme" uid="uid://7w454egydi41" path="res://assets/themes/baseUI.tres" id="2_g4bvn"] 7
8 8const CACHE_PATH = \"user://apworld_path.txt\"
9[sub_resource type="StyleBoxFlat" id=1] 9
10bg_color = Color( 0, 0, 0, 0 ) 10
11 11func _ready():
12[sub_resource type="StyleBoxFlat" id=2] 12 if FileAccess.file_exists(CACHE_PATH):
13bg_color = Color( 1, 1, 1, 1 ) 13 var file = FileAccess.open(CACHE_PATH, FileAccess.READ)
14border_width_left = 1 14 $Panel/HBoxContainer/LineEdit.text = file.get_as_text()
15border_width_top = 1 15 file.close()
16border_width_right = 1 16
17border_width_bottom = 1 17
18border_color = Color( 1, 1, 0, 1 ) 18func _browse_pressed():
19border_blend = true 19 $FileDialog.popup_centered()
20corner_radius_top_left = 3 20
21corner_radius_top_right = 3 21
22corner_radius_bottom_right = 3 22func _file_selected(path):
23corner_radius_bottom_left = 3 23 $Panel/HBoxContainer/LineEdit.text = path
24expand_offset_left = 5.0 24
25expand_offset_right = 5.0 25
26expand_offset_top = 5.0 26func _start_pressed():
27expand_offset_bottom = 5.0 27 var apworld_path = $Panel/HBoxContainer/LineEdit.text
28 28
29[node name="settings_screen" type="Node2D"] 29 if not FileAccess.file_exists(apworld_path):
30script = ExtResource( 5 ) 30 $AcceptDialog.popup_centered()
31 return
32
33 var zip_reader = ZIPReader.new()
34 zip_reader.open(apworld_path)
35
36 var inner_path = \"lingo2/client/apworld_runtime.gd\"
37 if not zip_reader.file_exists(inner_path):
38 zip_reader.close()
39 $AcceptDialog.popup_centered()
40 return
41
42 var cache_file = FileAccess.open(CACHE_PATH, FileAccess.WRITE)
43 cache_file.store_string(apworld_path)
44 cache_file.close()
45
46 var runtime_script = GDScript.new()
47 runtime_script.source_code = zip_reader.read_file(inner_path).get_string_from_utf8()
48 runtime_script.reload()
49
50 zip_reader.close()
51
52 var runtime = runtime_script.new(apworld_path)
53 runtime.name = \"Runtime\"
54
55 global.add_child(runtime)
56
57 runtime.load_script_as_scene.call_deferred(\"settings_screen.gd\", \"settings_screen\")
58
59
60func _quit_pressed():
61 get_tree().change_scene_to_file(\"res://objects/scenes/menus/main_menu.tscn\")
62
63"
64
65[node name="Node2D" type="Node2D"]
66script = SubResource( 2 )
31 67
32[node name="Panel" type="Panel" parent="."] 68[node name="Panel" type="Panel" parent="."]
69anchors_preset = -1
33offset_right = 1920.0 70offset_right = 1920.0
34offset_bottom = 1080.0 71offset_bottom = 1080.0
35 72
36[node name="title" parent="Panel" type="Label"] 73[node name="Label" type="Label" parent="Panel"]
37offset_left = 0.0 74layout_mode = 1
75anchors_preset = -1
38offset_top = 75.0 76offset_top = 75.0
39offset_right = 1920.0 77offset_right = 1920.0
40offset_bottom = 225.0 78offset_bottom = 225.0
41text = "ARCHIPELAGO" 79theme = ExtResource("1_mw3f1")
42valign = 1 80text = "archipelago"
43theme = ExtResource("2_g4bvn") 81horizontal_alignment = 1
44 82vertical_alignment = 1
45[node name="credit" parent="Panel" type="Label"] 83
46visible = false 84[node name="Label2" type="Label" parent="Panel"]
47offset_left = 1278.0 85layout_mode = 1
48offset_top = 974.0 86anchors_preset = -1
49offset_right = 1868.0 87anchor_right = 1.0
50offset_bottom = 1034.0 88offset_left = 80.0
51text = "Brenton Wildes" 89offset_top = 300.0
52theme = ExtResource("2_g4bvn") 90offset_right = -80.0
53 91offset_bottom = 388.0
54[node name="connect_button" parent="Panel" type="Button"] 92theme = ExtResource("1_mw3f1")
93theme_override_font_sizes/font_size = 56
94text = "Put the path to your lingo2.apworld in the below field and click start. Then, open the archipelago launcher and click \"Lingo 2 Client\"."
95horizontal_alignment = 1
96autowrap_mode = 3
97
98[node name="HBoxContainer" type="HBoxContainer" parent="Panel"]
99layout_mode = 1
100anchors_preset = -1
101anchor_right = 1.0
102offset_left = 80.0
103offset_top = 595.0
104offset_right = -80.0
105offset_bottom = 755.0
106theme_override_constants/separation = 32
107
108[node name="LineEdit" type="LineEdit" parent="Panel/HBoxContainer"]
109layout_mode = 2
110size_flags_horizontal = 3
111
112[node name="Button" type="Button" parent="Panel/HBoxContainer"]
113layout_mode = 2
114theme = ExtResource("1_mw3f1")
115text = "browse"
116
117[node name="StartButton" type="Button" parent="Panel"]
118layout_mode = 1
119anchors_preset = -1
55offset_left = 255.0 120offset_left = 255.0
56offset_top = 875.0 121offset_top = 875.0
57offset_right = 891.0 122offset_right = 891.0
58offset_bottom = 1025.0 123offset_bottom = 1025.0
59custom_colors/font_color_hover = Color( 1, 0.501961, 0, 1 ) 124theme = ExtResource("1_mw3f1")
60text = "CONNECT" 125text = "start"
61theme = ExtResource("2_g4bvn")
62script = ExtResource( 4 )
63 126
64[node name="quit_button" parent="Panel" type="Button"] 127[node name="QuitButton" type="Button" parent="Panel"]
128layout_mode = 1
129anchors_preset = -1
65offset_left = 1102.0 130offset_left = 1102.0
66offset_top = 875.0 131offset_top = 875.0
67offset_right = 1738.0 132offset_right = 1738.0
68offset_bottom = 1025.0 133offset_bottom = 1025.0
69custom_colors/font_color_hover = Color( 1, 0, 0, 1 ) 134theme = ExtResource("1_mw3f1")
70text = "BACK" 135text = "back"
71theme = ExtResource("2_g4bvn") 136
72script = ExtResource( 4 ) 137[node name="FileDialog" type="FileDialog" parent="."]
73 138title = "Open a File"
74[node name="credit2" parent="Panel" type="Label"] 139size = Vector2i(512, 512)
75offset_left = -105.0 140ok_button_text = "Open"
76offset_top = 346.0 141file_mode = 0
77offset_right = 485.0 142access = 2
78offset_bottom = 410.0 143filters = PackedStringArray("*.apworld;Archipelago Worlds")
79custom_styles/normal = SubResource( 1 ) 144show_hidden_files = true
80text = "SERVER" 145use_native_dialog = true
81align = 2 146
82theme = ExtResource("2_g4bvn") 147[node name="AcceptDialog" type="AcceptDialog" parent="."]
83 148dialog_text = "Could not open Lingo 2 apworld. Please check that the path is correct."
84[node name="credit5" parent="Panel" type="Label"] 149
85offset_left = 1239.0 150[connection signal="pressed" from="Panel/HBoxContainer/Button" to="." method="_browse_pressed"]
86offset_top = 422.0 151[connection signal="pressed" from="Panel/StartButton" to="." method="_start_pressed"]
87offset_right = 1829.0 152[connection signal="pressed" from="Panel/QuitButton" to="." method="_quit_pressed"]
88offset_bottom = 486.0 153[connection signal="file_selected" from="FileDialog" to="." method="_file_selected"]
89custom_styles/normal = SubResource( 1 )
90text = "OPTIONS"
91theme = ExtResource("2_g4bvn")
92
93[node name="credit3" parent="Panel" type="Label"]
94offset_left = -105.0
95offset_top = 519.0
96offset_right = 485.0
97offset_bottom = 583.0
98custom_styles/normal = SubResource( 1 )
99text = "PLAYER"
100align = 2
101theme = ExtResource("2_g4bvn")
102
103[node name="credit4" parent="Panel" type="Label"]
104offset_left = -105.0
105offset_top = 704.0
106offset_right = 485.0
107offset_bottom = 768.0
108custom_styles/normal = SubResource( 1 )
109text = "PASSWORD"
110align = 2
111theme = ExtResource("2_g4bvn")
112
113[node name="server_box" type="LineEdit" parent="Panel"]
114offset_left = 502.0
115offset_top = 295.0
116offset_right = 1144.0
117offset_bottom = 445.0
118custom_colors/selection_color = Color( 0.482353, 0, 0, 1 )
119custom_colors/cursor_color = Color( 0, 0, 0, 1 )
120custom_colors/font_color = Color( 0, 0, 0, 1 )
121custom_styles/focus = SubResource( 2 )
122align = 1
123caret_blink = true
124
125[node name="player_box" type="LineEdit" parent="Panel"]
126offset_left = 502.0
127offset_top = 477.0
128offset_right = 1144.0
129offset_bottom = 627.0
130custom_colors/selection_color = Color( 0.482353, 0, 0, 1 )
131custom_colors/cursor_color = Color( 0, 0, 0, 1 )
132custom_colors/font_color = Color( 0, 0, 0, 1 )
133custom_styles/focus = SubResource( 2 )
134align = 1
135caret_blink = true
136
137[node name="password_box" type="LineEdit" parent="Panel"]
138offset_left = 502.0
139offset_top = 659.0
140offset_right = 1144.0
141offset_bottom = 809.0
142custom_colors/selection_color = Color( 0.482353, 0, 0, 1 )
143custom_colors/cursor_color = Color( 0, 0, 0, 1 )
144custom_colors/font_color = Color( 0, 0, 0, 1 )
145custom_styles/focus = SubResource( 2 )
146align = 1
147caret_blink = true
148
149[node name="AcceptDialog" type="AcceptDialog" parent="Panel"]
150offset_right = 83.0
151offset_bottom = 58.0
152
153[node name="connection_history" type="MenuButton" parent="Panel"]
154offset_left = 1239.0
155offset_top = 276.0
156offset_right = 1829.0
157offset_bottom = 372.0
158text = "connection history"
159flat = false
160
161[connection signal="pressed" from="Panel/connect_button" to="Panel/connect_button" method="_connect_pressed"]
162[connection signal="pressed" from="Panel/quit_button" to="Panel/quit_button" method="_back_pressed"]