45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
![]() |
using System;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using BITKit;
|
||
|
using BITKit.UX;
|
||
|
using Cysharp.Threading.Tasks;
|
||
|
using Net.Project.B.PDA.App;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.UIElements;
|
||
|
|
||
|
namespace Net.Project.B.PDA
|
||
|
{
|
||
|
[Serializable]
|
||
|
public class AppMap : PDAApp<Map>, IUXPanel
|
||
|
{
|
||
|
protected override string DocumentPath => "ui_app_map";
|
||
|
public bool IsWindow => false;
|
||
|
public string Index => nameof(AppMap);
|
||
|
public bool AllowCursor => true;
|
||
|
public bool AllowInput => false;
|
||
|
public object Root => RootVisualElement;
|
||
|
public event Action OnEntry;
|
||
|
public event Func<UniTask> OnEntryAsync;
|
||
|
public event Action OnEntryCompleted;
|
||
|
public event Action OnExit;
|
||
|
public event Func<UniTask> OnExitAsync;
|
||
|
public event Action OnExitCompleted;
|
||
|
public event Action OnInitiated;
|
||
|
public event Func<UniTask> OnInitiatedAsync;
|
||
|
public void OnTick(float deltaTime) => throw new NotImplementedException();
|
||
|
|
||
|
[UXBindPath("map-container")] private VisualElement _mapContainer;
|
||
|
|
||
|
public override async UniTask InitializeAsync()
|
||
|
{
|
||
|
await base.InitializeAsync();
|
||
|
await OnInitiatedAsync.UniTaskFunc();
|
||
|
OnInitiated?.Invoke();
|
||
|
|
||
|
_mapContainer.parent.style.width = _mapContainer.parent.layout.height;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|