From 2f723e5320ef618985cc9ea8f71deafd3e4bec36 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期二, 16 四月 2019 11:35:50 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
Utility/ComponentExtersion.cs | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/Utility/ComponentExtersion.cs b/Utility/ComponentExtersion.cs
index e25ef13..d0932d0 100644
--- a/Utility/ComponentExtersion.cs
+++ b/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)
--
Gitblit v1.8.0