Commit 0353ab4d authored by SherryChaos's avatar SherryChaos

solo port editing enabled

parent 0b80b77e
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -14561,6 +14561,7 @@ MonoBehaviour: ...@@ -14561,6 +14561,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4ff1eab11d5a9a44ab6f86c71dd9cf63, type: 3} m_Script: {fileID: 11500000, guid: 4ff1eab11d5a9a44ab6f86c71dd9cf63, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
maxLenght: 0
type: 2 type: 2
--- !u!1 &275351601 --- !u!1 &275351601
GameObject: GameObject:
...@@ -34457,6 +34458,7 @@ GameObject: ...@@ -34457,6 +34458,7 @@ GameObject:
- component: {fileID: 661378175} - component: {fileID: 661378175}
- component: {fileID: 661378174} - component: {fileID: 661378174}
- component: {fileID: 661378173} - component: {fileID: 661378173}
- component: {fileID: 661378176}
m_Layer: 5 m_Layer: 5
m_Name: InputField Port m_Name: InputField Port
m_TagString: Untagged m_TagString: Untagged
...@@ -34524,7 +34526,7 @@ MonoBehaviour: ...@@ -34524,7 +34526,7 @@ MonoBehaviour:
m_PressedTrigger: Pressed m_PressedTrigger: Pressed
m_SelectedTrigger: Selected m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled m_DisabledTrigger: Disabled
m_Interactable: 0 m_Interactable: 1
m_TargetGraphic: {fileID: 661378174} m_TargetGraphic: {fileID: 661378174}
m_TextComponent: {fileID: 2120126745} m_TextComponent: {fileID: 2120126745}
m_Placeholder: {fileID: 0} m_Placeholder: {fileID: 0}
...@@ -34588,6 +34590,20 @@ CanvasRenderer: ...@@ -34588,6 +34590,20 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 661378171} m_GameObject: {fileID: 661378171}
m_CullTransparentMesh: 1 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 --- !u!1 &664545264
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -36568,7 +36584,7 @@ RectTransform: ...@@ -36568,7 +36584,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, 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_SizeDelta: {x: 0, y: 300}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &702608002 --- !u!114 &702608002
...@@ -39933,7 +39949,7 @@ MonoBehaviour: ...@@ -39933,7 +39949,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 476827028} m_HandleRect: {fileID: 476827028}
m_Direction: 2 m_Direction: 2
m_Value: 1 m_Value: 1
m_Size: 0.6544184 m_Size: 0.7188513
m_NumberOfSteps: 0 m_NumberOfSteps: 0
m_OnValueChanged: m_OnValueChanged:
m_PersistentCalls: m_PersistentCalls:
...@@ -40848,7 +40864,7 @@ CanvasGroup: ...@@ -40848,7 +40864,7 @@ CanvasGroup:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 797084638} m_GameObject: {fileID: 797084638}
m_Enabled: 1 m_Enabled: 1
m_Alpha: 0 m_Alpha: 1
m_Interactable: 1 m_Interactable: 1
m_BlocksRaycasts: 1 m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0 m_IgnoreParentGroups: 0
...@@ -41811,6 +41827,7 @@ MonoBehaviour: ...@@ -41811,6 +41827,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4ff1eab11d5a9a44ab6f86c71dd9cf63, type: 3} m_Script: {fileID: 11500000, guid: 4ff1eab11d5a9a44ab6f86c71dd9cf63, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
maxLenght: 0
type: 2 type: 2
--- !u!1 &816616400 --- !u!1 &816616400
GameObject: GameObject:
...@@ -46153,6 +46170,7 @@ MonoBehaviour: ...@@ -46153,6 +46170,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4ff1eab11d5a9a44ab6f86c71dd9cf63, type: 3} m_Script: {fileID: 11500000, guid: 4ff1eab11d5a9a44ab6f86c71dd9cf63, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
maxLenght: 0
type: 1 type: 1
--- !u!1 &900405841 --- !u!1 &900405841
GameObject: GameObject:
...@@ -54564,6 +54582,7 @@ MonoBehaviour: ...@@ -54564,6 +54582,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4ff1eab11d5a9a44ab6f86c71dd9cf63, type: 3} m_Script: {fileID: 11500000, guid: 4ff1eab11d5a9a44ab6f86c71dd9cf63, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
maxLenght: 0
type: 2 type: 2
--- !u!1 &1047381192 --- !u!1 &1047381192
GameObject: GameObject:
...@@ -56991,7 +57010,7 @@ RectTransform: ...@@ -56991,7 +57010,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, 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_SizeDelta: {x: 0, y: 300}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!1 &1117266860 --- !u!1 &1117266860
...@@ -191,6 +191,7 @@ namespace MDPro3 ...@@ -191,6 +191,7 @@ namespace MDPro3
return ""; return "";
} }
public static string port;
public void Launch(string command, bool lockHand, bool noCheck, bool noShuffle) public void Launch(string command, bool lockHand, bool noCheck, bool noShuffle)
{ {
command = command.Replace("'", "\""); command = command.Replace("'", "\"");
...@@ -198,9 +199,12 @@ namespace MDPro3 ...@@ -198,9 +199,12 @@ namespace MDPro3
command += " Hand=1"; command += " Hand=1";
command += " Host=127.0.0.1"; command += " Host=127.0.0.1";
string port = inputPort.text; port = inputPort.text;
if (string.IsNullOrEmpty(port) || port == "0") if (string.IsNullOrEmpty(port) || int.Parse(port.Substring(0, 5)) <= 0 || int.Parse(port.Substring(0, 5)) > 65535)
{
port = "7911"; port = "7911";
inputPort.text = port;
}
command += " Port=" + port; command += " Port=" + port;
string lp = inputLP.text; string lp = inputLP.text;
...@@ -221,7 +225,7 @@ namespace MDPro3 ...@@ -221,7 +225,7 @@ namespace MDPro3
else else
Room.soloLockHand = false; Room.soloLockHand = false;
Room.fromLocalHost = 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(); (new Thread(() => { Thread.Sleep(300); WindBot.Program.Main(Tools.SplitWithPreservedQuotes(command)); })).Start();
} }
} }
......
...@@ -15,7 +15,7 @@ namespace MDPro3.UI ...@@ -15,7 +15,7 @@ namespace MDPro3.UI
Path, Path,
NoSpace NoSpace
} }
public int maxLenght = 0;
InputField m_InputFied; InputField m_InputFied;
public ValidationType type = ValidationType.Path; public ValidationType type = ValidationType.Path;
...@@ -44,6 +44,11 @@ namespace MDPro3.UI ...@@ -44,6 +44,11 @@ namespace MDPro3.UI
if (inputInfo.Length > 0 && inputInfo.Contains(" ")) if (inputInfo.Length > 0 && inputInfo.Contains(" "))
m_InputFied.text = m_InputFied.text.Replace(" ", ""); 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