diff options
Diffstat (limited to 'apworld/client/settings_screen.gd')
| -rw-r--r-- | apworld/client/settings_screen.gd | 153 |
1 files changed, 153 insertions, 0 deletions
| diff --git a/apworld/client/settings_screen.gd b/apworld/client/settings_screen.gd new file mode 100644 index 0000000..b430b17 --- /dev/null +++ b/apworld/client/settings_screen.gd | |||
| @@ -0,0 +1,153 @@ | |||
| 1 | extends Node | ||
| 2 | |||
| 3 | |||
| 4 | func _ready(): | ||
| 5 | var theme = preload("res://assets/themes/baseUI.tres") | ||
| 6 | |||
| 7 | var simple_style_box = StyleBoxFlat.new() | ||
| 8 | simple_style_box.bg_color = Color(0, 0, 0, 0) | ||
| 9 | |||
| 10 | var panel = Panel.new() | ||
| 11 | panel.name = "Panel" | ||
| 12 | panel.offset_right = 1920.0 | ||
| 13 | panel.offset_bottom = 1080.0 | ||
| 14 | add_child(panel) | ||
| 15 | |||
| 16 | var title = Label.new() | ||
| 17 | title.name = "title" | ||
| 18 | title.offset_left = 0.0 | ||
| 19 | title.offset_top = 75.0 | ||
| 20 | title.offset_right = 1920.0 | ||
| 21 | title.offset_bottom = 225.0 | ||
| 22 | title.text = "ARCHIPELAGO" | ||
| 23 | title.vertical_alignment = VERTICAL_ALIGNMENT_CENTER | ||
| 24 | title.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER | ||
| 25 | title.theme = theme | ||
| 26 | panel.add_child(title) | ||
| 27 | |||
| 28 | var connect_button = Button.new() | ||
| 29 | connect_button.name = "connect_button" | ||
| 30 | connect_button.offset_left = 255.0 | ||
| 31 | connect_button.offset_top = 875.0 | ||
| 32 | connect_button.offset_right = 891.0 | ||
| 33 | connect_button.offset_bottom = 1025.0 | ||
| 34 | connect_button.add_theme_color_override("font_color_hover", Color(1, 0.501961, 0, 1)) | ||
| 35 | connect_button.text = "CONNECT" | ||
| 36 | connect_button.theme = theme | ||
| 37 | panel.add_child(connect_button) | ||
| 38 | |||
| 39 | var quit_button = Button.new() | ||
| 40 | quit_button.name = "quit_button" | ||
| 41 | quit_button.offset_left = 1102.0 | ||
| 42 | quit_button.offset_top = 875.0 | ||
| 43 | quit_button.offset_right = 1738.0 | ||
| 44 | quit_button.offset_bottom = 1025.0 | ||
| 45 | quit_button.add_theme_color_override("font_color_hover", Color(1, 0, 0, 1)) | ||
| 46 | quit_button.text = "QUIT" | ||
| 47 | quit_button.theme = theme | ||
| 48 | panel.add_child(quit_button) | ||
| 49 | |||
| 50 | var credit2 = Label.new() | ||
| 51 | credit2.name = "credit2" | ||
| 52 | credit2.offset_left = -105.0 | ||
| 53 | credit2.offset_top = 346.0 | ||
| 54 | credit2.offset_right = 485.0 | ||
| 55 | credit2.offset_bottom = 410.0 | ||
| 56 | credit2.add_theme_stylebox_override("normal", simple_style_box) | ||
| 57 | credit2.text = "SERVER" | ||
| 58 | credit2.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT | ||
| 59 | credit2.theme = theme | ||
| 60 | panel.add_child(credit2) | ||
| 61 | |||
| 62 | var credit3 = Label.new() | ||
| 63 | credit3.name = "credit3" | ||
| 64 | credit3.offset_left = -105.0 | ||
| 65 | credit3.offset_top = 519.0 | ||
| 66 | credit3.offset_right = 485.0 | ||
| 67 | credit3.offset_bottom = 583.0 | ||
| 68 | credit3.add_theme_stylebox_override("normal", simple_style_box) | ||
| 69 | credit3.text = "PLAYER" | ||
| 70 | credit3.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT | ||
| 71 | credit3.theme = theme | ||
| 72 | panel.add_child(credit3) | ||
| 73 | |||
| 74 | var credit4 = Label.new() | ||
| 75 | credit4.name = "credit4" | ||
| 76 | credit4.offset_left = -105.0 | ||
| 77 | credit4.offset_top = 704.0 | ||
| 78 | credit4.offset_right = 485.0 | ||
| 79 | credit4.offset_bottom = 768.0 | ||
| 80 | credit4.add_theme_stylebox_override("normal", simple_style_box) | ||
| 81 | credit4.text = "PASSWORD" | ||
| 82 | credit4.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT | ||
| 83 | credit4.theme = theme | ||
| 84 | panel.add_child(credit4) | ||
| 85 | |||
| 86 | var credit5 = Label.new() | ||
| 87 | credit5.name = "credit5" | ||
| 88 | credit5.offset_left = 1239.0 | ||
| 89 | credit5.offset_top = 422.0 | ||
| 90 | credit5.offset_right = 1829.0 | ||
| 91 | credit5.offset_bottom = 486.0 | ||
| 92 | credit5.add_theme_stylebox_override("normal", simple_style_box) | ||
| 93 | credit5.text = "OPTIONS" | ||
| 94 | credit5.theme = theme | ||
| 95 | panel.add_child(credit5) | ||
| 96 | |||
| 97 | var server_box = LineEdit.new() | ||
| 98 | server_box.name = "server_box" | ||
| 99 | server_box.offset_left = 502.0 | ||
| 100 | server_box.offset_top = 295.0 | ||
| 101 | server_box.offset_right = 1144.0 | ||
| 102 | server_box.offset_bottom = 445.0 | ||
| 103 | server_box.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER | ||
| 104 | server_box.caret_blink = true | ||
| 105 | panel.add_child(server_box) | ||
| 106 | |||
| 107 | var player_box = LineEdit.new() | ||
| 108 | player_box.name = "player_box" | ||
| 109 | player_box.offset_left = 502.0 | ||
| 110 | player_box.offset_top = 477.0 | ||
| 111 | player_box.offset_right = 1144.0 | ||
| 112 | player_box.offset_bottom = 627.0 | ||
| 113 | player_box.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER | ||
| 114 | player_box.caret_blink = true | ||
| 115 | panel.add_child(player_box) | ||
| 116 | |||
| 117 | var password_box = LineEdit.new() | ||
| 118 | password_box.name = "password_box" | ||
| 119 | password_box.offset_left = 502.0 | ||
| 120 | password_box.offset_top = 659.0 | ||
| 121 | password_box.offset_right = 1144.0 | ||
| 122 | password_box.offset_bottom = 809.0 | ||
| 123 | password_box.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER | ||
| 124 | password_box.caret_blink = true | ||
| 125 | panel.add_child(password_box) | ||
| 126 | |||
| 127 | var accept_dialog = AcceptDialog.new() | ||
| 128 | accept_dialog.name = "AcceptDialog" | ||
| 129 | accept_dialog.offset_right = 83.0 | ||
| 130 | accept_dialog.offset_bottom = 58.0 | ||
| 131 | panel.add_child(accept_dialog) | ||
| 132 | |||
| 133 | var version_mismatch = ConfirmationDialog.new() | ||
| 134 | version_mismatch.name = "VersionMismatch" | ||
| 135 | version_mismatch.offset_right = 83.0 | ||
| 136 | version_mismatch.offset_bottom = 58.0 | ||
| 137 | panel.add_child(version_mismatch) | ||
| 138 | |||
| 139 | var connection_history = MenuButton.new() | ||
| 140 | connection_history.name = "connection_history" | ||
| 141 | connection_history.offset_left = 1239.0 | ||
| 142 | connection_history.offset_top = 276.0 | ||
| 143 | connection_history.offset_right = 1829.0 | ||
| 144 | connection_history.offset_bottom = 372.0 | ||
| 145 | connection_history.text = "connection history" | ||
| 146 | connection_history.flat = false | ||
| 147 | panel.add_child(connection_history) | ||
| 148 | |||
| 149 | var runtime = global.get_node("Runtime") | ||
| 150 | var main_script = runtime.load_script("main.gd") | ||
| 151 | var main_node = main_script.new() | ||
| 152 | main_node.name = "Main" | ||
| 153 | add_child(main_node) | ||
