Exemplo n.º 1
0
        public static bool Click_Enter_Attention(this INeedAttention attention, Texture tex, string hint = "", bool canBeNull = true)
        {
            if (attention.IsNullOrDestroyed_Obj())
            {
                if (!canBeNull)
                {
                    return(icon.Warning.ClickUnFocus("Object is null; {0}".F(hint)));
                }
            }
            else
            {
                var msg = attention.NeedAttention();
                if (msg != null)
                {
                    return(icon.Warning.ClickUnFocus(msg));
                }
            }

            if (hint.IsNullOrEmpty())
            {
                hint = tex ? tex.ToString() : "Null Texture";
            }

            return(tex ? tex.ClickUnFocus(hint) : icon.Enter.ClickUnFocus(hint));
        }
Exemplo n.º 2
0
        public static bool Click_Enter_Attention(this INeedAttention attention, icon icon = icon.Enter, string hint = "", bool canBeNull = true)
        {
            if (attention.IsNullOrDestroyed_Obj())
            {
                if (!canBeNull)
                {
                    return(icon.Warning.ClickUnFocus("Object is null; {0}".F(hint)));
                }
            }
            else
            {
                var msg = attention.NeedAttention();
                if (msg != null)
                {
                    return(icon.Warning.ClickUnFocus(msg));
                }
            }

            if (hint.IsNullOrEmpty())
            {
                hint = icon.GetText();
            }

            return(icon.ClickUnFocus(hint));
        }