Replace text components in the main browser with TMP.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Cryville.Common;
|
||||
using Cryville.Common.Unity.UI;
|
||||
using System;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@@ -18,8 +19,8 @@ namespace Cryville.Crtr.Browsing {
|
||||
DockOccupiedRatioLayoutGroup _outerContentGroup;
|
||||
Transform _content;
|
||||
Image _cover;
|
||||
Text _title;
|
||||
Text _desc;
|
||||
TMP_Text _title;
|
||||
TMP_Text _desc;
|
||||
|
||||
protected override void Awake() {
|
||||
base.Awake();
|
||||
@@ -28,8 +29,8 @@ namespace Cryville.Crtr.Browsing {
|
||||
_outerContentGroup = _outerContent.GetComponent<DockOccupiedRatioLayoutGroup>();
|
||||
_content = _outerContent.transform.Find("__content__");
|
||||
_cover = _content.Find("Cover").GetComponent<Image>();
|
||||
_title = _content.Find("Texts/Title").GetComponent<Text>();
|
||||
_desc = _content.Find("Texts/Description").GetComponent<Text>();
|
||||
_title = _content.Find("Texts/Title").GetComponent<TMP_Text>();
|
||||
_desc = _content.Find("Texts/Description").GetComponent<TMP_Text>();
|
||||
}
|
||||
void OnDestroy() {
|
||||
if (_data.Cover != null) _data.Cover.Cancel();
|
||||
|
Reference in New Issue
Block a user