public override void OnSet(object data) { tfButtonContainer = buttonContainer.transform; tf = tfButtonContainer.parent; this.data = (MessageBoxDataModel)data; //print("On set messsage: " + this.data.message); RefreshUI(); }
/// <summary> /// Show confirmation message before exiting the game /// </summary> public void OpenExitConfirmation() { MessageBoxDataModel msg = new MessageBoxDataModel(); //msg.message = "The game data on your device and our server do not look alike. Which data would you like to use?"; //msg.messageNo = "SERVER DATA"; //msg.messageYes = "CURRENT DATA"; msg.message = Localization.Get("pu_exit_title"); msg.messageYes = Localization.Get("pu_exit_btn_no"); msg.messageNo = Localization.Get("pu_exit_btn_yes");; msg.OnNoButtonClicked = delegate { Application.Quit(); }; msg.OnYesButtonClicked = delegate { }; OpenPopup(ProjectConstants.Scenes.MessageBoxPopup, msg); }
public override void OnSet(object data) { if (data != null) { mess = (MessageBoxDataModel)data; lbtitle.text = mess.message; if (mess.style == PopUpStyle.YES_NO) { okBtn.SetActive(false); yesBtn.SetActive(true); noBtn.SetActive(true); yesLb.text = mess.messageYes; noLb.text = mess.messageNo; } else { okBtn.SetActive(true); yesBtn.SetActive(false); noBtn.SetActive(false); } } }