fix(UXAssist): fix UI color issue imported in 574919f

This commit is contained in:
soarqin committed 2026-09-11 00:41:28 +08:00
1 parent 87061d5235
commit 4b2f9c67dc
16 files changed
+14 -48

No files matched your search

+1
View File
@@ -158,3 +158,4 @@ The sync is implemented as an inline PowerShell `Exec` step inside the `ZipMod`
- **Mod-compatibility reflection:** Use `UXAssist.Common.ModCompat.ModCompatHelper` for BepInEx plugin detection, external mod type/method/field resolution, and property-setter lookup. Preserve the old public type identity with a forwarding or inherited compatibility facade when a refactor moves a type that external mods may locate through reflection; build and verify that the legacy reflection target forwards to the refactored implementation. Use `UXAssist.Common.Utils.DysonSphereReflection` for the DSPOptimizations-compatible `DysonSphereLayer` private fields (`totalNodeSP`, `totalFrameSP`, `totalCP`) instead of resolving them locally in each consumer. - **Mod-compatibility reflection:** Use `UXAssist.Common.ModCompat.ModCompatHelper` for BepInEx plugin detection, external mod type/method/field resolution, and property-setter lookup. Preserve the old public type identity with a forwarding or inherited compatibility facade when a refactor moves a type that external mods may locate through reflection; build and verify that the legacy reflection target forwards to the refactored implementation. Use `UXAssist.Common.Utils.DysonSphereReflection` for the DSPOptimizations-compatible `DysonSphereLayer` private fields (`totalNodeSP`, `totalFrameSP`, `totalCP`) instead of resolving them locally in each consumer.
- **Build quality gates:** Root `.editorconfig` defines suggestion-only C# style conventions. `Directory.Build.props` enables `TreatWarningsAsErrors` with `NoWarn>0618` for the expected obsolete-API usage, so any new warning fails the build. `.github/workflows/build.yml` runs a Release build and packages the three main mods on every push/PR. - **Build quality gates:** Root `.editorconfig` defines suggestion-only C# style conventions. `Directory.Build.props` enables `TreatWarningsAsErrors` with `NoWarn>0618` for the expected obsolete-API usage, so any new warning fails the build. `.github/workflows/build.yml` runs a Release build and packages the three main mods on every push/PR.
- **Save persistence:** Mods that need to persist data use the `IModCanSave` interface from DSPModSave. - **Save persistence:** Mods that need to persist data use the `IModCanSave` interface from DSPModSave.
- **Cloned UI button reset:** `UXAssist.UI.Util.ResetButton` calls the original `UIButton.Init` before resetting copied interaction state, preserving the original `Transition.normalColor` values. Do not replace cloned UI styles with guessed colors such as `Color.white`; clear runtime state while retaining the source's default style.
-4
View File
@@ -79,10 +79,7 @@ internal static class MenuButtonUI
btn.name = "button-uxassist-config"; btn.name = "button-uxassist-config";
btn.button.enabled = true; btn.button.enabled = true;
btn.button.interactable = true; btn.button.interactable = true;
btn.text.color = Color.white;
btn.text.fontStyle = FontStyle.Normal; btn.text.fontStyle = FontStyle.Normal;
btn.selectBg.color = new Color(1f, 1f, 1f, 0f);
btn.selectBar.color = new Color(1f, 1f, 1f, 0f);
var l = btn.text.GetComponent<Localizer>(); var l = btn.text.GetComponent<Localizer>();
if (l != null) if (l != null)
{ {
@@ -114,7 +111,6 @@ internal static class MenuButtonUI
if (img != null) if (img != null)
{ {
img.sprite = icon; img.sprite = icon;
img.color = Color.white;
img.enabled = icon != null; img.enabled = icon != null;
} }
@@ -354,7 +354,6 @@ internal static class RealtimeLogisticsInfoPanel
var itemIcon = Object.Instantiate(tipIconPrefab.gameObject, new Vector3(0, 0, 0), Quaternion.identity, _tipPrefab.transform); var itemIcon = Object.Instantiate(tipIconPrefab.gameObject, new Vector3(0, 0, 0), Quaternion.identity, _tipPrefab.transform);
itemIcon.name = "icon" + index; itemIcon.name = "icon" + index;
var itemIconImage = itemIcon.GetComponent<Image>(); var itemIconImage = itemIcon.GetComponent<Image>();
itemIconImage.color = Color.white;
itemIconImage.enabled = true; itemIconImage.enabled = true;
rectTrans = (RectTransform)itemIcon.transform; rectTrans = (RectTransform)itemIcon.transform;
rectTrans.sizeDelta = new Vector2(30f, 30f); rectTrans.sizeDelta = new Vector2(30f, 30f);
@@ -402,7 +401,6 @@ internal static class RealtimeLogisticsInfoPanel
var text = countText.GetComponent<Text>(); var text = countText.GetComponent<Text>();
text.fontSize = 18; text.fontSize = 18;
text.text = ""; text.text = "";
text.color = Color.white;
text.alignment = TextAnchor.UpperRight; text.alignment = TextAnchor.UpperRight;
text.fontStyle = FontStyle.Normal; text.fontStyle = FontStyle.Normal;
text.horizontalOverflow = HorizontalWrapMode.Overflow; text.horizontalOverflow = HorizontalWrapMode.Overflow;
@@ -419,7 +417,6 @@ internal static class RealtimeLogisticsInfoPanel
stateLocal.name = "iconLocal" + index; stateLocal.name = "iconLocal" + index;
var stateLocalImage = stateLocal.GetComponent<Image>(); var stateLocalImage = stateLocal.GetComponent<Image>();
stateLocalImage.material = null; stateLocalImage.material = null;
stateLocalImage.color = Color.white;
stateLocalImage.enabled = true; stateLocalImage.enabled = true;
rectTrans = (RectTransform)stateLocal.transform; rectTrans = (RectTransform)stateLocal.transform;
rectTrans.sizeDelta = new Vector2(16f, 16f); rectTrans.sizeDelta = new Vector2(16f, 16f);
@@ -431,7 +428,6 @@ internal static class RealtimeLogisticsInfoPanel
stateRemote.name = "iconRemote" + index; stateRemote.name = "iconRemote" + index;
var stateRemoteImage = stateRemote.GetComponent<Image>(); var stateRemoteImage = stateRemote.GetComponent<Image>();
stateRemoteImage.material = null; stateRemoteImage.material = null;
stateRemoteImage.color = Color.white;
stateRemoteImage.enabled = true; stateRemoteImage.enabled = true;
rectTrans = (RectTransform)stateRemote.transform; rectTrans = (RectTransform)stateRemote.transform;
rectTrans.sizeDelta = new Vector2(20f, 20f); rectTrans.sizeDelta = new Vector2(20f, 20f);
@@ -443,7 +439,6 @@ internal static class RealtimeLogisticsInfoPanel
var iconPrefab = Object.Instantiate(GameObject.Find("UI Root/Overlay Canvas/In Game/Top Tips/Entity Briefs/brief-info-top/brief-info/content/icons/icon"), _tipPrefab.transform); var iconPrefab = Object.Instantiate(GameObject.Find("UI Root/Overlay Canvas/In Game/Top Tips/Entity Briefs/brief-info-top/brief-info/content/icons/icon"), _tipPrefab.transform);
var iconPrefabImage = iconPrefab.GetComponent<Image>(); var iconPrefabImage = iconPrefab.GetComponent<Image>();
iconPrefabImage.color = Color.white;
iconPrefabImage.enabled = true; iconPrefabImage.enabled = true;
Object.Destroy(iconPrefab.transform.Find("count-text").gameObject); Object.Destroy(iconPrefab.transform.Find("count-text").gameObject);
Object.Destroy(iconPrefab.transform.Find("bg").gameObject); Object.Destroy(iconPrefab.transform.Find("bg").gameObject);
-1
View File
@@ -730,7 +730,6 @@ public class PlayerPatch : PatchImpl<PlayerPatch>
UiTipText = Object.Instantiate(originText, originText.transform.parent); UiTipText = Object.Instantiate(originText, originText.transform.parent);
UiTipText.gameObject.SetActive(false); UiTipText.gameObject.SetActive(false);
UiTipText.rectTransform.anchoredPosition = new Vector2(0f, 160f); UiTipText.rectTransform.anchoredPosition = new Vector2(0f, 160f);
UiTipText.color = Color.white;
UiTipText.fontStyle = FontStyle.Normal; UiTipText.fontStyle = FontStyle.Normal;
UiTipText.text = I18NKeys.AutoNavigationActive.Translate(); UiTipText.text = I18NKeys.AutoNavigationActive.Translate();
} }
-1
View File
@@ -72,7 +72,6 @@ public static class LayoutHelper
if (t != null) if (t != null)
{ {
t.text = text.Translate(); t.text = text.Translate();
t.color = Color.white;
t.fontStyle = FontStyle.Normal; t.fontStyle = FontStyle.Normal;
t.horizontalOverflow = HorizontalWrapMode.Overflow; t.horizontalOverflow = HorizontalWrapMode.Overflow;
t.verticalOverflow = VerticalWrapMode.Overflow; t.verticalOverflow = VerticalWrapMode.Overflow;
-2
View File
@@ -47,7 +47,6 @@ public class MyCheckButton : MonoBehaviour
{ {
txt.text = ""; txt.text = "";
txt.alignment = TextAnchor.MiddleCenter; txt.alignment = TextAnchor.MiddleCenter;
txt.color = Color.white;
txt.fontStyle = FontStyle.Normal; txt.fontStyle = FontStyle.Normal;
txt.rectTransform.anchorMax = new Vector2(0f, 1f); txt.rectTransform.anchorMax = new Vector2(0f, 1f);
txt.rectTransform.anchorMin = new Vector2(0f, 1f); txt.rectTransform.anchorMin = new Vector2(0f, 1f);
@@ -95,7 +94,6 @@ public class MyCheckButton : MonoBehaviour
{ {
cb.labelText.text = ""; cb.labelText.text = "";
cb.labelText.fontSize = fontSize; cb.labelText.fontSize = fontSize;
cb.labelText.color = Color.white;
cb.labelText.fontStyle = FontStyle.Normal; cb.labelText.fontStyle = FontStyle.Normal;
} }
} }
+12 -16
View File
@@ -17,10 +17,9 @@ public class MyCheckBox : MonoBehaviour
private bool _checked; private bool _checked;
private static GameObject _baseObject; private static GameObject _baseObject;
private static Color _boxColor;
private static readonly Color BoxColor = new(1f, 1f, 1f, 100f / 255f); private static Color _checkColor;
private static readonly Color CheckColor = new(1f, 1f, 1f, 1f); private static Color _textColor;
private static readonly Color TextColor = new(178f / 255f, 178f / 255f, 178f / 255f, 168f / 255f);
public static void InitBaseObject() public static void InitBaseObject()
{ {
@@ -32,13 +31,12 @@ public class MyCheckBox : MonoBehaviour
var boxImage = go.GetComponent<Image>(); var boxImage = go.GetComponent<Image>();
if (boxImage) if (boxImage)
{ {
boxImage.color = BoxColor;
boxImage.enabled = true; boxImage.enabled = true;
} }
var checkImage = go.transform.Find("checked")?.GetComponent<Image>(); var checkImage = go.transform.Find("checked")?.GetComponent<Image>();
if (checkImage) if (checkImage)
{ {
checkImage.color = CheckColor; _checkColor = checkImage.color;
checkImage.enabled = false; checkImage.enabled = false;
} }
var comp = go.transform.Find("text"); var comp = go.transform.Find("text");
@@ -48,13 +46,14 @@ public class MyCheckBox : MonoBehaviour
if (txt) if (txt)
{ {
txt.text = ""; txt.text = "";
txt.color = TextColor; _textColor = txt.color;
txt.alignment = TextAnchor.MiddleLeft; txt.alignment = TextAnchor.MiddleLeft;
txt.fontStyle = FontStyle.Normal; txt.fontStyle = FontStyle.Normal;
} }
var localizer = comp.GetComponent<Localizer>(); var localizer = comp.GetComponent<Localizer>();
if (localizer) DestroyImmediate(localizer); if (localizer) DestroyImmediate(localizer);
} }
if (boxImage) _boxColor = boxImage.color;
_baseObject = go; _baseObject = go;
} }
@@ -86,9 +85,7 @@ public class MyCheckBox : MonoBehaviour
cb.boxImage = go.transform.GetComponent<Image>(); cb.boxImage = go.transform.GetComponent<Image>();
cb.checkImage = go.transform.Find("checked")?.GetComponent<Image>(); cb.checkImage = go.transform.Find("checked")?.GetComponent<Image>();
Util.ResetButton(cb.uiButton); Util.ResetButton(cb.uiButton);
cb.boxImage.color = BoxColor;
cb.boxImage.enabled = true; cb.boxImage.enabled = true;
cb.checkImage.color = CheckColor;
cb.checkImage.enabled = false; cb.checkImage.enabled = false;
Util.NormalizeRectWithTopLeft(cb.checkImage, 0f, 0f); Util.NormalizeRectWithTopLeft(cb.checkImage, 0f, 0f);
@@ -100,7 +97,6 @@ public class MyCheckBox : MonoBehaviour
{ {
cb.labelText.text = ""; cb.labelText.text = "";
cb.labelText.fontSize = fontSize; cb.labelText.fontSize = fontSize;
cb.labelText.color = TextColor;
cb.labelText.alignment = TextAnchor.MiddleLeft; cb.labelText.alignment = TextAnchor.MiddleLeft;
cb.labelText.fontStyle = FontStyle.Normal; cb.labelText.fontStyle = FontStyle.Normal;
cb.UpdateLabelTextWidth(); cb.UpdateLabelTextWidth();
@@ -141,15 +137,15 @@ public class MyCheckBox : MonoBehaviour
if (uiButton) uiButton.enabled = on; if (uiButton) uiButton.enabled = on;
if (on) if (on)
{ {
if (boxImage) boxImage.color = BoxColor; if (boxImage) boxImage.color = _boxColor;
if (checkImage) checkImage.color = CheckColor; if (checkImage) checkImage.color = _checkColor;
if (labelText) labelText.color = TextColor; if (labelText) labelText.color = _textColor;
} }
else else
{ {
if (boxImage) boxImage.color = BoxColor.RGBMultiplied(0.5f); if (boxImage) boxImage.color = _boxColor.RGBMultiplied(0.5f);
if (checkImage) checkImage.color = CheckColor.RGBMultiplied(0.5f); if (checkImage) checkImage.color = _checkColor.RGBMultiplied(0.5f);
if (labelText) labelText.color = TextColor.RGBMultiplied(0.5f); if (labelText) labelText.color = _textColor.RGBMultiplied(0.5f);
} }
} }
-4
View File
@@ -42,7 +42,6 @@ public class MyComboBox : MonoBehaviour
txtComp.font = fontSource.font; txtComp.font = fontSource.font;
txtComp.fontSize = fontSource.fontSize; txtComp.fontSize = fontSource.fontSize;
txtComp.fontStyle = fontSource.fontStyle; txtComp.fontStyle = fontSource.fontStyle;
txtComp.color = Color.white;
} }
txtComp = rect.Find("Main Button/Text")?.GetComponent<Text>(); txtComp = rect.Find("Main Button/Text")?.GetComponent<Text>();
if (txtComp) if (txtComp)
@@ -50,7 +49,6 @@ public class MyComboBox : MonoBehaviour
txtComp.font = fontSource.font; txtComp.font = fontSource.font;
txtComp.fontSize = fontSource.fontSize; txtComp.fontSize = fontSource.fontSize;
txtComp.fontStyle = fontSource.fontStyle; txtComp.fontStyle = fontSource.fontStyle;
txtComp.color = Color.white;
} }
} }
cbctrl.onSubmit.RemoveAllListeners(); cbctrl.onSubmit.RemoveAllListeners();
@@ -59,8 +57,6 @@ public class MyComboBox : MonoBehaviour
cbctrl.isDroppedDown = false; cbctrl.isDroppedDown = false;
cbctrl.m_Input.text = ""; cbctrl.m_Input.text = "";
cbctrl.m_Text.text = ""; cbctrl.m_Text.text = "";
cbctrl.m_Input.textComponent.color = Color.white;
cbctrl.m_Text.color = Color.white;
cbctrl.m_DropDownContent.anchoredPosition = Vector2.zero; cbctrl.m_DropDownContent.anchoredPosition = Vector2.zero;
cbctrl.m_DropDownList.gameObject.SetActive(false); cbctrl.m_DropDownList.gameObject.SetActive(false);
cbctrl.m_EmptyItemRes.gameObject.SetActive(false); cbctrl.m_EmptyItemRes.gameObject.SetActive(false);
-3
View File
@@ -33,8 +33,6 @@ public class MyCornerComboBox : MonoBehaviour
cbctrl.isDroppedDown = false; cbctrl.isDroppedDown = false;
cbctrl.m_Input.text = ""; cbctrl.m_Input.text = "";
cbctrl.m_Text.text = ""; cbctrl.m_Text.text = "";
cbctrl.m_Input.textComponent.color = Color.white;
cbctrl.m_Text.color = Color.white;
cbctrl.m_DropDownContent.anchoredPosition = Vector2.zero; cbctrl.m_DropDownContent.anchoredPosition = Vector2.zero;
cbctrl.m_DropDownList.gameObject.SetActive(false); cbctrl.m_DropDownList.gameObject.SetActive(false);
cbctrl.m_EmptyItemRes.gameObject.SetActive(false); cbctrl.m_EmptyItemRes.gameObject.SetActive(false);
@@ -46,7 +44,6 @@ public class MyCornerComboBox : MonoBehaviour
} }
cbctrl.Items.Clear(); cbctrl.Items.Clear();
cbctrl.ItemButtons.Clear(); cbctrl.ItemButtons.Clear();
cbctrl.m_ListItemRes.GetComponentInChildren<Text>().color = Color.white;
_baseObject = go; _baseObject = go;
} }
-3
View File
@@ -27,14 +27,12 @@ public class MyFlatButton : MonoBehaviour
if (img != null) if (img != null)
{ {
img.sprite = panel.buttonDefaultSprite; img.sprite = panel.buttonDefaultSprite;
img.color = new Color(1f, 1f, 1f, 13f / 255f);
img.enabled = true; img.enabled = true;
} }
img = btn.gameObject.transform.Find("frame")?.GetComponent<Image>(); img = btn.gameObject.transform.Find("frame")?.GetComponent<Image>();
if (img != null) if (img != null)
{ {
img.color = new Color(1f, 1f, 1f, 0f);
img.enabled = true; img.enabled = true;
} }
@@ -42,7 +40,6 @@ public class MyFlatButton : MonoBehaviour
if (text) if (text)
{ {
text.text = ""; text.text = "";
text.color = Color.white;
text.fontStyle = FontStyle.Normal; text.fontStyle = FontStyle.Normal;
} }
-1
View File
@@ -64,7 +64,6 @@ public class MyKeyBinder : MonoBehaviour
Util.ResetButton(kb.setDefaultUIButton); Util.ResetButton(kb.setDefaultUIButton);
Util.ResetButton(kb.setNoneKeyUIButton); Util.ResetButton(kb.setNoneKeyUIButton);
kb.functionText.text = ""; kb.functionText.text = "";
kb.functionText.color = Color.white;
kb.functionText.fontStyle = FontStyle.Normal; kb.functionText.fontStyle = FontStyle.Normal;
kb.keyText.text = ""; kb.keyText.text = "";
kb.keyText.color = uikeyEntry.builtinColor; kb.keyText.color = uikeyEntry.builtinColor;
-1
View File
@@ -51,7 +51,6 @@ public class MySideSlider : MonoBehaviour
sl.labelText = go.transform.Find("value").GetComponent<Text>(); sl.labelText = go.transform.Find("value").GetComponent<Text>();
sl.labelText.text = ""; sl.labelText.text = "";
sl.labelText.color = Color.white;
sl.labelText.fontStyle = FontStyle.Normal; sl.labelText.fontStyle = FontStyle.Normal;
sl.labelText.alignment = textWidth <= 0f ? TextAnchor.MiddleLeft : TextAnchor.MiddleRight; sl.labelText.alignment = textWidth <= 0f ? TextAnchor.MiddleLeft : TextAnchor.MiddleRight;
if (sl.labelText.transform is RectTransform rectTrans2) if (sl.labelText.transform is RectTransform rectTrans2)
-1
View File
@@ -52,7 +52,6 @@ public class MySlider : MonoBehaviour
if (sl.labelText) if (sl.labelText)
{ {
sl.labelText.text = ""; sl.labelText.text = "";
sl.labelText.color = Color.white;
sl.labelText.alignment = TextAnchor.MiddleCenter; sl.labelText.alignment = TextAnchor.MiddleCenter;
sl.labelText.fontStyle = FontStyle.Normal; sl.labelText.fontStyle = FontStyle.Normal;
sl.labelText.fontSize = 14; sl.labelText.fontSize = 14;
-4
View File
@@ -391,7 +391,6 @@ public class MyWindow : ManualBehaviour
var rect = Util.NormalizeRectWithTopLeft(inputField, x, y, parent); var rect = Util.NormalizeRectWithTopLeft(inputField, x, y, parent);
rect.sizeDelta = new Vector2(210, rect.sizeDelta.y); rect.sizeDelta = new Vector2(210, rect.sizeDelta.y);
inputField.text = text; inputField.text = text;
inputField.textComponent.color = Color.white;
inputField.textComponent.fontStyle = FontStyle.Normal; inputField.textComponent.fontStyle = FontStyle.Normal;
inputField.textComponent.fontSize = fontSize; inputField.textComponent.fontSize = fontSize;
@@ -458,7 +457,6 @@ public class MyWindowWithTabs : MyWindow
var btn = Instantiate(src); var btn = Instantiate(src);
Util.ResetButton(btn); Util.ResetButton(btn);
btn.gameObject.GetComponent<Image>().sprite = swarmPanel.buttonDefaultSprite; btn.gameObject.GetComponent<Image>().sprite = swarmPanel.buttonDefaultSprite;
btn.gameObject.GetComponent<Image>().color = Color.white;
btn.gameObject.GetComponent<Image>().enabled = true; btn.gameObject.GetComponent<Image>().enabled = true;
btn.name = "tab-btn-" + index; btn.name = "tab-btn-" + index;
btn.highlighted = false; btn.highlighted = false;
@@ -480,7 +478,6 @@ public class MyWindowWithTabs : MyWindow
shadow.effectColor = new Color(0f, 0f, 0f, 0.4f); shadow.effectColor = new Color(0f, 0f, 0f, 0.4f);
shadow.effectDistance = new Vector2(1f, -1f); shadow.effectDistance = new Vector2(1f, -1f);
btnText.text = label.Translate(); btnText.text = label.Translate();
btnText.color = Color.white;
btnText.fontSize = 16; btnText.fontSize = 16;
btnText.fontStyle = FontStyle.Normal; btnText.fontStyle = FontStyle.Normal;
btn.data = index; btn.data = index;
@@ -505,7 +502,6 @@ public class MyWindowWithTabs : MyWindow
var image = img.GetComponent<Image>(); var image = img.GetComponent<Image>();
if (image) if (image)
{ {
image.color = Color.white;
image.enabled = true; image.enabled = true;
} }
Destroy(img.Find("tri").gameObject); Destroy(img.Find("tri").gameObject);
+1
View File
@@ -16,6 +16,7 @@ public static class Util
public static void ResetButton(UIButton button) public static void ResetButton(UIButton button)
{ {
if (!button) return; if (!button) return;
button.Init();
button.enabled = true; button.enabled = true;
button.highlighted = false; button.highlighted = false;
button.updating = true; button.updating = true;
@@ -125,7 +125,6 @@ public static class GalaxySelectUIPatch
var origText = orig.transform.parent.GetComponent<Text>(); var origText = orig.transform.parent.GetComponent<Text>();
title = Object.Instantiate(origText, origText.transform.parent); title = Object.Instantiate(origText, origText.transform.parent);
title.text = ""; title.text = "";
title.color = Color.white;
title.fontStyle = FontStyle.Normal; title.fontStyle = FontStyle.Normal;
title.horizontalOverflow = HorizontalWrapMode.Overflow; title.horizontalOverflow = HorizontalWrapMode.Overflow;
title.verticalOverflow = VerticalWrapMode.Overflow; title.verticalOverflow = VerticalWrapMode.Overflow;
@@ -144,7 +143,6 @@ public static class GalaxySelectUIPatch
slider.onValueChanged.RemoveAllListeners(); slider.onValueChanged.RemoveAllListeners();
text = slider.transform.FindChildRecur("Text").GetComponent<Text>(); text = slider.transform.FindChildRecur("Text").GetComponent<Text>();
text.text = ""; text.text = "";
text.color = Color.white;
text.fontStyle = FontStyle.Normal; text.fontStyle = FontStyle.Normal;
text.horizontalOverflow = HorizontalWrapMode.Overflow; text.horizontalOverflow = HorizontalWrapMode.Overflow;
text.verticalOverflow = VerticalWrapMode.Overflow; text.verticalOverflow = VerticalWrapMode.Overflow;