public override void SetData(object data) { if (data is UIBubbleButtonData) { UIBubbleButtonData popupData = (UIBubbleButtonData)data; m_Selection = popupData.Selection; m_Text.text = popupData.Text; m_Image.sprite = UIManager.Instance.Prompts.CurrentPromptsInfo.GetButtonInfo(popupData.Button).tex; } base.SetData(data); }
protected override void OnButtonClicked(object buttonData) { if (buttonData is UIBubbleButtonData) { UIBubbleButtonData data = (UIBubbleButtonData)buttonData; // If the onClickDelegate is null here, we have no popup interaction and that's pretty bad. Debug.Assert(onClickDelegate != null); if (onClickDelegate != null) { onClickDelegate(data.Selection, mData); } } }