예제 #1
0
        protected virtual bool DrawEntry(ListEntry entry)
        {
            if (!entry.Enabled)
            {
                return(false);
            }

            using (new EditorGUILayout.HorizontalScope()) {
                EntriesShown++;

                if (!GUILayout.Button(entry.ToString(), GetEntryStyle(entry)))
                {
                    return(false);
                }

                var time = EditorApplication.timeSinceStartup;
                var diff = time - _lastClickTime;
                _lastClickTime = EditorApplication.timeSinceStartup;

                return(!NeedsDoubleClick || diff < 1);
            }
        }
예제 #2
0
 protected virtual GUIStyle GetEntryStyle(ListEntry entry)
 {
     return(entry == _selected ? _selectedStyle : _unselectedStyle);
 }