2025-09-02 16:30:55 +08:00
|
|
|
using AlicizaX;
|
2025-07-31 20:15:20 +08:00
|
|
|
using AlicizaX.UI.Runtime;
|
2025-09-02 16:30:55 +08:00
|
|
|
using GameLogic.Event.Generated;
|
2025-07-31 20:15:20 +08:00
|
|
|
using GameLogic.UI;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using AudioType = AlicizaX.Audio.Runtime.AudioType;
|
|
|
|
|
|
|
|
|
|
namespace Hotfix.GameLogic.TestWindow
|
|
|
|
|
{
|
2025-09-02 16:30:55 +08:00
|
|
|
[Prewarm(2)]
|
|
|
|
|
public readonly struct ModeChangedEvent : IEventArgs
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
public readonly struct ModeHGameChangedEvent : IEventArgs
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-31 20:15:20 +08:00
|
|
|
[Window(UILayer.UI)]
|
|
|
|
|
public class UIHomeWindow : UIWindow<ui_UITestWindow>
|
|
|
|
|
{
|
|
|
|
|
protected override void OnInitialize()
|
|
|
|
|
{
|
|
|
|
|
baseui.ImgBackGround.color = Color.gray;
|
|
|
|
|
baseui.Btntest.onClick.AddListener(OnTestClick);
|
2025-09-02 16:30:55 +08:00
|
|
|
baseui.Btntest.BindHotKey();
|
2025-07-31 20:15:20 +08:00
|
|
|
}
|
|
|
|
|
|
2025-09-02 16:30:55 +08:00
|
|
|
|
2025-07-31 20:15:20 +08:00
|
|
|
private void OnTestClick()
|
|
|
|
|
{
|
2025-09-02 16:30:55 +08:00
|
|
|
Debug.Log("ShowUIA");
|
|
|
|
|
GameApp.UI.ShowUI<UITestAWindow>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnClose()
|
|
|
|
|
{
|
|
|
|
|
baseui.Btntest.UnBindHotKey();
|
2025-07-31 20:15:20 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Window(UILayer.UI)]
|
|
|
|
|
public class UITestAWindow : UIWindow<ui_UITestWindow>
|
|
|
|
|
{
|
|
|
|
|
protected override void OnInitialize()
|
|
|
|
|
{
|
|
|
|
|
baseui.ImgBackGround.color = Color.yellow;
|
|
|
|
|
baseui.Btntest.onClick.AddListener(OnTestClick);
|
2025-09-02 16:30:55 +08:00
|
|
|
baseui.Btntest.BindHotKey();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnRegisterEvent(EventListenerProxy proxy)
|
|
|
|
|
{
|
|
|
|
|
proxy.Add(EventPublisher.Subscribe(OnModeChangedEvent));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void OnModeChangedEvent(ModeChangedEvent args)
|
|
|
|
|
{
|
2025-07-31 20:15:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnTestClick()
|
|
|
|
|
{
|
2025-09-02 16:30:55 +08:00
|
|
|
Debug.Log("ShowB");
|
2025-07-31 20:15:20 +08:00
|
|
|
GameApp.UI.ShowUI<UITestBWindow>();
|
|
|
|
|
}
|
2025-09-02 16:30:55 +08:00
|
|
|
|
|
|
|
|
protected override void OnClose()
|
|
|
|
|
{
|
|
|
|
|
baseui.Btntest.UnBindHotKey();
|
|
|
|
|
}
|
2025-07-31 20:15:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Window(UILayer.UI)]
|
|
|
|
|
public class UITestBWindow : UIWindow<ui_UITestWindow>
|
|
|
|
|
{
|
|
|
|
|
protected override void OnInitialize()
|
|
|
|
|
{
|
|
|
|
|
baseui.ImgBackGround.color = Color.blue;
|
|
|
|
|
baseui.Btntest.onClick.AddListener(OnTestClick);
|
2025-09-02 16:30:55 +08:00
|
|
|
baseui.Btntest.BindHotKey();
|
2025-07-31 20:15:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnTestClick()
|
|
|
|
|
{
|
|
|
|
|
CloseSelf();
|
2025-09-02 16:30:55 +08:00
|
|
|
GameApp.UI.CloseUI<UITestAWindow>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnClose()
|
|
|
|
|
{
|
|
|
|
|
baseui.Btntest.UnBindHotKey();
|
2025-07-31 20:15:20 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|