Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8f32422

Browse files
美化了界面
1 parent 552ca87 commit 8f32422

File tree

3 files changed

+46
-21
lines changed

3 files changed

+46
-21
lines changed

‎Assets/MeshEditor/Editor/EditMeshVertexAuxiliary.cs‎

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class EditMeshVertexAuxiliary : EditorWindow
1010
[@MenuItem("Window/模型网格编辑辅助界面")]
1111
static void main()
1212
{
13-
EditorWindow.GetWindow<EditMeshVertexAuxiliary>(false, "模型网格编辑器");
13+
EditorWindow.GetWindowWithRect<EditMeshVertexAuxiliary>(newRect(0,0,400,260),false, "模型网格编辑器");
1414
}
1515

1616
public GameObject target;
@@ -26,36 +26,55 @@ void OnGUI()
2626
{
2727
scrollVec2 = EditorGUILayout.BeginScrollView(scrollVec2, GUILayout.Width(position.width), GUILayout.Height(position.height));
2828

29+
#region 打开网页
30+
EditorGUILayout.BeginHorizontal("MeTransitionHead");
31+
if (GUILayout.Button("访问CSDN博客", "toolbarbutton"))
32+
{
33+
Help.BrowseURL(@"http://blog.csdn.net/qq992817263/article/details/51579913");
34+
}
35+
if (GUILayout.Button("访问github项目", "toolbarbutton"))
36+
{
37+
Help.BrowseURL(@"https://github.com/coding2233/MeshEditor");
38+
}
39+
EditorGUILayout.EndHorizontal();
40+
#endregion
41+
2942
#region 当前编辑目标
30-
EditorGUILayout.BeginHorizontal();
43+
EditorGUILayout.BeginHorizontal("HelpBox");
3144
GUILayout.Label("当前编辑目标:");
3245
if (target != null)
3346
{
3447
targetName = target.name;
35-
if (GUILayout.Button(targetName))
48+
if (GUILayout.Button(targetName,GUILayout.Width(200)))
3649
EditorApplication.delayCall += SelectTarget;
3750
}
3851
else
39-
GUILayout.Label("无");
52+
{
53+
GUILayout.Label("无", "ErrorLabel");
54+
GUILayout.FlexibleSpace();
55+
}
4056
EditorGUILayout.EndHorizontal();
4157
#endregion
4258

4359
#region 目标克隆体
44-
EditorGUILayout.BeginHorizontal();
60+
EditorGUILayout.BeginHorizontal("HelpBox");
4561
GUILayout.Label("目标克隆体:");
4662
if (targetClone != null)
4763
{
4864
targetCloneName = targetClone.name;
49-
if (GUILayout.Button(targetCloneName))
65+
if (GUILayout.Button(targetCloneName,GUILayout.Width(200)))
5066
EditorApplication.delayCall += SelectTargetClone;
5167
}
5268
else
53-
GUILayout.Label("无");
69+
{
70+
GUILayout.Label("无", "ErrorLabel");
71+
GUILayout.FlexibleSpace();
72+
}
5473
EditorGUILayout.EndHorizontal();
5574
#endregion
5675

5776
#region 顶点大小
58-
EditorGUILayout.BeginHorizontal();
77+
EditorGUILayout.BeginHorizontal("HelpBox");
5978
GUILayout.Label("顶点大小:");
6079
if (target != null && editMeshVertexSenior != null)
6180
{
@@ -67,29 +86,35 @@ void OnGUI()
6786
}
6887
}
6988
else
70-
GUILayout.Label("无");
89+
{
90+
GUILayout.Label("无", "ErrorLabel");
91+
GUILayout.FlexibleSpace();
92+
}
7193
EditorGUILayout.EndHorizontal();
7294
#endregion
7395

7496
#region 顶点数量
75-
EditorGUILayout.BeginHorizontal();
97+
EditorGUILayout.BeginHorizontal("HelpBox");
7698
GUILayout.Label("顶点数量:");
7799
if (target != null && editMeshVertexSenior != null)
78100
{
79101
GUILayout.Label(editMeshVertexSenior._VertexNumber.ToString());
80102
}
81103
else
82-
GUILayout.Label("无");
104+
{
105+
GUILayout.Label("无", "ErrorLabel");
106+
GUILayout.FlexibleSpace();
107+
}
83108
EditorGUILayout.EndHorizontal();
84109
#endregion
85110

86111
#region 创建、删除
87112
EditorGUILayout.BeginHorizontal();
88-
if (GUILayout.Button("创建顶点"))
113+
if (GUILayout.Button("创建顶点","LargeButtonLeft"))
89114
{
90115
EditorApplication.delayCall += AddVertex;
91116
}
92-
if (GUILayout.Button("删除顶点"))
117+
if (GUILayout.Button("删除顶点","LargeButtonRight"))
93118
{
94119
EditorApplication.delayCall += DeleteVertex;
95120
}
@@ -98,11 +123,11 @@ void OnGUI()
98123

99124
#region 相交、镜像
100125
EditorGUILayout.BeginHorizontal();
101-
if (GUILayout.Button("相交位移"))
126+
if (GUILayout.Button("相交位移","LargeButtonLeft"))
102127
{
103128
EditorApplication.delayCall += IntersectionDisplacement;
104129
}
105-
if (GUILayout.Button("镜像位移"))
130+
if (GUILayout.Button("镜像位移","LargeButtonRight"))
106131
{
107132
EditorApplication.delayCall += MirrorDisplacement;
108133
}
@@ -111,11 +136,11 @@ void OnGUI()
111136

112137
#region 两点塌陷、多点塌陷
113138
EditorGUILayout.BeginHorizontal();
114-
if (GUILayout.Button("两点塌陷"))
139+
if (GUILayout.Button("两点塌陷","LargeButtonLeft"))
115140
{
116141
EditorApplication.delayCall += CollapseOnTwoVertex;
117142
}
118-
if (GUILayout.Button("多点塌陷"))
143+
if (GUILayout.Button("多点塌陷","LargeButtonRight"))
119144
{
120145
EditorApplication.delayCall += CollapseOnMoreVertex;
121146
}
@@ -124,7 +149,7 @@ void OnGUI()
124149

125150
#region 取消编辑
126151
EditorGUILayout.BeginHorizontal();
127-
if (GUILayout.Button("取消编辑"))
152+
if (GUILayout.Button("取消编辑","LargeButton"))
128153
{
129154
EditorApplication.delayCall += CancelEditor;
130155
}
@@ -133,7 +158,7 @@ void OnGUI()
133158

134159
#region 编辑完成
135160
EditorGUILayout.BeginHorizontal();
136-
if (GUILayout.Button("编辑完成"))
161+
if (GUILayout.Button("编辑完成","LargeButton"))
137162
{
138163
EditorApplication.delayCall += Finish;
139164
}

‎Assets/MeshEditor/Editor/EditMeshVertexSeniorEditor.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ public void OnEnable()
1414
}
1515
public override void OnInspectorGUI()
1616
{
17-
if (GUILayout.Button("打开编辑辅助界面"))
17+
if (GUILayout.Button("打开编辑辅助界面","LargeButton"))
1818
{
1919
EditorApplication.delayCall += OpenAuxiliaryWindow;
2020
}
2121
}
2222
void OpenAuxiliaryWindow()
2323
{
24-
_EditMeshVertexAuxiliary = EditorWindow.GetWindow<EditMeshVertexAuxiliary>(false, "模型网格编辑器");
24+
_EditMeshVertexAuxiliary = EditorWindow.GetWindowWithRect<EditMeshVertexAuxiliary>(newRect(0,0,400,260),false, "模型网格编辑器");
2525
_EditMeshVertexAuxiliary.target = _EditMeshVertexSenior.transform.gameObject;
2626
_EditMeshVertexAuxiliary.editMeshVertexSenior = _EditMeshVertexSenior;
2727
_EditMeshVertexAuxiliary.targetClone = _EditMeshVertexSenior._target;
6.75 KB
Binary file not shown.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /