diff options
| author | Anson Bridges <bridges.anson@gmail.com> | 2022-09-07 14:16:17 -0400 |
|---|---|---|
| committer | Anson Bridges <bridges.anson@gmail.com> | 2022-09-07 14:16:17 -0400 |
| commit | 366761197034a20d444282431e4a8edeb7882840 (patch) | |
| tree | 63d7b11eccbb499aef8f5afc3634945c63c14ff5 /ui | |
| parent | c232b92e2dde1277324d1f89d0e75ae641e4ac3b (diff) | |
whoops, fixed reorg
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/HUD.gd | 85 | ||||
| -rw-r--r-- | ui/HUD.tscn | 221 | ||||
| -rw-r--r-- | ui/MainMenu.gd | 61 | ||||
| -rw-r--r-- | ui/MainMenu.tscn | 44 | ||||
| -rw-r--r-- | ui/clientmenu/ClientUI.gd | 59 | ||||
| -rw-r--r-- | ui/clientmenu/ClientUI.tscn | 45 | ||||
| -rw-r--r-- | ui/servermenu/CmdPrompt.gd | 26 | ||||
| -rw-r--r-- | ui/servermenu/Console.gd | 14 | ||||
| -rw-r--r-- | ui/servermenu/ServerUI.gd | 43 | ||||
| -rw-r--r-- | ui/servermenu/ServerUI.tscn | 108 |
10 files changed, 0 insertions, 706 deletions
diff --git a/ui/HUD.gd b/ui/HUD.gd deleted file mode 100644 index 9bbcae1..0000000 --- a/ui/HUD.gd +++ /dev/null @@ -1,85 +0,0 @@ -extends Control - - -var world -onready var character_list = $CharacterSelect/VBoxContainer - -# Called when the node enters the scene tree for the first time. -func _ready(): - world = get_tree().get_root().get_node("GAMEWORLD") - -func _input(_event): - if Input.is_action_just_pressed("menu"): #toggle mouse capture on esc - $ServerJoinMenu.visible = false - $CharacterSelect.visible = false - $ChatPrompt.visible = false - $HUDAnim.play("close_chat") - world.is_chatting = false - Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) - if Input.is_action_just_pressed("server_menu"): - world.is_chatting = true - $CharacterSelect.visible = false - $ServerJoinMenu.visible = true - Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) - if Input.is_action_just_pressed("game_menu"): - update_characters() - world.is_chatting = true - $ServerJoinMenu.visible = false - $CharacterSelect.visible = true - Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) - if Input.is_action_just_pressed("chat") and !$ChatPrompt.visible: - world.is_chatting = true - Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) - $Chat.visible = true - $ChatPrompt.visible = true - $ChatPrompt.grab_focus() - yield(get_tree(), "idle_frame") - $ChatPrompt.text = "" - -func send_chat_msg(txt): - world.is_chatting = false - world.rpc_id(1, "_call_on_server", "_send_chat", {"id" : world.client_id, "msg" : txt}) - $ChatPrompt.visible = false - $ChatPrompt.text = "" - -func ui_chat_msg(msg): - $HUDAnim.stop() - $Chat.visible = true - var textlabel = Label.new() - textlabel.text = msg - textlabel.autowrap = true - textlabel.set_h_size_flags(SIZE_EXPAND_FILL) - $Chat/ChatLines.add_child(textlabel) - yield(get_tree().create_timer(0.05), "timeout") - $Chat.ensure_control_visible(textlabel) - $HUDAnim.play("close_chat") - Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) - -func ui_hide_chat(): - if !$ChatPrompt.visible: - $Chat.visible = false - -func ui_play_hitsound(): - $AudioCues/Hitsound.play() - -func ui_play_killsound(): - $AudioCues/Killsound.play() - -func update_characters(): - for btn in character_list.get_children(): - btn.queue_free() - for character in world.get_node("PLAYERS").get_children(): - if world.player_team == character.team: - var select_button = Button.new() - select_button.connect("pressed", world, "select_character", [character.name]) - select_button.text = character.name + " (" + str(character.get_network_master()) + ")" - character_list.add_child(select_button) - -func _ui_disconnect(): - get_tree().get_root().get_node("GAMEWORLD").client_disconnect() - -func ui_join_red(): - world.join_team("RED") - -func ui_join_blue(): - world.join_team("BLUE") diff --git a/ui/HUD.tscn b/ui/HUD.tscn deleted file mode 100644 index 5299b14..0000000 --- a/ui/HUD.tscn +++ /dev/null @@ -1,221 +0,0 @@ -[gd_scene load_steps=10 format=2] - -[ext_resource path="res://ui/HUD.gd" type="Script" id=1] -[ext_resource path="res://theming/FreeMono.otf" type="DynamicFontData" id=2] -[ext_resource path="res://sounds/hitsound.wav" type="AudioStream" id=3] -[ext_resource path="res://sounds/killsound.wav" type="AudioStream" id=4] - -[sub_resource type="DynamicFont" id=1] -size = 42 -outline_size = 2 -outline_color = Color( 0, 0, 0, 1 ) -font_data = ExtResource( 2 ) - -[sub_resource type="DynamicFont" id=2] -size = 18 -outline_size = 1 -outline_color = Color( 0, 0, 0, 1 ) -font_data = ExtResource( 2 ) - -[sub_resource type="DynamicFont" id=3] -font_data = ExtResource( 2 ) - -[sub_resource type="Animation" id=4] -resource_name = "close_chat" -length = 4.0 -tracks/0/type = "method" -tracks/0/path = NodePath(".") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/keys = { -"times": PoolRealArray( 4 ), -"transitions": PoolRealArray( 1 ), -"values": [ { -"args": [ ], -"method": "ui_hide_chat" -} ] -} - -[sub_resource type="DynamicFont" id=5] -size = 22 -outline_size = 1 -outline_color = Color( 0, 0, 0, 1 ) -font_data = ExtResource( 2 ) - -[node name="HUD" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -script = ExtResource( 1 ) - -[node name="Crosshair" type="Label" parent="."] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -text = "+" - -[node name="ServerJoinMenu" type="Control" parent="."] -visible = false -anchor_left = 0.15 -anchor_top = 0.15 -anchor_right = 0.85 -anchor_bottom = 1.0 - -[node name="ServerName" type="Label" parent="ServerJoinMenu"] -anchor_right = 1.0 -custom_fonts/font = SubResource( 1 ) -text = "SERVER NAME" -align = 1 - -[node name="MOTD" type="Label" parent="ServerJoinMenu"] -anchor_left = 0.05 -anchor_top = 0.073 -anchor_right = 0.95 -anchor_bottom = 0.266 -custom_fonts/font = SubResource( 2 ) -text = "This is where the MOTD goes." -align = 1 - -[node name="Team1Label" type="Label" parent="ServerJoinMenu"] -anchor_left = 0.05 -anchor_top = 0.266 -anchor_right = 0.05 -anchor_bottom = 0.275 -margin_right = 40.0 -margin_bottom = 14.0 -custom_fonts/font = SubResource( 3 ) -text = "RED TEAM:" - -[node name="Team1Players" type="Label" parent="ServerJoinMenu"] -anchor_left = 0.05 -anchor_top = 0.266 -anchor_right = 0.05 -anchor_bottom = 0.275 -margin_left = 86.56 -margin_top = 0.339996 -margin_right = 697.56 -margin_bottom = 33.75 -custom_fonts/font = SubResource( 3 ) -autowrap = true - -[node name="Team2Label" type="Label" parent="ServerJoinMenu"] -anchor_left = 0.05 -anchor_top = 0.266 -anchor_right = 0.05 -anchor_bottom = 0.275 -margin_left = -0.440002 -margin_top = 74.34 -margin_right = 69.56 -margin_bottom = 88.34 -custom_fonts/font = SubResource( 3 ) -text = "BLUE TEAM:" - -[node name="Team2Players" type="Label" parent="ServerJoinMenu"] -anchor_left = 0.05 -anchor_top = 0.266 -anchor_right = 0.05 -anchor_bottom = 0.275 -margin_left = 99.56 -margin_top = 74.34 -margin_right = 710.56 -margin_bottom = 105.75 -custom_fonts/font = SubResource( 3 ) -autowrap = true - -[node name="Spectators" type="Label" parent="ServerJoinMenu"] -anchor_left = 0.05 -anchor_top = 0.266 -anchor_right = 0.05 -anchor_bottom = 0.275 -margin_left = 26.56 -margin_top = 193.34 -margin_right = 637.56 -margin_bottom = 224.75 -custom_fonts/font = SubResource( 3 ) -autowrap = true - -[node name="JoinTeam1" type="Button" parent="ServerJoinMenu"] -margin_left = 52.4 -margin_top = 154.0 -margin_right = 87.4 -margin_bottom = 174.0 -text = "Join" - -[node name="JoinTeam2" type="Button" parent="ServerJoinMenu"] -margin_left = 52.4 -margin_top = 229.0 -margin_right = 87.4 -margin_bottom = 249.0 -text = "Join" - -[node name="Disconnect" type="Button" parent="ServerJoinMenu"] -margin_left = 35.0 -margin_top = 287.0 -margin_right = 149.0 -margin_bottom = 307.0 -text = "DISCONNECT" - -[node name="CharacterSelect" type="ScrollContainer" parent="."] -visible = false -margin_left = 82.0 -margin_top = 20.0 -margin_right = 298.0 -margin_bottom = 580.0 - -[node name="VBoxContainer" type="VBoxContainer" parent="CharacterSelect"] - -[node name="Chat" type="ScrollContainer" parent="."] -anchor_left = 0.018 -anchor_top = 0.651 -anchor_right = 0.23 -anchor_bottom = 0.834 -margin_left = -0.431999 -margin_top = 0.399994 -margin_right = 5.48 -margin_bottom = 0.600006 -follow_focus = true -scroll_horizontal_enabled = false - -[node name="ChatLines" type="VBoxContainer" parent="Chat"] -margin_right = 223.0 -margin_bottom = 110.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 - -[node name="ChatPrompt" type="LineEdit" parent="."] -visible = false -margin_left = 12.0 -margin_top = 519.0 -margin_right = 241.0 -margin_bottom = 543.0 - -[node name="HUDAnim" type="AnimationPlayer" parent="."] -anims/close_chat = SubResource( 4 ) - -[node name="Health" type="Label" parent="."] -anchor_left = 0.018 -anchor_top = 0.954 -anchor_right = 0.129 -anchor_bottom = 0.972 -margin_left = -1.432 -margin_top = -8.40002 -margin_right = -1.43199 -margin_bottom = 3.79999 -custom_fonts/font = SubResource( 5 ) - -[node name="AudioCues" type="Node" parent="."] - -[node name="Hitsound" type="AudioStreamPlayer" parent="AudioCues"] -stream = ExtResource( 3 ) -volume_db = 5.244 - -[node name="Killsound" type="AudioStreamPlayer" parent="AudioCues"] -stream = ExtResource( 4 ) -volume_db = 5.244 - -[connection signal="pressed" from="ServerJoinMenu/JoinTeam1" to="." method="ui_join_red"] -[connection signal="pressed" from="ServerJoinMenu/JoinTeam2" to="." method="ui_join_blue"] -[connection signal="pressed" from="ServerJoinMenu/Disconnect" to="." method="_ui_disconnect"] -[connection signal="text_entered" from="ChatPrompt" to="." method="send_chat_msg"] diff --git a/ui/MainMenu.gd b/ui/MainMenu.gd deleted file mode 100644 index 075789e..0000000 --- a/ui/MainMenu.gd +++ /dev/null @@ -1,61 +0,0 @@ -extends Node2D - -var client : NetworkedMultiplayerENet -var world -var local_server_tree = null - -func _ready(): - world = preload("res://scenes/GameBase.tscn").instance() - #get_tree().connect("network_peer_connected", self, "_player_connected") - #get_tree().connect("network_peer_disconnected", self, "_player_disconnected") - get_tree().connect("connected_to_server", self, "_local_connection_successful") - get_tree().connect("connection_failed", self, "_connected_fail") - get_tree().connect("server_disconnected", world, "_connection_lost") - set_process(false) - set_physics_process(false) - -func to_host_menu(): - var host_menu = preload("res://ui/servermenu/ServerUI.tscn").instance() - get_tree().get_root().add_child(host_menu) - queue_free() - -func to_join_menu(): - var client_menu = preload("res://ui/clientmenu/ClientUI.tscn").instance() - get_tree().get_root().add_child(client_menu) - queue_free() - -func run_local_server(): - local_server_tree = SceneTree.new() - local_server_tree.init() - local_server_tree.get_root().set_update_mode(Viewport.UPDATE_DISABLED) - var server_script = preload("res://scenes/Server.tscn").instance() - - #CHANGE LEVEL HERE - server_script.start_server("Local Server", "Local Singleplayer Server", 3, "res://maps/Main.tscn", "127.0.0.1", 25565, local_server_tree, null, "print") - set_process(true) - set_physics_process(true) - client = NetworkedMultiplayerENet.new() - client.create_client("127.0.0.1", 25565) - get_tree().set_network_peer(client) - -func _local_connection_failed(): - pass - -func _local_connection_successful(): - get_tree().get_root().add_child(world) - world.client = client - world.client_id = get_tree().get_network_unique_id() - world.player_name = "Player" - world.is_local = true - world.local_server_tree = local_server_tree - print("Connected to local server.") - queue_free() - -func _process(delta): - local_server_tree.idle(delta) - -func _physics_process(delta): - local_server_tree.iteration(delta) - -func quit_game(): - get_tree().quit() diff --git a/ui/MainMenu.tscn b/ui/MainMenu.tscn deleted file mode 100644 index 4cd993a..0000000 --- a/ui/MainMenu.tscn +++ /dev/null @@ -1,44 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://theming/menu_font.tres" type="DynamicFont" id=1] -[ext_resource path="res://ui/MainMenu.gd" type="Script" id=2] - -[node name="MainMenu" type="Node2D"] -script = ExtResource( 2 ) - -[node name="HostButton" type="Button" parent="."] -margin_left = 83.0 -margin_top = 73.0 -margin_right = 236.0 -margin_bottom = 109.0 -custom_fonts/font = ExtResource( 1 ) -text = "Host Server" - -[node name="JoinButton" type="Button" parent="."] -margin_left = 84.0 -margin_top = 121.0 -margin_right = 235.0 -margin_bottom = 157.0 -custom_fonts/font = ExtResource( 1 ) -text = "Join Server" - -[node name="LocalButton" type="Button" parent="."] -margin_left = 84.0 -margin_top = 168.0 -margin_right = 235.0 -margin_bottom = 204.0 -custom_fonts/font = ExtResource( 1 ) -text = "Local Server" - -[node name="QuitButton" type="Button" parent="."] -margin_left = 117.0 -margin_top = 226.0 -margin_right = 192.0 -margin_bottom = 246.0 -custom_fonts/font = ExtResource( 1 ) -text = "QUIT" - -[connection signal="pressed" from="HostButton" to="." method="to_host_menu"] -[connection signal="pressed" from="JoinButton" to="." method="to_join_menu"] -[connection signal="pressed" from="LocalButton" to="." method="run_local_server"] -[connection signal="pressed" from="QuitButton" to="." method="quit_game"] diff --git a/ui/clientmenu/ClientUI.gd b/ui/clientmenu/ClientUI.gd deleted file mode 100644 index 8b9fbcc..0000000 --- a/ui/clientmenu/ClientUI.gd +++ /dev/null @@ -1,59 +0,0 @@ -extends Node2D - -var client : NetworkedMultiplayerENet -var world -var local_server_tree = null -var is_local = false - -func _ready(): - world = preload("res://scenes/GameBase.tscn").instance() - #get_tree().connect("network_peer_connected", self, "_player_connected") - #get_tree().connect("network_peer_disconnected", self, "_player_disconnected") - get_tree().connect("connected_to_server", self, "_connection_successful") - get_tree().connect("connection_failed", self, "_connected_fail") - get_tree().connect("server_disconnected", world, "_connection_lost") - set_process(false) - set_physics_process(false) - -func _connect_btn(): - client = NetworkedMultiplayerENet.new() - client.create_client($IP.text, $Port.value) - - get_tree().set_network_peer(client) - -func _connection_successful(): - get_tree().get_root().add_child(world) - world.client = client - world.client_id = get_tree().get_network_unique_id() - world.player_name = $Name.text - if is_local: - world.is_local = true - world.local_server_tree = local_server_tree - print("Connected.") - queue_free() - -func _run_local_server(): - local_server_tree = SceneTree.new() - local_server_tree.init() - local_server_tree.get_root().set_update_mode(Viewport.UPDATE_DISABLED) - var server_script = preload("res://scenes/Server.tscn").instance() - - #CHANGE LEVEL HERE - server_script.start_server("Local Server", "Local Singleplayer Server", 3, "res://maps/Main.tscn", "127.0.0.1", 25565, local_server_tree, null, "print") - set_process(true) - set_physics_process(true) - is_local = true - client = NetworkedMultiplayerENet.new() - client.create_client("127.0.0.1", 25565) - get_tree().set_network_peer(client) - -func back_to_main(): - var main_menu = load("res://ui/MainMenu.tscn").instance() - get_tree().get_root().add_child(main_menu) - queue_free() - -func _process(delta): - local_server_tree.idle(delta) - -func _physics_process(delta): - local_server_tree.iteration(delta) diff --git a/ui/clientmenu/ClientUI.tscn b/ui/clientmenu/ClientUI.tscn deleted file mode 100644 index 6df552b..0000000 --- a/ui/clientmenu/ClientUI.tscn +++ /dev/null @@ -1,45 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://ui/clientmenu/ClientUI.gd" type="Script" id=1] - -[node name="ClientUI" type="Node2D"] -script = ExtResource( 1 ) - -[node name="IP" type="LineEdit" parent="."] -margin_left = 16.0 -margin_top = 64.0 -margin_right = 112.0 -margin_bottom = 88.0 -text = "127.0.0.1" - -[node name="Port" type="SpinBox" parent="."] -margin_left = 128.0 -margin_top = 64.0 -margin_right = 202.0 -margin_bottom = 88.0 -max_value = 65536.0 -value = 25565.0 - -[node name="Name" type="LineEdit" parent="."] -margin_left = 16.0 -margin_top = 96.0 -margin_right = 199.0 -margin_bottom = 120.0 -text = "PlayerName" - -[node name="ConnectButton" type="Button" parent="."] -margin_left = 16.0 -margin_top = 128.0 -margin_right = 202.0 -margin_bottom = 153.0 -text = "Connect" - -[node name="BackButton" type="Button" parent="."] -margin_left = 16.0 -margin_top = 16.0 -margin_right = 80.0 -margin_bottom = 36.0 -text = "Back" - -[connection signal="pressed" from="ConnectButton" to="." method="_connect_btn"] -[connection signal="pressed" from="BackButton" to="." method="back_to_main"] diff --git a/ui/servermenu/CmdPrompt.gd b/ui/servermenu/CmdPrompt.gd deleted file mode 100644 index 965631b..0000000 --- a/ui/servermenu/CmdPrompt.gd +++ /dev/null @@ -1,26 +0,0 @@ -extends LineEdit - -export var console_path := @""; onready var console := get_node(console_path) as ScrollContainer -var server_ref = null -var ui_ref = null - -func enter_cmd(new_text: String): - console.add_line(new_text) - text = "" - if new_text.substr(0,1) == "/": #PROCESS COMMAND - var end_ind = new_text.find(" ")-1 - if end_ind < -1: end_ind = -1 - var cmd : String = new_text.substr(1, end_ind) - var args = new_text.substr(end_ind+1, -1).split(" ", false) - - if cmd == "say": - if server_ref != null: - var m_args = {"name" : "SERVER", "msg" : args.join(" ")} - server_ref._send_chat(m_args) - elif cmd == "start": - if server_ref == null: - ui_ref.start_server() - elif cmd == "stop": - if server_ref != null: - ui_ref.stop_server() - diff --git a/ui/servermenu/Console.gd b/ui/servermenu/Console.gd deleted file mode 100644 index ac73525..0000000 --- a/ui/servermenu/Console.gd +++ /dev/null @@ -1,14 +0,0 @@ -extends ScrollContainer - -# Called when the node enters the scene tree for the first time. -func _ready(): - pass - -func add_line(text): - var lbl = Label.new() - lbl.autowrap = true - lbl.text = text - text = "" - $ConsoleLines.add_child(lbl) - yield(get_tree().create_timer(0.05), "timeout") - ensure_control_visible(lbl) diff --git a/ui/servermenu/ServerUI.gd b/ui/servermenu/ServerUI.gd deleted file mode 100644 index d065b21..0000000 --- a/ui/servermenu/ServerUI.gd +++ /dev/null @@ -1,43 +0,0 @@ -extends Node2D - - -var server -onready var console = get_node("Console") - -var is_running :bool = false - -func _ready(): - $CmdPrompt.ui_ref = self - -func hide_init_fields(): - for node in get_tree().get_nodes_in_group("init_fields"): - node.visible = false - $StopButton.visible = true - -func show_init_fields(): - for node in get_tree().get_nodes_in_group("init_fields"): - node.visible = true - $StopButton.visible = false - -func start_server(): - console.add_line("Server starting...") - is_running = true - - server = preload("res://scenes/Server.tscn").instance() - $CmdPrompt.server_ref = server - server.start_server($ServerName.text, $MOTD.text, $PlayerCount.value, $MapPath.text, $IP.text, $Port.value, get_tree(), console, "add_line") - - Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) - hide_init_fields() - -func stop_server(): - server.stop_server() - is_running = false - $CmdPrompt.server_ref = null - - show_init_fields() - -func back_to_main(): - var main_menu = load("res://ui/MainMenu.tscn").instance() - get_tree().get_root().add_child(main_menu) - queue_free() diff --git a/ui/servermenu/ServerUI.tscn b/ui/servermenu/ServerUI.tscn deleted file mode 100644 index f7ed009..0000000 --- a/ui/servermenu/ServerUI.tscn +++ /dev/null @@ -1,108 +0,0 @@ -[gd_scene load_steps=5 format=2] - -[ext_resource path="res://ui/servermenu/CmdPrompt.gd" type="Script" id=1] -[ext_resource path="res://ui/servermenu/Console.gd" type="Script" id=2] -[ext_resource path="res://ui/servermenu/ServerUI.gd" type="Script" id=4] - -[sub_resource type="StyleBoxFlat" id=1] -bg_color = Color( 0.0705882, 0.0705882, 0.0705882, 1 ) - -[node name="ServerUI" type="Node2D"] -script = ExtResource( 4 ) - -[node name="StartButton" type="Button" parent="." groups=["init_fields"]] -margin_left = 24.0 -margin_top = 56.0 -margin_right = 109.0 -margin_bottom = 76.0 -text = "Start Server" - -[node name="BackButton" type="Button" parent="." groups=["init_fields"]] -margin_left = 24.0 -margin_top = 24.0 -margin_right = 112.0 -margin_bottom = 44.0 -text = "Back" - -[node name="StopButton" type="Button" parent="."] -visible = false -margin_left = 24.0 -margin_top = 88.0 -margin_right = 108.0 -margin_bottom = 108.0 -text = "Stop Server" - -[node name="MapPath" type="LineEdit" parent="." groups=["init_fields"]] -margin_left = 120.0 -margin_top = 24.0 -margin_right = 337.0 -margin_bottom = 48.0 -text = "res://maps/Main.tscn" - -[node name="Console" type="ScrollContainer" parent="."] -margin_left = 588.0 -margin_top = 19.0 -margin_right = 1004.0 -margin_bottom = 383.0 -custom_styles/bg = SubResource( 1 ) -scroll_horizontal_enabled = false -script = ExtResource( 2 ) - -[node name="ConsoleLines" type="VBoxContainer" parent="Console"] -margin_right = 406.0 -margin_bottom = 14.0 - -[node name="Label" type="Label" parent="Console/ConsoleLines"] -margin_right = 406.0 -margin_bottom = 14.0 -text = "----------------------------------CONSOLE-----------------------------------" - -[node name="CmdPrompt" type="LineEdit" parent="."] -margin_left = 588.0 -margin_top = 402.0 -margin_right = 1004.0 -margin_bottom = 426.0 -script = ExtResource( 1 ) -console_path = NodePath("../Console") - -[node name="PlayerCount" type="SpinBox" parent="." groups=["init_fields"]] -margin_left = 344.0 -margin_top = 24.0 -margin_right = 418.0 -margin_bottom = 48.0 -min_value = 1.0 -value = 4.0 - -[node name="Port" type="SpinBox" parent="." groups=["init_fields"]] -margin_left = 264.0 -margin_top = 56.0 -margin_right = 338.0 -margin_bottom = 80.0 -max_value = 65536.0 -value = 25565.0 - -[node name="IP" type="LineEdit" parent="." groups=["init_fields"]] -margin_left = 120.0 -margin_top = 56.0 -margin_right = 250.0 -margin_bottom = 80.0 -text = "127.0.0.1" - -[node name="MOTD" type="TextEdit" parent="." groups=["init_fields"]] -margin_left = 120.0 -margin_top = 120.0 -margin_right = 337.0 -margin_bottom = 160.0 -text = "MOTD" - -[node name="ServerName" type="LineEdit" parent="." groups=["init_fields"]] -margin_left = 120.0 -margin_top = 88.0 -margin_right = 337.0 -margin_bottom = 112.0 -text = "Server Name" - -[connection signal="pressed" from="StartButton" to="." method="start_server"] -[connection signal="pressed" from="BackButton" to="." method="back_to_main"] -[connection signal="pressed" from="StopButton" to="." method="stop_server"] -[connection signal="text_entered" from="CmdPrompt" to="CmdPrompt" method="enter_cmd"] |
