mirror of
https://github.com/JohnBreaux/Boat-Battle.git
synced 2024-11-15 05:25:57 +00:00
Lobby: Multiple cosmetic changes were made to improve the user experience
This commit is contained in:
parent
754ad2986b
commit
8239c133fc
@ -1,4 +1,4 @@
|
|||||||
[gd_resource type="Theme" load_steps=6 format=2]
|
[gd_resource type="Theme" load_steps=8 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://assets/font/Minecraft.ttf" type="DynamicFontData" id=1]
|
[ext_resource path="res://assets/font/Minecraft.ttf" type="DynamicFontData" id=1]
|
||||||
[ext_resource path="res://assets/backgrounds/PanelBG_Dark.tres" type="StyleBox" id=2]
|
[ext_resource path="res://assets/backgrounds/PanelBG_Dark.tres" type="StyleBox" id=2]
|
||||||
@ -19,7 +19,24 @@ corner_radius_bottom_right = 3
|
|||||||
corner_radius_bottom_left = 3
|
corner_radius_bottom_left = 3
|
||||||
shadow_size = 3
|
shadow_size = 3
|
||||||
|
|
||||||
[sub_resource type="DynamicFont" id=3]
|
[sub_resource type="StyleBoxEmpty" id=3]
|
||||||
|
content_margin_left = 5.0
|
||||||
|
content_margin_right = 5.0
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id=4]
|
||||||
|
bg_color = Color( 0.109804, 0.0862745, 0.172549, 1 )
|
||||||
|
border_width_left = 2
|
||||||
|
border_width_top = 2
|
||||||
|
border_width_right = 2
|
||||||
|
border_width_bottom = 2
|
||||||
|
border_color = Color( 0.19, 0.15, 0.3, 1 )
|
||||||
|
corner_radius_top_left = 4
|
||||||
|
corner_radius_top_right = 4
|
||||||
|
corner_radius_bottom_right = 4
|
||||||
|
corner_radius_bottom_left = 4
|
||||||
|
expand_margin_top = 20.0
|
||||||
|
|
||||||
|
[sub_resource type="DynamicFont" id=5]
|
||||||
outline_size = 1
|
outline_size = 1
|
||||||
outline_color = Color( 0, 0, 0, 1 )
|
outline_color = Color( 0, 0, 0, 1 )
|
||||||
extra_spacing_top = 5
|
extra_spacing_top = 5
|
||||||
@ -28,7 +45,7 @@ extra_spacing_char = 1
|
|||||||
font_data = ExtResource( 1 )
|
font_data = ExtResource( 1 )
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
default_font = SubResource( 3 )
|
default_font = SubResource( 5 )
|
||||||
Button/colors/font_color = Color( 1, 1, 1, 1 )
|
Button/colors/font_color = Color( 1, 1, 1, 1 )
|
||||||
Button/colors/font_color_disabled = Color( 0.901961, 0.901961, 0.901961, 0.2 )
|
Button/colors/font_color_disabled = Color( 0.901961, 0.901961, 0.901961, 0.2 )
|
||||||
Button/colors/font_color_hover = Color( 1, 1, 1, 1 )
|
Button/colors/font_color_hover = Color( 1, 1, 1, 1 )
|
||||||
@ -39,9 +56,7 @@ Button/styles/disabled = null
|
|||||||
Button/styles/focus = null
|
Button/styles/focus = null
|
||||||
Button/styles/hover = SubResource( 1 )
|
Button/styles/hover = SubResource( 1 )
|
||||||
Button/styles/normal = SubResource( 2 )
|
Button/styles/normal = SubResource( 2 )
|
||||||
Button/styles/pressed = null
|
Button/styles/pressed = SubResource( 2 )
|
||||||
Dialogs/constants/button_margin = 100
|
|
||||||
Dialogs/constants/margin = 8
|
|
||||||
Label/colors/font_color = Color( 1, 1, 1, 1 )
|
Label/colors/font_color = Color( 1, 1, 1, 1 )
|
||||||
Label/colors/font_color_shadow = Color( 0, 0, 0, 0.25098 )
|
Label/colors/font_color_shadow = Color( 0, 0, 0, 0.25098 )
|
||||||
Label/colors/font_outline_modulate = Color( 0, 0, 0, 1 )
|
Label/colors/font_outline_modulate = Color( 0, 0, 0, 1 )
|
||||||
@ -51,9 +66,22 @@ Label/constants/shadow_offset_x = 0
|
|||||||
Label/constants/shadow_offset_y = 2
|
Label/constants/shadow_offset_y = 2
|
||||||
Label/fonts/font = null
|
Label/fonts/font = null
|
||||||
Label/styles/normal = null
|
Label/styles/normal = null
|
||||||
|
LineEdit/colors/clear_button_color = Color( 0.88, 0.88, 0.88, 1 )
|
||||||
|
LineEdit/colors/clear_button_color_pressed = Color( 1, 1, 1, 1 )
|
||||||
|
LineEdit/colors/cursor_color = Color( 0.878431, 0.878431, 0.878431, 1 )
|
||||||
|
LineEdit/colors/font_color = Color( 0.878431, 0.878431, 0.878431, 1 )
|
||||||
|
LineEdit/colors/font_color_selected = Color( 0, 0, 0, 1 )
|
||||||
|
LineEdit/colors/font_color_uneditable = Color( 0.88, 0.88, 0.88, 0.5 )
|
||||||
|
LineEdit/colors/selection_color = Color( 0.49, 0.49, 0.49, 1 )
|
||||||
|
LineEdit/constants/minimum_spaces = 12
|
||||||
|
LineEdit/fonts/font = null
|
||||||
|
LineEdit/icons/clear = null
|
||||||
|
LineEdit/styles/focus = null
|
||||||
|
LineEdit/styles/normal = SubResource( 3 )
|
||||||
|
LineEdit/styles/read_only = null
|
||||||
Panel/styles/panel = ExtResource( 2 )
|
Panel/styles/panel = ExtResource( 2 )
|
||||||
PanelContainer/styles/panel = ExtResource( 2 )
|
PanelContainer/styles/panel = ExtResource( 2 )
|
||||||
WindowDialog/colors/title_color = Color( 0.152941, 0.152941, 0.152941, 1 )
|
WindowDialog/colors/title_color = Color( 1, 1, 1, 1 )
|
||||||
WindowDialog/constants/close_h_ofs = 18
|
WindowDialog/constants/close_h_ofs = 18
|
||||||
WindowDialog/constants/close_v_ofs = 18
|
WindowDialog/constants/close_v_ofs = 18
|
||||||
WindowDialog/constants/scaleborder_size = 4
|
WindowDialog/constants/scaleborder_size = 4
|
||||||
@ -61,4 +89,4 @@ WindowDialog/constants/title_height = 20
|
|||||||
WindowDialog/fonts/title_font = null
|
WindowDialog/fonts/title_font = null
|
||||||
WindowDialog/icons/close = null
|
WindowDialog/icons/close = null
|
||||||
WindowDialog/icons/close_highlight = null
|
WindowDialog/icons/close_highlight = null
|
||||||
WindowDialog/styles/panel = null
|
WindowDialog/styles/panel = SubResource( 4 )
|
||||||
|
@ -1,7 +1,31 @@
|
|||||||
[gd_resource type="Theme" format=2]
|
[gd_resource type="Theme" load_steps=3 format=2]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id=1]
|
||||||
|
content_margin_left = 5.0
|
||||||
|
content_margin_right = 5.0
|
||||||
|
content_margin_top = 5.0
|
||||||
|
content_margin_bottom = 5.0
|
||||||
|
bg_color = Color( 0, 0.117647, 0.152941, 1 )
|
||||||
|
expand_margin_top = 5.0
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id=2]
|
||||||
|
bg_color = Color( 0, 0.117647, 0.152941, 1 )
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
resource_name = "Debug Theme"
|
resource_name = "Debug Theme"
|
||||||
|
LineEdit/colors/clear_button_color = Color( 0.88, 0.88, 0.88, 1 )
|
||||||
|
LineEdit/colors/clear_button_color_pressed = Color( 1, 1, 1, 1 )
|
||||||
|
LineEdit/colors/cursor_color = Color( 0.94, 0.94, 0.94, 1 )
|
||||||
|
LineEdit/colors/font_color = Color( 0.88, 0.88, 0.88, 1 )
|
||||||
|
LineEdit/colors/font_color_selected = Color( 0, 0, 0, 1 )
|
||||||
|
LineEdit/colors/font_color_uneditable = Color( 0.88, 0.88, 0.88, 0.5 )
|
||||||
|
LineEdit/colors/selection_color = Color( 0.49, 0.49, 0.49, 1 )
|
||||||
|
LineEdit/constants/minimum_spaces = 12
|
||||||
|
LineEdit/fonts/font = null
|
||||||
|
LineEdit/icons/clear = null
|
||||||
|
LineEdit/styles/focus = null
|
||||||
|
LineEdit/styles/normal = SubResource( 1 )
|
||||||
|
LineEdit/styles/read_only = null
|
||||||
TextEdit/colors/background_color = Color( 0, 0.117647, 0.152941, 1 )
|
TextEdit/colors/background_color = Color( 0, 0.117647, 0.152941, 1 )
|
||||||
TextEdit/colors/bookmark_color = Color( 0.0784314, 0.490196, 0.980392, 1 )
|
TextEdit/colors/bookmark_color = Color( 0.0784314, 0.490196, 0.980392, 1 )
|
||||||
TextEdit/colors/brace_mismatch_color = Color( 1, 0.2, 0.2, 1 )
|
TextEdit/colors/brace_mismatch_color = Color( 1, 0.2, 0.2, 1 )
|
||||||
@ -40,4 +64,4 @@ TextEdit/icons/tab = null
|
|||||||
TextEdit/styles/completion = null
|
TextEdit/styles/completion = null
|
||||||
TextEdit/styles/focus = null
|
TextEdit/styles/focus = null
|
||||||
TextEdit/styles/normal = null
|
TextEdit/styles/normal = null
|
||||||
TextEdit/styles/read_only = null
|
TextEdit/styles/read_only = SubResource( 2 )
|
||||||
|
@ -16,7 +16,7 @@ script_encryption_key=""
|
|||||||
custom_template/debug=""
|
custom_template/debug=""
|
||||||
custom_template/release=""
|
custom_template/release=""
|
||||||
binary_format/64_bits=true
|
binary_format/64_bits=true
|
||||||
binary_format/embed_pck=false
|
binary_format/embed_pck=true
|
||||||
texture_format/bptc=false
|
texture_format/bptc=false
|
||||||
texture_format/s3tc=true
|
texture_format/s3tc=true
|
||||||
texture_format/etc=false
|
texture_format/etc=false
|
||||||
@ -34,8 +34,8 @@ codesign/custom_options=PoolStringArray( )
|
|||||||
application/icon="res://icon.ico"
|
application/icon="res://icon.ico"
|
||||||
application/file_version=""
|
application/file_version=""
|
||||||
application/product_version=""
|
application/product_version=""
|
||||||
application/company_name=""
|
application/company_name="Group12"
|
||||||
application/product_name=""
|
application/product_name="Ship Battle"
|
||||||
application/file_description=""
|
application/file_description=""
|
||||||
application/copyright=""
|
application/copyright="2021 Group 12 Industries"
|
||||||
application/trademarks=""
|
application/trademarks=""
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
[gd_resource type="Theme" load_steps=6 format=2]
|
[gd_resource type="Theme" load_steps=9 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://assets/font/Minecraft.ttf" type="DynamicFontData" id=1]
|
[ext_resource path="res://assets/font/Minecraft.ttf" type="DynamicFontData" id=1]
|
||||||
[ext_resource path="res://assets/backgrounds/PanelBG_Light.tres" type="StyleBox" id=2]
|
[ext_resource path="res://assets/backgrounds/PanelBG_Light.tres" type="StyleBox" id=2]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id=1]
|
[sub_resource type="StyleBoxFlat" id=5]
|
||||||
bg_color = Color( 1, 1, 1, 1 )
|
bg_color = Color( 1, 1, 1, 1 )
|
||||||
corner_radius_top_left = 3
|
corner_radius_top_left = 3
|
||||||
corner_radius_top_right = 3
|
corner_radius_top_right = 3
|
||||||
@ -11,7 +11,7 @@ corner_radius_bottom_right = 3
|
|||||||
corner_radius_bottom_left = 3
|
corner_radius_bottom_left = 3
|
||||||
shadow_size = 4
|
shadow_size = 4
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id=2]
|
[sub_resource type="StyleBoxFlat" id=6]
|
||||||
bg_color = Color( 0.847059, 0.921569, 0.964706, 1 )
|
bg_color = Color( 0.847059, 0.921569, 0.964706, 1 )
|
||||||
corner_radius_top_left = 3
|
corner_radius_top_left = 3
|
||||||
corner_radius_top_right = 3
|
corner_radius_top_right = 3
|
||||||
@ -19,8 +19,36 @@ corner_radius_bottom_right = 3
|
|||||||
corner_radius_bottom_left = 3
|
corner_radius_bottom_left = 3
|
||||||
shadow_size = 3
|
shadow_size = 3
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id=4]
|
||||||
|
bg_color = Color( 0.941176, 0.941176, 0.941176, 1 )
|
||||||
|
corner_radius_top_left = 3
|
||||||
|
corner_radius_top_right = 3
|
||||||
|
corner_radius_bottom_right = 3
|
||||||
|
corner_radius_bottom_left = 3
|
||||||
|
shadow_size = 3
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id=1]
|
||||||
|
content_margin_left = 5.0
|
||||||
|
content_margin_right = 5.0
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id=2]
|
||||||
|
bg_color = Color( 0.847059, 0.921569, 0.964706, 1 )
|
||||||
|
border_width_left = 2
|
||||||
|
border_width_top = 2
|
||||||
|
border_width_right = 2
|
||||||
|
border_width_bottom = 2
|
||||||
|
border_color = Color( 0.219608, 0.239216, 0.25098, 1 )
|
||||||
|
border_blend = true
|
||||||
|
corner_radius_top_left = 4
|
||||||
|
corner_radius_top_right = 4
|
||||||
|
corner_radius_bottom_right = 4
|
||||||
|
corner_radius_bottom_left = 4
|
||||||
|
expand_margin_top = 20.0
|
||||||
|
shadow_color = Color( 0, 0, 0, 1 )
|
||||||
|
|
||||||
[sub_resource type="DynamicFont" id=3]
|
[sub_resource type="DynamicFont" id=3]
|
||||||
outline_size = 1
|
outline_size = 1
|
||||||
|
outline_color = Color( 0.847059, 0.921569, 0.964706, 0.501961 )
|
||||||
extra_spacing_top = 5
|
extra_spacing_top = 5
|
||||||
extra_spacing_bottom = 3
|
extra_spacing_bottom = 3
|
||||||
extra_spacing_char = 1
|
extra_spacing_char = 1
|
||||||
@ -29,18 +57,16 @@ font_data = ExtResource( 1 )
|
|||||||
[resource]
|
[resource]
|
||||||
default_font = SubResource( 3 )
|
default_font = SubResource( 3 )
|
||||||
Button/colors/font_color = Color( 0.0784314, 0.0784314, 0.0784314, 1 )
|
Button/colors/font_color = Color( 0.0784314, 0.0784314, 0.0784314, 1 )
|
||||||
Button/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 )
|
Button/colors/font_color_disabled = Color( 0.901961, 0.901961, 0.901961, 0.2 )
|
||||||
Button/colors/font_color_hover = Color( 0, 0, 0, 1 )
|
Button/colors/font_color_hover = Color( 0.0784314, 0.0784314, 0.0784314, 1 )
|
||||||
Button/colors/font_color_pressed = Color( 0, 0, 0, 1 )
|
Button/colors/font_color_pressed = Color( 0.0784314, 0.0784314, 0.0784314, 1 )
|
||||||
Button/constants/hseparation = 2
|
Button/constants/hseparation = 2
|
||||||
Button/fonts/font = null
|
Button/fonts/font = null
|
||||||
Button/styles/disabled = null
|
Button/styles/disabled = null
|
||||||
Button/styles/focus = null
|
Button/styles/focus = null
|
||||||
Button/styles/hover = SubResource( 1 )
|
Button/styles/hover = SubResource( 5 )
|
||||||
Button/styles/normal = SubResource( 2 )
|
Button/styles/normal = SubResource( 6 )
|
||||||
Button/styles/pressed = null
|
Button/styles/pressed = SubResource( 4 )
|
||||||
Dialogs/constants/button_margin = 100
|
|
||||||
Dialogs/constants/margin = 8
|
|
||||||
Label/colors/font_color = Color( 1, 1, 1, 1 )
|
Label/colors/font_color = Color( 1, 1, 1, 1 )
|
||||||
Label/colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
Label/colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||||
Label/colors/font_outline_modulate = Color( 0, 0, 0, 1 )
|
Label/colors/font_outline_modulate = Color( 0, 0, 0, 1 )
|
||||||
@ -50,9 +76,22 @@ Label/constants/shadow_offset_x = 0
|
|||||||
Label/constants/shadow_offset_y = 2
|
Label/constants/shadow_offset_y = 2
|
||||||
Label/fonts/font = null
|
Label/fonts/font = null
|
||||||
Label/styles/normal = null
|
Label/styles/normal = null
|
||||||
|
LineEdit/colors/clear_button_color = Color( 0.88, 0.88, 0.88, 1 )
|
||||||
|
LineEdit/colors/clear_button_color_pressed = Color( 1, 1, 1, 1 )
|
||||||
|
LineEdit/colors/cursor_color = Color( 0.0784314, 0.0784314, 0.0784314, 1 )
|
||||||
|
LineEdit/colors/font_color = Color( 0.0784314, 0.0784314, 0.0784314, 1 )
|
||||||
|
LineEdit/colors/font_color_selected = Color( 0.309804, 0.309804, 0.309804, 1 )
|
||||||
|
LineEdit/colors/font_color_uneditable = Color( 0.88, 0.88, 0.88, 0.5 )
|
||||||
|
LineEdit/colors/selection_color = Color( 0.490196, 0.490196, 0.490196, 1 )
|
||||||
|
LineEdit/constants/minimum_spaces = 12
|
||||||
|
LineEdit/fonts/font = null
|
||||||
|
LineEdit/icons/clear = null
|
||||||
|
LineEdit/styles/focus = null
|
||||||
|
LineEdit/styles/normal = SubResource( 1 )
|
||||||
|
LineEdit/styles/read_only = null
|
||||||
Panel/styles/panel = ExtResource( 2 )
|
Panel/styles/panel = ExtResource( 2 )
|
||||||
PanelContainer/styles/panel = ExtResource( 2 )
|
PanelContainer/styles/panel = ExtResource( 2 )
|
||||||
WindowDialog/colors/title_color = Color( 0.152941, 0.152941, 0.152941, 1 )
|
WindowDialog/colors/title_color = Color( 0, 0, 0, 1 )
|
||||||
WindowDialog/constants/close_h_ofs = 18
|
WindowDialog/constants/close_h_ofs = 18
|
||||||
WindowDialog/constants/close_v_ofs = 18
|
WindowDialog/constants/close_v_ofs = 18
|
||||||
WindowDialog/constants/scaleborder_size = 4
|
WindowDialog/constants/scaleborder_size = 4
|
||||||
@ -60,4 +99,4 @@ WindowDialog/constants/title_height = 20
|
|||||||
WindowDialog/fonts/title_font = null
|
WindowDialog/fonts/title_font = null
|
||||||
WindowDialog/icons/close = null
|
WindowDialog/icons/close = null
|
||||||
WindowDialog/icons/close_highlight = null
|
WindowDialog/icons/close_highlight = null
|
||||||
WindowDialog/styles/panel = null
|
WindowDialog/styles/panel = SubResource( 2 )
|
||||||
|
@ -89,7 +89,7 @@ __meta__ = {
|
|||||||
margin_top = 24.0
|
margin_top = 24.0
|
||||||
margin_right = 123.0
|
margin_right = 123.0
|
||||||
margin_bottom = 44.0
|
margin_bottom = 44.0
|
||||||
text = "Connect to Game"
|
text = "Join Game"
|
||||||
|
|
||||||
[node name="Connected Options" type="VBoxContainer" parent="Lobby Options"]
|
[node name="Connected Options" type="VBoxContainer" parent="Lobby Options"]
|
||||||
visible = false
|
visible = false
|
||||||
@ -154,7 +154,7 @@ margin_top = 404.977
|
|||||||
margin_right = 441.136
|
margin_right = 441.136
|
||||||
margin_bottom = 450.977
|
margin_bottom = 450.977
|
||||||
rect_min_size = Vector2( 240, 46 )
|
rect_min_size = Vector2( 240, 46 )
|
||||||
window_title = "Connect to Game"
|
window_title = "Join Game"
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,8 @@ func _on_peers_updated():
|
|||||||
func set_IP_Address_text(show):
|
func set_IP_Address_text(show):
|
||||||
# Print the IP address and port
|
# Print the IP address and port
|
||||||
if show:
|
if show:
|
||||||
ip_address.text = "IP: %s\nPort: %s" % [Net.get_ip(), Net.DEFAULT_PORT]
|
# ip_address.text = "IP: %sPort:%s" % [Net.get_ip(), Net.DEFAULT_PORT]
|
||||||
|
ip_address.text = "IP: %s" % Net.get_ip()
|
||||||
else:
|
else:
|
||||||
ip_address.text = ""
|
ip_address.text = ""
|
||||||
|
|
||||||
@ -30,13 +31,13 @@ func _ready():
|
|||||||
_on_peers_updated()
|
_on_peers_updated()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func show_Connected_Options(show, host = false):
|
func show_Connected_Options():
|
||||||
# [Hide]/Show the host options
|
# [Hide]/Show the host options
|
||||||
get_node("Lobby Options/Connected Options/Host Options").visible = host
|
get_node("Lobby Options/Connected Options/Host Options").visible = Net.hosting
|
||||||
# [Hide]/Show the host and connect buttons
|
# [Hide]/Show the host and connect buttons
|
||||||
get_node("Lobby Options/Host or Connect").visible = !show
|
get_node("Lobby Options/Host or Connect").visible = !Net.connected
|
||||||
# [Show]/Hide the host options
|
# [Show]/Hide the host options
|
||||||
get_node("Lobby Options/Connected Options").visible = show
|
get_node("Lobby Options/Connected Options").visible = Net.connected
|
||||||
|
|
||||||
# Buttons
|
# Buttons
|
||||||
# Host Button: Host a game
|
# Host Button: Host a game
|
||||||
@ -44,12 +45,12 @@ func show_Connected_Options(show, host = false):
|
|||||||
func _on_Host_Button_pressed():
|
func _on_Host_Button_pressed():
|
||||||
# Make noise
|
# Make noise
|
||||||
AudioBus.emit_signal("button_clicked")
|
AudioBus.emit_signal("button_clicked")
|
||||||
# Show "Connected Options"
|
|
||||||
show_Connected_Options(true, true)
|
|
||||||
# Show the host IP address
|
# Show the host IP address
|
||||||
set_IP_Address_text(true)
|
set_IP_Address_text(true)
|
||||||
# Begin hosting
|
# Begin hosting
|
||||||
Net.start_host()
|
Net.start_host()
|
||||||
|
# Show "Connected Options"
|
||||||
|
show_Connected_Options()
|
||||||
|
|
||||||
# Disconnect
|
# Disconnect
|
||||||
# Disconnect from (or stop hosting) a game
|
# Disconnect from (or stop hosting) a game
|
||||||
@ -59,10 +60,10 @@ func _on_Disconnect_Button_pressed():
|
|||||||
AudioBus.emit_signal("button_clicked")
|
AudioBus.emit_signal("button_clicked")
|
||||||
# Disconnect
|
# Disconnect
|
||||||
Net.disconnect_host()
|
Net.disconnect_host()
|
||||||
# Hide "Connected Options"
|
|
||||||
show_Connected_Options(false)
|
|
||||||
# Hide the host IP address
|
# Hide the host IP address
|
||||||
set_IP_Address_text(false)
|
set_IP_Address_text(false)
|
||||||
|
# Hide "Connected Options"
|
||||||
|
show_Connected_Options()
|
||||||
|
|
||||||
func _on_Start_Game_pressed():
|
func _on_Start_Game_pressed():
|
||||||
# If there are enough players for a game
|
# If there are enough players for a game
|
||||||
@ -72,22 +73,25 @@ func _on_Start_Game_pressed():
|
|||||||
pass # Replace with function body.
|
pass # Replace with function body.
|
||||||
|
|
||||||
func _on_Net_disconnected():
|
func _on_Net_disconnected():
|
||||||
# Hide "Connected Options"
|
|
||||||
show_Connected_Options(false)
|
|
||||||
# Hide the host IP address
|
# Hide the host IP address
|
||||||
set_IP_Address_text(false)
|
set_IP_Address_text(false)
|
||||||
|
# Hide "Connected Options"
|
||||||
|
show_Connected_Options()
|
||||||
|
|
||||||
func _on_Change_Name_Button_pressed():
|
func _on_Change_Name_Button_pressed():
|
||||||
# Make noise
|
# Make noise
|
||||||
AudioBus.emit_signal("button_clicked")
|
AudioBus.emit_signal("button_clicked")
|
||||||
# Show the Change Name dialogue
|
# Show the Change Name dialogue
|
||||||
get_node("Change Name").popup_centered()
|
get_node("Change Name").popup_centered()
|
||||||
|
get_node("Change Name/Name Entry").grab_focus()
|
||||||
|
|
||||||
func _on_Connect_Button_pressed():
|
func _on_Connect_Button_pressed():
|
||||||
# Make noise
|
# Make noise
|
||||||
AudioBus.emit_signal("button_clicked")
|
AudioBus.emit_signal("button_clicked")
|
||||||
# Show the Connect to Game dialogue
|
# Show the Connect to Game dialogue
|
||||||
get_node("Connect to Game").popup_centered()
|
game_popup.popup_centered()
|
||||||
|
game_popup.get_node("IP and Port Entry").grab_focus()
|
||||||
|
game_popup.get_node("IP and Port Entry").caret_position = -1
|
||||||
|
|
||||||
func _on_Exit_Lobby_pressed():
|
func _on_Exit_Lobby_pressed():
|
||||||
# Make noise
|
# Make noise
|
||||||
@ -98,7 +102,6 @@ func _on_Exit_Lobby_pressed():
|
|||||||
# Close Lobby menu
|
# Close Lobby menu
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
|
|
||||||
func _on_IP_and_Port_Entry_text_entered(text):
|
func _on_IP_and_Port_Entry_text_entered(text):
|
||||||
# Make noise
|
# Make noise
|
||||||
AudioBus.emit_signal("button_clicked")
|
AudioBus.emit_signal("button_clicked")
|
||||||
@ -107,12 +110,12 @@ func _on_IP_and_Port_Entry_text_entered(text):
|
|||||||
# If text exists and contains valid IP address
|
# If text exists and contains valid IP address
|
||||||
if ip_port.size() > 0 and ip_port[0].is_valid_ip_address():
|
if ip_port.size() > 0 and ip_port[0].is_valid_ip_address():
|
||||||
# Connect to host
|
# Connect to host
|
||||||
var connected = Net.callv("connect_host", ip_port)
|
var connected = Net.connect_host(ip_port[0])
|
||||||
if connected == OK:
|
if connected == OK:
|
||||||
# Show "Connected Options"
|
|
||||||
show_Connected_Options(true)
|
|
||||||
# Hide the popup
|
# Hide the popup
|
||||||
game_popup.hide()
|
game_popup.hide()
|
||||||
|
# Show "Connected Options"
|
||||||
|
show_Connected_Options()
|
||||||
|
|
||||||
|
|
||||||
func _on_Name_Entry_text_entered(text):
|
func _on_Name_Entry_text_entered(text):
|
||||||
|
Loading…
Reference in New Issue
Block a user