Minimum viable
This commit is contained in:
1 parent
476aff202f
commit
07229424a4
14 files changed
+564
No files matched your search
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEngine;
|
||||
using UnityModManagerNet;
|
||||
|
||||
namespace CommunityMapLocation.Config
|
||||
{
|
||||
public class Settings : UnityModManager.ModSettings
|
||||
{
|
||||
public int Port { get; set; } = 9090;
|
||||
public RequestSourceType RequestSourceType { get; set; } = RequestSourceType.Specific;
|
||||
public string RequestSource { get; set; } = "https://pyronicampt.github.io";
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
GUILayout.BeginVertical(GUILayout.ExpandWidth(false));
|
||||
|
||||
GUILayout.Label("Listening Port:");
|
||||
Port = Int32.TryParse(GUILayout.TextField(Port.ToString()), out var port) ? port : Port;
|
||||
|
||||
GUILayout.Label("Allow connections from websites hosted anywhere, or a specific website?");
|
||||
|
||||
UnityModManager.UI.ToggleGroup((int)RequestSourceType, Enum.GetNames(typeof(RequestSourceType)), i => RequestSourceType = (RequestSourceType)i);
|
||||
|
||||
if (RequestSourceType == RequestSourceType.Specific)
|
||||
{
|
||||
GUILayout.Label("Website:");
|
||||
RequestSource = GUILayout.TextField(RequestSource);
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user