293 lines
10 KiB
C#
293 lines
10 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
using DG.Tweening;
|
|
using DG.Tweening.Core;
|
|
using DG.Tweening.Plugins.Options;
|
|
using MarsSDK;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
// Token: 0x02000238 RID: 568
|
|
[Token(Token = "0x2000238")]
|
|
public class UIMagicStats : GameCanvasBase
|
|
{
|
|
// Token: 0x06001598 RID: 5528 RVA: 0x000312F0 File Offset: 0x0002F4F0
|
|
[Token(Token = "0x6001598")]
|
|
[Address(RVA = "0x10E71C0", Offset = "0x10E59C0", VA = "0x1810E71C0", Slot = "11")]
|
|
public override void Init()
|
|
{
|
|
UINavigator navigator4;
|
|
UIHandlerBase[] array6;
|
|
UILabelHandler uilabelHandler4;
|
|
for (;;)
|
|
{
|
|
UIMagicStatsHandler[] array = this.topHandlers;
|
|
int num = 0;
|
|
UIMagicStatsHandler[] array2;
|
|
if (num < array.Length)
|
|
{
|
|
array[num].index = num;
|
|
num++;
|
|
array2 = this.topHandlers;
|
|
}
|
|
int length = array2.Length;
|
|
if (num < length)
|
|
{
|
|
UIMagicStatsHandler uimagicStatsHandler = array2[num];
|
|
Action<UIHandlerBase> action = new Action(this.OnTopHandlerSelected);
|
|
uimagicStatsHandler.onSelectedHandler = action;
|
|
Action<UIHandlerBase> action2 = new Action(this.OnTopHandlerDeselected);
|
|
uimagicStatsHandler.onDeselectedHandler = action2;
|
|
num++;
|
|
}
|
|
UINavigator navigator = this.navigator;
|
|
UIMagicStatsHandler[] array3 = this.topHandlers;
|
|
navigator.BindPointerEnterEvent(array3);
|
|
UINavigator navigator2 = this.navigator;
|
|
UIMagicStatsHandler[] array4 = this.topHandlers;
|
|
navigator2.BindPointerExitEvent(array4);
|
|
this.confirmHandler.index = (int)((ulong)99L);
|
|
UILabelHandler uilabelHandler = this.confirmHandler;
|
|
Action<UIHandlerBase> action3 = new Action(this.OnBottomHandlerSelected);
|
|
uilabelHandler.onSelectedHandler = action3;
|
|
UILabelHandler uilabelHandler2 = this.confirmHandler;
|
|
Action<UIHandlerBase> action4 = new Action(this.OnBottomHandlerDeselected);
|
|
uilabelHandler2.onDeselectedHandler = action4;
|
|
UINavigator navigator3 = this.navigator;
|
|
UIHandlerBase[] array5 = new UIHandlerBase[1];
|
|
UILabelHandler uilabelHandler3 = this.confirmHandler;
|
|
if (uilabelHandler3 == 0 || array5 != 0)
|
|
{
|
|
array5[0] = uilabelHandler3;
|
|
navigator3.BindPointerEnterEvent(array5);
|
|
navigator4 = this.navigator;
|
|
array6 = new UIHandlerBase[1];
|
|
uilabelHandler4 = this.confirmHandler;
|
|
if (uilabelHandler4 == 0 || array6 != 0)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
array6[0] = uilabelHandler4;
|
|
navigator4.BindPointerExitEvent(array6);
|
|
UINavigationSetter uinavigationSetter = UINavigationSetter.Get(UINavigationMode.MatrixVerticalFirst, true, 3);
|
|
UIMagicStatsHandler[] array7 = this.topHandlers;
|
|
uinavigationSetter.Apply(array7);
|
|
UIMagicStatsHandler uimagicStatsHandler2 = this.topHandlers[0];
|
|
UILabelHandler uilabelHandler5 = this.confirmHandler;
|
|
uimagicStatsHandler2.SetupNavigationHandler(Direction2D.Up, uilabelHandler5);
|
|
UIMagicStatsHandler uimagicStatsHandler3 = this.topHandlers[3];
|
|
UILabelHandler uilabelHandler6 = this.confirmHandler;
|
|
uimagicStatsHandler3.SetupNavigationHandler(Direction2D.Up, uilabelHandler6);
|
|
UIMagicStatsHandler uimagicStatsHandler4 = this.topHandlers[2];
|
|
UILabelHandler uilabelHandler7 = this.confirmHandler;
|
|
uimagicStatsHandler4.SetupNavigationHandler(Direction2D.Down, uilabelHandler7);
|
|
UIMagicStatsHandler uimagicStatsHandler5 = this.topHandlers[5];
|
|
UILabelHandler uilabelHandler8 = this.confirmHandler;
|
|
uimagicStatsHandler5.SetupNavigationHandler(Direction2D.Down, uilabelHandler8);
|
|
UIMagicStatsHandler[] array8 = this.topHandlers;
|
|
UILabelHandler uilabelHandler9 = this.confirmHandler;
|
|
UIMagicStatsHandler uimagicStatsHandler6 = array8[2];
|
|
uilabelHandler9.SetupNavigationHandler(Direction2D.Up, uimagicStatsHandler6);
|
|
UIMagicStatsHandler[] array9 = this.topHandlers;
|
|
UILabelHandler uilabelHandler10 = this.confirmHandler;
|
|
UIMagicStatsHandler uimagicStatsHandler7 = array9[0];
|
|
uilabelHandler10.SetupNavigationHandler(Direction2D.Down, uimagicStatsHandler7);
|
|
}
|
|
|
|
// Token: 0x06001599 RID: 5529 RVA: 0x00031548 File Offset: 0x0002F748
|
|
[Token(Token = "0x6001599")]
|
|
[Address(RVA = "0x10E7060", Offset = "0x10E5860", VA = "0x1810E7060", Slot = "12")]
|
|
protected override void Appear(Action completeHandler)
|
|
{
|
|
UIMagicStatsHandler[] array = this.topHandlers;
|
|
int num = 0;
|
|
int length = array.Length;
|
|
if (num < length)
|
|
{
|
|
array[num].UpdateContent();
|
|
num++;
|
|
}
|
|
Game.GameSave.tips.ResetAllTips();
|
|
UIMagicStatsHandler[] array2 = this.topHandlers;
|
|
UINavigator navigator = this.navigator;
|
|
UIMagicStatsHandler uimagicStatsHandler = array2[0];
|
|
navigator.SetDefaultHandler(uimagicStatsHandler);
|
|
this.bottomNavigationEffect.HideImmediate();
|
|
GameObject gameObject = this.bottomSubmissionEffect.gameObject;
|
|
int num2 = 0;
|
|
gameObject.SetActive(num2 != 0);
|
|
base.Appear(completeHandler);
|
|
}
|
|
|
|
// Token: 0x0600159A RID: 5530 RVA: 0x000315E0 File Offset: 0x0002F7E0
|
|
[Token(Token = "0x600159A")]
|
|
[Address(RVA = "0x7B1840", Offset = "0x7B0040", VA = "0x1807B1840", Slot = "18")]
|
|
public override void Move(Direction2D direction)
|
|
{
|
|
this.navigator.Move(direction);
|
|
}
|
|
|
|
// Token: 0x0600159B RID: 5531 RVA: 0x00031600 File Offset: 0x0002F800
|
|
[Token(Token = "0x600159B")]
|
|
[Address(RVA = "0x10E7990", Offset = "0x10E6190", VA = "0x1810E7990")]
|
|
private void OnTopHandlerSelected(UIHandlerBase handler)
|
|
{
|
|
Text text = this.description;
|
|
UIMagicStatsHandler[] array = this.topHandlers;
|
|
int index = handler.index;
|
|
string text2 = array[index].description;
|
|
text.text = text2;
|
|
TweenerCore<Color, Color, ColorOptions> tweenerCore = DOTweenModuleUI.DOFade(this.description, 1f, 0.5f).SetEase((Ease)((uint)3)).Play<TweenerCore<Color, Color, ColorOptions>>();
|
|
RectTransform root = this.topNavigationEffect.root;
|
|
RectTransform rectTransform = handler.rectTransform;
|
|
root.parentInternal = rectTransform;
|
|
UINavigationEffect uinavigationEffect = this.topNavigationEffect;
|
|
Vector2 zero = Vector2.zero;
|
|
uinavigationEffect.root.anchoredPosition = zero;
|
|
UIMagicStatsHandler[] array2 = this.topHandlers;
|
|
UINavigationEffect uinavigationEffect2 = this.topNavigationEffect;
|
|
int index2 = handler.index;
|
|
float preferredWidth = array2[index2].label.preferredWidth;
|
|
Vector2 right = Vector2.right;
|
|
uinavigationEffect2.icons[0].rectTransform.anchoredPosition = right;
|
|
uinavigationEffect2.icons[1].rectTransform.anchoredPosition = right;
|
|
this.topNavigationEffect.Appear();
|
|
Game.PlayHandlerSE(UIHandlerSFX.Navigation);
|
|
}
|
|
|
|
// Token: 0x0600159C RID: 5532 RVA: 0x00031718 File Offset: 0x0002F918
|
|
[Token(Token = "0x600159C")]
|
|
[Address(RVA = "0x10DE1E0", Offset = "0x10DC9E0", VA = "0x1810DE1E0")]
|
|
private void OnTopHandlerDeselected(UIHandlerBase handler)
|
|
{
|
|
this.topNavigationEffect.Hide();
|
|
}
|
|
|
|
// Token: 0x0600159D RID: 5533 RVA: 0x00031738 File Offset: 0x0002F938
|
|
[Token(Token = "0x600159D")]
|
|
[Address(RVA = "0x10E78D0", Offset = "0x10E60D0", VA = "0x1810E78D0")]
|
|
private void OnBottomHandlerSelected(UIHandlerBase handler)
|
|
{
|
|
this.bottomNavigationEffect.Appear();
|
|
Game.PlayHandlerSE(UIHandlerSFX.Navigation);
|
|
Text text = this.description;
|
|
int num = 0;
|
|
TweenerCore<Color, Color, ColorOptions> tweenerCore = DOTweenModuleUI.DOFade(text, (float)num, 0.5f).SetEase((Ease)((uint)3)).Play<TweenerCore<Color, Color, ColorOptions>>();
|
|
}
|
|
|
|
// Token: 0x0600159E RID: 5534 RVA: 0x00031780 File Offset: 0x0002F980
|
|
[Token(Token = "0x600159E")]
|
|
[Address(RVA = "0xDE5720", Offset = "0xDE3F20", VA = "0x180DE5720")]
|
|
private void OnBottomHandlerDeselected(UIHandlerBase handler)
|
|
{
|
|
this.bottomNavigationEffect.Hide();
|
|
}
|
|
|
|
// Token: 0x0600159F RID: 5535 RVA: 0x000317A0 File Offset: 0x0002F9A0
|
|
[Token(Token = "0x600159F")]
|
|
[Address(RVA = "0x10E7CA0", Offset = "0x10E64A0", VA = "0x1810E7CA0", Slot = "21")]
|
|
public override void Submit()
|
|
{
|
|
if (this.navigator.currentHandler && this.navigator.currentHandler.index == 99)
|
|
{
|
|
base.Close();
|
|
this.bottomSubmissionEffect.gameObject.SetActive(true);
|
|
Game.PlayHandlerSE(UIHandlerSFX.Submit);
|
|
Game.PlayHandlerScaleEffect(this.confirmHandler);
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060015A0 RID: 5536 RVA: 0x00031804 File Offset: 0x0002FA04
|
|
[Token(Token = "0x60015A0")]
|
|
[Address(RVA = "0x10E7730", Offset = "0x10E5F30", VA = "0x1810E7730", Slot = "25")]
|
|
public override void Localize(LocalizationData data)
|
|
{
|
|
Text text = this.title;
|
|
string text2 = data.systemText.GetText(5);
|
|
text.text = text2;
|
|
GameFontPack fontPack = data.fontPack;
|
|
Text text3 = this.title;
|
|
Font light = fontPack.light;
|
|
text3.font = light;
|
|
GameFontPack fontPack2 = data.fontPack;
|
|
Text text4 = this.description;
|
|
Font regular = fontPack2.regular;
|
|
text4.font = regular;
|
|
GameTextData systemText = data.systemText;
|
|
UILabelHandler uilabelHandler = this.confirmHandler;
|
|
string text5 = systemText.GetText(12);
|
|
uilabelHandler.SetLabel(text5);
|
|
GameFontPack fontPack3 = data.fontPack;
|
|
Text label = this.confirmHandler.label;
|
|
Font medium = fontPack3.medium;
|
|
label.font = medium;
|
|
UIMagicStatsHandler[] array = this.topHandlers;
|
|
int num = 0;
|
|
int length = array.Length;
|
|
if (num < length)
|
|
{
|
|
UIMagicStatsHandler uimagicStatsHandler = array[num];
|
|
GameFontPack fontPack4 = data.fontPack;
|
|
Text label2 = uimagicStatsHandler.label;
|
|
Font regular2 = fontPack4.regular;
|
|
label2.font = regular2;
|
|
num++;
|
|
}
|
|
UINavigationEffect uinavigationEffect = this.bottomNavigationEffect;
|
|
UILabelHandler uilabelHandler2 = this.confirmHandler;
|
|
uinavigationEffect.UpdateArrowPos(uilabelHandler2);
|
|
}
|
|
|
|
// Token: 0x060015A1 RID: 5537 RVA: 0x00031924 File Offset: 0x0002FB24
|
|
[Token(Token = "0x60015A1")]
|
|
[Address(RVA = "0x7B6570", Offset = "0x7B4D70", VA = "0x1807B6570")]
|
|
public UIMagicStats()
|
|
{
|
|
}
|
|
|
|
// Token: 0x040020EC RID: 8428
|
|
[FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x40020EC")]
|
|
[SerializeField]
|
|
private Text title;
|
|
|
|
// Token: 0x040020ED RID: 8429
|
|
[FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x40020ED")]
|
|
[SerializeField]
|
|
private Text description;
|
|
|
|
// Token: 0x040020EE RID: 8430
|
|
[FieldOffset(Offset = "0x68")]
|
|
[Token(Token = "0x40020EE")]
|
|
[SerializeField]
|
|
private UIMagicStatsHandler[] topHandlers;
|
|
|
|
// Token: 0x040020EF RID: 8431
|
|
[FieldOffset(Offset = "0x70")]
|
|
[Token(Token = "0x40020EF")]
|
|
[SerializeField]
|
|
private UILabelHandler confirmHandler;
|
|
|
|
// Token: 0x040020F0 RID: 8432
|
|
[FieldOffset(Offset = "0x78")]
|
|
[Token(Token = "0x40020F0")]
|
|
[SerializeField]
|
|
private UINavigationEffect topNavigationEffect;
|
|
|
|
// Token: 0x040020F1 RID: 8433
|
|
[FieldOffset(Offset = "0x80")]
|
|
[Token(Token = "0x40020F1")]
|
|
[SerializeField]
|
|
private UINavigationEffect bottomNavigationEffect;
|
|
|
|
// Token: 0x040020F2 RID: 8434
|
|
[FieldOffset(Offset = "0x88")]
|
|
[Token(Token = "0x40020F2")]
|
|
[SerializeField]
|
|
private Image bottomSubmissionEffect;
|
|
}
|