public void OnGUI() { GUIStyle boxStyle = new GUIStyle("box"); var width = position.size.x - boxStyle.border.horizontal; var height = position.size.y - boxStyle.border.vertical; var innerBoxWidth = width - (boxStyle.padding.horizontal + boxStyle.border.horizontal); var innerBoxHeight = height - (boxStyle.padding.vertical + boxStyle.border.vertical); MyGUI.Layout(position, boxStyle, new int[, ] { { 0, 1, 1 }, { 2, 1, 1 }, { 2, 1, 1 }, //{ 1, 1, 1 }, }, (Rect pos) => { EditorGUILayout.BeginVertical(); EditorGUILayout.LabelField(TagTirggerListPath); EditorGUILayout.BeginHorizontal(); if (MyGUI.Button("保存")) { savetagTirgger(); } if (MyGUI.Button("读取")) { LoadtagTirgger(); } if (MyGUI.Button("增加Tag")) { if (tagname != "" && tagname != null) { AddTag(tagname); } tagname = ""; } if (MyGUI.Button("删除Tag")) { if (tagname != "" && tagname != null) { RemoveTag(tagname); } tagname = ""; } EditorGUILayout.EndHorizontal(); tagname = MyGUI.TextFieldWithTitle("tagName:", tagname); EditorGUILayout.EndVertical(); }, (Rect pos) => { //EditorGUILayout.BeginHorizontal(); //if (MyGUI.Button("保存")) //{ //} //if (MyGUI.Button("读取")) //{ //} //EditorGUILayout.EndHorizontal(); DoGUI("hhh", ref windowbool, ref scrollPos, getValue, setValue, pos.width, pos.height, pos.x, pos.y); }, (Rect pos) => { taglistdogui(ref taglistbool, "dsa", pos.width - 10, pos.height - 10); }, (Rect pos) => { //DoGUI("hhh", ref windowbool, ref scrollPos, getValue, setValue, pos.width, pos.height,pos.x,pos.y); } ); //EditorGUILayout.BeginHorizontal(); //taglistdogui(ref taglistbool, "dsa"); //DoGUI("hhh", ref windowbool, ref scrollPos, getValue, setValue, width, height); //EditorGUILayout.EndHorizontal(); }
//SkillListManagerDataAsset skillManagerDataAsset; void OnGUI() { MyGUI.Layout( position, boxStyle, Layout, (Rect position) => { EditorGUILayout.LabelField(skillDataFile); if (MyGUI.Button("读取")) { Load(); } if (MyGUI.Button("保存")) { Save(); } }, (Rect position) => { int removeIndex = -1; int copyIndex = -1; if (skillListDatas.Count > 0) { for (int i = 0; i < skillListDatas.Count; i++) { GUILayout.BeginHorizontal(); if (MyGUI.Button("复制", GUILayout.Width(20))) { copyIndex = i; } if (MyGUI.Button(skillListDatas[i].id)) { currskillListData = skillListDatas[i]; focusIndex = i; } if (MyGUI.Button("-", GUILayout.Width(20))) { removeIndex = i; } GUILayout.EndHorizontal(); } } if (removeIndex >= 0) { skillListDatas.RemoveAt(removeIndex); } if (copyIndex >= 0) { //SkillListData skill = skillListDatas[copyIndex]; skillListDatas.Add(Tools.DepthClone(skillListDatas[copyIndex])); } if (MyGUI.Button("+")) { skillListDatas.Add(new SkillListSaveData()); } }, (Rect position) => { if (currskillListData != null) { Scrollpos = EditorGUILayout.BeginScrollView(Scrollpos); currskillListData.id = MyGUI.TextFieldWithTitle("id:", currskillListData.id); currskillListData.roleSkillListFrameEventData.RoleSkillListType = (RoleSkillListType)MyGUI.EnumPopupWithTitle("类型:", currskillListData.roleSkillListFrameEventData.RoleSkillListType); currskillListData.roleSkillListFrameEventData = MyGUI.Skilldatalistfield(currskillListData.roleSkillListFrameEventData, currskillListData.roleSkillListFrameEventData.RoleSkillListType); EditorGUILayout.EndScrollView(); } }, (Rect position) => { if (Application.isPlaying) { testTimes = MyGUI.IntFieldWithTitle("测试次数", testTimes); testInterval = MyGUI.FloatFieldWithTitle("间隔时间", testInterval); //moveOrientation = MyGUI.Vector3WithTitle("移动方向", moveOrientation); //testPosition = MyGUI.Vector3WithTitle("位置", testPosition); testFlip = MyGUI.ToggleWithTitle("翻转", testFlip); if (MyGUI.Button("测试特效")) { EditorCoroutineSequenceRunner.RemoveCoroutine("SkillList"); EditorCoroutineSequenceRunner.AddCoroutineIfNot("SkillList", TestAnimEffect(currskillListData, testTimes, testInterval)); } } }); }