Scriptum/Assets/Scripts/REFACTORING/Application/Tools/WindowPanel/WindowText.cs

30 lines
908 B
C#
Raw Permalink Normal View History

2023-01-14 10:58:04 +01:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
// copy of PanelHeaderController
class WindowText : MonoBehaviour
{
public LanguageDetector<string> Content = new LanguageDetector<string>();
[Header("Content")]
[SerializeField] public TextMeshProUGUI displayedValue;
// alternative component - in some places ther is used plain Text component no TextMeshProUGUI... - trash soltuion, mess in project fonts :)
[SerializeField] public Text displayedTextValue;
private void Start()
{
// Set Panel Header value
if (displayedValue != null)
displayedValue.text = Content.DetectInstanceBasedOnLanguage();
if (displayedTextValue != null)
displayedTextValue.text = Content.DetectInstanceBasedOnLanguage();
}
}