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
1
Issues
1
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
hex
ygopro2
Commits
3606ed65
Commit
3606ed65
authored
Jul 01, 2025
by
hex
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove saved window position offsets, always center popup windows
parent
d7adc838
Pipeline
#38385
failed
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
38 deletions
+65
-38
Assets/SibylSystem/Menu/Menu.cs
Assets/SibylSystem/Menu/Menu.cs
+46
-21
Assets/SibylSystem/WindowServantSP.cs
Assets/SibylSystem/WindowServantSP.cs
+17
-15
Assets/transUI/prefab/trans_menu.prefab
Assets/transUI/prefab/trans_menu.prefab
+1
-1
ProjectSettings/ProjectSettings.asset
ProjectSettings/ProjectSettings.asset
+1
-1
No files found.
Assets/SibylSystem/Menu/Menu.cs
View file @
3606ed65
using
UnityEngine
;
using
System
;
using
System
;
using
System
.Collections.Generic
;
using
System.Diagnostics
;
using
System.IO
;
using
System.Net
;
using
System.Text
;
using
System.Threading
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
Menu
:
WindowServantSP
public
class
Menu
:
WindowServantSP
{
//GameObject screen;
public
override
void
initialize
()
...
...
@@ -40,6 +40,7 @@ public class Menu : WindowServantSP
static
int
Version
=
0
;
string
upurl
=
""
;
void
up
()
{
try
...
...
@@ -80,6 +81,7 @@ public class Menu : WindowServantSP
}
bool
outed
=
false
;
public
override
void
preFrameFunction
()
{
base
.
preFrameFunction
();
...
...
@@ -154,15 +156,29 @@ public class Menu : WindowServantSP
Application
.
OpenURL
(
"https://github.com/Unicorn369/closeup_mobile/releases/tag/0.1"
);
#elif UNITY_ANDROID //Android
AndroidJavaObject
jo
=
new
AndroidJavaObject
(
"cn.unicorn369.library.API"
);
if
(!
File
.
Exists
(
"updates/closeup_0.1.txt"
))
{
//用于检查更新
if
(
File
.
Exists
(
"closeup_0.1.zip"
))
{
//如果有则直接解压
if
(!
File
.
Exists
(
"updates/closeup_0.1.txt"
))
{
//用于检查更新
if
(
File
.
Exists
(
"closeup_0.1.zip"
))
{
//如果有则直接解压
jo
.
Call
(
"doExtractZipFile"
,
"closeup_0.1.zip"
,
Program
.
ANDROID_GAME_PATH
);
}
else
if
(
File
.
Exists
(
"updates/closeup_0.1.txt"
)){
//如果有则下载更新包
jo
.
Call
(
"doDownloadZipFile"
,
"https://github.com/Unicorn369/closeup_mobile/releases/download/0.1/closeup_0.1.zip"
);
}
else
{
//否则下载并解压,锁定目录:ANDROID_GAME_PATH
jo
.
Call
(
"doDownloadZipFile"
,
"https://github.com/Unicorn369/closeup_mobile/releases/download/0.1/closeup_0.1.zip"
);
}
}
else
{
else
if
(
File
.
Exists
(
"updates/closeup_0.1.txt"
))
{
//如果有则下载更新包
jo
.
Call
(
"doDownloadZipFile"
,
"https://github.com/Unicorn369/closeup_mobile/releases/download/0.1/closeup_0.1.zip"
);
}
else
{
//否则下载并解压,锁定目录:ANDROID_GAME_PATH
jo
.
Call
(
"doDownloadZipFile"
,
"https://github.com/Unicorn369/closeup_mobile/releases/download/0.1/closeup_0.1.zip"
);
}
}
else
{
jo
.
Call
(
"showToast"
,
"已是最新,无需再次下载!"
);
Program
.
PrintToChat
(
InterString
.
Get
(
"已是最新,无需再次下载!"
));
}
...
...
@@ -178,12 +194,11 @@ public class Menu : WindowServantSP
File
.
Delete
(
"commamd.shell"
);
}
}
catch
(
Exception
)
{
}
catch
(
Exception
)
{
}
}
static
int
lastTime
=
0
;
public
static
void
checkCommend
()
{
if
(
Program
.
TimePassed
()
-
lastTime
>
1000
)
...
...
@@ -223,7 +238,7 @@ public class Menu : WindowServantSP
string
all
=
""
;
try
{
all
=
File
.
ReadAllText
(
"commamd.shell"
,
Encoding
.
UTF8
);
all
=
File
.
ReadAllText
(
"commamd.shell"
,
Encoding
.
UTF8
);
string
[]
mats
=
all
.
Split
(
" "
);
if
(
mats
.
Length
>
0
)
{
...
...
@@ -232,33 +247,43 @@ public class Menu : WindowServantSP
case
"online"
:
if
(
mats
.
Length
==
5
)
{
UIHelper
.
iniFaces
();
//加载用户头像
Program
.
I
().
selectServer
.
KF_onlineGame
(
mats
[
1
],
mats
[
2
],
mats
[
3
],
mats
[
4
]);
UIHelper
.
iniFaces
();
//加载用户头像
Program
.
I
()
.
selectServer
.
KF_onlineGame
(
mats
[
1
],
mats
[
2
],
mats
[
3
],
mats
[
4
]);
}
if
(
mats
.
Length
==
6
)
{
UIHelper
.
iniFaces
();
Program
.
I
().
selectServer
.
KF_onlineGame
(
mats
[
1
],
mats
[
2
],
mats
[
3
],
mats
[
4
],
mats
[
5
]);
Program
.
I
()
.
selectServer
.
KF_onlineGame
(
mats
[
1
],
mats
[
2
],
mats
[
3
],
mats
[
4
],
mats
[
5
]
);
}
break
;
case
"edit"
:
if
(
mats
.
Length
==
2
)
{
Program
.
I
().
selectDeck
.
KF_editDeck
(
mats
[
1
]);
//编辑卡组
Program
.
I
().
selectDeck
.
KF_editDeck
(
mats
[
1
]);
//编辑卡组
}
break
;
case
"replay"
:
if
(
mats
.
Length
==
2
)
{
UIHelper
.
iniFaces
();
Program
.
I
().
selectReplay
.
KF_replay
(
mats
[
1
]);
//编辑录像
Program
.
I
().
selectReplay
.
KF_replay
(
mats
[
1
]);
//编辑录像
}
break
;
case
"puzzle"
:
if
(
mats
.
Length
==
2
)
{
UIHelper
.
iniFaces
();
Program
.
I
().
puzzleMode
.
KF_puzzle
(
mats
[
1
]);
//运行残局
Program
.
I
().
puzzleMode
.
KF_puzzle
(
mats
[
1
]);
//运行残局
}
break
;
default
:
...
...
Assets/SibylSystem/WindowServantSP.cs
View file @
3606ed65
using
System
;
using
UnityEngine
;
public
class
WindowServantSP
:
Servant
public
class
WindowServantSP
:
Servant
{
public
bool
instanceHide
=
false
;
...
...
@@ -31,7 +32,7 @@ public class WindowServantSP : Servant
base
.
applyHideArrangement
();
if
(
gameObject
!=
null
)
{
if
(
instanceHide
)
if
(
instanceHide
)
{
return
;
}
...
...
@@ -51,7 +52,7 @@ public class WindowServantSP : Servant
resize
();
}
public
void
SetActiveFalse
()
public
void
SetActiveFalse
()
{
gameObject
.
SetActive
(
false
);
}
...
...
@@ -101,19 +102,17 @@ public class WindowServantSP : Servant
public
void
createWindow
(
GameObject
mod
)
{
gameObject
=
create
(
mod
,
Vector3
.
zero
,
Vector3
.
zero
,
false
,
Program
.
ui_windows_2d
);
gameObject
=
create
(
mod
,
Vector3
.
zero
,
Vector3
.
zero
,
false
,
Program
.
ui_windows_2d
);
UIHelper
.
InterGameObject
(
gameObject
);
Vector3
v
=
new
Vector3
();
v
.
x
=
Mathf
.
Clamp
(
Config
.
getFloat
(
"x_"
+
gameObject
.
name
),
-
0.5f
,
0.5f
)
*
(
float
)
Screen
.
width
;
v
.
y
=
Mathf
.
Clamp
(
Config
.
getFloat
(
"y_"
+
gameObject
.
name
),
-
0.5f
,
0.5f
)
*
(
float
)
Screen
.
height
;
gameObject
.
transform
.
localPosition
=
v
;
// Vector3 v = new Vector3();
// v.x =
// Mathf.Clamp(Config.getFloat("x_" + gameObject.name), -0.5f, 0.5f) * (float)Screen.width;
// v.y =
// Mathf.Clamp(Config.getFloat("y_" + gameObject.name), -0.5f, 0.5f)
// * (float)Screen.height;
// gameObject.transform.localPosition = v;
// 原本是从配置读取坐标——删除或注释掉, 只进行居中显示
gameObject
.
transform
.
localPosition
=
Vector3
.
zero
;
var
panelKIller
=
gameObject
.
GetComponent
<
panelKIller
>();
if
(
panelKIller
==
null
)
{
...
...
@@ -125,10 +124,13 @@ public class WindowServantSP : Servant
public
override
void
ES_quit
()
{
base
.
ES_quit
();
// 不再保存坐标
/*
if (gameObject != null)
{
Config.setFloat("x_" + gameObject.name, gameObject.transform.localPosition.x / (float)Screen.width);
Config.setFloat("y_" + gameObject.name, gameObject.transform.localPosition.y / (float)Screen.height);
}
*/
}
}
Assets/transUI/prefab/trans_menu.prefab
View file @
3606ed65
...
...
@@ -1221,7 +1221,7 @@ MonoBehaviour:
generateNormals
:
0
widgetsAreStatic
:
0
cullWhileDragging
:
1
alwaysOnScreen
:
0
alwaysOnScreen
:
1
anchorOffset
:
0
softBorderPadding
:
1
renderQueue
:
0
...
...
ProjectSettings/ProjectSettings.asset
View file @
3606ed65
...
...
@@ -184,7 +184,7 @@ PlayerSettings:
serializedVersion
:
2
m_Bits
:
238
iPhoneSdkVersion
:
988
iOSTargetOSVersionString
:
1
5
.0
iOSTargetOSVersionString
:
1
3
.0
tvOSSdkVersion
:
0
tvOSRequireExtendedGameController
:
0
tvOSTargetOSVersionString
:
9.0
...
...
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