UI tweaks for controllers on android.
This commit is contained in:
parent
9283a3263f
commit
032d2583e6
|
|
@ -14,6 +14,9 @@ func _ready():
|
||||||
else:
|
else:
|
||||||
var desktop_path = OS.get_system_dir(0).replace("\\", "/").split("/")
|
var desktop_path = OS.get_system_dir(0).replace("\\", "/").split("/")
|
||||||
$Connect/Name.text = desktop_path[desktop_path.size() - 2]
|
$Connect/Name.text = desktop_path[desktop_path.size() - 2]
|
||||||
|
|
||||||
|
$Connect/Join.grab_focus()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _on_host_pressed():
|
func _on_host_pressed():
|
||||||
|
|
@ -28,7 +31,7 @@ func _on_host_pressed():
|
||||||
var player_name = $Connect/Name.text
|
var player_name = $Connect/Name.text
|
||||||
NetworkManager.host_game(player_name)
|
NetworkManager.host_game(player_name)
|
||||||
refresh_lobby()
|
refresh_lobby()
|
||||||
|
$Players/Start.grab_focus()
|
||||||
|
|
||||||
func _on_join_pressed():
|
func _on_join_pressed():
|
||||||
if $Connect/Name.text == "":
|
if $Connect/Name.text == "":
|
||||||
|
|
@ -43,6 +46,7 @@ func _on_join_pressed():
|
||||||
$Connect/ErrorLabel.text = ""
|
$Connect/ErrorLabel.text = ""
|
||||||
$Connect/Host.disabled = true
|
$Connect/Host.disabled = true
|
||||||
$Connect/Join.disabled = true
|
$Connect/Join.disabled = true
|
||||||
|
$Players/Start.grab_focus()
|
||||||
|
|
||||||
var player_name = $Connect/Name.text
|
var player_name = $Connect/Name.text
|
||||||
NetworkManager.join_game(ip, player_name)
|
NetworkManager.join_game(ip, player_name)
|
||||||
|
|
|
||||||
|
|
@ -129,13 +129,14 @@ margin_bottom = 109.0
|
||||||
size_flags_horizontal = 2
|
size_flags_horizontal = 2
|
||||||
size_flags_vertical = 2
|
size_flags_vertical = 2
|
||||||
custom_fonts/font = ExtResource( 2 )
|
custom_fonts/font = ExtResource( 2 )
|
||||||
text = "127.0.0.1"
|
text = "192.168.0.133"
|
||||||
|
|
||||||
[node name="Host" type="Button" parent="Connect"]
|
[node name="Host" type="Button" parent="Connect"]
|
||||||
margin_left = 181.0
|
margin_left = 181.0
|
||||||
margin_top = 31.0
|
margin_top = 31.0
|
||||||
margin_right = 246.0
|
margin_right = 246.0
|
||||||
margin_bottom = 51.0
|
margin_bottom = 51.0
|
||||||
|
focus_neighbour_bottom = NodePath("../Join")
|
||||||
size_flags_horizontal = 2
|
size_flags_horizontal = 2
|
||||||
size_flags_vertical = 2
|
size_flags_vertical = 2
|
||||||
custom_fonts/font = ExtResource( 2 )
|
custom_fonts/font = ExtResource( 2 )
|
||||||
|
|
@ -146,6 +147,7 @@ margin_left = 181.0
|
||||||
margin_top = 87.0
|
margin_top = 87.0
|
||||||
margin_right = 246.0
|
margin_right = 246.0
|
||||||
margin_bottom = 107.0
|
margin_bottom = 107.0
|
||||||
|
focus_neighbour_top = NodePath("../Host")
|
||||||
size_flags_horizontal = 2
|
size_flags_horizontal = 2
|
||||||
size_flags_vertical = 2
|
size_flags_vertical = 2
|
||||||
custom_fonts/font = ExtResource( 2 )
|
custom_fonts/font = ExtResource( 2 )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user