using System.Collections.Generic; using MoleMole.Config; using UnityEngine; using UnityEngine.UI; using proto; namespace MoleMole { public class DispatchAvatarDialogContext : BaseDialogContext { private List showAvatarList; public int selectedAvatarID; public int teamEditIndex; public VentureDataItem ventureData; public DispatchAvatarDialogContext(VentureDataItem ventureData, int index) { config = new ContextPattern { contextName = "DispatchAvatarDialogContext", viewPrefabPath = "UI/Menus/Dialog/CabinDispatchAvatarDialog" }; this.ventureData = ventureData; teamEditIndex = index; } public override bool OnNotify(Notify ntf) { if (ntf.type == NotifyTypes.SelectAvtarIconChange) { return UpdateSelectedAvatar((int)ntf.body); } return false; } protected override void BindViewCallbacks() { BindViewCallback(base.view.transform.Find("Dialog/Content/ListPanel/NextBtn").GetComponent