Initial Checkin of new Re-Orderable List.
Still ToDo: 1: complete testing scenarios 2: Update Editor script to add new auto-create option --HG-- branch : develop_5.2pull/413/head
parent
953770528d
commit
a88c7a9c1b
|
@ -0,0 +1,9 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 281614f4c0e3b7a4d9056bd377134172
|
||||||
|
folderAsset: yes
|
||||||
|
timeCreated: 1446117980
|
||||||
|
licenseType: Pro
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1,8 +1,12 @@
|
||||||
using System;
|
/// Credit Ziboo
|
||||||
using UnityEngine;
|
/// Sourced from - http://forum.unity3d.com/threads/free-reorderable-list.364600/
|
||||||
using UnityEngine.Events;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using UnityEngine.Events;
|
||||||
|
|
||||||
|
namespace UnityEngine.UI.Extensions
|
||||||
|
{
|
||||||
|
[AddComponentMenu("UI/Extensions/Re-orderable list")]
|
||||||
public class ReorderableList : MonoBehaviour
|
public class ReorderableList : MonoBehaviour
|
||||||
{
|
{
|
||||||
public LayoutGroup ContentLayout;
|
public LayoutGroup ContentLayout;
|
||||||
|
@ -72,3 +76,4 @@ public class ReorderableList : MonoBehaviour
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
}
|
|
@ -1,7 +1,11 @@
|
||||||
using System.Collections;
|
/// Credit Ziboo
|
||||||
using System.Collections.Generic;
|
/// Sourced from - http://forum.unity3d.com/threads/free-reorderable-list.364600/
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace UnityEngine.UI.Extensions
|
||||||
|
{
|
||||||
public class ReorderableListContent : MonoBehaviour
|
public class ReorderableListContent : MonoBehaviour
|
||||||
{
|
{
|
||||||
private List<Transform> _cachedChildren;
|
private List<Transform> _cachedChildren;
|
||||||
|
@ -56,3 +60,4 @@ public class ReorderableListContent : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
|
@ -1,11 +1,10 @@
|
||||||
using System;
|
/// Credit Ziboo
|
||||||
using UnityEngine;
|
/// Sourced from - http://forum.unity3d.com/threads/free-reorderable-list.364600/
|
||||||
using System.Collections;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
|
namespace UnityEngine.UI.Extensions
|
||||||
|
{
|
||||||
public class ReorderableListDebug : MonoBehaviour
|
public class ReorderableListDebug : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
public Text DebugLabel;
|
public Text DebugLabel;
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
|
@ -27,3 +26,4 @@ public class ReorderableListDebug : MonoBehaviour
|
||||||
DebugLabel.text += string.Format("To {0} at Index {1} \n", droppedStruct.ToList.name, droppedStruct.ToIndex);
|
DebugLabel.text += string.Format("To {0} at Index {1} \n", droppedStruct.ToList.name, droppedStruct.ToIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
|
@ -1,7 +1,11 @@
|
||||||
using System.Collections.Generic;
|
/// Credit Ziboo
|
||||||
using UnityEngine;
|
/// Sourced from - http://forum.unity3d.com/threads/free-reorderable-list.364600/
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using UnityEngine.UI;
|
|
||||||
|
namespace UnityEngine.UI.Extensions
|
||||||
|
{
|
||||||
|
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
public class ReorderableListElement : MonoBehaviour, IDragHandler, IBeginDragHandler, IEndDragHandler
|
public class ReorderableListElement : MonoBehaviour, IDragHandler, IBeginDragHandler, IEndDragHandler
|
||||||
|
@ -207,3 +211,4 @@ public class ReorderableListElement : MonoBehaviour, IDragHandler, IBeginDragHan
|
||||||
_rect = GetComponent<RectTransform>();
|
_rect = GetComponent<RectTransform>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue