1
This commit is contained in:
6156
Assets/BITKit/Unity/Art/Fonts/SDF/Roboto-Regular SDF.asset
Normal file
6156
Assets/BITKit/Unity/Art/Fonts/SDF/Roboto-Regular SDF.asset
Normal file
File diff suppressed because one or more lines are too long
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-Black.ttf
Normal file
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-Black.ttf
Normal file
Binary file not shown.
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-BlackItalic.ttf
Normal file
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-BlackItalic.ttf
Normal file
Binary file not shown.
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-Bold.ttf
Normal file
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-Bold.ttf
Normal file
Binary file not shown.
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-BoldItalic.ttf
Normal file
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-Italic.ttf
Normal file
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-Italic.ttf
Normal file
Binary file not shown.
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-Light.ttf
Normal file
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-Light.ttf
Normal file
Binary file not shown.
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-LightItalic.ttf
Normal file
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-LightItalic.ttf
Normal file
Binary file not shown.
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-Medium.ttf
Normal file
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-Medium.ttf
Normal file
Binary file not shown.
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-MediumItalic.ttf
Normal file
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-MediumItalic.ttf
Normal file
Binary file not shown.
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-Regular.ttf
Normal file
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-Regular.ttf
Normal file
Binary file not shown.
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-Thin.ttf
Normal file
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-Thin.ttf
Normal file
Binary file not shown.
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-ThinItalic.ttf
Normal file
BIN
Assets/BITKit/Unity/Art/Fonts/TTF/Roboto/Roboto-ThinItalic.ttf
Normal file
Binary file not shown.
@@ -22,6 +22,11 @@ namespace BITKit.Console
|
||||
{
|
||||
public class BITConsole : MonoBehaviour
|
||||
{
|
||||
[RuntimeInitializeOnLoadMethod]
|
||||
private static void Reload()
|
||||
{
|
||||
Application.logMessageReceivedThreaded += EnqueueLog;
|
||||
}
|
||||
private class CommandSelector
|
||||
{
|
||||
public VisualElement Container { get; set; }
|
||||
@@ -163,17 +168,6 @@ namespace BITKit.Console
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
Application.logMessageReceived += EnqueueLog;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
Application.logMessageReceived -= EnqueueLog;
|
||||
}
|
||||
|
||||
private void OnNextLine()
|
||||
{
|
||||
if (outputString.Count is not 0 && outputString.Last() != string.Empty)
|
||||
|
BIN
Assets/BITKit/Unity/Scripts/I18N/I18N.CJK.dll
Normal file
BIN
Assets/BITKit/Unity/Scripts/I18N/I18N.CJK.dll
Normal file
Binary file not shown.
BIN
Assets/BITKit/Unity/Scripts/I18N/I18N.MidEast.dll
Normal file
BIN
Assets/BITKit/Unity/Scripts/I18N/I18N.MidEast.dll
Normal file
Binary file not shown.
BIN
Assets/BITKit/Unity/Scripts/I18N/I18N.Other.dll
Normal file
BIN
Assets/BITKit/Unity/Scripts/I18N/I18N.Other.dll
Normal file
Binary file not shown.
BIN
Assets/BITKit/Unity/Scripts/I18N/I18N.Rare.dll
Normal file
BIN
Assets/BITKit/Unity/Scripts/I18N/I18N.Rare.dll
Normal file
Binary file not shown.
BIN
Assets/BITKit/Unity/Scripts/I18N/I18N.West.dll
Normal file
BIN
Assets/BITKit/Unity/Scripts/I18N/I18N.West.dll
Normal file
Binary file not shown.
16
Assets/BITKit/Unity/Scripts/I18N/I18N.asmdef
Normal file
16
Assets/BITKit/Unity/Scripts/I18N/I18N.asmdef
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "I18N",
|
||||
"rootNamespace": "",
|
||||
"references": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
BIN
Assets/BITKit/Unity/Scripts/I18N/I18N.dll
Normal file
BIN
Assets/BITKit/Unity/Scripts/I18N/I18N.dll
Normal file
Binary file not shown.
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
@@ -17,6 +18,15 @@ namespace BITKit.Mod
|
||||
[SerializeField] private bool loadLocalPackageOnStart;
|
||||
private async void Start()
|
||||
{
|
||||
|
||||
if (Application.isEditor is false)
|
||||
{
|
||||
BIT4Log.Log<UnityModService>($"UnityPlayer所在位置:{Application.dataPath}");
|
||||
|
||||
BIT4Log.Log<UnityModService>($"{nameof(System.Linq)}位于{typeof(Enumerable).Assembly.Location}");
|
||||
}
|
||||
|
||||
|
||||
foreach (var x in referencedAssemblies)
|
||||
{
|
||||
var dllName = x.Value.Contains(".dll") ? x.Value : $"{x.Value}.dll";
|
||||
|
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using BITKit.Net.LAN;
|
||||
using Cysharp.Threading.Tasks;
|
||||
@@ -23,8 +24,10 @@ namespace BITKit.Mod
|
||||
_broadcaster.StartListen();
|
||||
}
|
||||
|
||||
private void OnReceive(EndPoint arg1, byte[] bytes)
|
||||
private async void OnReceive(EndPoint arg1, byte[] bytes)
|
||||
{
|
||||
await UniTask.SwitchToMainThread();
|
||||
if(destroyCancellationToken.IsCancellationRequested) return;
|
||||
var command = BITBinary.ReadAsValue(bytes);
|
||||
switch (command)
|
||||
{
|
||||
@@ -32,6 +35,17 @@ namespace BITKit.Mod
|
||||
BIT4Log.Log<UnityWorkshopClient>($"收到加载命令:{loadFromFolderCommand.FolderPath}");
|
||||
ModService.LoadFromPackage(loadFromFolderCommand.FolderPath).Forget();
|
||||
break;
|
||||
case UninstallPackageCommand uninstallPackageCommand:
|
||||
BIT4Log.Log<UnityWorkshopClient>($"收到卸载命令:{uninstallPackageCommand.PackageName}");
|
||||
var mod = ModService.Mods.SingleOrDefault(x=>x.PackageName == uninstallPackageCommand.PackageName);
|
||||
if (mod is null)
|
||||
{
|
||||
BIT4Log.Warning<UnityWorkshopClient>($"未找到包:{uninstallPackageCommand.PackageName}");
|
||||
return;
|
||||
}
|
||||
ModService.UnLoad(mod);
|
||||
ModService.UnInstall(mod);
|
||||
break;
|
||||
default:
|
||||
BIT4Log.Log<UnityWorkshopClient>($"未知命令:{command}");
|
||||
break;
|
||||
|
@@ -99,15 +99,26 @@ namespace BITKit.UX
|
||||
{
|
||||
await UniTask.SwitchToMainThread();
|
||||
if (destroyCancellationToken.IsCancellationRequested) return;
|
||||
_modContainers.GetOrAdd(obj.Name,_=> Create(obj));
|
||||
|
||||
var container = _modContainers.GetOrAdd(obj.Name,_=> Create(obj));
|
||||
container.visualElement.RegisterCallback<MouseDownEvent>(x =>
|
||||
{
|
||||
if (x.button != 1) return;
|
||||
ContextMenuBuilder.Create().BuildAction("卸载", () =>
|
||||
{
|
||||
ModService.UnLoad(obj);
|
||||
ModService.UnInstall(obj);
|
||||
}).Build();
|
||||
});
|
||||
}
|
||||
private async void OnModUnLoaded(IMod obj)
|
||||
{
|
||||
await UniTask.SwitchToMainThread();
|
||||
if (destroyCancellationToken.IsCancellationRequested) return;
|
||||
var container = _modContainers.GetOrAdd(obj.Name,_=> Create(obj));
|
||||
container.toggle.SetValueWithoutNotify(false);
|
||||
//var container = _modContainers.GetOrAdd(obj.Name,_=> Create(obj));
|
||||
if(_modContainers.TryGetValue(obj.Name,out var container))
|
||||
{
|
||||
container.toggle.SetValueWithoutNotify(false);
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnModLoaded(IMod obj)
|
||||
|
@@ -27,9 +27,9 @@ namespace BITKit
|
||||
CreateNoWindow = true,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError =true,
|
||||
StandardErrorEncoding = System.Text.Encoding.UTF8,
|
||||
StandardInputEncoding = System.Text.Encoding.UTF8,
|
||||
StandardOutputEncoding = System.Text.Encoding.UTF8,
|
||||
StandardErrorEncoding = System.Text.Encoding.GetEncoding("gb2312"),
|
||||
//StandardInputEncoding = System.Text.Encoding.GetEncoding("gb2312"),
|
||||
StandardOutputEncoding = System.Text.Encoding.GetEncoding("gb2312"),
|
||||
};
|
||||
if(arguments != null)
|
||||
{
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<ui:VisualElement name="Console" class="Console" style="width: 1024px; height: 768px; border-top-left-radius: 16px; border-bottom-left-radius: 16px; border-top-right-radius: 16px; border-bottom-right-radius: 16px; padding-left: 16px; padding-right: 16px; padding-top: 8px; padding-bottom: 8px; margin-left: auto; margin-right: auto; margin-top: auto; margin-bottom: auto;">
|
||||
<ui:Label text="Console" display-tooltip-when-elided="true" class="Console-Text" />
|
||||
<ui:ScrollView name="context-scrollview" class="Console-ScrollView" style="height: auto; flex-grow: 1; display: flex;">
|
||||
<ui:Label text="This is Console This is <size=24>Rich Text</size> This is <color=yellow>Warning</color> This is <color=red>Error</color> This is loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text This is Console This is <size=24>Rich Text</size> This is <color=yellow>Warning</color> This is <color=red>Error</color> This is loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text This is Console This is <size=24>Rich Text</size> This is <color=yellow>Warning</color> This is <color=red>Error</color> This is loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text This is Console This is <size=24>Rich Text</size> This is <color=yellow>Warning</color> This is <color=red>Error</color> This is loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text This is Console This is <size=24>Rich Text</size> This is <color=yellow>Warning</color> This is <color=red>Error</color> This is loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text" display-tooltip-when-elided="true" name="Text" class="Console-Text" style="padding-left: 8px; padding-right: 8px; padding-top: 4px; padding-bottom: 4px; white-space: normal;" />
|
||||
<ui:Label text="This is Console This is <size=24>Rich Text</size> This is <color=yellow>Warning</color> This is <color=red>Error</color> This is loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text This is Console This is <size=24>Rich Text</size> This is <color=yellow>Warning</color> This is <color=red>Error</color> This is loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text <color=#add8e6ff><b>TypeName</b></color>:MyMessage" display-tooltip-when-elided="true" name="Text" enable-rich-text="true" parse-escape-sequences="false" class="Console-Text" style="padding-left: 8px; padding-right: 8px; padding-top: 4px; padding-bottom: 4px; white-space: normal;" />
|
||||
</ui:ScrollView>
|
||||
<ui:TextField picking-mode="Ignore" value="filler text" text="filler text" name="TextField" class="Console-TextField" style="height: 48px;" />
|
||||
</ui:VisualElement>
|
||||
|
@@ -58,7 +58,7 @@ TabBar Button:disabled {
|
||||
padding-top: 32px;
|
||||
padding-bottom: 32px;
|
||||
-unity-font-definition: initial;
|
||||
-unity-font: url('project://database/Assets/BITKit/Unity/Art/Fonts/TTF/SourceHanMono/SourceHanMono-Regular.ttc?fileID=12800000&guid=170bacfb8afc52a468d956884ff0be08&type=3#SourceHanMono-Regular');
|
||||
-unity-font: url("project://database/Assets/BITKit/Unity/Art/Fonts/TTF/SourceHanMono/SourceHanMono-Regular.ttc?fileID=12800000&guid=170bacfb8afc52a468d956884ff0be08&type=3#SourceHanMono-Regular");
|
||||
}
|
||||
|
||||
.pa-64 {
|
||||
@@ -107,7 +107,7 @@ TabBar Button:disabled {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
-unity-font-definition: initial;
|
||||
-unity-font: url('project://database/Assets/BITKit/Unity/Art/Fonts/TTF/SourceHanMono/SourceHanMono-Regular.ttc?fileID=12800000&guid=170bacfb8afc52a468d956884ff0be08&type=3#SourceHanMono-Regular');
|
||||
-unity-font: url("project://database/Assets/BITKit/Unity/Art/Fonts/TTF/SourceHanMono/SourceHanMono-Regular.ttc?fileID=12800000&guid=170bacfb8afc52a468d956884ff0be08&type=3#SourceHanMono-Regular");
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
padding-top: 6px;
|
||||
@@ -138,7 +138,7 @@ TabBar Button:disabled {
|
||||
}
|
||||
|
||||
.unity-text-element {
|
||||
-unity-font-definition: url('project://database/Assets/BITKit/Unity/Art/Fonts/SDF/SourceHanMono-Regular%20SDF.asset?fileID=11400000&guid=b3753d022dd4b4545b0e5f3f6e9a997f&type=2#Assets/BITKit/Unity/Art/Fonts/SDF/SourceHanMono-Regular SDF.asset');
|
||||
-unity-font-definition: url("project://database/Assets/BITKit/Unity/Art/Fonts/SDF/Roboto-Regular%20SDF.asset?fileID=11400000&guid=5b449e7b33d231a4085b869a8ae2c94c&type=2#Roboto-Regular SDF");
|
||||
}
|
||||
|
||||
#unity-text-input .unity-text-element {
|
||||
@@ -147,12 +147,12 @@ TabBar Button:disabled {
|
||||
|
||||
.theme-light .unity-text-element {
|
||||
color: rgb(31, 31, 31);
|
||||
-unity-font: url('project://database/Assets/BITKit/Unity/Art/Fonts/TTF/SourceHanMono/SourceHanMono-Medium.ttc?fileID=12800000&guid=c8058440fb1ea26488e022a5ee5b3b35&type=3#SourceHanMono-Medium');
|
||||
-unity-font: url("project://database/Assets/BITKit/Unity/Art/Fonts/TTF/SourceHanMono/SourceHanMono-Medium.ttc?fileID=12800000&guid=c8058440fb1ea26488e022a5ee5b3b35&type=3#SourceHanMono-Medium");
|
||||
}
|
||||
|
||||
.theme-dark .unity-text-element {
|
||||
color: rgb(231, 231, 231);
|
||||
-unity-font: url('project://database/Assets/BITKit/Unity/Art/Fonts/TTF/SourceHanMono/SourceHanMono-Medium.ttc?fileID=12800000&guid=c8058440fb1ea26488e022a5ee5b3b35&type=3#SourceHanMono-Medium');
|
||||
-unity-font: url("project://database/Assets/BITKit/Unity/Art/Fonts/TTF/SourceHanMono/SourceHanMono-Medium.ttc?fileID=12800000&guid=c8058440fb1ea26488e022a5ee5b3b35&type=3#SourceHanMono-Medium");
|
||||
}
|
||||
|
||||
.theme-dark DropdownField > VisualElement > VisualElement {
|
||||
|
Reference in New Issue
Block a user