Beispiel #1
0
 private static void BeginLayoutedListview(ListViewState state, GUIStyle style, params GUILayoutOption[] options)
 {
     ListViewGUILayout.GUILayoutedListViewGroup layoutedListViewGroup = (ListViewGUILayout.GUILayoutedListViewGroup)GUILayoutUtility.BeginLayoutGroup(style, (GUILayoutOption[])null, typeof(ListViewGUILayout.GUILayoutedListViewGroup));
     layoutedListViewGroup.state = state;
     state.ilvState.group        = layoutedListViewGroup;
     GUIUtility.GetControlID(ListViewGUILayout.layoutedListViewHash, FocusType.Native);
     if (Event.current.type != EventType.Layout)
     {
         return;
     }
     layoutedListViewGroup.resetCoords = false;
     layoutedListViewGroup.isVertical  = true;
     layoutedListViewGroup.ApplyOptions(options);
 }
Beispiel #2
0
        private static void BeginLayoutedListview(ListViewState state, GUIStyle style, params GUILayoutOption[] options)
        {
            ListViewGUILayout.GUILayoutedListViewGroup gUILayoutedListViewGroup = (ListViewGUILayout.GUILayoutedListViewGroup)GUILayoutUtility.BeginLayoutGroup(style, null, typeof(ListViewGUILayout.GUILayoutedListViewGroup));
            gUILayoutedListViewGroup.state = state;
            state.ilvState.group           = gUILayoutedListViewGroup;
            GUIUtility.GetControlID(ListViewGUILayout.layoutedListViewHash, FocusType.Passive);
            EventType type = Event.current.type;

            if (type == EventType.Layout)
            {
                gUILayoutedListViewGroup.resetCoords = false;
                gUILayoutedListViewGroup.isVertical  = true;
                gUILayoutedListViewGroup.ApplyOptions(options);
            }
        }