コード例 #1
0
ファイル: Menu.cs プロジェクト: paradisewu/MVC_ECS_Framework
    public static void OpenGUILookWindows()
    {
        EditorStyleViewer win = EditorStyleViewer.GetWindow <EditorStyleViewer>();

        win.titleContent = new GUIContent("GUI样式查看器");
        win.Show();
    }
コード例 #2
0
ファイル: Menu.cs プロジェクト: paradisewu/MVC_ECS_Framework
    public static void OpenFileEditorWindows()
    {
        EditorStyleViewer win = EditorStyleViewer.GetWindow <EditorStyleViewer>();

        win.titleContent = new GUIContent("文件名检测工具");
        win.Show();
    }
コード例 #3
0
ファイル: Menu.cs プロジェクト: paradisewu/MVC_ECS_Framework
    public static void OpenMapEditorWindows()
    {
        MapWindows win = EditorStyleViewer.GetWindow <MapWindows>();

        win.titleContent = new GUIContent("地图编辑器");
        win.Show();
    }
コード例 #4
0
    public static void Init()
    {
        EditorStyleViewer w = EditorWindow.GetWindow <EditorStyleViewer>();

        w.title             = "Editor Styles";
        w.minSize           = new Vector2(335, 400);
        w.totalSizeOfStyles = 0;

        w.usableSkins.Clear();
        w.projectSkins.Clear();
        w.guiSkins.Clear();

        w.projectSkins = GetAssetsOfType <GUISkin>(".GUISkin");
        w.usableSkins.Add(EditorGUIUtility.GetBuiltinSkin(EditorSkin.Game));
        w.usableSkins.Add(EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector));

        foreach (GUISkin s in w.projectSkins)
        {
            w.usableSkins.Add(s);
        }

        foreach (GUISkin s in w.usableSkins)
        {
            w.guiSkins.Add(s.name);
        }

        w.guiSkins[1] = "InspectorSkin";

        w.LoadSkin(w.usableSkins[w.selSkin]);
    }
コード例 #5
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        if (GUILayout.Button("EditorStyleViewer", GUILayout.Height(40)))
        {
            EditorStyleViewer.Init();
        }
    }
コード例 #6
0
    public static void Init()
    {
        EditorStyleViewer w = EditorWindow.GetWindow <EditorStyleViewer>();

        //w.title = "Editor Styles";
        w.minSize           = new Vector2(335, 400);
        w.totalSizeOfStyles = 0;
        w.stylePrefs        = new StylePref[EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector).customStyles.Length];
        w.initialCount      = EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector).customStyles.Length;
        w.eStyles           = EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector).customStyles;
        w.optionsMenu.AddItem(new GUIContent("Copy"), false, w.CopyItem);
        w.optionsMenu.AddItem(new GUIContent("Display Sample Text"), false, w.ShowSampleText);
        w.optionsMenu.AddItem(new GUIContent("Enable or Disable"), false, w.ToggleDisabled);
        w.UpdateListSize();
        Debug.Log("View Size : " + w.totalSizeofView);
    }
コード例 #7
0
    public static void OpenWindow()
    {
        EditorStyleViewer window = EditorWindow.GetWindow <EditorStyleViewer>();

        window.Show();
    }