using System.Collections;
using System.Collections.Generic;
using DefaultNamespace;
using MotionFramework;
using UnityEngine;
using UnityEngine.UI;
using static InterfaceManager;
public class UI_Tips : MonoBehaviour
{
public static UI_Tips instance;
///
/// 提示面板
///
public GameObject tipspanel;
///
/// 提示文本
///
public Text tipstext;
///
///
///
public Button btn_close;
bool ishidegui = false;
public GameObject duihua;
private void Awake()
{
instance = this;
}
void Start()
{
btn_close.onClick.AddListener(() => { HidePanel(); });
}
public GameObject ecp;
void Update()
{
}
///
/// 输入文本,显示提示
///
/// 内容
/// 是否要关闭遮罩
public void ShowPanel(string text, bool hidegui = false)
{
tipspanel.SetActive(true);
tipstext.text = text;
ishidegui = hidegui;
}
public void HidePanel()
{
if (!ishidegui)
{
tipspanel.SetActive(false);
if (MotionEngine.GetModule().ExamName == "基建工程供应计划制定")
{
ecp.SetActive(true);
ecp.GetComponent().enabled = true;
}
else if (MotionEngine.GetModule().ExamName == "不良行为处理")
{
}
else if (MotionEngine.GetModule().ExamName == "不良行为处理")
{
}
LoadTriggerNextGuide(btn_close.name);
}
else
{
tipspanel.SetActive(false);
LoadTriggerNextGuide("关闭");
}
}
}