using System; using MoleMole.Config; using UnityEngine.UI; namespace MoleMole { public class AgreementDialogContext : BaseSequenceDialogContext { public Action buttonCallBack; public AgreementDialogContext() { config = new ContextPattern { contextName = "AgreementDialogContext", viewPrefabPath = "UI/Menus/Dialog/UserAgreementDialog", cacheType = ViewCacheType.DontCache }; } protected override bool SetupView() { string text = CommonUtils.LoadTextFileToString("Data/Agreement"); base.view.transform.Find("Dialog/Content/Scroll View/Viewport/Content/DescText").GetComponent().text = text; base.view.transform.Find("Dialog/Content/DoubleButton/AgreeBtn").GetComponent