|
7 | 7 | namespace Toolbox.Editor |
8 | 8 | { |
9 | 9 | using Toolbox.Editor.Drawers; |
10 | | - using Toolbox.Editor.Hierarchy; |
11 | 10 | using Toolbox.Editor.Folders; |
| 11 | + using Toolbox.Editor.Hierarchy; |
12 | 12 |
|
13 | 13 | internal interface IToolboxGeneralSettings |
14 | 14 | { } |
@@ -201,6 +201,37 @@ private void OnValidate() |
201 | 201 |
|
202 | 202 | #endregion |
203 | 203 |
|
| 204 | + public void Reset() |
| 205 | + { |
| 206 | + ResetHierarchySettings(); |
| 207 | + ResetProjectSettings(); |
| 208 | + ResetInspectorSettings(); |
| 209 | + } |
| 210 | + |
| 211 | + public void ResetHierarchySettings() |
| 212 | + { |
| 213 | + UseToolboxHierarchy = true; |
| 214 | + RowDataTypes = Defaults.rowDataTypes; |
| 215 | + DrawHorizontalLines = true; |
| 216 | + ShowSelectionsCount = true; |
| 217 | + } |
| 218 | + |
| 219 | + public void ResetProjectSettings() |
| 220 | + { |
| 221 | + UseToolboxProject = true; |
| 222 | + ResetIconRectProperties(); |
| 223 | + CustomFolders = new List<FolderData>(); |
| 224 | + } |
| 225 | + |
| 226 | + public void ResetInspectorSettings() |
| 227 | + { |
| 228 | + UseToolboxDrawers = true; |
| 229 | + SetAllPossibleDecoratorDrawers(); |
| 230 | + SetAllPossibleConditionDrawers(); |
| 231 | + SetAllPossibleSelfPropertyDrawers(); |
| 232 | + SetAllPossibleListPropertyDrawers(); |
| 233 | + SetAllPossibleTargetTypeDrawers(); |
| 234 | + } |
204 | 235 |
|
205 | 236 | public void SetAllPossibleDecoratorDrawers() |
206 | 237 | { |
@@ -252,7 +283,6 @@ public void SetAllPossibleTargetTypeDrawers() |
252 | 283 | } |
253 | 284 | } |
254 | 285 |
|
255 | | - |
256 | 286 | public void ResetIconRectProperties() |
257 | 287 | { |
258 | 288 | largeIconScale = Defaults.largeFolderIconScaleDefault; |
@@ -331,10 +361,10 @@ public bool UseToolboxDrawers |
331 | 361 | set => useToolboxDrawers = value; |
332 | 362 | } |
333 | 363 |
|
334 | | - public bool ForceDefaultLists |
335 | | - { |
336 | | - get => forceDefaultLists; |
337 | | - set => forceDefaultLists = value; |
| 364 | + public bool ForceDefaultLists |
| 365 | + { |
| 366 | + get => forceDefaultLists; |
| 367 | + set => forceDefaultLists = value; |
338 | 368 | } |
339 | 369 |
|
340 | 370 | public List<SerializedType> DecoratorDrawerHandlers |
|
0 commit comments