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