Exemple #1
0
        void DrawHeaderUI()
        {
            var style_title = new GUIStyle(EditorStyles.whiteBoldLabel);

            style_title.normal.background = ExcelConverterUtility.GenerateColorBlockTexture(ExcelConverterUtility.ExcelStandardColor);

            GUILayout.Label(new GUIContent("Excel Converter"), style_title);
        }
        void OnEnable()
        {
            style_title                   = new GUIStyle(EditorStyles.whiteBoldLabel);
            style_title.fontSize          = 16;
            style_title.alignment         = TextAnchor.MiddleCenter;
            style_title.normal.background = ExcelConverterUtility.GenerateColorBlockTexture(ExcelConverterUtility.ExcelStandardColor);

            style_index                   = new GUIStyle();
            style_index.fontSize          = 14;
            style_index.alignment         = TextAnchor.MiddleRight;
            style_index.normal.textColor  = new Color(0, 0, 0, 0.5f);
            style_index.normal.background = ExcelConverterUtility.GenerateColorBlockTexture(new Color(1, 1, 1, 0.5f));

            style_data           = new GUIStyle();
            style_data.fontSize  = 14;
            style_data.alignment = TextAnchor.MiddleLeft;
            bg[0] = ExcelConverterUtility.GenerateColorBlockTexture(new Color(0.7f, 0.7f, 0.7f));
            bg[1] = ExcelConverterUtility.GenerateColorBlockTexture(new Color(0.75f, 0.75f, 0.75f));

            style_popup = new GUIStyle(GUI.skin.button);
            style_popup.focused.textColor = Color.black;
        }