Esempio n. 1
0
        /*
         * public static Enum EnumPopupZoomCompensated(Rect r, Enum selected ){
         *
         *      // TODO: Custom enum popup proper zoom positioning
         *
         *      if(GUI.Button(r,selected.ToString(),EditorStyles.popup)){
         *
         *              GenericMenu gm = new GenericMenu();
         *              //gm.AddItem(selected);
         *
         *              Array enumList = Enum.GetValues(selected.GetType());
         *
         *              for(int i=0;i < enumList.Length;i++){
         *
         *                      gm.AddItem( new GUIContent(enumList.GetValue(i).ToString()), i == Convert.ToInt32(selected), (object o)=>{Debug.Log(o.ToString());},"Test " + i);
         *
         *
         *              }
         *
         *              gm.ShowAsContext();
         *
         *
         *
         *      }
         *
         *
         *
         *      return selected;
         *
         * }
         */

        public static void FillBackground(Rect r)
        {
            Color pCol = GUI.color;

            SF_GUI.UseBackgroundColor();
            GUI.DrawTexture(r, EditorGUIUtility.whiteTexture);
            GUI.color = pCol;
        }