using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks.Triggers; using PMaker.Await; using PMaker.Extension; using Sirenix.OdinInspector; using System.Collections.Generic; using System.Linq; using System.Threading; using UniRx; using UniRx.Triggers; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; using UnityEngine.UI.Extensions; public class UIWiring : AwaitBehaviour { //#if UNITY_EDITOR // private static bool DrawColoredEnumElement(Rect rect, bool value) // { // if (Event.current.type == EventType.MouseDown && rect.Contains(Event.current.mousePosition)) // { // value = !value; // GUI.changed = true; // Event.current.Use(); // } //#if UNITY_EDITOR // UnityEditor.EditorGUI.DrawRect(rect.Padding(1), value ? new Color(0.1f, 0.8f, 0.2f) : new Color(0, 0, 0, 0.5f)); //#endif // return value; // } // [TableMatrix(VerticalTitle = "序号", HorizontalTitle = "答案", DrawElementMethod = "DrawColoredEnumElement", ResizableColumns = false)] // // 0 2 0 1 3 // public bool[,] answers; //[Button] //public void SetAnswers() //{ // Debug.Log(answers.GetLength(0)); // var length = answers.GetLength(0); // intAnswers = new int[length]; // for (int row = 0; row < length; row++) // { // for (int i = 0; i < answers.GetLength(1); i++) // { // if (answers[row, i] == true) // { // intAnswers[row] = i; // break; // } // } // } // this.SetDirty(); //} //#endif public int[] intAnswers; public Button confirmBtn; public bool isSingle = true; public UILineRenderer lineRendererPrefab; public UILineRenderer currentLine; public List roots; public List