-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from eviltwo/0.7.1-dev
0.7.1
- Loading branch information
Showing
12 changed files
with
126 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
InputGlyphs/Assets/InputGlyphs/Scripts/Display/TextMeshPro/Editor.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
InputGlyphs/Assets/InputGlyphs/Scripts/Display/TextMeshPro/Editor/InputGlyphTextEditor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#if ENABLE_INPUT_SYSTEM && SUPPORT_TMPRO | ||
using System.Text; | ||
using UnityEditor; | ||
using UnityEngine; | ||
|
||
namespace InputGlyphs.Display.Editor | ||
{ | ||
[CustomEditor(typeof(InputGlyphText))] | ||
public class InputGlyphTextEditor : UnityEditor.Editor | ||
{ | ||
private StringBuilder _stringBuilder = new StringBuilder(); | ||
|
||
public override void OnInspectorGUI() | ||
{ | ||
base.OnInspectorGUI(); | ||
|
||
var glyphText = (InputGlyphText)target; | ||
|
||
EditorGUILayout.Space(); | ||
EditorGUILayout.LabelField("Enter the following tag into the text:"); | ||
using (new EditorGUI.IndentLevelScope()) | ||
{ | ||
for (int i = 0; i < glyphText.InputActionReferences.Length; i++) | ||
{ | ||
if (glyphText.InputActionReferences[i] == null) | ||
{ | ||
continue; | ||
} | ||
using (new EditorGUILayout.HorizontalScope()) | ||
{ | ||
_stringBuilder.Clear(); | ||
_stringBuilder.Append("<sprite name="); | ||
_stringBuilder.Append(glyphText.InputActionReferences[i].action.name); | ||
_stringBuilder.Append(">"); | ||
EditorGUILayout.LabelField(_stringBuilder.ToString()); | ||
if (GUILayout.Button("Copy")) | ||
{ | ||
EditorGUIUtility.systemCopyBuffer = _stringBuilder.ToString(); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
#endif |
11 changes: 11 additions & 0 deletions
11
...Glyphs/Assets/InputGlyphs/Scripts/Display/TextMeshPro/Editor/InputGlyphTextEditor.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
...utGlyphs/Scripts/Display/TextMeshPro/Editor/InputGlyphs.Display.TextMeshPro.Editor.asmdef
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "InputGlyphs.Display.TextMeshPro.Editor", | ||
"rootNamespace": "", | ||
"references": [ | ||
"GUID:75469ad4d38634e559750d17036d5f7c", | ||
"GUID:1f6dfe89326c1df4db8a18418293db90" | ||
], | ||
"includePlatforms": [ | ||
"Editor" | ||
], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false, | ||
"overrideReferences": false, | ||
"precompiledReferences": [], | ||
"autoReferenced": false, | ||
"defineConstraints": [], | ||
"versionDefines": [ | ||
{ | ||
"name": "com.unity.textmeshpro", | ||
"expression": "", | ||
"define": "SUPPORT_TMPRO" | ||
} | ||
], | ||
"noEngineReferences": false | ||
} |
7 changes: 7 additions & 0 deletions
7
...phs/Scripts/Display/TextMeshPro/Editor/InputGlyphs.Display.TextMeshPro.Editor.asmdef.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters