Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced "join" interface fixes #35 #44

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Multiplayer/Components/MainMenu/MultiplayerPane.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using System;
using System;
using System.Text.RegularExpressions;
using DV.UIFramework;
using DV.Utils;
using Multiplayer.Components.Networking;
using TMPro;
using UnityEngine;

namespace Multiplayer.Components.MainMenu;
Expand Down Expand Up @@ -39,6 +40,7 @@ private void ShowIpPopup()
return;

popup.labelTMPro.text = Locale.SERVER_BROWSER__IP;
popup.GetComponentInChildren<TMP_InputField>().text = Multiplayer.Settings.DefaultRemoteIP;

popup.Closed += result =>
{
Expand Down Expand Up @@ -67,6 +69,7 @@ private void ShowPortPopup()
return;

popup.labelTMPro.text = Locale.SERVER_BROWSER__PORT;
popup.GetComponentInChildren<TMP_InputField>().text = Multiplayer.Settings.Port.ToString();
AMacro marked this conversation as resolved.
Show resolved Hide resolved

popup.Closed += result =>
{
Expand Down Expand Up @@ -95,6 +98,7 @@ private void ShowPasswordPopup()
return;

popup.labelTMPro.text = Locale.SERVER_BROWSER__PASSWORD;
popup.GetComponentInChildren<TMP_InputField>().text = Multiplayer.Settings.Password;
AMacro marked this conversation as resolved.
Show resolved Hide resolved

popup.Closed += result =>
{
Expand Down
4 changes: 3 additions & 1 deletion Multiplayer/Settings.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using Humanizer;
using UnityEngine;
using UnityModManagerNet;
Expand All @@ -21,6 +21,8 @@ public class Settings : UnityModManager.ModSettings, IDrawable

[Space(10)]
[Header("Server")]
[Draw("Default Remote IP", Tooltip = "The default server IP when joining as a client.")]
public string DefaultRemoteIP = "";
[Draw("Password", Tooltip = "The password required to join your server. Leave blank for no password.")]
public string Password = "";
[Draw("Max Players", Tooltip = "The maximum number of players that can join your server, including yourself.")]
Expand Down