cmdline args for running debug sessions
This commit is contained in:
parent
40f96d3f07
commit
7af091a2ce
@ -22,6 +22,9 @@ func _ready() -> void:
|
||||
_on_chat_history_scroll_changed.bind(_chat_history_scroll_inactive)
|
||||
)
|
||||
|
||||
if "--on-top" in OS.get_cmdline_args():
|
||||
get_window().grab_focus()
|
||||
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||
|
||||
if not multiplayer.is_server():
|
||||
|
@ -17,6 +17,14 @@ var _game_started := false
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
for arg in OS.get_cmdline_args():
|
||||
if arg == "--host":
|
||||
_on_host_button_pressed()
|
||||
return
|
||||
elif arg == "--join":
|
||||
_on_join_button_pressed()
|
||||
return
|
||||
|
||||
_start_menu.show()
|
||||
_chat_menu.hide()
|
||||
|
||||
@ -46,6 +54,9 @@ func _register_player(username: String) -> void:
|
||||
list_label.text = username
|
||||
_player_list.add_child(list_label)
|
||||
|
||||
if id != 1 and "--immediate-start" in OS.get_cmdline_args():
|
||||
_on_start_button_pressed()
|
||||
|
||||
|
||||
@rpc("authority", "call_local", "reliable")
|
||||
func _unregister_player(id: int) -> void:
|
||||
|
Loading…
Reference in New Issue
Block a user