diff --git a/AquaMai.Mods/GameSystem/SinglePlayer.cs b/AquaMai.Mods/GameSystem/SinglePlayer.cs index ab9fbd2..f408a07 100644 --- a/AquaMai.Mods/GameSystem/SinglePlayer.cs +++ b/AquaMai.Mods/GameSystem/SinglePlayer.cs @@ -37,9 +37,9 @@ public static IEnumerable TargetMethods() public static void Prefix(MonoBehaviour gameMainObject, ref Transform left, ref Transform right) { - left.transform.position = Vector3.zero; + Vector3 position = Camera.main.gameObject.transform.position; + Camera.main.gameObject.transform.position = new Vector3(position.x - 540f, position.y, position.z); right.localScale = Vector3.zero; - GameObject.Find("Mask").transform.position = new Vector3(540f, 0f, 0f); } } diff --git a/AquaMai.Mods/UX/QuickEndPlay.cs b/AquaMai.Mods/UX/QuickEndPlay.cs index a8469bc..a2387d8 100644 --- a/AquaMai.Mods/UX/QuickEndPlay.cs +++ b/AquaMai.Mods/UX/QuickEndPlay.cs @@ -42,7 +42,7 @@ public static void GameProcessPostUpdate(GameProcess __instance, Message[] ____m break; } - if (_timer > 60 && (InputManager.GetTouchPanelAreaDown(InputManager.TouchPanelArea.B4) || InputManager.GetTouchPanelAreaDown(InputManager.TouchPanelArea.E4))) + if (_timer > 60 && (InputManager.GetTouchPanelAreaDown(InputManager.TouchPanelArea.A4) || InputManager.GetButtonDown(0, InputManager.ButtonSetting.Button04))) { var traverse = Traverse.Create(__instance); ___container.processManager.SendMessage(____message[0]); @@ -53,18 +53,28 @@ public static void GameProcessPostUpdate(GameProcess __instance, Message[] ____m private class Ui : MonoBehaviour { + //button position(x,y) topleft point + public float topleftx = Screen.width / 2 - GuiSizes.PlayerWidth * 0.097f; + public float toplefty = Screen.height - GuiSizes.PlayerWidth * 0.09f; + //button size(w,h) + public float width = GuiSizes.PlayerWidth * .50f; + public float height = GuiSizes.PlayerWidth * .23f; + public void OnGUI() { if (_timer < 60) return; - // 这里重新 setup 一下 style 也可以 - var x = GuiSizes.PlayerCenter; - var y = Screen.height - GuiSizes.PlayerWidth * .37f; - var width = GuiSizes.PlayerWidth * .25f; - var height = GuiSizes.PlayerWidth * .13f; - - GUI.Box(new Rect(x, y, width, height), ""); - GUI.Button(new Rect(x, y, width, height), Locale.Skip); + // get button texture 4 -> SKIP + Texture2D buttonTexture = ButtonControllerBase.GetFlatButtonParam(4).Image.texture; + // set button background to transparent + GUIStyle buttonBG = new GUIStyle(GUI.skin.button); + buttonBG.normal.background = null; + buttonBG.hover.background = null; + // rotate -22.5° + Vector2 topLeftPosition = new Vector2(topleftx, toplefty); + GUIUtility.RotateAroundPivot((float)-22.5, topLeftPosition); + // draw button + GUI.Button(new Rect(topleftx, toplefty, width, height), buttonTexture, buttonBG); } } }