Skip to content
This repository was archived by the owner on Jan 24, 2023. It is now read-only.

Commit a4fd337

Browse files
committed
Moved TitleText to private, added setter for TitleText
1 parent 90fa156 commit a4fd337

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

UI/QuickMenu/ReRadioTogglePage.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,13 @@ private static GameObject MenuPrefab
3333
public event Action OnOpen;
3434
public event Action OnClose;
3535
public event Action<Object> OnSelect;
36-
37-
public TextMeshProUGUI TitleText;
38-
36+
37+
public string TitleText
38+
{
39+
set => _titleText.text = value;
40+
}
41+
42+
private TextMeshProUGUI _titleText;
3943
private ListBinding ListBinding;
4044
private GameObject RadioButtonPrefab;
4145
private RadioButtonSelectorGroup RadioButtonSelectorGroup;
@@ -52,9 +56,9 @@ public ReRadioTogglePage(string name) : base(MenuPrefab, QuickMenuEx.MenuParent,
5256
{
5357
var headerTransform = RectTransform.GetChild(0);
5458

55-
TitleText = headerTransform.GetComponentInChildren<TextMeshProUGUI>();
56-
TitleText.text = name;
57-
TitleText.richText = true;
59+
_titleText = headerTransform.GetComponentInChildren<TextMeshProUGUI>();
60+
_titleText.text = name;
61+
_titleText.richText = true;
5862

5963
_container = RectTransform.GetComponentInChildren<ScrollRect>().content;
6064

0 commit comments

Comments
 (0)