using System;
using Cpp2IlInjected;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x02000292 RID: 658
[Token(Token = "0x2000292")]
public class UISettingsGamepad : UIKeyBindingBase
{
	// Token: 0x170000F3 RID: 243
	// (get) Token: 0x060018AF RID: 6319 RVA: 0x0003AFC0 File Offset: 0x000391C0
	[Token(Token = "0x170000F3")]
	protected override bool IsGamepad
	{
		[Token(Token = "0x60018AF")]
		[Address(RVA = "0x4990D0", Offset = "0x4980D0", VA = "0x1804990D0", Slot = "22")]
		get
		{
			return true;
		}
	}

	// Token: 0x060018B0 RID: 6320 RVA: 0x0003AFD0 File Offset: 0x000391D0
	[Token(Token = "0x60018B0")]
	[Address(RVA = "0x958050", Offset = "0x957050", VA = "0x180958050", Slot = "11")]
	public override void Init(CanvasGroup mainCanvasGroup, Action cancelHandler, Text title)
	{
		base.Init(mainCanvasGroup, cancelHandler, title);
		Game.AddDeviceChangedHandler(new Action(this.OnControllerChanged));
	}

	// Token: 0x060018B1 RID: 6321 RVA: 0x0003AFF8 File Offset: 0x000391F8
	[Token(Token = "0x60018B1")]
	[Address(RVA = "0x958190", Offset = "0x957190", VA = "0x180958190")]
	private void OnControllerChanged(ControllerDevice device)
	{
		if (device != ControllerDevice.Keyboard)
		{
			UIKeyBindingPage[] pages = this.pages;
			int num = 0;
			int length = pages.Length;
			if (num < length)
			{
				pages[num].UpdateIcon(true);
				num++;
			}
		}
	}

	// Token: 0x060018B2 RID: 6322 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60018B2")]
	[Address(RVA = "0x957E00", Offset = "0x956E00", VA = "0x180957E00")]
	private string GetInvalidKeyName(string effectivePath)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060018B3 RID: 6323 RVA: 0x0003B034 File Offset: 0x00039234
	[Token(Token = "0x60018B3")]
	[Address(RVA = "0x958130", Offset = "0x957130", VA = "0x180958130", Slot = "20")]
	public override void Localize(LocalizationData data)
	{
		string text = data.systemText.GetText(95);
		this.titleText = text;
		base.UpdateTextAndFont(data);
	}

	// Token: 0x060018B4 RID: 6324 RVA: 0x0003B064 File Offset: 0x00039264
	[Token(Token = "0x60018B4")]
	[Address(RVA = "0x3ED6F0", Offset = "0x3EC6F0", VA = "0x1803ED6F0")]
	public UISettingsGamepad()
	{
	}
}
