2023-08-15 17:38:54 +03:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Text;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
public class CockpitUIModule : MonoBehaviour
|
|
|
|
{
|
|
|
|
[SerializeField]
|
|
|
|
private UIPanel _previewPanel;
|
|
|
|
[SerializeField]
|
|
|
|
private Image _image;
|
|
|
|
[SerializeField]
|
|
|
|
private UITextShow _UITextShow;
|
|
|
|
|
|
|
|
public void ShowInfo(Sprite image, string description)
|
|
|
|
{
|
|
|
|
_image.sprite = image;
|
|
|
|
_previewPanel.ShowPanel();
|
|
|
|
|
|
|
|
_UITextShow.ShowSubtitle
|
|
|
|
(
|
|
|
|
description,
|
2023-08-22 15:41:12 +03:00
|
|
|
0.1f,
|
2023-08-15 17:38:54 +03:00
|
|
|
5,
|
|
|
|
null,
|
|
|
|
() => { _previewPanel.HidePanel(); }
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[ContextMenu("Debug subtitre")]
|
|
|
|
private void DebugSubtitre()
|
|
|
|
{
|
2024-05-29 14:11:57 +03:00
|
|
|
ShowInfo(null, "Большой текст,Большой текст,Большой текст,Большой текст,Большой текст,Большой текст,Большой текст,");
|
2023-08-15 17:38:54 +03:00
|
|
|
}
|
|
|
|
}
|