From aaddf88916536313ec2e311ce7474f2e37c22159 Mon Sep 17 00:00:00 2001 From: Buger404 Date: Mon, 12 Aug 2024 22:59:02 +0800 Subject: [PATCH] feat: MilListView.Interactable --- Scripts/Milease/Core/UI/MilListView.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Scripts/Milease/Core/UI/MilListView.cs b/Scripts/Milease/Core/UI/MilListView.cs index 444da0d..8dc700c 100644 --- a/Scripts/Milease/Core/UI/MilListView.cs +++ b/Scripts/Milease/Core/UI/MilListView.cs @@ -23,6 +23,8 @@ public enum AlignMode [HideInInspector] public readonly List Items = new(); + public bool Interactable = true; + public GameObject ItemPrefab; public bool Vertical = true; public float Spacing; @@ -221,6 +223,11 @@ internal void Select(int index, bool dontCall, PointerEventData args) { Awake(); } + + if (!Interactable) + { + return; + } if (SelectedIndex != -1) { if (bindDisplay[SelectedIndex]) @@ -616,4 +623,4 @@ public void OnScroll(PointerEventData eventData) CheckPosition(); } } -} \ No newline at end of file +}