forked from akanyan/mu3-mods
feat: a decent rating selector?
Except it shows an arrow to the right when it shouldn't
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
namespace MU3.CustomUI;
|
namespace MU3.CustomUI;
|
||||||
|
|
||||||
class patch_MU3UICounter: MU3UICounter {
|
class patch_MU3UICounter: MU3UICounter {
|
||||||
protected extern void orig_calcNumFiguresFloat(double value);
|
protected extern void orig_calcNumFiguresFloat(double value);
|
||||||
protected new void calcNumFiguresFloat(double value) {
|
protected new void calcNumFiguresFloat(double value) {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using MU3.CustomUI;
|
using MU3.CustomUI;
|
||||||
|
|
||||||
namespace MU3.SceneObject;
|
namespace MU3.SceneObject;
|
||||||
|
|
||||||
class patch_ANM_CMN_UserDeta_01: ANM_CMN_UserDeta_01 {
|
class patch_ANM_CMN_UserDeta_01: ANM_CMN_UserDeta_01 {
|
||||||
private MU3UICounter rating;
|
private MU3UICounter rating;
|
||||||
public extern void orig_setUserDetail();
|
public extern void orig_setUserDetail();
|
||||||
|
@ -1,19 +1,43 @@
|
|||||||
using MU3.CustomUI;
|
using MU3.CustomUI;
|
||||||
using MU3.User;
|
using MU3.User;
|
||||||
using MU3.Util;
|
using MU3.Util;
|
||||||
|
using System.Reflection;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace MU3;
|
namespace MU3;
|
||||||
|
|
||||||
class patch_OptionSelecterController: OptionSelecterController {
|
class patch_OptionSelecterController: OptionSelecterController {
|
||||||
private chengeParamFuncArray[] cpFuncArray = new chengeParamFuncArray[35];
|
private chengeParamFuncArray[] cpFuncArray = new chengeParamFuncArray[35];
|
||||||
public extern void orig_init(UserOption.OptionName id);
|
public extern void orig_init(UserOption.OptionName id);
|
||||||
private extern void orig_chengeParamOther(int currentParam);
|
|
||||||
public new void init(UserOption.OptionName id) {
|
public new void init(UserOption.OptionName id) {
|
||||||
orig_init(id);
|
orig_init(id);
|
||||||
cpFuncArray[33].max = 2;
|
cpFuncArray[33].max = 2;
|
||||||
|
|
||||||
|
if(id == UserOption.OptionName.Rating) {
|
||||||
|
var rct = transform.Find("NUL_SWH_Option_00/NUL_Select/PAT_OnOff").GetComponent<RectTransform>();
|
||||||
|
var changer = transform.Find("NUL_SWH_Option_00/NUL_Select/PAT_OnOff").GetComponent<MU3UIImageChanger>();
|
||||||
|
|
||||||
|
rct.anchoredPosition = new Vector3(0f, -5f, 0);
|
||||||
|
rct.sizeDelta = new Vector2(158, 70);
|
||||||
|
|
||||||
|
var spritesFi = typeof(MU3UIImageChanger).GetField("_sprites", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||||
|
var tex = ((Sprite[])spritesFi.GetValue(changer))[0].texture;
|
||||||
|
var newSprites = new Sprite[3];
|
||||||
|
newSprites[0] = Sprite.Create(tex, new Rect(1552.0f, 366.0f, 160.0f, 65.0f), new Vector2(80.0f, 0.0f));
|
||||||
|
newSprites[1] = Sprite.Create(tex, new Rect(1221.0f, 1488.0f, 160.0f, 70.0f), new Vector2(80.0f, 35.0f));
|
||||||
|
newSprites[2] = Sprite.Create(tex, new Rect(1221.0f, 1410.0f, 160.0f, 70.0f), new Vector2(80.0f, 35.0f));
|
||||||
|
|
||||||
|
spritesFi.SetValue(changer, newSprites);
|
||||||
|
|
||||||
|
changer.patternNumber = (int)Singleton<UserManager>.instance.userOption.customSet.Rating;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private extern void orig_chengeParamOther(int currentParam);
|
||||||
private void chengeParamOther(int currentParam) {
|
private void chengeParamOther(int currentParam) {
|
||||||
if(myOptionId == UserOption.OptionName.Rating) {
|
if(myOptionId == UserOption.OptionName.Rating) {
|
||||||
transform.Find("NUL_SWH_Option_00/NUL_Select/PAT_OnOff").GetComponent<MU3UIImageChanger>().patternNumber = currentParam != 0 ? 0f : 1f;
|
var changer = transform.Find("NUL_SWH_Option_00/NUL_Select/PAT_OnOff").GetComponent<MU3UIImageChanger>();
|
||||||
|
changer.patternNumber = currentParam;
|
||||||
Singleton<UserManager>.instance.userOption.customSet.Rating = (UserOption.eRating)currentParam;
|
Singleton<UserManager>.instance.userOption.customSet.Rating = (UserOption.eRating)currentParam;
|
||||||
SingletonMonoBehaviour<SystemUI>.instance.userData.setUserDetail();
|
SingletonMonoBehaviour<SystemUI>.instance.userData.setUserDetail();
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
using MU3.CustomUI;
|
using MonoMod;
|
||||||
|
using MU3.CustomUI;
|
||||||
using MU3.Sequence;
|
using MU3.Sequence;
|
||||||
using MU3.User;
|
using MU3.User;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace MU3;
|
namespace MU3;
|
||||||
|
|
||||||
class patch_UIResultBattlePoint: UIResultBattlePoint {
|
class patch_UIResultBattlePoint: UIResultBattlePoint {
|
||||||
private Animator animator_;
|
private Animator animator_;
|
||||||
private MU3UICounter counterScore_;
|
private MU3UICounter counterScore_;
|
||||||
@ -12,8 +14,9 @@ class patch_UIResultBattlePoint: UIResultBattlePoint {
|
|||||||
private MU3UICounter counterScoreMinus_;
|
private MU3UICounter counterScoreMinus_;
|
||||||
private GameObject hideScore_;
|
private GameObject hideScore_;
|
||||||
|
|
||||||
private extern void orig_disable(MU3UICounter counter);
|
[MonoModIgnore]
|
||||||
private void disable(MU3UICounter counter) => orig_disable(counter);
|
private extern void disable(MU3UICounter counter);
|
||||||
|
|
||||||
public extern void orig_initTechRating(PlayInfo playInfo);
|
public extern void orig_initTechRating(PlayInfo playInfo);
|
||||||
public new void initTechRating(PlayInfo playInfo) {
|
public new void initTechRating(PlayInfo playInfo) {
|
||||||
((patch_MU3UICounter)counterScore_).isDispSuffix = NaiveRating.IsEnabled();
|
((patch_MU3UICounter)counterScore_).isDispSuffix = NaiveRating.IsEnabled();
|
||||||
|
Reference in New Issue
Block a user