代码合并

This commit is contained in:
MuHua-123
2024-11-08 18:15:06 +08:00
parent 5f169b90bb
commit 497b43a446
146 changed files with 2858 additions and 110 deletions
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 480fd755dcfed1b4180c5a7743753277
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,32 @@
.pp-unit {
width: 100px;
height: 60px;
}
.pp-button {
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
background-color: rgb(188, 188, 188);
border-left-color: rgb(149, 149, 149);
border-right-color: rgb(149, 149, 149);
border-top-color: rgb(149, 149, 149);
border-bottom-color: rgb(149, 149, 149);
margin-top: 5px;
margin-right: 5px;
margin-bottom: 5px;
margin-left: 5px;
padding-top: 0;
padding-right: 0;
padding-bottom: 0;
padding-left: 0;
flex-grow: 1;
}
.pp-button:hover {
border-left-color: rgb(255, 255, 255);
border-right-color: rgb(255, 255, 255);
border-top-color: rgb(255, 255, 255);
border-bottom-color: rgb(255, 255, 255);
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 56954ee7ad04e0544988b1d2b52f7a77
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
disableValidation: 0
@@ -0,0 +1,12 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<Style src="project://database/Assets/UI%20Toolkit/UIWindow/PresetsPlate/PresetsPlate.uss?fileID=7433441132597879392&amp;guid=56954ee7ad04e0544988b1d2b52f7a77&amp;type=3#PresetsPlate" />
<ui:VisualElement style="flex-grow: 1; background-image: url(&quot;project://database/Assets/UI%20Toolkit/Assets/%E6%8C%89%E9%92%AE%E9%98%B4%E5%BD%B1.png?fileID=21300000&amp;guid=9ce769a9c36db7048b884f400edd2560&amp;type=3#按钮阴影&quot;);">
<ui:VisualElement style="flex-grow: 1; background-color: rgb(204, 204, 204); margin-top: 15px; margin-right: 15px; margin-bottom: 15px; margin-left: 15px; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0);">
<ui:VisualElement style="width: 100%; height: 35px; background-color: rgb(128, 128, 128); flex-direction: row;">
<ui:Label tabindex="-1" text="预制模板" parse-escape-sequences="true" display-tooltip-when-elided="true" style="-unity-text-align: middle-center; background-color: rgb(204, 204, 204); margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; padding-top: 0; padding-right: 10px; padding-bottom: 0; padding-left: 10px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-size: 18px;" />
<ui:Button text="关闭" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Close" style="position: absolute; top: 0; right: 0; background-color: rgba(0, 0, 0, 0); border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0; margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; padding-top: 0; padding-right: 0; padding-bottom: 0; padding-left: 0; height: 100%; width: 80px; color: rgb(255, 255, 255); font-size: 18px;" />
</ui:VisualElement>
<ui:VisualElement name="Container" style="flex-grow: 1; width: 100%; height: 100%; flex-direction: row; align-items: flex-start; flex-wrap: wrap; justify-content: flex-start; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px;" />
</ui:VisualElement>
</ui:VisualElement>
</ui:UXML>
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 5c36844e01281c24c8eee91af6feee87
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
@@ -0,0 +1,4 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
<Style src="project://database/Assets/UI%20Toolkit/UIWindow/PresetsPlate/PresetsPlate.uss?fileID=7433441132597879392&amp;guid=56954ee7ad04e0544988b1d2b52f7a77&amp;type=3#PresetsPlate" />
<ui:Button text="Button" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Button" class="pp-button" />
</ui:UXML>
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 6c07881a6c4179a4dbd89b86689b3837
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
@@ -0,0 +1,30 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;
public class UIPresetsPlate {
public Action ClickClose;
public readonly VisualElement element;
public Button Close => element.Q<Button>("Close");
public VisualElement Container => element.Q<VisualElement>("Container");
public UIPresetsPlate(VisualElement element) {
this.element = element;
Container.Clear();
Close.clicked += Close_Clicked;
}
public void Add(UIPresetsPlateUnit unit) {
Container.Add(unit.element);
unit.element.AddToClassList("pp-unit");
}
public void Add(VisualElement visualElement) {
Container.Add(visualElement);
}
public void Clear() {
Container.Clear();
}
private void Close_Clicked() {
ClickClose?.Invoke();
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 31b12dad4121ac74f8072b56fccff8e6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,21 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;
public class UIPresetsPlateUnit {
public Action Click;
public readonly VisualElement element;
public readonly DataPresetsPlate data;
public Button Button => element.Q<Button>("Button");
public UIPresetsPlateUnit(VisualElement element, DataPresetsPlate data) {
this.data = data;
this.element = element;
Button.text = data.name;
Button.clicked += Button_Clicked;
}
private void Button_Clicked() {
Click?.Invoke();
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1b2a4d8284ea1bb4dbf0f18daed5ecef
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: