47 lines
1.4 KiB
C#
47 lines
1.4 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Unity.VisualScripting;
|
|
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
using UnityEngine.UI;
|
|
using ZXKFramework;
|
|
|
|
namespace YiLiao.XinFeiTingZhen
|
|
{
|
|
public class TopMenuPanel : UIBase
|
|
{
|
|
public override string GroupName => "TopMenuPanel";
|
|
public override string Name => "TopMenuPanel";
|
|
|
|
Button xztz;
|
|
Button fbtz;
|
|
public Action xztz_action;
|
|
public Action fbtx_action;
|
|
public override void Init(IUIManager uictrl)
|
|
{
|
|
base.Init(uictrl);
|
|
xztz = transform.FindFirst<Button>("XZTZ");
|
|
fbtz = transform.FindFirst<Button>("FBTZ");
|
|
xztz.onClick.AddListener(ClickXZTZ);
|
|
fbtz.onClick.AddListener(ClickFBTZ);
|
|
}
|
|
|
|
public void ClickXZTZ()
|
|
{
|
|
if (xztz.transform.FindFirst("Select").activeSelf) return;
|
|
xztz.transform.FindFirst("Select").SetActive(true);
|
|
fbtz.transform.FindFirst("Select").SetActive(false);
|
|
xztz_action?.Invoke();
|
|
}
|
|
|
|
public void ClickFBTZ()
|
|
{
|
|
if (fbtz.transform.FindFirst("Select").activeSelf) return;
|
|
xztz.transform.FindFirst("Select").SetActive(false);
|
|
fbtz.transform.FindFirst("Select").SetActive(true);
|
|
fbtx_action?.Invoke();
|
|
}
|
|
}
|
|
}
|