コード例 #1
0
        public static void DropdownHeader(string content, ref bool show_dropdown, EditorStyle style)
        {
            string label = "";

            UnityEngine.Color last_background_color = GUI.backgroundColor;

            if (show_dropdown)
            {
                label += "▼ ";

                GUI.backgroundColor = style.DropdownHeaderShowing.UnityColor;
            }
            else
            {
                label += "► ";

                GUI.backgroundColor = style.DropdownHeaderBase.UnityColor;
            }

            label += content;

            if (GUILayout.Button(label, style.DropdownHeaderButtonStyle))
            {
                show_dropdown = !show_dropdown;

                GUIUtility.keyboardControl = 0;
            }

            GUI.backgroundColor = last_background_color;
        }
コード例 #2
0
 public static void HorizontalLine(EditorStyle style)
 {
     UnityEngine.Color c = GUI.color;
     GUI.color = style.HorizontalLineBase.UnityColor;
     GUILayout.Box(GUIContent.none, style.HorizontalLine);
     GUI.color = c;
 }
コード例 #3
0
        private void StartDrawGUI()
        {
            if (fist_time)
            {
                fist_time = false;

                style = new EditorStyle();
            }
        }