1
This commit is contained in:
@@ -13,4 +13,7 @@ MonoBehaviour:
|
|||||||
m_Name: "\u76FE\u724C"
|
m_Name: "\u76FE\u724C"
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
sprite: {fileID: 21300000, guid: b97c91e8b348f3f4ebdc11f5c82182cd, type: 3}
|
sprite: {fileID: 21300000, guid: b97c91e8b348f3f4ebdc11f5c82182cd, type: 3}
|
||||||
|
level: 0
|
||||||
|
rarity: 1
|
||||||
type: 1
|
type: 1
|
||||||
|
category: 10
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!114 &11400000
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 45818eb64c9b04441b20b29f0230edb7, type: 3}
|
|
||||||
m_Name: "\u5355\u624B\u5251 1"
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
sprite: {fileID: 21300000, guid: 5fd50594014b70e48bd6993443d46b32, type: 3}
|
|
||||||
type: 0
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!114 &11400000
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 45818eb64c9b04441b20b29f0230edb7, type: 3}
|
|
||||||
m_Name: "\u5355\u624B\u5251 2"
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
sprite: {fileID: 21300000, guid: 5fd50594014b70e48bd6993443d46b32, type: 3}
|
|
||||||
type: 0
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 2155d31e917f2eb45a9f62174a1698ea
|
|
||||||
NativeFormatImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
mainObjectFileID: 11400000
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!114 &11400000
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 45818eb64c9b04441b20b29f0230edb7, type: 3}
|
|
||||||
m_Name: "\u5355\u624B\u5251"
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
sprite: {fileID: 21300000, guid: 5fd50594014b70e48bd6993443d46b32, type: 3}
|
|
||||||
type: 0
|
|
||||||
@@ -13,4 +13,7 @@ MonoBehaviour:
|
|||||||
m_Name: "\u5F13"
|
m_Name: "\u5F13"
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
sprite: {fileID: 21300000, guid: 5d7061fc7da05ce44add317708ec7215, type: 3}
|
sprite: {fileID: 21300000, guid: 5d7061fc7da05ce44add317708ec7215, type: 3}
|
||||||
|
level: 0
|
||||||
|
rarity: 0
|
||||||
type: 2
|
type: 2
|
||||||
|
category: 0
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ using UnityEditor;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UIElements;
|
using UnityEngine.UIElements;
|
||||||
using MuHua;
|
using MuHua;
|
||||||
|
using System;
|
||||||
|
using System.Security.AccessControl;
|
||||||
|
|
||||||
namespace MuHuaEditor {
|
namespace MuHuaEditor {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -13,16 +15,26 @@ namespace MuHuaEditor {
|
|||||||
|
|
||||||
public VisualTreeAsset ButtonTemplate = default;
|
public VisualTreeAsset ButtonTemplate = default;
|
||||||
|
|
||||||
|
private string type;
|
||||||
|
private EquipmentConst equipment;
|
||||||
private EquipmentType currentEquipmentType;
|
private EquipmentType currentEquipmentType;
|
||||||
|
|
||||||
private UIEquipmentEnum<EquipmentType> equipmentType;
|
private UIEquipmentEnum<EquipmentType> equipmentType;
|
||||||
private UIEquipmentEnum<WeaponType> weaponType;
|
private UIEquipmentEnum<WeaponType> weaponType;
|
||||||
private UIEquipmentEnum<ArmorType> armorType;
|
private UIEquipmentEnum<ArmorType> armorType;
|
||||||
private UIEquipmentEnum<AccessoryType> accessoryType;
|
private UIEquipmentEnum<AccessoryType> accessoryType;
|
||||||
private UIEquipmentList equipmentList;
|
private UIEquipmentList equipmentList;
|
||||||
|
private UIEquipmentSettings equipmentSettings;
|
||||||
|
private UIEquipmentPanel equipmentPanel;
|
||||||
|
|
||||||
public VisualElement VEEquipmentType => Q<VisualElement>("EquipmentType");
|
public VisualElement VEEquipmentType => Q<VisualElement>("EquipmentType");
|
||||||
public VisualElement VEEquipmentExtendType => Q<VisualElement>("EquipmentExtendType");
|
public VisualElement VEEquipmentExtendType => Q<VisualElement>("EquipmentExtendType");
|
||||||
public VisualElement EquipmentList => Q<VisualElement>("EquipmentList");
|
public VisualElement EquipmentList => Q<VisualElement>("EquipmentList");
|
||||||
|
public VisualElement EquipmentSettings => Q<VisualElement>("EquipmentSettings");
|
||||||
|
public VisualElement EquipmentPanel => Q<VisualElement>("EquipmentPanel");
|
||||||
|
public Button Button1 => Q<Button>("Button1");// 创建
|
||||||
|
public Button Button2 => Q<Button>("Button2");// 删除
|
||||||
|
public Button Button3 => Q<Button>("Button3");// 刷新
|
||||||
|
|
||||||
[MenuItem("Window/UI Toolkit/EquipmentWindow")]
|
[MenuItem("Window/UI Toolkit/EquipmentWindow")]
|
||||||
public static void ShowWindow() {
|
public static void ShowWindow() {
|
||||||
@@ -35,10 +47,16 @@ namespace MuHuaEditor {
|
|||||||
weaponType = new UIEquipmentEnum<WeaponType>(VEEquipmentExtendType, ButtonTemplate, (value) => SettingsEquipmentType(value.ToString()));
|
weaponType = new UIEquipmentEnum<WeaponType>(VEEquipmentExtendType, ButtonTemplate, (value) => SettingsEquipmentType(value.ToString()));
|
||||||
armorType = new UIEquipmentEnum<ArmorType>(VEEquipmentExtendType, ButtonTemplate, (value) => SettingsEquipmentType(value.ToString()));
|
armorType = new UIEquipmentEnum<ArmorType>(VEEquipmentExtendType, ButtonTemplate, (value) => SettingsEquipmentType(value.ToString()));
|
||||||
accessoryType = new UIEquipmentEnum<AccessoryType>(VEEquipmentExtendType, ButtonTemplate, (value) => SettingsEquipmentType(value.ToString()));
|
accessoryType = new UIEquipmentEnum<AccessoryType>(VEEquipmentExtendType, ButtonTemplate, (value) => SettingsEquipmentType(value.ToString()));
|
||||||
equipmentList = new UIEquipmentList(EquipmentList, rootVisualElement, ButtonTemplate, (value) => Debug.Log(value));
|
equipmentList = new UIEquipmentList(EquipmentList, rootVisualElement, ButtonTemplate, Settings);
|
||||||
AddControl(equipmentList);
|
AddControl(equipmentList);
|
||||||
|
|
||||||
|
equipmentSettings = new UIEquipmentSettings(EquipmentSettings);
|
||||||
|
equipmentPanel = new UIEquipmentPanel(EquipmentPanel);
|
||||||
|
|
||||||
equipmentType.Initial();
|
equipmentType.Initial();
|
||||||
|
Button1.clicked += CreateEquipment;
|
||||||
|
Button2.clicked += DeleteEquipment;
|
||||||
|
Button3.clicked += () => Settings(equipment);
|
||||||
}
|
}
|
||||||
public override void OnDestroy() {
|
public override void OnDestroy() {
|
||||||
base.OnDestroy();
|
base.OnDestroy();
|
||||||
@@ -55,13 +73,73 @@ namespace MuHuaEditor {
|
|||||||
if (type == EquipmentType.护甲) { armorType.Initial(); }
|
if (type == EquipmentType.护甲) { armorType.Initial(); }
|
||||||
if (type == EquipmentType.饰品) { accessoryType.Initial(); }
|
if (type == EquipmentType.饰品) { accessoryType.Initial(); }
|
||||||
}
|
}
|
||||||
/// <summary> 设置装备类型 </summary>
|
/// <summary> 设置装备分类 </summary>
|
||||||
private void SettingsEquipmentType(string type) {
|
private void SettingsEquipmentType(string type) {
|
||||||
|
this.type = type;
|
||||||
string path = $"Assets/AssetsEquipment/ScriptableObject/{currentEquipmentType}/{type}";
|
string path = $"Assets/AssetsEquipment/ScriptableObject/{currentEquipmentType}/{type}";
|
||||||
EnsureDirectoryExists(path);
|
EnsureDirectoryExists(path);
|
||||||
List<EquipmentConst> equipments = FindConstAssets<EquipmentConst>(path);
|
List<EquipmentConst> equipments = FindConstAssets<EquipmentConst>(path);
|
||||||
equipmentList.Initial(equipments);
|
equipmentList.Initial(equipments);
|
||||||
}
|
}
|
||||||
|
/// <summary> 设置装备 </summary>
|
||||||
|
private void Settings(EquipmentConst equipment) {
|
||||||
|
this.equipment = equipment;
|
||||||
|
Button2.EnableInClassList("ew-hide", equipment == null);
|
||||||
|
equipmentSettings.Initial(equipment);
|
||||||
|
equipmentPanel.Initial(equipment);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary> 创建装备 </summary>
|
||||||
|
private void CreateEquipment() {
|
||||||
|
// 创建一个新的 ConstWeapon 资源
|
||||||
|
ScriptableObject asset = null;
|
||||||
|
if (currentEquipmentType == EquipmentType.武器) {
|
||||||
|
WeaponConst weapon = ScriptableObject.CreateInstance<WeaponConst>();
|
||||||
|
weapon.type = (WeaponType)Enum.Parse(typeof(WeaponType), type);
|
||||||
|
asset = weapon;
|
||||||
|
}
|
||||||
|
if (currentEquipmentType == EquipmentType.护甲) {
|
||||||
|
ArmorConst armor = ScriptableObject.CreateInstance<ArmorConst>();
|
||||||
|
armor.type = (ArmorType)Enum.Parse(typeof(ArmorType), type);
|
||||||
|
asset = armor;
|
||||||
|
}
|
||||||
|
if (currentEquipmentType == EquipmentType.饰品) {
|
||||||
|
AccessoryConst accessory = ScriptableObject.CreateInstance<AccessoryConst>();
|
||||||
|
accessory.type = (AccessoryType)Enum.Parse(typeof(AccessoryType), type);
|
||||||
|
asset = accessory;
|
||||||
|
}
|
||||||
|
|
||||||
|
string directory = $"Assets/AssetsEquipment/ScriptableObject/{currentEquipmentType}/{type}";
|
||||||
|
EnsureDirectoryExists(directory);
|
||||||
|
string path = GetUniqueAssetPath(directory, "Equipment");
|
||||||
|
AssetDatabase.CreateAsset(asset, path);
|
||||||
|
AssetDatabase.SaveAssets();
|
||||||
|
EditorUtility.FocusProjectWindow();
|
||||||
|
Selection.activeObject = asset;
|
||||||
|
// 刷新装备列表
|
||||||
|
SettingsEquipmentType(type);
|
||||||
|
}
|
||||||
|
/// <summary> 删除装备 </summary>
|
||||||
|
private void DeleteEquipment() {
|
||||||
|
if (equipment == null) { return; }
|
||||||
|
string path = AssetDatabase.GetAssetPath(equipment);
|
||||||
|
if (string.IsNullOrEmpty(path)) { return; }
|
||||||
|
AssetDatabase.DeleteAsset(path);
|
||||||
|
AssetDatabase.SaveAssets();
|
||||||
|
equipment = null;
|
||||||
|
// 刷新装备列表
|
||||||
|
SettingsEquipmentType(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetUniqueAssetPath(string directory, string baseName = "Equipment") {
|
||||||
|
string path = $"{directory}/{baseName}.asset";
|
||||||
|
int index = 1;
|
||||||
|
while (File.Exists(path)) {
|
||||||
|
path = $"{directory}/{baseName} {index}.asset";
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
#region 编辑器工具
|
#region 编辑器工具
|
||||||
/// <summary> 查找指定文件夹下的所有 T 类型的 ScriptableObject 资源 </summary>
|
/// <summary> 查找指定文件夹下的所有 T 类型的 ScriptableObject 资源 </summary>
|
||||||
@@ -81,22 +159,5 @@ namespace MuHuaEditor {
|
|||||||
if (!Directory.Exists(path)) { Directory.CreateDirectory(path); }
|
if (!Directory.Exists(path)) { Directory.CreateDirectory(path); }
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private void CreateConstWeapon() {
|
|
||||||
// 创建一个新的 ConstWeapon 资源
|
|
||||||
var asset = ScriptableObject.CreateInstance<WeaponConst>();
|
|
||||||
string path = EditorUtility.SaveFilePanelInProject(
|
|
||||||
"保存 ConstWeapon",
|
|
||||||
"NewConstWeapon.asset",
|
|
||||||
"asset",
|
|
||||||
"请选择保存 ConstWeapon 的路径"
|
|
||||||
);
|
|
||||||
if (!string.IsNullOrEmpty(path)) {
|
|
||||||
AssetDatabase.CreateAsset(asset, path);
|
|
||||||
AssetDatabase.SaveAssets();
|
|
||||||
EditorUtility.FocusProjectWindow();
|
|
||||||
Selection.activeObject = asset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UIElements;
|
||||||
|
using MuHua;
|
||||||
|
|
||||||
|
namespace MuHuaEditor {
|
||||||
|
/// <summary>
|
||||||
|
/// 装备面板
|
||||||
|
/// </summary>
|
||||||
|
public class UIEquipmentPanel : ModuleUIPanel {
|
||||||
|
|
||||||
|
public WeaponConst weapon;
|
||||||
|
public ArmorConst armor;
|
||||||
|
public AccessoryConst accessory;
|
||||||
|
|
||||||
|
public Label Name => Q<Label>("Name");
|
||||||
|
public Label Type => Q<Label>("Type");
|
||||||
|
|
||||||
|
public UIEquipmentPanel(VisualElement element) : base(element) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Initial(EquipmentConst equipment) {
|
||||||
|
element.EnableInClassList("ew-hide", equipment == null);
|
||||||
|
if (equipment == null) { return; }
|
||||||
|
Name.text = equipment.name;
|
||||||
|
if (equipment is WeaponConst weapon) { InitialWeapon(weapon); }
|
||||||
|
if (equipment is ArmorConst armor) { InitialArmor(armor); }
|
||||||
|
if (equipment is AccessoryConst accessory) { InitialAccessory(accessory); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InitialWeapon(WeaponConst weapon) {
|
||||||
|
Type.text = $"Lv{weapon.level} {weapon.rarity} {weapon.type} {weapon.category}";
|
||||||
|
}
|
||||||
|
public void InitialArmor(ArmorConst armor) {
|
||||||
|
Type.text = $"Lv{armor.level} {armor.rarity} {armor.type}";
|
||||||
|
}
|
||||||
|
public void InitialAccessory(AccessoryConst accessory) {
|
||||||
|
Type.text = $"Lv{accessory.level} {accessory.rarity} {accessory.type}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8a4bc99140d169c4e8b0daf8629bfc08
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 3f16688385cc5a942b38ebd5c494e8a0
|
guid: babeefadaf13a2f468d537479da309c7
|
||||||
NativeFormatImporter:
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
mainObjectFileID: 11400000
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
+71
@@ -0,0 +1,71 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEngine.UIElements;
|
||||||
|
using UnityEditor.UIElements;
|
||||||
|
using MuHua;
|
||||||
|
|
||||||
|
namespace MuHuaEditor {
|
||||||
|
/// <summary>
|
||||||
|
/// 装备输入
|
||||||
|
/// </summary>
|
||||||
|
public class UIEquipmentInput : ModuleUIPanel {
|
||||||
|
|
||||||
|
public WeaponConst weapon;
|
||||||
|
public EquipmentConst equipment;
|
||||||
|
|
||||||
|
public TextField Name => Q<TextField>("Name");
|
||||||
|
public IntegerField Level => Q<IntegerField>("Level");
|
||||||
|
public ObjectField Sprite => Q<ObjectField>("Sprite");
|
||||||
|
public EnumField Rarity => Q<EnumField>("Rarity");
|
||||||
|
public EnumField WeaponCategory => Q<EnumField>("WeaponCategory");
|
||||||
|
|
||||||
|
public UIEquipmentInput(VisualElement element) : base(element) {
|
||||||
|
Name.RegisterCallback<FocusOutEvent>(evt => ModifyName());
|
||||||
|
Level.RegisterCallback<FocusOutEvent>(evt => ModifyLevel());
|
||||||
|
Sprite.RegisterCallback<FocusOutEvent>(evt => ModifySprite());
|
||||||
|
Rarity.RegisterValueChangedCallback(evt => ModifyRarity((EquipmentRarity)evt.newValue));
|
||||||
|
WeaponCategory.RegisterValueChangedCallback(evt => ModifyWeaponType((WeaponCategory)evt.newValue));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Initial(EquipmentConst equipment) {
|
||||||
|
this.equipment = equipment;
|
||||||
|
if (equipment == null) { return; }
|
||||||
|
Name.SetValueWithoutNotify(equipment.name);
|
||||||
|
Level.SetValueWithoutNotify(equipment.level);
|
||||||
|
Sprite.SetValueWithoutNotify(equipment.sprite);
|
||||||
|
Rarity.Init(equipment.rarity);
|
||||||
|
weapon = equipment as WeaponConst;
|
||||||
|
WeaponCategory.EnableInClassList("ew-hide", weapon == null);
|
||||||
|
if (weapon == null) { return; }
|
||||||
|
WeaponCategory.Init(weapon.category);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary> 修改名字 </summary>
|
||||||
|
private void ModifyName() {
|
||||||
|
if (Name.value == null || Name.value == "") {
|
||||||
|
Name.SetValueWithoutNotify(equipment.name);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
string oldPath = AssetDatabase.GetAssetPath(equipment);
|
||||||
|
AssetDatabase.RenameAsset(oldPath, Name.value);
|
||||||
|
equipment.name = Name.value;
|
||||||
|
Dirty();
|
||||||
|
}
|
||||||
|
/// <summary> 修改类型 </summary>
|
||||||
|
private void ModifyLevel() { equipment.level = Level.value; Dirty(); }
|
||||||
|
/// <summary> 修改预览图 </summary>
|
||||||
|
private void ModifySprite() { equipment.sprite = Sprite.value as Sprite; Dirty(); }
|
||||||
|
/// <summary> 修改布尔值 </summary>
|
||||||
|
private void ModifyRarity(EquipmentRarity rarity) { equipment.rarity = rarity; Dirty(); }
|
||||||
|
/// <summary> 修改武器类型 </summary>
|
||||||
|
private void ModifyWeaponType(WeaponCategory category) { weapon.category = category; Dirty(); }
|
||||||
|
|
||||||
|
/// <summary> 保存资源 </summary>
|
||||||
|
private void Dirty() {
|
||||||
|
EditorUtility.SetDirty(equipment);
|
||||||
|
AssetDatabase.SaveAssets();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9e7055e519bcd124f847fb3c863398e1
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UIElements;
|
||||||
|
using MuHua;
|
||||||
|
|
||||||
|
namespace MuHuaEditor {
|
||||||
|
/// <summary>
|
||||||
|
/// 装备设置
|
||||||
|
/// </summary>
|
||||||
|
public class UIEquipmentSettings : ModuleUIPanel {
|
||||||
|
|
||||||
|
public EquipmentConst equipment;
|
||||||
|
public UIEquipmentInput equipmentInput;
|
||||||
|
|
||||||
|
public VisualElement EquipmentInput => Q<VisualElement>("EquipmentInput");
|
||||||
|
|
||||||
|
public UIEquipmentSettings(VisualElement element) : base(element) {
|
||||||
|
equipmentInput = new UIEquipmentInput(EquipmentInput);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Initial(EquipmentConst equipment) {
|
||||||
|
this.equipment = equipment;
|
||||||
|
element.EnableInClassList("ew-hide", equipment == null);
|
||||||
|
equipmentInput.Initial(equipment);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c315dbb1477d31342a8c610161d5d477
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 装备品级
|
||||||
|
/// </summary>
|
||||||
|
public enum EquipmentRarity {
|
||||||
|
/// <summary> 普通装备(白) 无词条 </summary>
|
||||||
|
普通级,
|
||||||
|
/// <summary> 精良装备(蓝) 词条数 1 - 10 完全随机 </summary>
|
||||||
|
精良级,
|
||||||
|
/// <summary> 稀有装备(紫) 词条数 4 - 8 保底4词条 </summary>
|
||||||
|
稀有级,
|
||||||
|
/// <summary> 传奇装备(黄) 词条数 4 - 8 固定4词条 </summary>
|
||||||
|
传奇级,
|
||||||
|
/// <summary> 传说装备(橙) 固定强力词条 </summary>
|
||||||
|
传说级,
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4baf27d75ac05b64a94c8f7ee500c886
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 武器类型
|
||||||
|
/// </summary>
|
||||||
|
public enum WeaponCategory {
|
||||||
|
剑 = 0,
|
||||||
|
刀 = 1,
|
||||||
|
锤 = 2,
|
||||||
|
弓 = 3,
|
||||||
|
弩 = 4,
|
||||||
|
|
||||||
|
盾牌 = 10,
|
||||||
|
魔杖 = 11,
|
||||||
|
法杖 = 12,
|
||||||
|
斧头 = 13,
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 97b7b6833ffe67343981c298faab084f
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 武器类型
|
/// 武器分类
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum WeaponType {
|
public enum WeaponType {
|
||||||
单手 = 0,
|
单手 = 0,
|
||||||
|
|||||||
@@ -6,5 +6,8 @@ using UnityEngine;
|
|||||||
/// 装备 - 物品常量
|
/// 装备 - 物品常量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EquipmentConst : InventoryItemConst {
|
public class EquipmentConst : InventoryItemConst {
|
||||||
|
/// <summary> 装备等级 </summary>
|
||||||
|
public int level;
|
||||||
|
/// <summary> 装备品级 </summary>
|
||||||
|
public EquipmentRarity rarity;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ using UnityEngine;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[CreateAssetMenu(menuName = "MuHua/物品系统/武器")]
|
[CreateAssetMenu(menuName = "MuHua/物品系统/武器")]
|
||||||
public class WeaponConst : EquipmentConst {
|
public class WeaponConst : EquipmentConst {
|
||||||
/// <summary> 武器类型 </summary>
|
/// <summary> 武器分类 </summary>
|
||||||
public WeaponType type;
|
public WeaponType type;
|
||||||
/// <summary> 武器类别 </summary>
|
/// <summary> 武器类型 </summary>
|
||||||
public string category;
|
public WeaponCategory category;
|
||||||
|
|
||||||
public override InventoryItem To() {
|
public override InventoryItem To() {
|
||||||
Equipment item = new Equipment();
|
Equipment item = new Equipment();
|
||||||
|
|||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: d1ab7394c601aff4797e854bd7be57f5
|
guid: 72f6e38937d65fb4093608aa539c7d7d
|
||||||
NativeFormatImporter:
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
mainObjectFileID: 11400000
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
.ep-label {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-left: 0;
|
||||||
|
padding-top: 2px;
|
||||||
|
padding-right: 2px;
|
||||||
|
padding-bottom: 2px;
|
||||||
|
padding-left: 2px;
|
||||||
|
font-size: 14px;
|
||||||
|
-unity-font-style: bold;
|
||||||
|
-unity-font: url("project://database/Assets/UI%20Toolkit/FontLibrary/Fonts/SourceHanSansCN-Medium.otf?fileID=12800000&guid=3ceb88ff2ced01a439c5b2d1b63c86a5&type=3#SourceHanSansCN-Medium");
|
||||||
|
-unity-font-definition: url("project://database/Assets/UI%20Toolkit/FontLibrary/Fonts/SourceHanSansCN-Medium%20SDF.asset?fileID=11400000&guid=0239ab36009b94e479c9c67877764f1e&type=2#SourceHanSansCN-Medium SDF");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ep-separate-label {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-left: 0;
|
||||||
|
padding-top: 2px;
|
||||||
|
padding-right: 2px;
|
||||||
|
padding-bottom: 2px;
|
||||||
|
padding-left: 2px;
|
||||||
|
font-size: 12px;
|
||||||
|
-unity-font: url("project://database/Assets/UI%20Toolkit/FontLibrary/Fonts/SourceHanSansCN-Medium.otf?fileID=12800000&guid=3ceb88ff2ced01a439c5b2d1b63c86a5&type=3#SourceHanSansCN-Medium");
|
||||||
|
-unity-font-definition: url("project://database/Assets/UI%20Toolkit/FontLibrary/Fonts/SourceHanSansCN-Medium%20SDF.asset?fileID=11400000&guid=0239ab36009b94e479c9c67877764f1e&type=2#SourceHanSansCN-Medium SDF");
|
||||||
|
-unity-font-style: normal;
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8659d41deeaac2e4c83d9287f11f74bd
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
disableValidation: 0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<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">
|
||||||
|
<ui:Template name="EquipmentSeparate" src="project://database/Assets/ModuleCore/ModuleEquipment/UI%20Toolkit/EquipmentPanel/EquipmentSeparate.uxml?fileID=9197481963319205126&guid=9560b815ca2481d48bb0dd7f66557436&type=3#EquipmentSeparate" />
|
||||||
|
<Style src="project://database/Assets/ModuleCore/ModuleEquipment/UI%20Toolkit/EquipmentPanel/EquipmentPanel.uss?fileID=7433441132597879392&guid=8659d41deeaac2e4c83d9287f11f74bd&type=3#EquipmentPanel" />
|
||||||
|
<ui:Label tabindex="-1" text="符文主宰者" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Name" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 20px; -unity-font-style: bold;" />
|
||||||
|
<ui:Label tabindex="-1" text="Lv77 神话级 单手 斧头" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Type" class="ep-label" />
|
||||||
|
<ui:Instance template="EquipmentSeparate" name="EquipmentSeparate" />
|
||||||
|
<ui:Label tabindex="-1" text="基础攻击力 2-99" parse-escape-sequences="true" display-tooltip-when-elided="true" class="ep-label" />
|
||||||
|
<ui:Label tabindex="-1" text="攻击速度 -10%" parse-escape-sequences="true" display-tooltip-when-elided="true" class="ep-label" />
|
||||||
|
<ui:VisualElement name="EquipmentSeparate">
|
||||||
|
<ui:VisualElement style="flex-direction: row; align-items: center;">
|
||||||
|
<ui:Label tabindex="-1" text="效果" parse-escape-sequences="true" display-tooltip-when-elided="true" class="ep-separate-label" />
|
||||||
|
<ui:VisualElement style="height: 2px; flex-grow: 1; background-color: rgb(38, 38, 38); margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px;" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:UXML>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 22e06df30da9e2c4ba404d47958e03ec
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
|
||||||
|
<Style src="project://database/Assets/ModuleCore/ModuleEquipment/UI%20Toolkit/EquipmentPanel/EquipmentPanel.uss?fileID=7433441132597879392&guid=8659d41deeaac2e4c83d9287f11f74bd&type=3#EquipmentPanel" />
|
||||||
|
<ui:VisualElement style="flex-direction: row; align-items: center;">
|
||||||
|
<ui:Label tabindex="-1" text="基础属性" parse-escape-sequences="true" display-tooltip-when-elided="true" class="ep-separate-label" />
|
||||||
|
<ui:VisualElement style="height: 2px; flex-grow: 1; background-color: rgb(38, 38, 38); margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px;" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:UXML>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9560b815ca2481d48bb0dd7f66557436
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<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="True">
|
||||||
|
<Style src="project://database/Assets/ModuleCore/ModuleEquipment/UI%20Toolkit/EquipmentWindow/EquipmentWindow.uss?fileID=7433441132597879392&guid=8bceec5d72cb41343aace6e8d7439e3b&type=3#EquipmentWindow" />
|
||||||
|
<ui:TextField picking-mode="Ignore" label="名字" value="filler text" name="Name" />
|
||||||
|
<ui:IntegerField label="等级" value="42" name="Level" />
|
||||||
|
<uie:ObjectField label="预览图" name="Sprite" type="UnityEngine.Sprite, UnityEngine.CoreModule" />
|
||||||
|
<ui:EnumField label="稀有度" type="UnityEngine.TextAlignment, UnityEngine.TextRenderingModule" value="Center" name="Rarity" />
|
||||||
|
<ui:EnumField label="武器类型" type="UnityEngine.TextAlignment, UnityEngine.TextRenderingModule" value="Center" name="WeaponCategory" class="ew-hide" />
|
||||||
|
</ui:UXML>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b67c220f946395e4bb23a70520a0ec55
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<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="True">
|
||||||
|
<ui:Template name="EquipmentInfo" src="project://database/Assets/ModuleCore/ModuleEquipment/UI%20Toolkit/EquipmentWindow/EquipmentInput.uxml?fileID=9197481963319205126&guid=b67c220f946395e4bb23a70520a0ec55&type=3#EquipmentInput" />
|
||||||
|
<Style src="project://database/Assets/ModuleCore/ModuleEquipment/UI%20Toolkit/EquipmentWindow/EquipmentWindow.uss?fileID=7433441132597879392&guid=8bceec5d72cb41343aace6e8d7439e3b&type=3#EquipmentWindow" />
|
||||||
|
<Style src="project://database/Assets/ModuleCore/ModuleEquipment/UI%20Toolkit/EquipmentPanel/EquipmentPanel.uss?fileID=7433441132597879392&guid=8659d41deeaac2e4c83d9287f11f74bd&type=3#EquipmentPanel" />
|
||||||
|
<ui:Instance template="EquipmentInfo" name="EquipmentInput" />
|
||||||
|
<ui:VisualElement name="EquipmentSeparate">
|
||||||
|
<ui:VisualElement style="flex-direction: row; align-items: center;">
|
||||||
|
<ui:Label tabindex="-1" text="基础属性" parse-escape-sequences="true" display-tooltip-when-elided="true" class="ep-separate-label" />
|
||||||
|
<ui:VisualElement style="height: 2px; flex-grow: 1; background-color: rgb(38, 38, 38); margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px;" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:VisualElement>
|
||||||
|
<ui:VisualElement name="EquipmentSeparate">
|
||||||
|
<ui:VisualElement style="flex-direction: row; align-items: center;">
|
||||||
|
<ui:Label tabindex="-1" text="效果" parse-escape-sequences="true" display-tooltip-when-elided="true" class="ep-separate-label" />
|
||||||
|
<ui:VisualElement style="height: 2px; flex-grow: 1; background-color: rgb(38, 38, 38); margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px;" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:UXML>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ba4b25ea6d09a3a4985edfdf2e8f80db
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
.ew-hide {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<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">
|
<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">
|
||||||
<ui:Template name="Button1" src="project://database/Assets/ModuleCore/ModuleEquipment/UI%20Toolkit/Button/ButtonTemplate.uxml?fileID=9197481963319205126&guid=72d39f3bc55f0a94196e83e8bfea1857&type=3#ButtonTemplate" />
|
<ui:Template name="Button1" src="project://database/Assets/ModuleCore/ModuleEquipment/UI%20Toolkit/Button/ButtonTemplate.uxml?fileID=9197481963319205126&guid=72d39f3bc55f0a94196e83e8bfea1857&type=3#ButtonTemplate" />
|
||||||
<ui:Template name="EquipmentList" src="project://database/Assets/ModuleCore/ModuleEquipment/UI%20Toolkit/EquipmentWindow/EquipmentList.uxml?fileID=9197481963319205126&guid=723d660a1c7f9a148829ed36eacad3df&type=3#EquipmentList" />
|
<ui:Template name="EquipmentList" src="project://database/Assets/ModuleCore/ModuleEquipment/UI%20Toolkit/EquipmentWindow/EquipmentList.uxml?fileID=9197481963319205126&guid=723d660a1c7f9a148829ed36eacad3df&type=3#EquipmentList" />
|
||||||
|
<ui:Template name="EquipmentSettings" src="project://database/Assets/ModuleCore/ModuleEquipment/UI%20Toolkit/EquipmentWindow/EquipmentSettings.uxml?fileID=9197481963319205126&guid=ba4b25ea6d09a3a4985edfdf2e8f80db&type=3#EquipmentSettings" />
|
||||||
|
<ui:Template name="EquipmentPanel" src="project://database/Assets/ModuleCore/ModuleEquipment/UI%20Toolkit/EquipmentPanel/EquipmentPanel.uxml?fileID=9197481963319205126&guid=22e06df30da9e2c4ba404d47958e03ec&type=3#EquipmentPanel" />
|
||||||
<Style src="project://database/Assets/ModuleCore/ModuleEquipment/UI%20Toolkit/EquipmentWindow/EquipmentWindow.uss?fileID=7433441132597879392&guid=8bceec5d72cb41343aace6e8d7439e3b&type=3#EquipmentWindow" />
|
<Style src="project://database/Assets/ModuleCore/ModuleEquipment/UI%20Toolkit/EquipmentWindow/EquipmentWindow.uss?fileID=7433441132597879392&guid=8bceec5d72cb41343aace6e8d7439e3b&type=3#EquipmentWindow" />
|
||||||
<ui:VisualElement name="EquipmentType" style="flex-direction: row; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px;">
|
<ui:VisualElement name="EquipmentType" style="flex-direction: row; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px;">
|
||||||
<ui:Instance template="Button1" name="Button1" />
|
<ui:Instance template="Button1" name="Button1" />
|
||||||
@@ -23,10 +25,15 @@
|
|||||||
<ui:VisualElement name="FunctionPanel" style="flex-grow: 1; flex-direction: row;">
|
<ui:VisualElement name="FunctionPanel" style="flex-grow: 1; flex-direction: row;">
|
||||||
<ui:Instance template="EquipmentList" name="EquipmentList" style="width: 100px;" />
|
<ui:Instance template="EquipmentList" name="EquipmentList" style="width: 100px;" />
|
||||||
<ui:VisualElement style="background-color: rgb(38, 38, 38); width: 2px;" />
|
<ui:VisualElement style="background-color: rgb(38, 38, 38); width: 2px;" />
|
||||||
|
<ui:Instance template="EquipmentSettings" name="EquipmentSettings" style="flex-grow: 1;" />
|
||||||
|
<ui:VisualElement style="background-color: rgb(38, 38, 38); width: 2px;" />
|
||||||
|
<ui:Instance template="EquipmentPanel" name="EquipmentPanel" style="min-width: 200px;" />
|
||||||
</ui:VisualElement>
|
</ui:VisualElement>
|
||||||
<ui:VisualElement style="height: 2px; background-color: rgb(38, 38, 38);" />
|
<ui:VisualElement style="height: 2px; background-color: rgb(38, 38, 38);" />
|
||||||
<ui:VisualElement name="ButtonGroup" style="flex-direction: row;">
|
<ui:VisualElement name="ButtonGroup" style="flex-direction: row;">
|
||||||
<ui:Button text="创建" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Button1" style="margin-top: 2px; margin-right: 2px; margin-bottom: 2px; margin-left: 2px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; width: 96px;" />
|
<ui:Button text="创建" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Button1" style="margin-top: 2px; margin-right: 2px; margin-bottom: 2px; margin-left: 2px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; width: 96px;" />
|
||||||
<ui:Button text="创建(随机)" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Button2" style="margin-top: 2px; margin-right: 2px; margin-bottom: 2px; margin-left: 2px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; width: 96px;" />
|
<ui:Button text="删除" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Button2" style="margin-top: 2px; margin-right: 2px; margin-bottom: 2px; margin-left: 2px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; width: 96px;" />
|
||||||
|
<ui:VisualElement style="flex-grow: 1;" />
|
||||||
|
<ui:Button text="刷新" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Button3" style="margin-top: 2px; margin-right: 2px; margin-bottom: 2px; margin-left: 2px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; width: 96px;" />
|
||||||
</ui:VisualElement>
|
</ui:VisualElement>
|
||||||
</ui:UXML>
|
</ui:UXML>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user