Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions Assets/QA/Tests/Core Platform Menu/SceneMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,13 @@ void BuildSearchBar(Transform parent)
var ph = MakeText("Placeholder", textArea.transform, "Search scenes\u2026", 18,
kTextSecondary, TextAlignmentOptions.MidlineLeft);
ph.fontStyle = FontStyles.Italic;
ph.textWrappingMode = TextWrappingModes.NoWrap;
DisableWordWrap(ph);
ph.overflowMode = TextOverflowModes.Ellipsis;
Stretch(ph.gameObject);

var txt = MakeText("Text", textArea.transform, "", 18,
kTextPrimary, TextAlignmentOptions.MidlineLeft);
txt.textWrappingMode = TextWrappingModes.NoWrap;
DisableWordWrap(txt);
Stretch(txt.gameObject);

var input = bar.AddComponent<TMP_InputField>();
Expand Down Expand Up @@ -614,7 +614,7 @@ void BuildSceneButton(Transform parent, SceneEntry entry)
var nameT = MakeText("Name", go.transform, entry.displayName, 15, kTextPrimary,
TextAlignmentOptions.Center);
nameT.overflowMode = TextOverflowModes.Ellipsis;
nameT.textWrappingMode = TextWrappingModes.NoWrap;
DisableWordWrap(nameT);
var nr = Rect(nameT);
nr.anchorMin = new Vector2(0.04f, 0.38f);
nr.anchorMax = new Vector2(0.96f, 0.94f);
Expand All @@ -626,7 +626,7 @@ void BuildSceneButton(Transform parent, SceneEntry entry)
var subT = MakeText("Sub", go.transform, entry.subcategory, 11, kTextSecondary,
TextAlignmentOptions.Center);
subT.overflowMode = TextOverflowModes.Ellipsis;
subT.textWrappingMode = TextWrappingModes.NoWrap;
DisableWordWrap(subT);
var srr = Rect(subT);
srr.anchorMin = new Vector2(0.04f, 0.06f);
srr.anchorMax = new Vector2(0.96f, 0.38f);
Expand Down Expand Up @@ -714,6 +714,15 @@ static TextMeshProUGUI MakeText(string name, Transform parent, string text, floa
return t;
}

static void DisableWordWrap(TMP_Text t)
{
#if UNITY_6000_0_OR_NEWER
t.textWrappingMode = TextWrappingModes.NoWrap;
#else
t.enableWordWrapping = false;
#endif
}

static void Stretch(GameObject go)
{
var r = go.GetComponent<RectTransform>();
Expand Down
2 changes: 1 addition & 1 deletion Assets/Samples/InGameHints/InGameHintsActions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.19.1
// version 1.20.0
// from Assets/Samples/InGameHints/InGameHintsActions.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
Expand Down
2 changes: 1 addition & 1 deletion Assets/Samples/SimpleDemo/SimpleControls.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.19.1
// version 1.20.0
// from Assets/Samples/SimpleDemo/SimpleControls.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.19.1
// version 1.20.0
// from Assets/Tests/InputSystem/InputActionCodeGeneratorActions.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
Expand Down
Loading