Skip to content

Commit bf60b3a

Browse files
committed
[F] layer
1 parent 00a0c11 commit bf60b3a

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

AquaMai.Mods/Utils/DisplayTouchInGame.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ public static void OnGameStart(GameMonitor[] ____monitors)
121121
canvas.transform.SetParent(sub, false);
122122
canvas.SetActive(displayType[i] > 0);
123123
canvasGameObjects[i] = canvas;
124+
GameObject buttons = null;
124125

125126
if (displayType[i] == 3)
126127
{
@@ -148,6 +149,15 @@ public static void OnGameStart(GameMonitor[] ____monitors)
148149
tmps[i] = t;
149150
}
150151

152+
if (displayType[i] != 3)
153+
{
154+
// init button display
155+
buttons = new GameObject("Buttons");
156+
buttons.transform.SetParent(canvas.transform, false);
157+
buttons.transform.localPosition = Vector3.zero;
158+
buttons.transform.localScale = Vector3.one * 450 / 1080f;
159+
}
160+
151161
var touchPanel = Object.Instantiate(prefab, canvas.transform, false);
152162
Object.Destroy(touchPanel.GetComponent<MouseTouchPanel>());
153163
foreach (Transform item in touchPanel.transform)
@@ -166,12 +176,6 @@ public static void OnGameStart(GameMonitor[] ____monitors)
166176

167177
if (displayType[i] != 3)
168178
{
169-
// init button display
170-
var buttons = new GameObject("Buttons");
171-
buttons.transform.SetParent(canvas.transform, false);
172-
buttons.transform.localPosition = Vector3.zero;
173-
buttons.transform.localScale = Vector3.one * 450 / 1080f;
174-
175179
foreach (Transform item in touchPanel.transform)
176180
{
177181
var customGraphic = item.GetComponent<CustomGraphic>();

0 commit comments

Comments
 (0)