Skip to content

Commit 2745691

Browse files
committed
Tweak database UI
1 parent 0e5b179 commit 2745691

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

Integration/Editor/Database/EditorDataItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public sealed override void OnGUI (Rect position, SerializedProperty property, G
6868
serializedProperties.Add (property.FindPropertyRelative (extraProperties[i]));
6969
}*/
7070
int beginningDepth = iterationProperty.depth;
71-
while (iterationProperty.NextVisible(false))
71+
while (iterationProperty.NextVisible(true))
7272
{
7373
if (iterationProperty.depth != beginningDepth) break;
7474
serializedProperties.Add(iterationProperty.Copy());

Integration/Editor/Database/EditorLSDatabaseWindow.cs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void OnGUI () {
5454
EditorGUILayout.LabelField ("Cannot modify database during runtime", EditorStyles.boldLabel);
5555
return;
5656
}
57-
DrawLoader ();
57+
DrawSettings ();
5858
if (DatabaseEditor != null) {
5959
DrawDatabase ();
6060
} else {
@@ -65,11 +65,11 @@ void OnGUI () {
6565
}
6666

6767
public string DatabaseDirectory {get; private set;}
68-
bool loadFoldout = false;
68+
bool settingsFoldout = false;
6969

70-
void DrawLoader () {
71-
loadFoldout = EditorGUILayout.Foldout (loadFoldout, "Database Directory");
72-
if (loadFoldout) {
70+
void DrawSettings () {
71+
settingsFoldout = EditorGUILayout.Foldout (settingsFoldout, "Settings");
72+
if (settingsFoldout) {
7373
GUILayout.BeginHorizontal ();
7474

7575
const int maxDirLength = 28;
@@ -87,14 +87,16 @@ void DrawLoader () {
8787
}
8888
}
8989
GUILayout.EndHorizontal ();
90-
}
91-
SerializedObject obj = new SerializedObject(this);
92-
SerializedProperty editorTypeProp = obj.FindProperty ("_databaseEditorType");
9390

94-
EditorGUILayout.PropertyField (editorTypeProp, new GUIContent ("Editor Type"));
95-
SerializedProperty databaseTypeProp = obj.FindProperty("_databaseType");
96-
EditorGUILayout.PropertyField (databaseTypeProp, new GUIContent ("Database Type"));
97-
obj.ApplyModifiedProperties ();
91+
SerializedObject obj = new SerializedObject(this);
92+
SerializedProperty editorTypeProp = obj.FindProperty ("_databaseEditorType");
93+
94+
EditorGUILayout.PropertyField (editorTypeProp, new GUIContent ("Editor Type"));
95+
SerializedProperty databaseTypeProp = obj.FindProperty("_databaseType");
96+
EditorGUILayout.PropertyField (databaseTypeProp, new GUIContent ("Database Type"));
97+
obj.ApplyModifiedProperties ();
98+
99+
}
98100

99101
}
100102

0 commit comments

Comments
 (0)