Commit 0353ab4d authored by SherryChaos's avatar SherryChaos

solo port editing enabled

parent 0b80b77e
This diff is collapsed.
......@@ -14561,6 +14561,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4ff1eab11d5a9a44ab6f86c71dd9cf63, type: 3}
m_Name:
m_EditorClassIdentifier:
maxLenght: 0
type: 2
--- !u!1 &275351601
GameObject:
......@@ -34457,6 +34458,7 @@ GameObject:
- component: {fileID: 661378175}
- component: {fileID: 661378174}
- component: {fileID: 661378173}
- component: {fileID: 661378176}
m_Layer: 5
m_Name: InputField Port
m_TagString: Untagged
......@@ -34524,7 +34526,7 @@ MonoBehaviour:
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 0
m_Interactable: 1
m_TargetGraphic: {fileID: 661378174}
m_TextComponent: {fileID: 2120126745}
m_Placeholder: {fileID: 0}
......@@ -34588,6 +34590,20 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 661378171}
m_CullTransparentMesh: 1
--- !u!114 &661378176
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 661378171}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4ff1eab11d5a9a44ab6f86c71dd9cf63, type: 3}
m_Name:
m_EditorClassIdentifier:
maxLenght: 5
type: 0
--- !u!1 &664545264
GameObject:
m_ObjectHideFlags: 0
......@@ -36568,7 +36584,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -0.000030517578}
m_AnchoredPosition: {x: 0, y: 0.000030517578}
m_SizeDelta: {x: 0, y: 300}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &702608002
......@@ -39933,7 +39949,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 476827028}
m_Direction: 2
m_Value: 1
m_Size: 0.6544184
m_Size: 0.7188513
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
......@@ -40848,7 +40864,7 @@ CanvasGroup:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 797084638}
m_Enabled: 1
m_Alpha: 0
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
......@@ -41811,6 +41827,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4ff1eab11d5a9a44ab6f86c71dd9cf63, type: 3}
m_Name:
m_EditorClassIdentifier:
maxLenght: 0
type: 2
--- !u!1 &816616400
GameObject:
......@@ -46153,6 +46170,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4ff1eab11d5a9a44ab6f86c71dd9cf63, type: 3}
m_Name:
m_EditorClassIdentifier:
maxLenght: 0
type: 1
--- !u!1 &900405841
GameObject:
......@@ -54564,6 +54582,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4ff1eab11d5a9a44ab6f86c71dd9cf63, type: 3}
m_Name:
m_EditorClassIdentifier:
maxLenght: 0
type: 2
--- !u!1 &1047381192
GameObject:
......@@ -56991,7 +57010,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0.000030517578}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 300}
m_Pivot: {x: 0.5, y: 1}
--- !u!1 &1117266860
......@@ -191,6 +191,7 @@ namespace MDPro3
return "";
}
public static string port;
public void Launch(string command, bool lockHand, bool noCheck, bool noShuffle)
{
command = command.Replace("'", "\"");
......@@ -198,9 +199,12 @@ namespace MDPro3
command += " Hand=1";
command += " Host=127.0.0.1";
string port = inputPort.text;
if (string.IsNullOrEmpty(port) || port == "0")
port = inputPort.text;
if (string.IsNullOrEmpty(port) || int.Parse(port.Substring(0, 5)) <= 0 || int.Parse(port.Substring(0, 5)) > 65535)
{
port = "7911";
inputPort.text = port;
}
command += " Port=" + port;
string lp = inputLP.text;
......@@ -221,7 +225,7 @@ namespace MDPro3
else
Room.soloLockHand = false;
Room.fromLocalHost = false;
(new Thread(() => { Thread.Sleep(200); TcpHelper.Join("127.0.0.1", Config.Get("DuelPlayerName0", "@ui"), "7911", "", ""); })).Start();
(new Thread(() => { Thread.Sleep(200); TcpHelper.Join("127.0.0.1", Config.Get("DuelPlayerName0", "@ui"), port, "", ""); })).Start();
(new Thread(() => { Thread.Sleep(300); WindBot.Program.Main(Tools.SplitWithPreservedQuotes(command)); })).Start();
}
}
......
......@@ -15,7 +15,7 @@ namespace MDPro3.UI
Path,
NoSpace
}
public int maxLenght = 0;
InputField m_InputFied;
public ValidationType type = ValidationType.Path;
......@@ -44,6 +44,11 @@ namespace MDPro3.UI
if (inputInfo.Length > 0 && inputInfo.Contains(" "))
m_InputFied.text = m_InputFied.text.Replace(" ", "");
}
if(maxLenght > 0)
{
if (inputInfo.Length > maxLenght)
m_InputFied.text = inputInfo.Substring(0, maxLenght);
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment