mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2026-10-11 01:48:07 +08:00
Only lexer-highlight what is shown in CS console (fix max vert overflow)
This commit is contained in:
1 parent
4f50afdddc
commit
1d24af5666
7 files changed
+182
-93
No files matched your search
@@ -22,7 +22,7 @@ namespace UnityExplorer.UI
|
||||
|
||||
public InputField InputField;
|
||||
public Text PlaceholderText;
|
||||
private readonly RectTransform Rect;
|
||||
public RectTransform Rect;
|
||||
|
||||
public string Text
|
||||
{
|
||||
@@ -30,6 +30,9 @@ namespace UnityExplorer.UI
|
||||
set => InputField.text = value;
|
||||
}
|
||||
|
||||
public bool ReachedMaxVerts => TextGenerator.vertexCount >= UIManager.MAX_TEXT_VERTS;
|
||||
public TextGenerator TextGenerator => InputField.cachedInputTextGenerator;
|
||||
|
||||
private bool updatedWanted;
|
||||
|
||||
private void OnInputChanged(string value)
|
||||
@@ -41,7 +44,8 @@ namespace UnityExplorer.UI
|
||||
{
|
||||
if (updatedWanted)
|
||||
{
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(Rect);
|
||||
//LayoutRebuilder.ForceRebuildLayoutImmediate(Rect);
|
||||
LayoutRebuilder.MarkLayoutForRebuild(Rect);
|
||||
|
||||
OnValueChanged?.Invoke(InputField.text);
|
||||
updatedWanted = false;
|
||||
|
||||
Reference in new issue
Block a user