mirror of https://github.com/hykilpikonna/AquaDX
parent
cdfb86e021
commit
4006438d93
|
@ -56,6 +56,8 @@ HideSelfMadeCharts=true
|
|||
CustomFont=false
|
||||
# Provide the ability to use custom note skins (advanced feature)
|
||||
CustomNoteSkin=false
|
||||
# Map touch actions to buttons
|
||||
TouchToButtonInput=false
|
||||
# Delayed the animation of the song start screen
|
||||
# Hide "TRACK X" text and DX/Standard chart display box
|
||||
# For recording chart confirmation
|
||||
|
|
|
@ -65,6 +65,8 @@ HideSelfMadeCharts=true
|
|||
CustomFont=false
|
||||
# 提供自定义音符皮肤的能力(高级功能)
|
||||
CustomNoteSkin=false
|
||||
# 映射触摸操作至实体按键
|
||||
TouchToButtonInput=false
|
||||
# 推迟了歌曲开始界面的动画
|
||||
# 隐藏“TRACK X”字样和 DX/标准谱面的显示框
|
||||
# 录制谱面确认用
|
||||
|
|
|
@ -40,6 +40,7 @@ namespace AquaMai
|
|||
public bool HideSelfMadeCharts { get; set; }
|
||||
public bool CustomFont { get; set; }
|
||||
public bool CustomNoteSkin { get; set; }
|
||||
public bool TouchToButtonInput { get; set; }
|
||||
public bool TrackStartProcessTweak { get; set; }
|
||||
public bool HideHanabi { get; set; }
|
||||
public string CustomVersionString { get; set; } = "";
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
using HarmonyLib;
|
||||
using Manager;
|
||||
using Process;
|
||||
using static Manager.InputManager;
|
||||
|
||||
namespace AquaMai.UX;
|
||||
|
||||
public class TouchToButtonInput
|
||||
{
|
||||
private static bool _isPlaying = false;
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(GameProcess),"OnUpdate")]
|
||||
public static void OnUpdate(GameProcess __instance)
|
||||
{
|
||||
var notesManager = new NotesManager();
|
||||
_isPlaying = notesManager.IsPlaying();
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(Manager.InputManager), "GetButtonDown")]
|
||||
public static void GetButtonDown(ref bool __result, int monitorId, ButtonSetting button)
|
||||
{
|
||||
if (_isPlaying || __result) return;
|
||||
if (button.ToString().StartsWith("Button"))
|
||||
{
|
||||
__result = GetTouchPanelAreaDown(monitorId, (TouchPanelArea)button);
|
||||
}
|
||||
else if (button.ToString().Equals("Select"))
|
||||
{
|
||||
__result = GetTouchPanelAreaLongPush(monitorId, TouchPanelArea.C1, 500L) || GetTouchPanelAreaLongPush(monitorId, TouchPanelArea.C2, 500L);
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(Manager.InputManager), "GetButtonPush")]
|
||||
public static void GetButtonPush(ref bool __result, int monitorId, ButtonSetting button)
|
||||
{
|
||||
if (_isPlaying || __result) return;
|
||||
if (button.ToString().StartsWith("Button")) __result = GetTouchPanelAreaPush(monitorId, (TouchPanelArea)button);
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(Manager.InputManager), "GetButtonLongPush")]
|
||||
public static void GetButtonLongPush(ref bool __result, int monitorId, ButtonSetting button, long msec)
|
||||
{
|
||||
if (_isPlaying || __result) return;
|
||||
if (button.ToString().StartsWith("Button")) __result = GetTouchPanelAreaLongPush(monitorId, (TouchPanelArea)button, msec);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue