mirror of
https://github.com/thegatesbrowser/godot-multiplayer.git
synced 2025-10-15 17:03:34 -04:00
copy from thegates-jam repo
This commit is contained in:
parent
c1a7ad74e1
commit
1a335de566
523 changed files with 22408 additions and 0 deletions
29
ui/change_name.gd
Normal file
29
ui/change_name.gd
Normal file
|
@ -0,0 +1,29 @@
|
|||
extends LineEdit
|
||||
|
||||
var is_changing: bool
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
text_submitted.connect(on_text_submitted)
|
||||
focus_entered.connect(start_edit)
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if not event.is_action_pressed("change_name"): return
|
||||
if is_changing: return
|
||||
|
||||
start_edit.call_deferred()
|
||||
|
||||
|
||||
func start_edit() -> void:
|
||||
is_changing = true
|
||||
EditMode.set_enabled(true)
|
||||
grab_click_focus()
|
||||
grab_focus()
|
||||
caret_column = text.length()
|
||||
|
||||
|
||||
func on_text_submitted(_text: String) -> void:
|
||||
is_changing = false
|
||||
EditMode.set_enabled(false)
|
||||
release_focus()
|
8
ui/edit_mode.gd
Normal file
8
ui/edit_mode.gd
Normal file
|
@ -0,0 +1,8 @@
|
|||
extends Node
|
||||
class_name EditMode
|
||||
|
||||
static var is_enabled: bool
|
||||
|
||||
|
||||
static func set_enabled(value: bool) -> void:
|
||||
is_enabled = value
|
51
ui/floating_nickname.gd
Normal file
51
ui/floating_nickname.gd
Normal file
|
@ -0,0 +1,51 @@
|
|||
extends Control
|
||||
|
||||
@export var user_data_events: UserDataEvents
|
||||
@export var label: Label
|
||||
@export var speaking_indicator: Control
|
||||
@export var anchor: Node3D
|
||||
@export var offset: Vector3
|
||||
|
||||
var camera: Camera3D
|
||||
var user_data: UserData
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if Connection.is_server() or is_multiplayer_authority():
|
||||
set_visible(false)
|
||||
set_process(false)
|
||||
return
|
||||
|
||||
var id = get_multiplayer_authority()
|
||||
var _user_data = user_data_events.user_data_manager.try_get_user_data(id)
|
||||
if is_instance_valid(_user_data):
|
||||
retrieve_user_data(id, _user_data)
|
||||
else:
|
||||
user_data_events.user_data_spawned.connect(retrieve_user_data)
|
||||
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
camera = get_viewport().get_camera_3d()
|
||||
if not is_instance_valid(camera): return
|
||||
|
||||
var anchor_pos = anchor.global_position + offset
|
||||
visible = not camera.is_position_behind(anchor_pos)
|
||||
position = camera.unproject_position(anchor_pos)
|
||||
|
||||
|
||||
func retrieve_user_data(id: int, _user_data: UserData) -> void:
|
||||
if id != get_multiplayer_authority(): return
|
||||
|
||||
user_data = _user_data
|
||||
user_data.nickname_changed.connect(nickname_changed)
|
||||
user_data.speaking_changed.connect(speaking_changed)
|
||||
nickname_changed(user_data.nickname)
|
||||
speaking_changed(user_data.speaking)
|
||||
|
||||
|
||||
func nickname_changed(nickname: String) -> void:
|
||||
label.text = nickname
|
||||
|
||||
|
||||
func speaking_changed(speaking: bool) -> void:
|
||||
speaking_indicator.visible = speaking
|
39
ui/mouse_mode.gd
Normal file
39
ui/mouse_mode.gd
Normal file
|
@ -0,0 +1,39 @@
|
|||
extends Control
|
||||
|
||||
var is_in_game: bool
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
visibility_changed.connect(on_visibility_changed)
|
||||
on_visibility_changed()
|
||||
|
||||
|
||||
func _input(_event: InputEvent) -> void:
|
||||
if not is_in_game: return
|
||||
|
||||
if Input.is_action_just_pressed("show_mouse"): set_captured(false)
|
||||
if Input.is_action_just_released("show_mouse"): set_captured(true)
|
||||
|
||||
|
||||
func on_visibility_changed() -> void:
|
||||
if is_visible_in_tree():
|
||||
set_captured(true)
|
||||
is_in_game = true
|
||||
else:
|
||||
set_captured(false)
|
||||
is_in_game = false
|
||||
|
||||
|
||||
func _notification(what: int) -> void:
|
||||
match what:
|
||||
MainLoop.NOTIFICATION_APPLICATION_FOCUS_IN:
|
||||
if is_visible_in_tree(): set_captured(true)
|
||||
MainLoop.NOTIFICATION_APPLICATION_FOCUS_OUT:
|
||||
pass
|
||||
|
||||
|
||||
func set_captured(captured: bool) -> void:
|
||||
if captured:
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||
else:
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
42
ui/player_panel.gd
Normal file
42
ui/player_panel.gd
Normal file
|
@ -0,0 +1,42 @@
|
|||
extends Control
|
||||
class_name PlayerPanel
|
||||
|
||||
@export var nickname_edit: LineEdit
|
||||
@export var volume_slider: HSlider
|
||||
@export var speaking_indicator: Control
|
||||
@export var animation_player: AnimationPlayer
|
||||
@export var user_data_events: UserDataEvents
|
||||
|
||||
var user_data: UserData
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
user_data.nickname = nickname_edit.text
|
||||
speaking_indicator.visible = false
|
||||
|
||||
nickname_edit.text_submitted.connect(text_submitted)
|
||||
volume_slider.value_changed.connect(volume_changed)
|
||||
|
||||
|
||||
func text_submitted(nickname: String) -> void:
|
||||
user_data.nickname = nickname
|
||||
|
||||
|
||||
func volume_changed(volume: float) -> void:
|
||||
user_data_events.user_volume_changed_emit(user_data.id, volume)
|
||||
|
||||
|
||||
func set_user_data(_user_data: UserData) -> void:
|
||||
user_data = _user_data
|
||||
if user_data.is_my_data: animation_player.play("my_panel")
|
||||
|
||||
user_data.nickname_changed.connect(nickname_changed)
|
||||
user_data.speaking_changed.connect(speaking_changed)
|
||||
|
||||
|
||||
func nickname_changed(nickname: String) -> void:
|
||||
nickname_edit.text = nickname
|
||||
|
||||
|
||||
func speaking_changed(speaking: bool) -> void:
|
||||
speaking_indicator.visible = speaking
|
285
ui/player_panel.tscn
Normal file
285
ui/player_panel.tscn
Normal file
|
@ -0,0 +1,285 @@
|
|||
[gd_scene load_steps=11 format=3 uid="uid://dpre6ebljycx4"]
|
||||
|
||||
[ext_resource type="Script" path="res://ui/player_panel.gd" id="1_hxm32"]
|
||||
[ext_resource type="Resource" uid="uid://rclnl7v8k722" path="res://user_data/user_data_events.res" id="2_y2iyx"]
|
||||
[ext_resource type="Script" path="res://ui/change_name.gd" id="3_yfkbo"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tmqoe"]
|
||||
resource_local_to_scene = true
|
||||
bg_color = Color(0.211765, 0.211765, 0.211765, 0.505882)
|
||||
corner_radius_top_left = 10
|
||||
corner_radius_bottom_left = 10
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_k7gc0"]
|
||||
bg_color = Color(0.6, 0.6, 0.6, 0)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_oc66c"]
|
||||
bg_color = Color(0.251, 1, 0, 0.7)
|
||||
corner_radius_top_left = 25
|
||||
corner_radius_top_right = 25
|
||||
corner_radius_bottom_right = 25
|
||||
corner_radius_bottom_left = 25
|
||||
|
||||
[sub_resource type="StyleBoxLine" id="StyleBoxLine_1pmgd"]
|
||||
color = Color(0.509804, 0.509804, 0.509804, 0.501961)
|
||||
grow_begin = 0.0
|
||||
grow_end = 0.0
|
||||
thickness = 3
|
||||
|
||||
[sub_resource type="Animation" id="Animation_tisq7"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Panel:theme_override_styles/panel:bg_color")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(0.211765, 0.211765, 0.211765, 0.505882)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("MarginContainer/VBoxContainer/Control/NicknameEdit:editable")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("MarginContainer/VBoxContainer/Control/NicknameEdit:text")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": ["Player One"]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("MarginContainer/VBoxContainer/Hints:visible")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("MarginContainer/VBoxContainer/VolumeSlider:visible")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("MarginContainer/VBoxContainer/Control/NicknameEdit:placeholder_text")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [""]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_2fcr5"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Panel:theme_override_styles/panel:bg_color")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(0.211765, 0.211765, 0.211765, 0.505882)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("MarginContainer/VBoxContainer/Control/NicknameEdit:editable")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("MarginContainer/VBoxContainer/Control/NicknameEdit:text")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [""]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("MarginContainer/VBoxContainer/Hints:visible")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("MarginContainer/VBoxContainer/VolumeSlider:visible")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("MarginContainer/VBoxContainer/Control/NicknameEdit:placeholder_text")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": ["Your nickname"]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_mruyl"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_tisq7"),
|
||||
"my_panel": SubResource("Animation_2fcr5")
|
||||
}
|
||||
|
||||
[node name="PlayerPanel" type="Control" node_paths=PackedStringArray("nickname_edit", "volume_slider", "speaking_indicator", "animation_player")]
|
||||
custom_minimum_size = Vector2(0, 60)
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 300.0
|
||||
offset_bottom = 40.0
|
||||
mouse_filter = 1
|
||||
script = ExtResource("1_hxm32")
|
||||
nickname_edit = NodePath("MarginContainer/VBoxContainer/Control/NicknameEdit")
|
||||
volume_slider = NodePath("MarginContainer/VBoxContainer/VolumeSlider")
|
||||
speaking_indicator = NodePath("MarginContainer/VBoxContainer/Control/SpeakIndicator")
|
||||
animation_player = NodePath("AnimationPlayer")
|
||||
user_data_events = ExtResource("2_y2iyx")
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
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_tmqoe")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
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 = 10
|
||||
theme_override_constants/margin_top = 5
|
||||
theme_override_constants/margin_right = 10
|
||||
theme_override_constants/margin_bottom = 5
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Control" type="Control" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="NicknameEdit" type="LineEdit" parent="MarginContainer/VBoxContainer/Control"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_right = -20.0
|
||||
offset_bottom = 4.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_colors/font_color = Color(1, 1, 1, 0.701961)
|
||||
theme_override_colors/font_uneditable_color = Color(1, 1, 1, 0.701961)
|
||||
theme_override_colors/selection_color = Color(1, 1, 1, 0.701961)
|
||||
theme_override_font_sizes/font_size = 24
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_k7gc0")
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_k7gc0")
|
||||
theme_override_styles/read_only = SubResource("StyleBoxFlat_k7gc0")
|
||||
text = "Player One"
|
||||
max_length = 20
|
||||
editable = false
|
||||
script = ExtResource("3_yfkbo")
|
||||
|
||||
[node name="SpeakIndicator" type="Panel" parent="MarginContainer/VBoxContainer/Control"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -15.0
|
||||
offset_top = -18.0
|
||||
offset_bottom = -3.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_oc66c")
|
||||
|
||||
[node name="VolumeSlider" type="HSlider" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
theme_override_styles/slider = SubResource("StyleBoxLine_1pmgd")
|
||||
min_value = 0.001
|
||||
max_value = 1.0
|
||||
step = 0.01
|
||||
value = 0.701
|
||||
scrollable = false
|
||||
|
||||
[node name="Hints" type="RichTextLabel" parent="MarginContainer/VBoxContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_colors/default_color = Color(1, 1, 1, 0.701961)
|
||||
theme_override_font_sizes/normal_font_size = 14
|
||||
theme_override_font_sizes/bold_font_size = 12
|
||||
bbcode_enabled = true
|
||||
text = "[b]N[/b] - name, [b]Shift[/b] - speak, [b]Ctlr[/b] - volume"
|
||||
fit_content = true
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_mruyl")
|
||||
}
|
28
ui/player_panel_contiainer.gd
Normal file
28
ui/player_panel_contiainer.gd
Normal file
|
@ -0,0 +1,28 @@
|
|||
extends VBoxContainer
|
||||
|
||||
@export var user_data_events: UserDataEvents
|
||||
@export var player_panel: PackedScene
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
user_data_events.user_data_spawned.connect(user_data_spawned)
|
||||
user_data_events.user_data_despawned.connect(user_data_despawned)
|
||||
|
||||
|
||||
func user_data_spawned(id: int, user_data: UserData) -> void:
|
||||
var p: PlayerPanel = player_panel.instantiate() as PlayerPanel
|
||||
p.set_user_data(user_data)
|
||||
p.name = str(id)
|
||||
add_child(p)
|
||||
|
||||
if user_data.is_my_data: move_child(p, 0)
|
||||
|
||||
|
||||
func user_data_despawned(id: int) -> void:
|
||||
get_node(str(id)).queue_free()
|
||||
|
||||
|
||||
func on_visibility_changed() -> void:
|
||||
if not is_visible_in_tree() and not Connection.is_peer_connected:
|
||||
for child in get_children():
|
||||
child.queue_free()
|
35
ui/ui.gd
Normal file
35
ui/ui.gd
Normal file
|
@ -0,0 +1,35 @@
|
|||
extends Control
|
||||
|
||||
signal start_server
|
||||
signal connect_client
|
||||
|
||||
@export var hide_ui_and_connect: bool
|
||||
|
||||
|
||||
func _ready():
|
||||
if Connection.is_server(): return
|
||||
|
||||
if hide_ui_and_connect:
|
||||
connect_client_emit()
|
||||
else:
|
||||
show_ui()
|
||||
|
||||
|
||||
func start_server_emit() -> void:
|
||||
start_server.emit()
|
||||
$MainMenu.visible = false
|
||||
|
||||
|
||||
func connect_client_emit() -> void:
|
||||
connect_client.emit()
|
||||
hide_ui()
|
||||
|
||||
|
||||
func hide_ui() -> void:
|
||||
$MainMenu.visible = false
|
||||
$InGameUI.visible = true
|
||||
|
||||
|
||||
func show_ui() -> void:
|
||||
$MainMenu.visible = true
|
||||
$InGameUI.visible = false
|
87
ui/ui.tscn
Normal file
87
ui/ui.tscn
Normal file
|
@ -0,0 +1,87 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://cvl4jsitsxp0u"]
|
||||
|
||||
[ext_resource type="Script" path="res://ui/ui.gd" id="1_3uiwb"]
|
||||
[ext_resource type="Script" path="res://ui/mouse_mode.gd" id="2_rhohj"]
|
||||
[ext_resource type="Script" path="res://ui/player_panel_contiainer.gd" id="4_0te8w"]
|
||||
[ext_resource type="Resource" uid="uid://rclnl7v8k722" path="res://user_data/user_data_events.res" id="5_tmjbr"]
|
||||
[ext_resource type="PackedScene" uid="uid://dpre6ebljycx4" path="res://ui/player_panel.tscn" id="6_lta7j"]
|
||||
|
||||
[node name="UI" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 1
|
||||
script = ExtResource("1_3uiwb")
|
||||
hide_ui_and_connect = true
|
||||
|
||||
[node name="MainMenu" type="Control" parent="."]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Buttons" type="VBoxContainer" parent="MainMenu"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -150.0
|
||||
offset_top = -52.0
|
||||
offset_right = 150.0
|
||||
offset_bottom = 52.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Server" type="Button" parent="MainMenu/Buttons"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 30
|
||||
text = "Server"
|
||||
|
||||
[node name="Client" type="Button" parent="MainMenu/Buttons"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 30
|
||||
text = "Client"
|
||||
|
||||
[node name="InGameUI" type="Control" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 1
|
||||
|
||||
[node name="MouseMode" type="Control" parent="InGameUI"]
|
||||
anchors_preset = 0
|
||||
script = ExtResource("2_rhohj")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="InGameUI"]
|
||||
custom_minimum_size = Vector2(350, 0)
|
||||
layout_mode = 1
|
||||
anchors_preset = 9
|
||||
anchor_bottom = 1.0
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 40
|
||||
theme_override_constants/margin_top = 80
|
||||
theme_override_constants/margin_bottom = 40
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="InGameUI/MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="InGameUI/MarginContainer/ScrollContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
script = ExtResource("4_0te8w")
|
||||
user_data_events = ExtResource("5_tmjbr")
|
||||
player_panel = ExtResource("6_lta7j")
|
||||
|
||||
[connection signal="pressed" from="MainMenu/Buttons/Server" to="." method="start_server_emit"]
|
||||
[connection signal="pressed" from="MainMenu/Buttons/Client" to="." method="connect_client_emit"]
|
Loading…
Add table
Add a link
Reference in a new issue