Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mercury233
ygopro2
Commits
860e5d14
Commit
860e5d14
authored
Apr 10, 2019
by
Unicorn369
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉感觉没用的按钮
parent
df89d805
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
1866 deletions
+84
-1866
Assets/SibylSystem/selectServer/SelectServer.cs
Assets/SibylSystem/selectServer/SelectServer.cs
+1
-1
Assets/SibylSystem/selectServer/SelectServer.cs.bak
Assets/SibylSystem/selectServer/SelectServer.cs.bak
+49
-66
Assets/transUI/prefab/selectServerWithRoomlist.prefab
Assets/transUI/prefab/selectServerWithRoomlist.prefab
+34
-1799
No files found.
Assets/SibylSystem/selectServer/SelectServer.cs
View file @
860e5d14
...
...
@@ -160,7 +160,7 @@ public class SelectServer : WindowServantSP
KF_onlineGame
(
Name
,
ipString
,
portString
,
versionString
,
pswString
);
}
public
void
KF_onlineGame
(
string
Name
,
string
ipString
,
string
portString
,
string
versionString
,
string
pswString
=
""
)
public
void
KF_onlineGame
(
string
Name
,
string
ipString
,
string
portString
,
string
versionString
,
string
pswString
=
""
)
{
name
=
Name
;
Config
.
Set
(
"name"
,
name
);
...
...
Assets/SibylSystem/selectServer/SelectServer.cs.bak
View file @
860e5d14
...
...
@@ -14,20 +14,18 @@ public class SelectServer : WindowServantSP
UIInput inputPsw;
UIInput inputVersion;
UISprite inputIP_;
UISprite inputPort_;
public override void initialize()
{
createWindow(Program.I().new_ui_selectServer);
UIHelper.registEvent(gameObject, "exit_", onClickExit);
UIHelper.registEvent(gameObject, "face_", onClickFace);
UIHelper.registEvent(gameObject, "join_", onClickJoin);
UIHelper.registEvent(gameObject, "roomList_", onClickRoomList); // 可有可无的选项
UIHelper.registEvent(gameObject, "quickSingle_", onQuickSingle);// 好像没什么卵用
UIHelper.registEvent(gameObject, "quickMatch_", onQuickMatch); // 好像没什么卵用
UIHelper.registEvent(gameObject, "quickAI_", onQuickAI); // 好像没什么卵用
UIHelper.registEvent(gameObject, "quickTag_", onQuickTag); // 好像没什么卵用
serversList = UIHelper.getByName<UIPopupList>(gameObject, "server");
serversList.fontSize = 20;
serversList.value = Config.Get("serversPicker", "[
TCG+OCG]Szefo
");
serversList.value = Config.Get("serversPicker", "[
OCG]Koishi
");
UIHelper.registEvent(gameObject, "server", pickServer);
UIHelper.getByName<UIInput>(gameObject, "name_").value = Config.Get("name", "YGOPro2 User");
//UIHelper.getByName<UIInput>(gameObject, "name_").defaultText = "昵称不能为空";
...
...
@@ -35,8 +33,10 @@ public class SelectServer : WindowServantSP
UIHelper.registEvent(gameObject, "history_", onSelected);
name = Config.Get("name", "YGOPro2 User");
inputIP = UIHelper.getByName<UIInput>(gameObject, "ip_");
inputIP_ = UIHelper.getByName<UISprite>(gameObject, "ip_");
//inputIP.defaultText = "服务器IP 或 域名";
inputPort = UIHelper.getByName<UIInput>(gameObject, "port_");
inputPort_ = UIHelper.getByName<UISprite>(gameObject, "port_");
//inputPort.defaultText = "端口";
inputPsw = UIHelper.getByName<UIInput>(gameObject, "psw_");
//inputPsw.defaultText = "房间密码";
...
...
@@ -44,6 +44,7 @@ public class SelectServer : WindowServantSP
set_version("0x" + String.Format("{0:X}", Config.ClientVersion));
SetActiveFalse();
}
private void pickServer()
{
string server = serversList.value;
...
...
@@ -54,6 +55,10 @@ public class SelectServer : WindowServantSP
UIHelper.getByName<UIInput>(gameObject, "ip_").value = "s1.ygo233.com";
UIHelper.getByName<UIInput>(gameObject, "port_").value = "233";
Config.Set("serversPicker", "[OCG]Mercury233");
list.enabled = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
}
case "[OCG]Koishi":
...
...
@@ -61,6 +66,10 @@ public class SelectServer : WindowServantSP
UIHelper.getByName<UIInput>(gameObject, "ip_").value = "koishi.moecube.com";
UIHelper.getByName<UIInput>(gameObject, "port_").value = "7210";
Config.Set("serversPicker", "[OCG]Koishi");
list.enabled = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
}
case "[TCG]Koishi":
...
...
@@ -68,6 +77,10 @@ public class SelectServer : WindowServantSP
UIHelper.getByName<UIInput>(gameObject, "ip_").value = "koishi.moecube.com";
UIHelper.getByName<UIInput>(gameObject, "port_").value = "1311";
Config.Set("serversPicker", "[TCG]Koishi");
list.enabled = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
}
case "[222DIY]Koishi":
...
...
@@ -75,6 +88,10 @@ public class SelectServer : WindowServantSP
UIHelper.getByName<UIInput>(gameObject, "ip_").value = "koishi.moecube.com";
UIHelper.getByName<UIInput>(gameObject, "port_").value = "222";
Config.Set("serversPicker", "[222DIY]Koishi");
list.enabled = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
}
case "[轮抽服]2Pick":
...
...
@@ -82,6 +99,10 @@ public class SelectServer : WindowServantSP
UIHelper.getByName<UIInput>(gameObject, "ip_").value = "2pick.mycard.moe";
UIHelper.getByName<UIInput>(gameObject, "port_").value = "765";
Config.Set("serversPicker", "[轮抽服]2Pick");
list.enabled = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
}
case "[OCG&TCG]한국서버":
...
...
@@ -89,60 +110,25 @@ public class SelectServer : WindowServantSP
UIHelper.getByName<UIInput>(gameObject, "ip_").value = "cygopro.fun25.co.kr";
UIHelper.getByName<UIInput>(gameObject, "port_").value = "17225";
Config.Set("serversPicker", "[OCG&TCG]한국서버");
list.enabled = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
}
default:
{
Config.Set("serversPicker", "[Custom]");
list.enabled = true;
inputIP_.enabled = true;
inputPort_.enabled = true;
break;
}
}
}
public void onQuickSingle()
{
if (!isShowed)
{
return;
}
onQuick("");
}
public void onQuickAI()
{
if (!isShowed)
{
return;
}
onQuick("AI");
}
public void onQuickTag()
{
if (!isShowed)
{
return;
}
onQuick("T");
}
public void onQuickMatch()
{
if (!isShowed)
{
return;
}
onQuick("M");
}
private void onQuick(string psw)
{
string Name = UIHelper.getByName<UIInput>(gameObject, "name_").value;
string ipString = UIHelper.getByName<UIInput>(gameObject, "ip_").value;
string portString = UIHelper.getByName<UIInput>(gameObject, "port_").value;
string pswString = psw;
string versionString = UIHelper.getByName<UIInput>(gameObject, "version_").value;
KF_onlineGame(Name, ipString, portString, versionString, pswString);
}
void onSelected()
{
if (list != null)
...
...
@@ -284,25 +270,22 @@ public class SelectServer : WindowServantSP
{
if (name != "")
{
if (pswString != "L")
string fantasty = "(" + versionString + ")" + ipString + ":" + portString + " " + pswString;
list.items.Remove(fantasty);
list.items.Insert(0, fantasty);
list.value = fantasty;
if (list.items.Count>5)
{
list.items.RemoveAt(list.items.Count - 1);
}
string all = "";
for (int i = 0; i < list.items.Count; i++)
{
string fantasty = "(" + versionString + ")" + ipString + ":" + portString + " " + pswString;
list.items.Remove(fantasty);
list.items.Insert(0, fantasty);
list.value = fantasty;
if (list.items.Count > 5)
{
list.items.RemoveAt(list.items.Count - 1);
}
string all = "";
for (int i = 0; i < list.items.Count; i++)
{
all += list.items[i] + "\r\n";
}
File.WriteAllText("config/hosts.conf", all);
printFile(false);
all += list.items[i] + "\r\n";
}
(new Thread(() => { TcpHelper.join(ipString, name, portString, pswString, versionString); })).Start();
File.WriteAllText("config/hosts.conf", all);
printFile(false);
(new Thread(() => { TcpHelper.join(ipString, name, portString, pswString,versionString); })).Start();
}
else
{
...
...
Assets/transUI/prefab/selectServerWithRoomlist.prefab
View file @
860e5d14
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment