mirror of
https://github.com/thegatesbrowser/godot-multiplayer.git
synced 2025-10-16 02:03:43 -04:00
Update to 4.4.1
This commit is contained in:
parent
4ae45deca1
commit
ceb10e9a06
160 changed files with 491 additions and 71 deletions
1
ui/change_name.gd.uid
Normal file
1
ui/change_name.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://bswv8rp4q8gdg
|
1
ui/edit_mode.gd.uid
Normal file
1
ui/edit_mode.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://cdwqyiof531p2
|
1
ui/floating_nickname.gd.uid
Normal file
1
ui/floating_nickname.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://74phah5dnq4x
|
1
ui/mouse_mode.gd.uid
Normal file
1
ui/mouse_mode.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://cnttwj1d0772f
|
1
ui/player_panel.gd.uid
Normal file
1
ui/player_panel.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://cjpsrt7jscpsg
|
|
@ -1,8 +1,8 @@
|
|||
[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="Script" uid="uid://cjpsrt7jscpsg" 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"]
|
||||
[ext_resource type="Script" uid="uid://bswv8rp4q8gdg" path="res://ui/change_name.gd" id="3_yfkbo"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tmqoe"]
|
||||
resource_local_to_scene = true
|
||||
|
@ -178,8 +178,8 @@ tracks/5/keys = {
|
|||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_mruyl"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_tisq7"),
|
||||
"my_panel": SubResource("Animation_2fcr5")
|
||||
&"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")]
|
||||
|
|
1
ui/player_panel_contiainer.gd.uid
Normal file
1
ui/player_panel_contiainer.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://b7utl83ieo61
|
17
ui/ui.gd
17
ui/ui.gd
|
@ -15,6 +15,19 @@ func _ready():
|
|||
show_ui()
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("quit_game"):
|
||||
if $MainMenu.visible:
|
||||
# If main menu is visible, quit the game
|
||||
get_tree().quit()
|
||||
elif $InGameUI.visible:
|
||||
# If in-game UI is visible, return to main menu
|
||||
# Disconnect from server/client first
|
||||
if Connection.is_peer_connected:
|
||||
multiplayer.multiplayer_peer.close()
|
||||
show_ui()
|
||||
|
||||
|
||||
func start_server_emit() -> void:
|
||||
start_server.emit()
|
||||
$MainMenu.visible = false
|
||||
|
@ -25,6 +38,10 @@ func connect_client_emit() -> void:
|
|||
hide_ui()
|
||||
|
||||
|
||||
func exit_game_emit() -> void:
|
||||
get_tree().quit()
|
||||
|
||||
|
||||
func hide_ui() -> void:
|
||||
$MainMenu.visible = false
|
||||
$InGameUI.visible = true
|
||||
|
|
1
ui/ui.gd.uid
Normal file
1
ui/ui.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://c2wjq5gyp82kd
|
16
ui/ui.tscn
16
ui/ui.tscn
|
@ -1,8 +1,8 @@
|
|||
[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="Script" uid="uid://c2wjq5gyp82kd" path="res://ui/ui.gd" id="1_3uiwb"]
|
||||
[ext_resource type="Script" uid="uid://cnttwj1d0772f" path="res://ui/mouse_mode.gd" id="2_rhohj"]
|
||||
[ext_resource type="Script" uid="uid://b7utl83ieo61" 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"]
|
||||
|
||||
|
@ -34,9 +34,9 @@ anchor_top = 0.5
|
|||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -150.0
|
||||
offset_top = -52.0
|
||||
offset_top = -78.0
|
||||
offset_right = 150.0
|
||||
offset_bottom = 52.0
|
||||
offset_bottom = 78.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
|
@ -50,6 +50,11 @@ layout_mode = 2
|
|||
theme_override_font_sizes/font_size = 30
|
||||
text = "Client"
|
||||
|
||||
[node name="Exit" type="Button" parent="MainMenu/Buttons"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 30
|
||||
text = "Exit"
|
||||
|
||||
[node name="InGameUI" type="Control" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
|
@ -85,3 +90,4 @@ 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"]
|
||||
[connection signal="pressed" from="MainMenu/Buttons/Exit" to="." method="exit_game_emit"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue