示例#1
0
 public static void SetAllButtonLock(this PlatController ctrl, bool value)
 {
     foreach (var btn in ctrl.GetAllButton())
     {
         (btn as IButtonController).SetLock(value);
     }
 }
示例#2
0
        private void DrawButtonList()
        {
            EditorGUILayout.BeginHorizontal();
            if (GUILayout.Button("Lock All"))
            {
                controller.SetAllButtonLock(true);
            }
            if (GUILayout.Button("Unlock All"))
            {
                controller.SetAllButtonLock(false);
            }
            EditorGUILayout.EndHorizontal();

            foreach (var btn in controller.GetAllButton())
            {
                DrawButtonItem(btn);
            }
        }