Files
NobetaSource/Cpp2IL/Assembly-CSharp/UIItemBar.cs
2023-09-06 22:09:22 +02:00

271 lines
8.1 KiB
C#

using System;
using System.Collections.Generic;
using Cpp2IlInjected;
using MEC;
using UnityEngine;
using UnityEngine.UI;
// Token: 0x020002D2 RID: 722
[Token(Token = "0x20002D2")]
public class UIItemBar : MonoBehaviour
{
// Token: 0x06001ACE RID: 6862 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6001ACE")]
[Address(RVA = "0x7B9150", Offset = "0x7B7950", VA = "0x1807B9150")]
public void Init()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06001ACF RID: 6863 RVA: 0x00040468 File Offset: 0x0003E668
[Token(Token = "0x6001ACF")]
[Address(RVA = "0x532310", Offset = "0x530B10", VA = "0x180532310")]
public int GetItemSelectPos()
{
return this.itemSelectPos;
}
// Token: 0x06001AD0 RID: 6864 RVA: 0x0004047C File Offset: 0x0003E67C
[Token(Token = "0x6001AD0")]
[Address(RVA = "0x7BA1B0", Offset = "0x7B89B0", VA = "0x1807BA1B0")]
public void UpdateItemSprite(ItemSystem.ItemType[] holdItem)
{
int num = 0;
if (this.itemSize > num)
{
UIItem uiitem = this.itemElements[num];
UIItemSprite uiitemSprite = this.itemSpriteCollection;
ItemSystem.ItemType itemType = holdItem[num];
Sprite itemSprite = uiitemSprite.GetItemSprite(itemType);
uiitem.g_ItemImg.sprite = itemSprite;
num++;
}
}
// Token: 0x06001AD1 RID: 6865 RVA: 0x000404D0 File Offset: 0x0003E6D0
[Token(Token = "0x6001AD1")]
[Address(RVA = "0x7B9CE0", Offset = "0x7B84E0", VA = "0x1807B9CE0")]
public void UpdateItemSelectMove(int iPos)
{
RectTransform rectTransform = this.itemSelectFrame;
int num = 0;
if (!(rectTransform == num))
{
RectTransform[] array = this.itemElementRects;
if (array != 0)
{
int num2 = this.itemSize;
if (iPos < num2)
{
this.itemSelectPos = iPos;
}
this.itemSelectPos = (int)((ulong)0L);
this.itemSelectPos = num2;
RectTransform rectTransform2 = this.itemSelectFrame;
int num3 = this.itemSelectPos;
Vector2 anchoredPosition = array[num3].anchoredPosition;
rectTransform2.anchoredPosition = anchoredPosition;
}
}
}
// Token: 0x06001AD2 RID: 6866 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6001AD2")]
[Address(RVA = "0x7B9DD0", Offset = "0x7B85D0", VA = "0x1807B9DD0")]
public void UpdateItemSize(int size)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06001AD3 RID: 6867 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6001AD3")]
[Address(RVA = "0x7B98D0", Offset = "0x7B80D0", VA = "0x1807B98D0")]
public void UpdateInstructions(ItemSystem.ItemType itemType)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06001AD4 RID: 6868 RVA: 0x0004054C File Offset: 0x0003E74C
[Token(Token = "0x6001AD4")]
[Address(RVA = "0x7B97A0", Offset = "0x7B7FA0", VA = "0x1807B97A0")]
public void Localize(LocalizationData data)
{
UIItem[] array = this.itemElements;
int num = 0;
int length = array.Length;
if (num < length)
{
UIItem uiitem = array[num];
GameFontPack fontPack = data.fontPack;
Text g_TextNum = uiitem.g_TextNum;
Font light = fontPack.light;
g_TextNum.font = light;
num++;
}
GameFontPack fontPack2 = data.fontPack;
Text text = this.instructionsLabel;
Font regular = fontPack2.regular;
text.font = regular;
}
// Token: 0x06001AD5 RID: 6869 RVA: 0x000405C4 File Offset: 0x0003E7C4
[Token(Token = "0x6001AD5")]
[Address(RVA = "0x7B8F00", Offset = "0x7B7700", VA = "0x1807B8F00")]
public void Dispose()
{
CoroutineHandle[] array = new CoroutineHandle[3];
int length = array.Length;
CoroutineHandle coroutineHandle = this.itemBarProcessor;
array[0] = coroutineHandle;
CoroutineHandle coroutineHandle2 = this.newItemProcessor;
array[0] = coroutineHandle2;
CoroutineHandle coroutineHandle3 = this.instructionsProcessor;
array[1] = coroutineHandle3;
int num = Timing.KillCoroutines(array);
Game.RemoveDeviceChangedHandler(new Action(this.UpdateItemHotKey));
}
// Token: 0x06001AD6 RID: 6870 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6001AD6")]
[Address(RVA = "0x7B9860", Offset = "0x7B8060", VA = "0x1807B9860")]
private IEnumerator<float> MoveItemBar()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06001AD7 RID: 6871 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6001AD7")]
[Address(RVA = "0x7B90E0", Offset = "0x7B78E0", VA = "0x1807B90E0")]
private IEnumerator<float> FadeOutNewItem()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06001AD8 RID: 6872 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6001AD8")]
[Address(RVA = "0x7B9070", Offset = "0x7B7870", VA = "0x1807B9070")]
private IEnumerator<float> FadeOutInstructions()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06001AD9 RID: 6873 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6001AD9")]
[Address(RVA = "0x7B9B70", Offset = "0x7B8370", VA = "0x1807B9B70")]
private void UpdateItemHotKey(ControllerDevice controllerDevice)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06001ADA RID: 6874 RVA: 0x00040630 File Offset: 0x0003E830
[Token(Token = "0x6001ADA")]
[Address(RVA = "0x7BA270", Offset = "0x7B8A70", VA = "0x1807BA270")]
public UIItemBar()
{
}
// Token: 0x040024D3 RID: 9427
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40024D3")]
[SerializeField]
private GameObject itemElementPrefab;
// Token: 0x040024D4 RID: 9428
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x40024D4")]
[SerializeField]
private RectTransform itemBarRoot;
// Token: 0x040024D5 RID: 9429
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x40024D5")]
[SerializeField]
private RectTransform itemSelectFrame;
// Token: 0x040024D6 RID: 9430
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x40024D6")]
[SerializeField]
private Image newItemImg;
// Token: 0x040024D7 RID: 9431
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x40024D7")]
[SerializeField]
private Image instructionsImg;
// Token: 0x040024D8 RID: 9432
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x40024D8")]
[SerializeField]
private Text instructionsLabel;
// Token: 0x040024D9 RID: 9433
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x40024D9")]
private RectTransform[] itemElementRects;
// Token: 0x040024DA RID: 9434
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x40024DA")]
private UIItem[] itemElements;
// Token: 0x040024DB RID: 9435
[FieldOffset(Offset = "0x58")]
[Token(Token = "0x40024DB")]
private UIItemSprite itemSpriteCollection;
// Token: 0x040024DC RID: 9436
[FieldOffset(Offset = "0x60")]
[Token(Token = "0x40024DC")]
private float itemBarRootPos = -105f;
// Token: 0x040024DD RID: 9437
[FieldOffset(Offset = "0x64")]
[Token(Token = "0x40024DD")]
private int itemSize = (int)((ulong)4L);
// Token: 0x040024DE RID: 9438
[FieldOffset(Offset = "0x68")]
[Token(Token = "0x40024DE")]
private int itemSelectPos;
// Token: 0x040024DF RID: 9439
[FieldOffset(Offset = "0x6C")]
[Token(Token = "0x40024DF")]
private float newItemAlpha;
// Token: 0x040024E0 RID: 9440
[FieldOffset(Offset = "0x70")]
[Token(Token = "0x40024E0")]
private float instructionsAlpha;
// Token: 0x040024E1 RID: 9441
[FieldOffset(Offset = "0x74")]
[Token(Token = "0x40024E1")]
private float instructionsStayTimeVal;
// Token: 0x040024E2 RID: 9442
[Token(Token = "0x40024E2")]
private const int DEFAULT_ITEM_SIZE = 4;
// Token: 0x040024E3 RID: 9443
[Token(Token = "0x40024E3")]
private const float INSTRUC_STAY_TIME = 2.5f;
// Token: 0x040024E4 RID: 9444
[FieldOffset(Offset = "0x78")]
[Token(Token = "0x40024E4")]
private CoroutineHandle itemBarProcessor;
// Token: 0x040024E5 RID: 9445
[FieldOffset(Offset = "0x7C")]
[Token(Token = "0x40024E5")]
private CoroutineHandle newItemProcessor;
// Token: 0x040024E6 RID: 9446
[FieldOffset(Offset = "0x80")]
[Token(Token = "0x40024E6")]
private CoroutineHandle instructionsProcessor;
}