33 lines
883 B
C#
33 lines
883 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using TMPro;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
|
|||
|
class PanelHeaderController : MonoBehaviour
|
|||
|
{
|
|||
|
[SerializeField]
|
|||
|
public LanguageDetector<string> Headers;
|
|||
|
|
|||
|
[Header("Account Balance")]
|
|||
|
[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;
|
|||
|
|
|||
|
public void Start()
|
|||
|
{
|
|||
|
// Set Panel Header value
|
|||
|
if(displayedValue != null)
|
|||
|
displayedValue.text = Headers.DetectInstanceBasedOnLanguage();
|
|||
|
|
|||
|
if (displayedTextValue != null)
|
|||
|
displayedTextValue.text = Headers.DetectInstanceBasedOnLanguage();
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|