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

// Token: 0x02000248 RID: 584
[Token(Token = "0x2000248")]
public class UISettingsGamepad : UIKeyBindingBase
{
	// Token: 0x170000E4 RID: 228
	// (get) Token: 0x06001691 RID: 5777 RVA: 0x00035CD4 File Offset: 0x00033ED4
	[Token(Token = "0x170000E4")]
	protected override bool IsGamepad
	{
		[Token(Token = "0x6001691")]
		[Address(RVA = "0x454840", Offset = "0x453640", VA = "0x180454840", Slot = "22")]
		get
		{
			return true;
		}
	}

	// Token: 0x06001692 RID: 5778 RVA: 0x00035CE4 File Offset: 0x00033EE4
	[Token(Token = "0x6001692")]
	[Address(RVA = "0x18A4D70", Offset = "0x18A3B70", VA = "0x1818A4D70", Slot = "11")]
	public override void Init(CanvasGroup mainCanvasGroup, Action cancelHandler, Text title)
	{
		base.Init(mainCanvasGroup, cancelHandler, title);
		Game.AddDeviceChangedHandler(new Action(this.OnControllerChanged));
	}

	// Token: 0x06001693 RID: 5779 RVA: 0x00035D0C File Offset: 0x00033F0C
	[Token(Token = "0x6001693")]
	[Address(RVA = "0x18A4EB0", Offset = "0x18A3CB0", VA = "0x1818A4EB0")]
	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: 0x06001694 RID: 5780 RVA: 0x00035D48 File Offset: 0x00033F48
	[Token(Token = "0x6001694")]
	[Address(RVA = "0x18A4B10", Offset = "0x18A3910", VA = "0x1818A4B10", Slot = "23")]
	protected override string GetInvalidBindingMsg(string effectivePath)
	{
		return base.GetInvalidBindingMsg(effectivePath);
	}

	// Token: 0x06001695 RID: 5781 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001695")]
	[Address(RVA = "0x18A4B20", Offset = "0x18A3920", VA = "0x1818A4B20")]
	private string GetInvalidKeyName(string effectivePath)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001696 RID: 5782 RVA: 0x00035D5C File Offset: 0x00033F5C
	[Token(Token = "0x6001696")]
	[Address(RVA = "0x18A4E50", Offset = "0x18A3C50", VA = "0x1818A4E50", Slot = "20")]
	public override void Localize(LocalizationData data)
	{
		string text = data.systemText.GetText(95);
		this.titleText = text;
		base.UpdateTextAndFont(data);
	}

	// Token: 0x06001697 RID: 5783 RVA: 0x00035D8C File Offset: 0x00033F8C
	[Token(Token = "0x6001697")]
	[Address(RVA = "0x384B20", Offset = "0x383920", VA = "0x180384B20")]
	public UISettingsGamepad()
	{
	}
}
