Beispiel #1
0
 private void InitCategories()
 {
     Debug.Log("InitCategories called...");
     _categories     = EditorUtils.GetListFromEnum <PaletteItem.Category>();
     _categoryLabels = new List <string>();
     foreach (PaletteItem.Category category in _categories)
     {
         _categoryLabels.Add(category.ToString());
     }
 }
Beispiel #2
0
        private void DrawModeGUI()
        {
            List <Mode>   modes      = EditorUtils.GetListFromEnum <Mode>();
            List <string> modeLabels = new List <string>();

            foreach (Mode mode in modes)
            {
                modeLabels.Add(mode.ToString());
            }

            Handles.BeginGUI();
            GUILayout.BeginArea(new Rect(10f, 10f, 360f, 40f));
            _selectedMode = (Mode)GUILayout.Toolbar((int)_currentMode, modeLabels.ToArray(), GUILayout.ExpandHeight(true));
            GUILayout.EndArea();
            Handles.EndGUI();
        }