예제 #1
0
        public void DrawSelf(XBaseWindow window)
        {
            name = window.CreateStringField("ClassName", name);

            window.DoButton("Add New NameSpace", () => importNamespace.Add("UnityEngine"));
            for (int pos = 0; pos < importNamespace.Count; pos++)
            {
                //  TODO loop in importNamespace.Count
                window.BeginHorizontal();
                importNamespace[pos] = window.CreateStringField(importNamespace[pos]);
                window.DoButton("Delete", () => importNamespace.RemoveAt(pos));
                window.EndHorizontal();
            }

            window.DoButton("Add New BaseClass", () => baseClass.Add("Object"));
            for (int pos = 0; pos < baseClass.Count; pos++)
            {
                //  TODO loop in importNamespace.Count
                window.BeginHorizontal();
                baseClass[pos] = window.CreateStringField(baseClass[pos]);
                window.DoButton("Delete", () => baseClass.RemoveAt(pos));
                window.EndHorizontal();
            }

            window.BeginHorizontal();
            window.DoButton("Add Method", () => methods.Add(new XCodeMethod()));
            window.DoButton("Add Field", () => fields.Add(new XCodeField()));
            window.DoButton("Add Property", () => properties.Add(new XCodeProperty()));
            window.EndHorizontal();

            for (int pos = 0; pos < methods.Count; pos++)
            {
                //  TODO loop in classChildren.Count
                methods[pos].DrawSelf(window);
                window.DoButton("Delete", () => methods.RemoveAt(pos));
            }
            for (int pos = 0; pos < fields.Count; pos++)
            {
                //  TODO loop in classChildren.Count
                fields[pos].DrawSelf(window);
                window.DoButton("Delete", () => fields.RemoveAt(pos));
            }
            for (int pos = 0; pos < properties.Count; pos++)
            {
                //  TODO loop in classChildren.Count
                properties[pos].DrawSelf(window);
                window.DoButton("Delete", () => properties.RemoveAt(pos));
            }
        }
예제 #2
0
        public override void DrawSelf(XBaseWindow window)
        {
            window.DoButton(name, () => isShowAll = !isShowAll);
            if (isShowAll)
            {
                window.BeginHorizontal();
                name = window.CreateStringField(name);
                window.EndHorizontal();

                window.BeginHorizontal();
                DrawType(window);
                window.DoButton("Add Parameter", () => parameters.Add(new XCodeParameter()));
                window.DoButton("Add Attribute", () => attributes.Add(new XCodeCustomAttribute()));
                window.DoButton("Add Comment", () => comments.Add("TODO LIST"));
                window.EndHorizontal();
            }


            if (isShowAll)
            {
                DrawComments(window);
                DrawCustomeAttribute(window);
                DrawParameters(window);
            }
        }
예제 #3
0
//		public virtual void DrawMemberAttribute(XBaseWindow window)
//		{
//			memberAttribute = window.CreateEnumSelectable( memberAttribute ) as MemberAttributes;
//		}

        public virtual void DrawComments(XBaseWindow window)
        {
            XBaseWindow.CreateLabel("Comments");
            for (int pos = 0; pos < comments.Count; pos++)
            {
                //  TODO loop in comments.Count
                XBaseWindow.BeginHorizontal();
                comments[pos] = XBaseWindow.CreateStringField(comments[pos]);
                XBaseWindow.DoButton("Delete", () => comments.RemoveAt(pos));
                XBaseWindow.EndHorizontal();
            }
        }
예제 #4
0
 public virtual void DrawCustomeAttribute(XBaseWindow window)
 {
     XBaseWindow.CreateLabel("CustomAttributes");
     for (int pos = 0; pos < attributes.Count; pos++)
     {
         //  TODO loop in comments.Count
         XBaseWindow.BeginHorizontal();
         attributes[pos].name = XBaseWindow.CreateStringField(attributes[pos].name);
         XBaseWindow.DoButton <XCodeParameter>("Parameter", ParameterCreate, attributes[pos].parameter);
         XBaseWindow.DoButton("Delete", () => attributes.RemoveAt(pos));
         XBaseWindow.EndHorizontal();
     }
 }
예제 #5
0
        public override void DrawSelf(XBaseWindow window)
        {
            window.BeginHorizontal();
            window.DoButton(name, () => isShowAll = !isShowAll);
            if (isShowAll)
            {
                name = window.CreateStringField(name);
//				window.CreateEnumSelectable( codeType );
//				TypeID = window.CreateSelectableString(TypeID, StrTypes );
                DrawType(window);
                window.DoButton("Add Attribute", () => attributes.Add(new XCodeCustomAttribute()));
                window.DoButton("Add Comment", () => comments.Add("TODO LIST"));
            }
            window.EndHorizontal();

            if (isShowAll)
            {
                DrawComments(window);
            }
        }
예제 #6
0
 public override void OnInspectorGUI()
 {
     if (isVisible)
     {
         XBaseEditor.DrawLogo();
         base.OnInspectorGUI();
         material.renderQueue = XBaseWindow.CreateIntField("renderQueue", material.renderQueue);
         toggleKeywords       = XBaseWindow.CreateCheckBox("shaderKeywords : " + material.shaderKeywords.Length, toggleKeywords);
         if (toggleKeywords)
         {
             for (int i = 0; i < material.shaderKeywords.Length; i++)
             {
                 material.shaderKeywords [i] = XBaseWindow.CreateStringField(material.shaderKeywords [i]);
             }
         }
         if (material.HasProperty("_Color"))
         {
             material.color = XBaseWindow.CreateColorField("_Color", material.color);
         }
     }
 }