forked from akanyan/mu3-mods
fix(MoreProfileOptions): a better way
This commit is contained in:
@ -1,4 +1,8 @@
|
||||
using MU3.CustomUI;
|
||||
using MU3.Data;
|
||||
using MU3.DB;
|
||||
using MU3.Mod;
|
||||
using MU3.User;
|
||||
|
||||
namespace MU3.SceneObject;
|
||||
|
||||
@ -7,8 +11,15 @@ class patch_ANM_CMN_UserDeta_01: ANM_CMN_UserDeta_01 {
|
||||
|
||||
public extern void orig_setUserDetail();
|
||||
public new void setUserDetail() {
|
||||
rating.isRatingDisplay = true;
|
||||
orig_setUserDetail();
|
||||
rating.setForceDirty();
|
||||
|
||||
if(CustomRating.IsEnabled()) {
|
||||
var r = CustomRating.Get();
|
||||
rating.Counter = UserUtil.toRatingFloat(r);
|
||||
rating.AddSuffix(CustomRating.GetSuffix());
|
||||
RatingColorID ratingColorIDFromRating = GameData.getRatingColorIDFromRating100(r);
|
||||
transform.Find("NUM_CMN_UserData_01/NUM_Rating").GetComponent<MU3UICounter>().SpriteIndex = (int)ratingColorIDFromRating;
|
||||
transform.Find("NUM_CMN_UserData_01/NUM_Rating/PAT_Header").GetComponent<MU3UIImageChanger>().patternNumber = (float)ratingColorIDFromRating;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user