From 0927ff6379e81ad0c654b64f9c51daa14956101b Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Mon, 14 Apr 2025 09:59:18 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E9=AB=98=E4=BA=AE=E6=97=B6=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E8=B4=B4=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Item/ObjectColorToggle.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Item/ObjectColorToggle.cs b/Assets/Scripts/Item/ObjectColorToggle.cs index 758ba9a0..350f0501 100644 --- a/Assets/Scripts/Item/ObjectColorToggle.cs +++ b/Assets/Scripts/Item/ObjectColorToggle.cs @@ -12,8 +12,9 @@ public class ObjectColorToggle : MonoBehaviour } public Color isOnColor = new Color(86 / 255f, 255 / 255f, 160 / 255f); public Color isOffColor = new Color(255 / 255f, 255 / 255f, 255 / 255f); - public Color isHoverColor = new Color(185f / 255f, 255 / 255f, 215/ 255f); + public Color isHoverColor = new Color(185f / 255f, 255 / 255f, 215 / 255f); MeshRenderer mesh; + private Texture2D savedTexture; private void Awake() { mesh = gameObject.GetComponent(); @@ -26,14 +27,19 @@ public class ObjectColorToggle : MonoBehaviour { case State.On: isOnColor.a = alpha; + savedTexture = mesh.material.mainTexture as Texture2D; + mesh.material.mainTexture = null; mesh.material.color = isOnColor; break; case State.Off: isOffColor.a = alpha; + mesh.material.mainTexture = savedTexture; mesh.material.color = isOffColor; break; case State.Hover: isHoverColor.a = alpha; + savedTexture = mesh.material.mainTexture as Texture2D; + mesh.material.mainTexture = null; mesh.material.color = isHoverColor; break; default: @@ -56,5 +62,4 @@ public class ObjectColorToggle : MonoBehaviour SetColor(State.Off); } } - -} +} \ No newline at end of file From a19b26f3415fe886afebd8382375013c210687e6 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Mon, 14 Apr 2025 10:01:11 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E5=AD=97?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Art/UIPrefab/UIBody3D.prefab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Art/UIPrefab/UIBody3D.prefab b/Assets/Art/UIPrefab/UIBody3D.prefab index 71164454..8ef14b96 100644 --- a/Assets/Art/UIPrefab/UIBody3D.prefab +++ b/Assets/Art/UIPrefab/UIBody3D.prefab @@ -2318,7 +2318,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: "\u6E05\u5C4F" + m_text: "\u9690\u85CF" m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 97936a7b3a86809479ac89371e95b079, type: 2} m_sharedMaterial: {fileID: 168401102475399263, guid: 97936a7b3a86809479ac89371e95b079, type: 2} From f66df0aab262ada3e75e163028220149169afe32 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Mon, 14 Apr 2025 10:30:33 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/UIBody3DMenuTree.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/UI/UIBody3DMenuTree.cs b/Assets/Scripts/UI/UIBody3DMenuTree.cs index a6e15033..07790d1f 100644 --- a/Assets/Scripts/UI/UIBody3DMenuTree.cs +++ b/Assets/Scripts/UI/UIBody3DMenuTree.cs @@ -217,7 +217,7 @@ namespace QFramework.Example SearchContent.gameObject.SetActive(true); Content.gameObject.SetActive(false); }); - Input.onEndEdit.AddListener(str => + Input.onValueChanged.AddListener(str => { if (string.IsNullOrEmpty(str)) { From 4d23f8cd3a9bd715d7a454262d687c66842ccb17 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Mon, 14 Apr 2025 11:23:20 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/UIBody3DMenuTree.cs | 36 +++++++++++---------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/Assets/Scripts/UI/UIBody3DMenuTree.cs b/Assets/Scripts/UI/UIBody3DMenuTree.cs index 07790d1f..48ecc22b 100644 --- a/Assets/Scripts/UI/UIBody3DMenuTree.cs +++ b/Assets/Scripts/UI/UIBody3DMenuTree.cs @@ -349,34 +349,26 @@ namespace QFramework.Example GameObject clone = GameObject.Instantiate(SearchItem.gameObject, SearchContent); searchItemMap.Add(clone, child.gameObject); Transform subContent = child.Find("SubContent"); + Button btn = clone.transform.Find("Button").GetComponent