Example #1
0
        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));
        }
Example #2
0
        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));
        }
Example #3
0
        protected UGUIRichElementImage CreateImageElement(string image, string url)
        {
            Action openURLHandler = null;

            if (!string.IsNullOrEmpty(url))
            {
                openURLHandler = () => { RichTextUtil.OpenURL(url); };
            }

            return(new UGUIRichElementImage(image, openURLHandler));
        }
Example #4
0
        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));
            }
        }