87 lines
1.9 KiB
C#
87 lines
1.9 KiB
C#
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;
|
|
|
|
/// <summary>
|
|
/// 提示面板
|
|
/// </summary>
|
|
public GameObject tipspanel;
|
|
|
|
/// <summary>
|
|
/// 提示文本
|
|
/// </summary>
|
|
public Text tipstext;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
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()
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// 输入文本,显示提示
|
|
/// </summary>
|
|
/// <param name="text">内容</param>
|
|
/// <param name="hidegui">是否要关闭遮罩</param>
|
|
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<GlobalDataStorage>().ExamName == "基建工程供应计划制定")
|
|
{
|
|
ecp.SetActive(true);
|
|
ecp.GetComponent<FormulationSupplyPlanInfrastructureProjects>().enabled = true;
|
|
}
|
|
else if (MotionEngine.GetModule<GlobalDataStorage>().ExamName == "不良行为处理")
|
|
{
|
|
}
|
|
else if (MotionEngine.GetModule<GlobalDataStorage>().ExamName == "不良行为处理")
|
|
{
|
|
}
|
|
|
|
|
|
LoadTriggerNextGuide(btn_close.name);
|
|
}
|
|
else
|
|
{
|
|
tipspanel.SetActive(false);
|
|
LoadTriggerNextGuide("关闭");
|
|
}
|
|
}
|
|
} |