protected NGUIRichElementImageSizeable CreateImageSizeableElement(string image, string url, Vector2 size) { Action openURLHandler = null; if (!string.IsNullOrEmpty(url)) { openURLHandler = () => { RichTextUtil.OpenURL(url); }; } return(new NGUIRichElementImageSizeable(image, openURLHandler, size)); }
protected NGUIRichElementAnimationImage CreateAnimImageElement(string image, string url, uint count, float fps) { Action openURLHandler = null; if (!string.IsNullOrEmpty(url)) { openURLHandler = () => { RichTextUtil.OpenURL(url); }; } return(new NGUIRichElementAnimationImage(image, openURLHandler, count, fps)); }
protected UGUIRichElementImage CreateImageElement(string image, string url) { Action openURLHandler = null; if (!string.IsNullOrEmpty(url)) { openURLHandler = () => { RichTextUtil.OpenURL(url); }; } return(new UGUIRichElementImage(image, openURLHandler)); }
protected NGUIRichElementText CreateTextElement(string text, string fontStyle, bool underline, string url) { Action openURLHandler = null; if (!string.IsNullOrEmpty(url)) { openURLHandler = () => { RichTextUtil.OpenURL(url); }; } if (underline) { return(new NGUIRichElementTextUnderline(text, fontStyle, openURLHandler)); } else { return(new NGUIRichElementText(text, fontStyle, openURLHandler)); } }