1
This commit is contained in:
@@ -72,9 +72,9 @@
|
||||
"name": "Aim",
|
||||
"type": "Button",
|
||||
"id": "f521b9d3-bfbb-4ce2-85c8-15cb3fcc2534",
|
||||
"expectedControlType": "Button",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "Tap,Hold,Press",
|
||||
"interactions": "Press",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
@@ -135,7 +135,7 @@
|
||||
"name": "Primary",
|
||||
"type": "Button",
|
||||
"id": "113a3c02-0fbb-4081-9fac-c39878ddfd09",
|
||||
"expectedControlType": "Button",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "Press,Hold",
|
||||
"initialStateCheck": false
|
||||
@@ -144,7 +144,7 @@
|
||||
"name": "Secondary",
|
||||
"type": "Button",
|
||||
"id": "57a12f28-2fde-45e5-957f-d8d61afe44de",
|
||||
"expectedControlType": "Button",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "Press,Hold",
|
||||
"initialStateCheck": false
|
||||
@@ -153,7 +153,7 @@
|
||||
"name": "Tertiary",
|
||||
"type": "Button",
|
||||
"id": "c2535f43-fec8-42bd-b680-6d1cee5246e5",
|
||||
"expectedControlType": "Button",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "Press,Hold",
|
||||
"initialStateCheck": false
|
||||
@@ -162,7 +162,7 @@
|
||||
"name": "Quaternary",
|
||||
"type": "Button",
|
||||
"id": "6740f3a7-7571-4277-96e9-15aa08af7302",
|
||||
"expectedControlType": "Button",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "Press,Hold",
|
||||
"initialStateCheck": false
|
||||
@@ -171,7 +171,7 @@
|
||||
"name": "Quinary",
|
||||
"type": "Button",
|
||||
"id": "97511588-e441-4e27-953e-e60cbea80489",
|
||||
"expectedControlType": "Button",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
@@ -180,7 +180,7 @@
|
||||
"name": "Senary",
|
||||
"type": "Button",
|
||||
"id": "46173186-2ef3-4ab9-8ff4-b94cc113df67",
|
||||
"expectedControlType": "Button",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
|
@@ -2,10 +2,10 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using AYellowpaper.SerializedCollections;
|
||||
|
||||
using YooAsset;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
using YooAsset;
|
||||
|
||||
#endif
|
||||
|
||||
using UnityEngine;
|
||||
|
@@ -111,6 +111,7 @@ namespace BITKit.UX
|
||||
private readonly IUXService _uxService;
|
||||
private VisualElement _root;
|
||||
private VisualElement _container;
|
||||
private bool _isInitialized = false;
|
||||
public UXContextMenu(IUXService uxService)
|
||||
{
|
||||
_uxService = uxService;
|
||||
@@ -121,7 +122,7 @@ namespace BITKit.UX
|
||||
|
||||
private async void InitializeAsync()
|
||||
{
|
||||
var go = new GameObject("UXConsole");
|
||||
var go = new GameObject(nameof(UXContextMenu));
|
||||
Object.DontDestroyOnLoad(go);
|
||||
var document = go.AddComponent<UIDocument>();
|
||||
document.sortingOrder = 1;
|
||||
@@ -143,6 +144,7 @@ namespace BITKit.UX
|
||||
{
|
||||
Close();
|
||||
});
|
||||
_isInitialized = true;
|
||||
Close();
|
||||
}
|
||||
public void Create(ContextMenuBuilder builder)
|
||||
@@ -166,6 +168,7 @@ namespace BITKit.UX
|
||||
}
|
||||
private void Close()
|
||||
{
|
||||
if(_isInitialized is false)return;
|
||||
_container.Clear();
|
||||
_root.SetActive(false);
|
||||
}
|
||||
|
@@ -29,6 +29,7 @@ namespace BITKit.UX
|
||||
public VisualElement RootVisualElement { get; set; }
|
||||
protected VisualTreeAsset VisualTreeAsset { get; private set; }
|
||||
private readonly ValidHandle _isBusy = new();
|
||||
public readonly UniTaskCompletionSource WaitUtilInitialized = new();
|
||||
protected UIToolKitPanel(IUXService uxService)
|
||||
{
|
||||
UXService = uxService;
|
||||
@@ -76,6 +77,8 @@ namespace BITKit.UX
|
||||
UXUtils.Inject(this);
|
||||
|
||||
RootVisualElement.SetActive(false);
|
||||
|
||||
WaitUtilInitialized.TrySetResult();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,11 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit.UX;
|
||||
using UnityEngine;
|
||||
|
||||
public class UIToolkitSubPanel
|
||||
{
|
||||
public UIToolkitSubPanel()
|
||||
{
|
||||
}
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 398253ee7f746d143bbbcd9effab9da1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -31,3 +31,4 @@
|
||||
scale: 1.2 1.2;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user