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} diff --git a/Assets/Art/UIPrefab/UIBody3DMenuTree.prefab b/Assets/Art/UIPrefab/UIBody3DMenuTree.prefab index f142a726..4f9b6b7e 100644 --- a/Assets/Art/UIPrefab/UIBody3DMenuTree.prefab +++ b/Assets/Art/UIPrefab/UIBody3DMenuTree.prefab @@ -914,11 +914,11 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 10 - m_fontSizeBase: 10 + m_fontSize: 16 + m_fontSizeBase: 16 m_fontWeight: 400 - m_enableAutoSizing: 1 - m_fontSizeMin: 10 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 m_fontSizeMax: 72 m_fontStyle: 0 m_HorizontalAlignment: 1 @@ -1821,8 +1821,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 77.005, y: -16.552} - m_SizeDelta: {x: 154.01, y: 33.104} + m_AnchoredPosition: {x: 91.4, y: -16.552} + m_SizeDelta: {x: 182.8, y: 33.104} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8476752034012845522 CanvasRenderer: @@ -1845,7 +1845,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 0} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 @@ -2489,8 +2489,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 77.005, y: -16.552} - m_SizeDelta: {x: 144.01, y: 33} + m_AnchoredPosition: {x: 91.4, y: -16.552} + m_SizeDelta: {x: 172.8, y: 33} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &60149285316496278 CanvasRenderer: @@ -2520,17 +2520,17 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: 123123123123 + m_text: m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: e7da174c677019b49aa681250aa4ded8, type: 2} - m_sharedMaterial: {fileID: -7878122246201655599, guid: e7da174c677019b49aa681250aa4ded8, type: 2} + m_fontAsset: {fileID: 11400000, guid: 97936a7b3a86809479ac89371e95b079, type: 2} + m_sharedMaterial: {fileID: 168401102475399263, guid: 97936a7b3a86809479ac89371e95b079, type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4281479730 - m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + rgba: 4278190080 + m_fontColor: {r: 0, g: 0, b: 0, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 m_fontColorGradient: @@ -2547,15 +2547,15 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 20 - m_fontSizeBase: 20 + m_fontSize: 16 + m_fontSizeBase: 16 m_fontWeight: 400 - m_enableAutoSizing: 1 + m_enableAutoSizing: 0 m_fontSizeMin: 18 - m_fontSizeMax: 20 + m_fontSizeMax: 72 m_fontStyle: 0 - m_HorizontalAlignment: 2 - m_VerticalAlignment: 512 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 8192 m_textAlignment: 65535 m_characterSpacing: 0 m_wordSpacing: 0 @@ -2642,7 +2642,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: MarkType: 0 - CustomComponentName: RootContent + CustomComponentName: CustomComment: mComponentName: RectTransform --- !u!1 &8280112074671649668 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 diff --git a/Assets/Scripts/UI/UIBody3DMenuTree.cs b/Assets/Scripts/UI/UIBody3DMenuTree.cs index a6e15033..48ecc22b 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)) { @@ -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