Ejemplo n.º 1
0
 private void OnSelectionChanged(SerializableSystemType selectedtype)
 {
     currentSelection       = selectedtype;
     currentItem            = items.Get(currentSelection.SystemType);
     detailScrollPosition.x = 0f;
     detailScrollPosition.y = 0f;
 }
Ejemplo n.º 2
0
        public SignalsTreeViewItem Get(Type type)
        {
            SignalsTreeViewItem item;

            if (items.TryGetValue(type, out item))
            {
                return(item);
            }

            item        = new SignalsTreeViewItem(type);
            items[type] = item;
            return(item);
        }
Ejemplo n.º 3
0
        private void DoDetailView()
        {
            if (currentSelection == null || currentSelection.SystemType == null)
            {
                GUILayout.Label("Nothing selected");
                return;
            }

            if (currentItem == null)
            {
                currentItem = items.Get(currentSelection.SystemType);
            }

            currentItem.DrawSignalDetailView();
        }
Ejemplo n.º 4
0
 public SignalListenerViewDrawer(SignalsTreeViewItem parent, Type baseType)
 {
     this.parent    = parent;
     listenersField = baseType.GetField("listeners", BindingFlags.Instance | BindingFlags.NonPublic);
 }