2023-07-28 11:48:57 +03:00
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
2023-08-01 11:28:14 +03:00
|
|
|
using UnityEngine.UI;
|
2023-07-28 11:48:57 +03:00
|
|
|
|
|
|
|
public class PreviewModule : MonoBehaviour
|
|
|
|
{
|
|
|
|
[SerializeField]
|
2023-08-15 17:38:54 +03:00
|
|
|
private UIPanel _previewPanel;
|
2023-08-01 11:28:14 +03:00
|
|
|
[SerializeField]
|
|
|
|
private RawImage _secondDisplayPreviewImage;
|
2023-07-28 11:48:57 +03:00
|
|
|
|
|
|
|
public void TogglePanel(bool value)
|
|
|
|
{
|
2023-08-15 17:38:54 +03:00
|
|
|
if (value)
|
2023-07-28 11:48:57 +03:00
|
|
|
{
|
|
|
|
ShowPanel();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
HidePanel();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private void ShowPanel()
|
|
|
|
{
|
2023-08-15 17:38:54 +03:00
|
|
|
_previewPanel.ShowPanel();
|
2023-08-01 11:28:14 +03:00
|
|
|
_secondDisplayPreviewImage.gameObject.SetActive(true);
|
2023-07-28 11:48:57 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
private void HidePanel()
|
|
|
|
{
|
2023-08-15 17:38:54 +03:00
|
|
|
_previewPanel.HidePanel();
|
2023-08-01 11:28:14 +03:00
|
|
|
_secondDisplayPreviewImage.gameObject.SetActive(false);
|
2023-07-28 11:48:57 +03:00
|
|
|
}
|
|
|
|
}
|