cool
This commit is contained in:
@@ -6,6 +6,7 @@ using System.Threading;
|
||||
using BITKit.Mod;
|
||||
using BITKit.StateMachine;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Net.BITKit.Localization;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.InputSystem;
|
||||
@@ -107,10 +108,17 @@ namespace BITKit.UX
|
||||
RootVisualElement.RegisterCallback<TransitionEndEvent>(OnTransitionEnd);
|
||||
RootVisualElement.RegisterCallback<TransitionCancelEvent>(OnTransitionEnd);
|
||||
|
||||
if (BITApp.ServiceProvider.QueryComponents(out ILocalizationService localizationService))
|
||||
{
|
||||
await localizationService.LocalizeAsync(RootVisualElement);
|
||||
}
|
||||
|
||||
|
||||
WaitUtilTransitionCompleted.TrySetResult();
|
||||
|
||||
WaitUtilInitialized.TrySetResult();
|
||||
|
||||
|
||||
OnInitiated?.Invoke();
|
||||
}
|
||||
}
|
||||
@@ -206,6 +214,8 @@ namespace BITKit.UX
|
||||
|
||||
RootVisualElement.RemoveFromClassList(USSEntry);
|
||||
RootVisualElement.RemoveFromClassList(USSEntryAsync);
|
||||
|
||||
IsEntered = true;
|
||||
}
|
||||
private void OnTransitionEnd<TChangeEvent>(TChangeEvent evt)
|
||||
{
|
||||
@@ -219,6 +229,8 @@ namespace BITKit.UX
|
||||
|
||||
public override void OnStateExit(IState old, IState newState)
|
||||
{
|
||||
IsEntered = false;
|
||||
|
||||
OnPanelExit();
|
||||
InputActionGroup.allowInput.RemoveElement(this);
|
||||
OnExit?.Invoke();
|
||||
|
Reference in New Issue
Block a user