Skip to content

Commit

Permalink
Tri inspector (#2)
Browse files Browse the repository at this point in the history
Replace drawers with Tri Inspector
  • Loading branch information
vanifatovvlad authored Jun 30, 2023
1 parent 97b0eb5 commit b63cf34
Show file tree
Hide file tree
Showing 50 changed files with 325 additions and 422 deletions.
3 changes: 0 additions & 3 deletions Editor/Adapters.meta

This file was deleted.

29 changes: 0 additions & 29 deletions Editor/Adapters/FloatFormatAdapterEditor.cs

This file was deleted.

3 changes: 0 additions & 3 deletions Editor/Adapters/FloatFormatAdapterEditor.cs.meta

This file was deleted.

26 changes: 0 additions & 26 deletions Editor/Adapters/TextLocalizeAdapterEditor.cs

This file was deleted.

3 changes: 0 additions & 3 deletions Editor/Adapters/TextLocalizeAdapterEditor.cs.meta

This file was deleted.

3 changes: 0 additions & 3 deletions Editor/Applicators.meta

This file was deleted.

57 changes: 0 additions & 57 deletions Editor/Applicators/FormattedTMPTextApplicatorEditor.cs

This file was deleted.

3 changes: 0 additions & 3 deletions Editor/Applicators/FormattedTMPTextApplicatorEditor.cs.meta

This file was deleted.

57 changes: 0 additions & 57 deletions Editor/Applicators/LocalizedTMPTextApplicatorEditor.cs

This file was deleted.

3 changes: 0 additions & 3 deletions Editor/Applicators/LocalizedTMPTextApplicatorEditor.cs.meta

This file was deleted.

7 changes: 5 additions & 2 deletions Editor/CodeWriter.ViewBinding.Editor.asmdef
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{
"name": "CodeWriter.ViewBinding.Editor",
"rootNamespace": "",
"references": [
"CodeWriter.ViewBinding",
"CodeWriter.ViewBinding.Applicators"
"CodeWriter.ViewBinding.Applicators",
"TriInspector",
"TriInspector.Editor"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"overrideReferences": true,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
Expand Down
11 changes: 8 additions & 3 deletions Editor/Odin.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions Editor/Odin/CodeWriter.ViewBinding.Editor.Odin.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "CodeWriter.ViewBinding.Editor.Odin",
"rootNamespace": "",
"references": [
"CodeWriter.ViewBinding",
"TriInspector.Editor.Integrations.Odin"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [
"ODIN_INSPECTOR"
],
"versionDefines": [],
"noEngineReferences": false
}
7 changes: 7 additions & 0 deletions Editor/Odin/CodeWriter.ViewBinding.Editor.Odin.asmdef.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 14 additions & 6 deletions Editor/Odin/OdinViewEntryValidator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#if ODIN_INSPECTOR

using CodeWriter.ViewBinding.Editor.Odin;
using CodeWriter.ViewBinding.Editor.Odin;
using Sirenix.OdinInspector.Editor;
using Sirenix.OdinInspector.Editor.Validation;
using TriInspector.Editor.Integrations.Odin;

[assembly: RegisterValidator(typeof(OdinViewEntryValidator<>))]

Expand All @@ -11,6 +11,16 @@ public class OdinViewEntryValidator<TViewEntry> : ValueValidator<TViewEntry>
where TViewEntry : ViewEntry
{
#if ODIN_INSPECTOR_3_1
public override bool CanValidateProperty(InspectorProperty property)
{
if (TriOdinUtility.IsDrawnByTri(property.Tree.TargetType))
{
return false;
}

return base.CanValidateProperty(property);
}

protected override void Validate(ValidationResult result)
{
ValidateInternal(ValueEntry.SmartValue, result);
Expand All @@ -34,6 +44,4 @@ private void ValidateInternal(TViewEntry value, ValidationResult result)
result.ResultType = ValidationResultType.Error;
}
}
}

#endif
}
4 changes: 2 additions & 2 deletions Editor/Odin/OdinViewEntryValidator.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 0 additions & 54 deletions Editor/SingleResultAdapterBaseEditor.cs

This file was deleted.

3 changes: 0 additions & 3 deletions Editor/SingleResultAdapterBaseEditor.cs.meta

This file was deleted.

2 changes: 2 additions & 0 deletions Editor/Styles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ namespace CodeWriter.ViewBinding.Editor
{
internal static class Styles
{
public static readonly GUIContent NoneContent = GUIContent.none;

public static readonly GUIStyle RedBoldLabel;

static Styles()
Expand Down
Loading

0 comments on commit b63cf34

Please sign in to comment.