mu3-mods/NaiveRating/MU3/patch_OptionSelecterController.cs

24 lines
986 B
C#

using MU3.CustomUI;
using MU3.User;
using MU3.Util;
namespace MU3;
class patch_OptionSelecterController: OptionSelecterController {
private chengeParamFuncArray[] cpFuncArray = new chengeParamFuncArray[35];
public extern void orig_init(UserOption.OptionName id);
private extern void orig_chengeParamOther(int currentParam);
public new void init(UserOption.OptionName id) {
orig_init(id);
cpFuncArray[33].max = 2;
}
private void chengeParamOther(int currentParam) {
if(myOptionId == UserOption.OptionName.Rating) {
transform.Find("NUL_SWH_Option_00/NUL_Select/PAT_OnOff").GetComponent<MU3UIImageChanger>().patternNumber = currentParam != 0 ? 0f : 1f;
Singleton<UserManager>.instance.userOption.customSet.Rating = (UserOption.eRating)currentParam;
SingletonMonoBehaviour<SystemUI>.instance.userData.setUserDetail();
} else {
orig_chengeParamOther(currentParam);
}
}
}