少年修仙传客户端代码仓库
client_Hale
2019-04-16 2f723e5320ef618985cc9ea8f71deafd3e4bec36
Utility/ComponentExtersion.cs
@@ -212,6 +212,24 @@
    }
    [XLua.LuaCallCSharp]
    public static void SetColorful(this Button _btn, Text _btnTxt, bool _colorful)
    {
        if (_btn != null)
        {
            var imageEx = _btn.image as ImageEx;
            if (imageEx != null)
            {
                imageEx.gray = !_colorful;
            }
        }
        if (_btnTxt != null)
        {
            _btnTxt.color = UIHelper.GetUIColor(_colorful ? TextColType.NavyBrown : TextColType.White);
            _btnTxt.color = _btnTxt.color.SetA(_colorful ? 1 : 0.5f);
        }
    }
    [XLua.LuaCallCSharp]
    public static void SetInteractable(this Button _btn, Text _btnText, bool _interactable)
    {
        if (_btn != null)