using System.Collections.Generic; using UnityEngine; namespace Mly.Hotfix { public interface ICheatOpenStage { CheatAdvView CheatView { get; set; } void CheatOpenStagesTo(int id); } public interface ICheatOpenAllStages { void CheatOpenAllStages(); } public class CheatAdvView : CheatListView { public ICheatOpenStage View; public LocalAdvChap Chap; protected override IList List => Chap?.AdvMapList; protected override string GetItemText(LocalAdvMap item) { return item.Name1; } protected override void OnClickItem(LocalAdvMap item) { View.CheatOpenStagesTo(item.Id); } protected override void UpdateList() { base.UpdateList(); if (View is ICheatOpenAllStages v) { if (GUI.Button(CheatUtil.GetNextRect(), $"All", CheatUtil.GetGUIButtonStyle())) { v.CheatOpenAllStages(); } CheatUtil.PointToNext(); } } } }