mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-13 00:47:27 +08:00
[+] TouchSensitivity
This commit is contained in:
25
AquaMai/TouchSensitivity/Enable.cs
Normal file
25
AquaMai/TouchSensitivity/Enable.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
using HarmonyLib;
|
||||
using IO;
|
||||
using Manager;
|
||||
using MelonLoader;
|
||||
|
||||
namespace AquaMai.TouchSensitivity;
|
||||
|
||||
public class Enable
|
||||
{
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(NewTouchPanel), "SetTouchPanelSensitivity")]
|
||||
public static void SetTouchPanelSensitivityPrefix(List<byte> sensitivity)
|
||||
{
|
||||
var configType = AquaMai.AppConfig.TouchSensitivity.GetType();
|
||||
for (var i = 0; i < 34; i++)
|
||||
{
|
||||
var area = (InputManager.TouchPanelArea)i;
|
||||
var field = configType.GetProperty(area.ToString());
|
||||
var value = (byte)field.GetValue(AquaMai.AppConfig.TouchSensitivity);
|
||||
sensitivity[i] = value;
|
||||
}
|
||||
MelonLogger.Msg("[TouchSensitivity] Applied");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user