快捷键重构
@@ -2,7 +2,7 @@
|
||||
"name": "PlayerInputControl",
|
||||
"maps": [
|
||||
{
|
||||
"name": "Normal",
|
||||
"name": "Player",
|
||||
"id": "df70fa95-8a34-4494-b137-73ab6b9c7d37",
|
||||
"actions": [
|
||||
{
|
||||
@@ -68,24 +68,6 @@
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Use",
|
||||
"type": "Button",
|
||||
"id": "7372f7e2-b3d2-4e91-b8e6-2f0ccde6fc1f",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Use2",
|
||||
"type": "Button",
|
||||
"id": "45a833e1-2aaf-4907-ae1e-1d97ee260b18",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "SelectItem",
|
||||
"type": "Button",
|
||||
@@ -321,9 +303,18 @@
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Back",
|
||||
"name": "Use1",
|
||||
"type": "Button",
|
||||
"id": "6b649cc4-0104-4234-bfe9-2d647df3862d",
|
||||
"id": "5f9c0896-f98f-442f-b9f1-9f3ac33bcfde",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Use2",
|
||||
"type": "Button",
|
||||
"id": "6b94216d-9977-4d4a-ad3b-51e187da640e",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
@@ -595,17 +586,6 @@
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "01d704a4-4abb-4832-a338-6ecc59ac4c75",
|
||||
"path": "<Keyboard>/e",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Use",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "211b10df-e7a6-4128-a2a9-f8d3817914e4",
|
||||
@@ -894,18 +874,18 @@
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "9f16f60c-4749-4672-bdaf-9fb804c0b6f1",
|
||||
"path": "<Keyboard>/escape",
|
||||
"id": "09257b2e-f9bf-4dc8-a805-d9ae8167ce4c",
|
||||
"path": "<Keyboard>/e",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Back",
|
||||
"action": "Use1",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "7e0ce3aa-9cf2-4b1e-9995-756ccbdeeda4",
|
||||
"id": "ff8df6be-dab1-42c1-8431-d479ab9477b1",
|
||||
"path": "<Keyboard>/y",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
@@ -928,6 +908,114 @@
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Back",
|
||||
"type": "Button",
|
||||
"id": "401f71b2-4e5e-4157-91d4-b5d582f3a05e",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Enter",
|
||||
"type": "Button",
|
||||
"id": "7f14a5b4-f3b7-4f7e-b580-6e872739a8a8",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Tab",
|
||||
"type": "Button",
|
||||
"id": "fef7976b-b6a3-4a42-a774-52cde704f619",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Prev",
|
||||
"type": "Button",
|
||||
"id": "43ccf3ef-746f-4dd7-b21c-d4c6db069938",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Next",
|
||||
"type": "Button",
|
||||
"id": "cda4c3e5-6ca3-44c6-b378-3c31b1d7f3f6",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "SubPrev",
|
||||
"type": "Button",
|
||||
"id": "884769f9-3abc-4fae-9a67-825c30770143",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "SubNext",
|
||||
"type": "Button",
|
||||
"id": "aba7119c-4211-4c6d-918b-a75ca20c2f7f",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Right",
|
||||
"type": "Button",
|
||||
"id": "348bd961-a6a0-4d13-b414-83b43201bc10",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Left",
|
||||
"type": "Button",
|
||||
"id": "da1344ed-a4b5-43ef-bad6-a3f6bb06ff23",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Down",
|
||||
"type": "Button",
|
||||
"id": "dafd152b-aa0a-48bb-890d-289ab3a3e713",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Up",
|
||||
"type": "Button",
|
||||
"id": "e0dbeebd-c69d-44bd-83de-94fcce8c6727",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "New action",
|
||||
"type": "Button",
|
||||
"id": "a21da899-9653-49b5-8fd8-73934d7f180c",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
@@ -941,6 +1029,138 @@
|
||||
"action": "Roll",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "89052787-93ee-47da-ae8f-5bd86adfb2ff",
|
||||
"path": "<Keyboard>/escape",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Back",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "a6e94404-e896-4fec-b3bf-affd31b12571",
|
||||
"path": "<Keyboard>/enter",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Enter",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "23dac47b-935f-4261-8044-a8612edf3fda",
|
||||
"path": "<Keyboard>/tab",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Tab",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "1a7adfe5-f5a6-498f-8a9a-f6dd4f0c6c05",
|
||||
"path": "<Keyboard>/q",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Prev",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "2661bf5d-0afe-4f8c-a4e8-2aa6150c724d",
|
||||
"path": "<Keyboard>/e",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Next",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "487ceb23-336d-45f6-a782-3b4e9d9f0cd1",
|
||||
"path": "<Keyboard>/z",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "SubPrev",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "463ec073-6e9d-4b1d-9956-8ec19838aa3e",
|
||||
"path": "<Keyboard>/c",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "SubNext",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "053ddbac-9f73-4672-be59-abfdb6037aea",
|
||||
"path": "<Keyboard>/d",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Right",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "031b930d-59b6-4a26-9dfe-97764c3e8b37",
|
||||
"path": "<Keyboard>/a",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Left",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "45f78626-cbf2-4e1f-904d-d82e4c2a2f41",
|
||||
"path": "<Keyboard>/s",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Down",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "f1a47b3c-e79f-4ab3-86b6-fcc0a6470114",
|
||||
"path": "<Keyboard>/w",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Up",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "393f1eb9-d10d-4cd1-87e7-ea299f92b2da",
|
||||
"path": "",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "New action",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.6 MiB |
BIN
Assets/Resources/Fgui/Shop/Shop_atlas_9lmcv.png
Normal file
|
After Width: | Height: | Size: 2.1 MiB |
117
Assets/Resources/Fgui/Shop/Shop_atlas_9lmcv.png.meta
Normal file
@@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c5656eb4b7b00d748854cd3cf6b90426
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,3 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53d4b4ea733e48a3b1324345029f2bc2
|
||||
timeCreated: 1747967959
|
||||
fileFormatVersion: 2
|
||||
guid: 9f40e3fa2b734184858dde08f66c6590
|
||||
timeCreated: 1748091942
|
||||
@@ -1,12 +0,0 @@
|
||||
namespace NBF
|
||||
{
|
||||
public class ListClassifyData
|
||||
{
|
||||
public string Title;
|
||||
|
||||
public ListClassifyData(string title)
|
||||
{
|
||||
this.Title = title;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: edbbd6c0c6004af8924e5b8f2ec39039
|
||||
timeCreated: 1747969245
|
||||
46
Assets/Scripts/Data/TabListData.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public class TabItemData
|
||||
{
|
||||
public string Name;
|
||||
public string Icon;
|
||||
}
|
||||
|
||||
public class TabSubItemData : TabItemData
|
||||
{
|
||||
public List<object> Items = new List<object>();
|
||||
}
|
||||
|
||||
public class TabListData
|
||||
{
|
||||
public TabItemData Tab;
|
||||
public List<TabSubItemData> SubTab = new List<TabSubItemData>();
|
||||
|
||||
public void AddTestData(int index)
|
||||
{
|
||||
Tab = new TabItemData();
|
||||
Tab.Name = $"标题-{index + 1}";
|
||||
string[] testIcon = { "Globe", "Granade", "Gun" };
|
||||
var count1 = Random.Range(5, 10);
|
||||
var count2 = Random.Range(90, 200);
|
||||
for (int i = 0; i < count1; i++)
|
||||
{
|
||||
TabSubItemData subTab = new TabSubItemData();
|
||||
subTab.Name = $"类型-{i}";
|
||||
subTab.Icon = testIcon[Random.Range(0, testIcon.Length)];
|
||||
// ListData.Add(new ListClassifyData($"Title-{i}"));
|
||||
for (int j = 0; j < count2; j++)
|
||||
{
|
||||
var item = new ShopGearData();
|
||||
item.title = $"Item {index}-{i}-" + j;
|
||||
subTab.Items.Add(item);
|
||||
}
|
||||
|
||||
SubTab.Add(subTab);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
27
Assets/Scripts/Def/InputDef.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
namespace NBF
|
||||
{
|
||||
public class InputDef
|
||||
{
|
||||
public class UI
|
||||
{
|
||||
public const string Back = "Back";
|
||||
public const string Enter = "Enter";
|
||||
public const string Tab = "Tab";
|
||||
public const string Prev = "Prev";
|
||||
public const string Next = "Next";
|
||||
public const string SubPrev = "SubPrev";
|
||||
public const string SubNext = "SubNext";
|
||||
public const string Left = "Left";
|
||||
public const string Right = "Right";
|
||||
public const string Up = "Up";
|
||||
public const string Down = "Down";
|
||||
}
|
||||
|
||||
public class Player
|
||||
{
|
||||
public const string Run = "Run";
|
||||
public const string Use1 = "Use1";
|
||||
public const string Use2 = "Use2";
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Def/InputDef.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c1d17072df749909ccc26de605346d1
|
||||
timeCreated: 1748104048
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using NBC;
|
||||
// using Rewired;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
@@ -13,95 +14,28 @@ namespace NBF
|
||||
public static bool IsOp1;
|
||||
public static bool IsOp2;
|
||||
|
||||
|
||||
public static event Action<bool> OnOp1Action;
|
||||
public static event Action<bool> OnOp2Action;
|
||||
public static event Action OnUseAction;
|
||||
public static event Action OnUse2Action;
|
||||
public static event Action<bool> OnSelectItemAction;
|
||||
public static event Action<bool> OnSelectBaitAction;
|
||||
public static event Action<bool> OnSelectFoodAction;
|
||||
|
||||
/// <summary>
|
||||
/// 快速选择数值
|
||||
/// 执行输入事件
|
||||
/// </summary>
|
||||
public static event Action<int> OnQuickIndexAction;
|
||||
public static event Action<string> OnUIPerformed;
|
||||
|
||||
/// <summary>
|
||||
/// 使用手电筒
|
||||
/// 执行输入事件完毕
|
||||
/// </summary>
|
||||
public static event Action<bool> OnUseTorchAction;
|
||||
public static event Action<string> OnUICanceled;
|
||||
|
||||
/// <summary>
|
||||
/// 使用抄网
|
||||
/// 执行输入事件
|
||||
/// </summary>
|
||||
public static event Action<bool> OnUseBrailAction;
|
||||
public static event Action<string> OnPlayerPerformed;
|
||||
|
||||
/// <summary>
|
||||
/// 使用望远镜
|
||||
/// 执行输入事件完毕
|
||||
/// </summary>
|
||||
public static event Action<bool> OnUseTelescopeAction;
|
||||
|
||||
/// <summary>
|
||||
/// 添加浮漂
|
||||
/// </summary>
|
||||
public static event Action<bool> OnAddBobAction;
|
||||
|
||||
/// <summary>
|
||||
/// 减少浮漂
|
||||
/// </summary>
|
||||
public static event Action<bool> OnSubBobAction;
|
||||
|
||||
/// <summary>
|
||||
/// 返回背包
|
||||
/// </summary>
|
||||
public static event Action<bool> OnToBagAction;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 帮助
|
||||
/// </summary>
|
||||
public static event Action<bool> OnHelpAction;
|
||||
|
||||
/// <summary>
|
||||
/// 聊天
|
||||
/// </summary>
|
||||
public static event Action<bool> OnChatAction;
|
||||
|
||||
/// <summary>
|
||||
/// 物品信息
|
||||
/// </summary>
|
||||
public static event Action<bool> OnInfoAction;
|
||||
|
||||
/// <summary>
|
||||
/// 技能
|
||||
/// </summary>
|
||||
public static event Action<bool> OnSkillAction;
|
||||
|
||||
/// <summary>
|
||||
/// 打开背包
|
||||
/// </summary>
|
||||
public static event Action<bool> OnOpenBagAction;
|
||||
|
||||
/// <summary>
|
||||
/// 打开鱼护
|
||||
/// </summary>
|
||||
public static event Action<bool> OnKeepnetAction;
|
||||
|
||||
/// <summary>
|
||||
/// 打开制造
|
||||
/// </summary>
|
||||
public static event Action<bool> OnMakeAction;
|
||||
|
||||
/// <summary>
|
||||
/// 打开地图
|
||||
/// </summary>
|
||||
public static event Action<bool> OnMapAction;
|
||||
|
||||
/// <summary>
|
||||
/// 奔跑
|
||||
/// </summary>
|
||||
public static event Action<bool> OnRunAction;
|
||||
public static event Action<string> OnPlayerCanceled;
|
||||
|
||||
/// <summary>
|
||||
/// 触发交互游戏对象
|
||||
@@ -110,6 +44,11 @@ namespace NBF
|
||||
|
||||
public static PlayerInputControl PlayerInputControl { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// ui阻止游戏输入
|
||||
/// </summary>
|
||||
public static bool IsUIStopInput;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
@@ -118,19 +57,20 @@ namespace NBF
|
||||
|
||||
public static Vector2 GetMovementInput()
|
||||
{
|
||||
return PlayerInputControl.Normal.Move?.ReadValue<Vector2>() ?? Vector2.zero;
|
||||
if (IsUIStopInput) return Vector2.zero;
|
||||
return PlayerInputControl.Player.Move?.ReadValue<Vector2>() ?? Vector2.zero;
|
||||
}
|
||||
|
||||
public static Vector2 GetLookInput()
|
||||
{
|
||||
return PlayerInputControl.Normal.Look?.ReadValue<Vector2>() ?? Vector2.zero;
|
||||
if (IsUIStopInput) return Vector2.zero;
|
||||
return PlayerInputControl.Player.Look?.ReadValue<Vector2>() ?? Vector2.zero;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
PlayerInputControl = new PlayerInputControl();
|
||||
PlayerInputControl.Enable();
|
||||
PlayerInputControl.Normal.Enable();
|
||||
AddEvent();
|
||||
}
|
||||
|
||||
@@ -141,348 +81,85 @@ namespace NBF
|
||||
|
||||
private void AddEvent()
|
||||
{
|
||||
PlayerInputControl.Normal.Run.performed += OnRun;
|
||||
PlayerInputControl.Normal.Run.canceled += OnRun;
|
||||
PlayerInputControl.Normal.Op1.performed += OnOp1;
|
||||
PlayerInputControl.Normal.Op1.canceled += OnOp1;
|
||||
PlayerInputControl.Normal.Op2.performed += OnOp2;
|
||||
PlayerInputControl.Normal.Op2.canceled += OnOp2;
|
||||
PlayerInputControl.Normal.Use.performed += OnUse;
|
||||
PlayerInputControl.Normal.Use.canceled += OnUse;
|
||||
PlayerInputControl.Normal.Use2.performed += OnUse2;
|
||||
PlayerInputControl.Normal.Use2.canceled += OnUse2;
|
||||
|
||||
PlayerInputControl.Normal.SelectItem.performed += OnSelectItem;
|
||||
PlayerInputControl.Normal.SelectItem.canceled += OnSelectItem;
|
||||
|
||||
PlayerInputControl.Normal.SelectFood.performed += OnSelectFood;
|
||||
PlayerInputControl.Normal.SelectFood.canceled += OnSelectFood;
|
||||
|
||||
PlayerInputControl.Normal.SelectBait.performed += OnSelectBait;
|
||||
PlayerInputControl.Normal.SelectBait.canceled += OnSelectBait;
|
||||
|
||||
PlayerInputControl.Normal.UseTorch.performed += OnUseTorch;
|
||||
PlayerInputControl.Normal.UseTorch.canceled += OnUseTorch;
|
||||
|
||||
PlayerInputControl.Normal.UseTelescope.performed += OnUseTelescope;
|
||||
PlayerInputControl.Normal.UseTelescope.canceled += OnUseTelescope;
|
||||
|
||||
PlayerInputControl.Normal.UseBrail.performed += OnUseBrail;
|
||||
PlayerInputControl.Normal.UseBrail.canceled += OnUseBrail;
|
||||
|
||||
PlayerInputControl.Normal.AddBob.performed += OnAddBob;
|
||||
PlayerInputControl.Normal.AddBob.canceled += OnAddBob;
|
||||
|
||||
PlayerInputControl.Normal.SubBob.performed += OnSubBob;
|
||||
PlayerInputControl.Normal.SubBob.canceled += OnSubBob;
|
||||
|
||||
PlayerInputControl.Normal.ToBag.performed += OnToBag;
|
||||
PlayerInputControl.Normal.ToBag.canceled += OnToBag;
|
||||
|
||||
PlayerInputControl.Normal.Help.performed += OnHelp;
|
||||
PlayerInputControl.Normal.Help.canceled += OnHelp;
|
||||
|
||||
PlayerInputControl.Normal.Chat.performed += OnChat;
|
||||
PlayerInputControl.Normal.Chat.canceled += OnChat;
|
||||
|
||||
PlayerInputControl.Normal.Info.performed += OnInfo;
|
||||
PlayerInputControl.Normal.Info.canceled += OnInfo;
|
||||
|
||||
PlayerInputControl.Normal.Skill.performed += OnSkill;
|
||||
PlayerInputControl.Normal.Skill.canceled += OnSkill;
|
||||
|
||||
PlayerInputControl.Normal.OpenBag.performed += OnOpenBag;
|
||||
PlayerInputControl.Normal.OpenBag.canceled += OnOpenBag;
|
||||
|
||||
PlayerInputControl.Normal.Keepnet.performed += OnKeepnet;
|
||||
PlayerInputControl.Normal.Keepnet.canceled += OnKeepnet;
|
||||
|
||||
PlayerInputControl.Normal.Make.performed += OnMake;
|
||||
PlayerInputControl.Normal.Make.canceled += OnMake;
|
||||
|
||||
PlayerInputControl.Normal.Map.performed += OnMap;
|
||||
PlayerInputControl.Normal.Map.canceled += OnMap;
|
||||
|
||||
PlayerInputControl.Normal.Quick1.performed += OnQuick1;
|
||||
PlayerInputControl.Normal.Quick2.performed += OnQuick2;
|
||||
PlayerInputControl.Normal.Quick3.performed += OnQuick3;
|
||||
PlayerInputControl.Normal.Quick4.performed += OnQuick4;
|
||||
PlayerInputControl.Normal.Quick5.performed += OnQuick5;
|
||||
PlayerInputControl.Normal.Quick6.performed += OnQuick6;
|
||||
PlayerInputControl.Normal.Quick7.performed += OnQuick7;
|
||||
PlayerInputControl.Normal.Quick8.performed += OnQuick8;
|
||||
PlayerInputControl.Normal.Quick9.performed += OnQuick9;
|
||||
foreach (var actionMap in PlayerInputControl.asset.actionMaps)
|
||||
{
|
||||
actionMap.Enable();
|
||||
if (actionMap.name == "UI")
|
||||
{
|
||||
foreach (var action in actionMap.actions)
|
||||
{
|
||||
if (action.type == InputActionType.Button)
|
||||
{
|
||||
action.performed += OnUIButtonPerformed;
|
||||
action.canceled += OnUIButtonCanceled;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (actionMap.name == "Normal")
|
||||
{
|
||||
foreach (var action in actionMap.actions)
|
||||
{
|
||||
if (action.type == InputActionType.Button)
|
||||
{
|
||||
action.performed += OnPlayerButtonPerformed;
|
||||
action.canceled += OnPlayerButtonCanceled;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveEvent()
|
||||
{
|
||||
PlayerInputControl.Normal.Run.performed -= OnRun;
|
||||
PlayerInputControl.Normal.Run.canceled -= OnRun;
|
||||
PlayerInputControl.Normal.Op1.performed -= OnOp1;
|
||||
PlayerInputControl.Normal.Op1.canceled -= OnOp1;
|
||||
PlayerInputControl.Normal.Op2.performed -= OnOp2;
|
||||
PlayerInputControl.Normal.Op2.canceled -= OnOp2;
|
||||
PlayerInputControl.Normal.Use.performed -= OnUse;
|
||||
PlayerInputControl.Normal.Use.canceled -= OnUse;
|
||||
PlayerInputControl.Normal.Use2.performed -= OnUse2;
|
||||
PlayerInputControl.Normal.Use2.canceled -= OnUse2;
|
||||
|
||||
PlayerInputControl.Normal.SelectItem.performed -= OnSelectItem;
|
||||
PlayerInputControl.Normal.SelectItem.canceled -= OnSelectItem;
|
||||
|
||||
PlayerInputControl.Normal.SelectFood.performed -= OnSelectFood;
|
||||
PlayerInputControl.Normal.SelectFood.canceled -= OnSelectFood;
|
||||
|
||||
PlayerInputControl.Normal.SelectBait.performed -= OnSelectBait;
|
||||
PlayerInputControl.Normal.SelectBait.canceled -= OnSelectBait;
|
||||
|
||||
PlayerInputControl.Normal.UseTorch.performed -= OnUseTorch;
|
||||
PlayerInputControl.Normal.UseTorch.canceled -= OnUseTorch;
|
||||
|
||||
PlayerInputControl.Normal.UseTelescope.performed -= OnUseTelescope;
|
||||
PlayerInputControl.Normal.UseTelescope.canceled -= OnUseTelescope;
|
||||
|
||||
PlayerInputControl.Normal.UseBrail.performed -= OnUseBrail;
|
||||
PlayerInputControl.Normal.UseBrail.canceled -= OnUseBrail;
|
||||
|
||||
PlayerInputControl.Normal.AddBob.performed -= OnAddBob;
|
||||
PlayerInputControl.Normal.AddBob.canceled -= OnAddBob;
|
||||
|
||||
PlayerInputControl.Normal.SubBob.performed -= OnSubBob;
|
||||
PlayerInputControl.Normal.SubBob.canceled -= OnSubBob;
|
||||
|
||||
PlayerInputControl.Normal.ToBag.performed -= OnToBag;
|
||||
PlayerInputControl.Normal.ToBag.canceled -= OnToBag;
|
||||
|
||||
PlayerInputControl.Normal.Help.performed -= OnHelp;
|
||||
PlayerInputControl.Normal.Help.canceled -= OnHelp;
|
||||
|
||||
PlayerInputControl.Normal.Chat.performed -= OnChat;
|
||||
PlayerInputControl.Normal.Chat.canceled -= OnChat;
|
||||
|
||||
PlayerInputControl.Normal.Info.performed -= OnInfo;
|
||||
PlayerInputControl.Normal.Info.canceled -= OnInfo;
|
||||
|
||||
PlayerInputControl.Normal.Skill.performed -= OnSkill;
|
||||
PlayerInputControl.Normal.Skill.canceled -= OnSkill;
|
||||
|
||||
PlayerInputControl.Normal.OpenBag.performed -= OnOpenBag;
|
||||
PlayerInputControl.Normal.OpenBag.canceled -= OnOpenBag;
|
||||
|
||||
PlayerInputControl.Normal.Keepnet.performed -= OnKeepnet;
|
||||
PlayerInputControl.Normal.Keepnet.canceled -= OnKeepnet;
|
||||
|
||||
PlayerInputControl.Normal.Make.performed -= OnMake;
|
||||
PlayerInputControl.Normal.Make.canceled -= OnMake;
|
||||
|
||||
PlayerInputControl.Normal.Map.performed -= OnMap;
|
||||
PlayerInputControl.Normal.Map.canceled -= OnMap;
|
||||
|
||||
PlayerInputControl.Normal.Quick1.performed -= OnQuick1;
|
||||
PlayerInputControl.Normal.Quick2.performed -= OnQuick2;
|
||||
PlayerInputControl.Normal.Quick3.performed -= OnQuick3;
|
||||
PlayerInputControl.Normal.Quick4.performed -= OnQuick4;
|
||||
PlayerInputControl.Normal.Quick5.performed -= OnQuick5;
|
||||
PlayerInputControl.Normal.Quick6.performed -= OnQuick6;
|
||||
PlayerInputControl.Normal.Quick7.performed -= OnQuick7;
|
||||
PlayerInputControl.Normal.Quick8.performed -= OnQuick8;
|
||||
PlayerInputControl.Normal.Quick9.performed -= OnQuick9;
|
||||
OnUIPerformed = null;
|
||||
OnUICanceled = null;
|
||||
OnPlayerPerformed = null;
|
||||
OnPlayerCanceled = null;
|
||||
}
|
||||
|
||||
private void OnUIButtonPerformed(InputAction.CallbackContext context)
|
||||
{
|
||||
OnUIPerformed?.Invoke(context.action.name);
|
||||
}
|
||||
|
||||
private void OnUIButtonCanceled(InputAction.CallbackContext context)
|
||||
{
|
||||
OnUICanceled?.Invoke(context.action.name);
|
||||
}
|
||||
|
||||
private void OnPlayerButtonPerformed(InputAction.CallbackContext context)
|
||||
{
|
||||
if (IsUIStopInput) return;
|
||||
var actionName = context.action.name;
|
||||
if (actionName == "Op1")
|
||||
{
|
||||
OnOp1Action?.Invoke(true);
|
||||
}
|
||||
else if (actionName == "Op2")
|
||||
{
|
||||
OnOp2Action?.Invoke(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPlayerButtonCanceled(InputAction.CallbackContext context)
|
||||
{
|
||||
if (IsUIStopInput) return;
|
||||
var actionName = context.action.name;
|
||||
if (actionName == "Op1")
|
||||
{
|
||||
OnOp1Action?.Invoke(false);
|
||||
}
|
||||
else if (actionName == "Op2")
|
||||
{
|
||||
OnOp2Action?.Invoke(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void OnInteractiveObject(InteractiveObject interactiveObject)
|
||||
{
|
||||
Debug.LogError($"OnInteractiveObject {interactiveObject != null}");
|
||||
OnInteractiveObjectAction?.Invoke(interactiveObject);
|
||||
}
|
||||
|
||||
private void OnRun(InputAction.CallbackContext context)
|
||||
{
|
||||
OnRunAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnOp1(InputAction.CallbackContext context)
|
||||
{
|
||||
IsOp1 = context.performed;
|
||||
OnOp1Action?.Invoke(IsOp1);
|
||||
}
|
||||
|
||||
private void OnOp2(InputAction.CallbackContext context)
|
||||
{
|
||||
IsOp2 = context.performed;
|
||||
OnOp2Action?.Invoke(IsOp2);
|
||||
}
|
||||
|
||||
private void OnUse(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
OnUseAction?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnUse2(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
OnUse2Action?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnSelectItem(InputAction.CallbackContext context)
|
||||
{
|
||||
OnSelectItemAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnSelectFood(InputAction.CallbackContext context)
|
||||
{
|
||||
OnSelectFoodAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnSelectBait(InputAction.CallbackContext context)
|
||||
{
|
||||
OnSelectBaitAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnUseTorch(InputAction.CallbackContext context)
|
||||
{
|
||||
OnUseTorchAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnUseTelescope(InputAction.CallbackContext context)
|
||||
{
|
||||
OnUseTelescopeAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnUseBrail(InputAction.CallbackContext context)
|
||||
{
|
||||
OnUseBrailAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnAddBob(InputAction.CallbackContext context)
|
||||
{
|
||||
OnSubBobAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnSubBob(InputAction.CallbackContext context)
|
||||
{
|
||||
OnSubBobAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnToBag(InputAction.CallbackContext context)
|
||||
{
|
||||
OnToBagAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnHelp(InputAction.CallbackContext context)
|
||||
{
|
||||
OnHelpAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnChat(InputAction.CallbackContext context)
|
||||
{
|
||||
OnChatAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnInfo(InputAction.CallbackContext context)
|
||||
{
|
||||
OnInfoAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnSkill(InputAction.CallbackContext context)
|
||||
{
|
||||
OnSkillAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnOpenBag(InputAction.CallbackContext context)
|
||||
{
|
||||
OnOpenBagAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnKeepnet(InputAction.CallbackContext context)
|
||||
{
|
||||
OnKeepnetAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnMake(InputAction.CallbackContext context)
|
||||
{
|
||||
OnMakeAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnMap(InputAction.CallbackContext context)
|
||||
{
|
||||
OnMapAction?.Invoke(context.performed);
|
||||
}
|
||||
|
||||
private void OnQuick1(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
OnQuickIndexAction?.Invoke(1);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnQuick2(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
OnQuickIndexAction?.Invoke(2);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnQuick3(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
OnQuickIndexAction?.Invoke(3);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnQuick4(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
OnQuickIndexAction?.Invoke(4);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnQuick5(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
OnQuickIndexAction?.Invoke(5);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnQuick6(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
OnQuickIndexAction?.Invoke(6);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnQuick7(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
OnQuickIndexAction?.Invoke(7);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnQuick8(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
OnQuickIndexAction?.Invoke(8);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnQuick9(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
OnQuickIndexAction?.Invoke(9);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,10 +56,12 @@ namespace NBF
|
||||
transform.rotation = _player.Data.rotation;
|
||||
|
||||
App.Inst.SetMouseCurrsor(false);
|
||||
InputManager.OnRunAction += OnRunAction;
|
||||
InputManager.OnQuickIndexAction += OnQuickIndexAction;
|
||||
InputManager.OnUseTorchAction += OnUseTorchAction;
|
||||
InputManager.OnUseTelescopeAction += OnUseTelescopeAction;
|
||||
InputManager.OnPlayerCanceled += OnPlayerCanceled;
|
||||
InputManager.OnPlayerPerformed += OnPlayerPerformed;
|
||||
// InputManager.OnRunAction += OnRunAction;
|
||||
// InputManager.OnQuickIndexAction += OnQuickIndexAction;
|
||||
// InputManager.OnUseTorchAction += OnUseTorchAction;
|
||||
// InputManager.OnUseTelescopeAction += OnUseTelescopeAction;
|
||||
|
||||
interactableLayer = LayerMask.GetMask("Interactive");
|
||||
}
|
||||
@@ -93,9 +95,8 @@ namespace NBF
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
InputManager.OnQuickIndexAction -= OnQuickIndexAction;
|
||||
InputManager.OnUseTorchAction -= OnUseTorchAction;
|
||||
InputManager.OnUseTelescopeAction -= OnUseTelescopeAction;
|
||||
InputManager.OnPlayerCanceled -= OnPlayerCanceled;
|
||||
InputManager.OnPlayerPerformed -= OnPlayerPerformed;
|
||||
}
|
||||
|
||||
#region 交互检测
|
||||
@@ -283,28 +284,29 @@ namespace NBF
|
||||
|
||||
#region 按键输入事件
|
||||
|
||||
private void OnRunAction(bool performed)
|
||||
private void OnPlayerPerformed(string action)
|
||||
{
|
||||
if (performed) Sprint();
|
||||
else StopSprinting();
|
||||
}
|
||||
|
||||
private void OnQuickIndexAction(int index)
|
||||
{
|
||||
nextShowSlotIndex = index;
|
||||
}
|
||||
|
||||
private void OnUseTorchAction(bool ret)
|
||||
{
|
||||
if (!ret)
|
||||
if (action == "Run")
|
||||
{
|
||||
_player.Data.openLight = !_player.Data.openLight;
|
||||
Sprint();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnUseTelescopeAction(bool ret)
|
||||
private void OnPlayerCanceled(string action)
|
||||
{
|
||||
if (!ret)
|
||||
if (action == "Run")
|
||||
{
|
||||
StopSprinting();
|
||||
}
|
||||
else if (action.StartsWith("Quick"))
|
||||
{
|
||||
nextShowSlotIndex = int.Parse(action.Substring("Quick".Length));
|
||||
}
|
||||
else if (action == "UseTorch")
|
||||
{
|
||||
_player.Data.openLight = !_player.Data.openLight;
|
||||
}
|
||||
else if (action == "UseTelescope")
|
||||
{
|
||||
_player.Data.openTelescope = !_player.Data.openTelescope;
|
||||
_player.ToggleTelescope();
|
||||
|
||||
@@ -8,9 +8,12 @@ namespace NBF
|
||||
{
|
||||
public static void BindAll()
|
||||
{
|
||||
UIObjectFactory.SetPackageItemExtension(BottomMenu.URL, typeof(BottomMenu));
|
||||
UIObjectFactory.SetPackageItemExtension(ClassifyList.URL, typeof(ClassifyList));
|
||||
UIObjectFactory.SetPackageItemExtension(CommonMenu.URL, typeof(CommonMenu));
|
||||
UIObjectFactory.SetPackageItemExtension(ListTitleItem.URL, typeof(ListTitleItem));
|
||||
UIObjectFactory.SetPackageItemExtension(BtnTitleInputControl.URL, typeof(BtnTitleInputControl));
|
||||
UIObjectFactory.SetPackageItemExtension(CommonSubMenu.URL, typeof(CommonSubMenu));
|
||||
UIObjectFactory.SetPackageItemExtension(BtnInputControl.URL, typeof(BtnInputControl));
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/UI/Common/Button.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e421fb97db2b48ccb37e75b8766265de
|
||||
timeCreated: 1748071593
|
||||
@@ -7,17 +7,17 @@ using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class ListTitleItem
|
||||
public partial class BtnInputControl
|
||||
{
|
||||
public const string URL = "ui://6hgkvlauoomea";
|
||||
public const string URL = "ui://6hgkvlaur03ut";
|
||||
|
||||
public GImage back;
|
||||
public Controller show;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
back = (GImage)GetChild("back");
|
||||
show = GetController("show");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dfab5a485e648254dad616e988d7a17e
|
||||
15
Assets/Scripts/UI/Common/Button/BtnInputControl.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class BtnInputControl : GButton
|
||||
{
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/Button/BtnInputControl.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9bc3045114c90ef4888ae8cd51aa1e2e
|
||||
25
Assets/Scripts/UI/Common/Button/BtnTitleInputControl.Designer.cs
generated
Normal file
@@ -0,0 +1,25 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class BtnTitleInputControl
|
||||
{
|
||||
public const string URL = "ui://6hgkvlaur03uj0";
|
||||
|
||||
public Controller show;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
show = GetController("show");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a4cdcb09978fcd47b043fa05e53e433
|
||||
19
Assets/Scripts/UI/Common/Button/BtnTitleInputControl.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class BtnTitleInputControl : GButton
|
||||
{
|
||||
public Action OnAction;
|
||||
public string ActionName;
|
||||
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15ebd24da667f9146bc2cfbfec56a512
|
||||
@@ -11,18 +11,65 @@ namespace NBF
|
||||
public partial class ClassifyList : GComponent
|
||||
{
|
||||
private readonly List<object> _listData = new List<object>();
|
||||
|
||||
|
||||
public event Action<object> OnClickItem;
|
||||
|
||||
|
||||
private int _columnsCount;
|
||||
|
||||
private void OnInited()
|
||||
{
|
||||
List.itemProvider = GetListItemResource;
|
||||
List.itemRenderer = OnRenderItem;
|
||||
List.onClickItem.Add(OnClickListItem);
|
||||
InputManager.OnUICanceled += OnUICanceled;
|
||||
}
|
||||
|
||||
public void SetListData(List<object> listData,ListSelectionMode selectionMode = ListSelectionMode.Single)
|
||||
public override void Dispose()
|
||||
{
|
||||
InputManager.OnUICanceled -= OnUICanceled;
|
||||
base.Dispose();
|
||||
}
|
||||
|
||||
private void OnUICanceled(string action)
|
||||
{
|
||||
if (action == InputDef.UI.Right)
|
||||
{
|
||||
SetListSelected(List.selectedIndex + 1);
|
||||
}
|
||||
else if (action == InputDef.UI.Left)
|
||||
{
|
||||
SetListSelected(List.selectedIndex - 1);
|
||||
}
|
||||
else if (action == InputDef.UI.Up)
|
||||
{
|
||||
SetListSelected(List.selectedIndex - _columnsCount);
|
||||
}
|
||||
else if (action == InputDef.UI.Down)
|
||||
{
|
||||
if (List.selectedIndex < 0)
|
||||
{
|
||||
SetListSelected(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetListSelected(List.selectedIndex + _columnsCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetListSelected(int selectedIndex)
|
||||
{
|
||||
if (selectedIndex >= 0 && selectedIndex < _listData.Count)
|
||||
{
|
||||
List.selectedIndex = selectedIndex;
|
||||
List.ScrollToView(List.selectedIndex);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetListData(List<object> listData, ListSelectionMode selectionMode = ListSelectionMode.Single)
|
||||
{
|
||||
List.selectedIndex = -1;
|
||||
List.defaultItem = GetListDefaultItemResource(listData);
|
||||
List.itemRenderer = OnRenderItem;
|
||||
List.onClickItem.Add(OnClickListItem);
|
||||
List.SetVirtual();
|
||||
_listData.Clear();
|
||||
foreach (var obj in listData)
|
||||
{
|
||||
@@ -32,13 +79,14 @@ namespace NBF
|
||||
List.selectionMode = selectionMode;
|
||||
List.numItems = _listData.Count;
|
||||
List.ScrollToView(0);
|
||||
_columnsCount = 5;
|
||||
}
|
||||
|
||||
void OnClickListItem(EventContext context)
|
||||
{
|
||||
OnClickItem?.Invoke(context.data);
|
||||
}
|
||||
|
||||
|
||||
void OnRenderItem(int index, GObject obj)
|
||||
{
|
||||
if (obj is ListItemBase item)
|
||||
@@ -48,20 +96,15 @@ namespace NBF
|
||||
}
|
||||
|
||||
//根据索引的不同,返回不同的资源URL
|
||||
string GetListItemResource(int index)
|
||||
string GetListDefaultItemResource(List<object> listData)
|
||||
{
|
||||
var itemData = _listData[index];
|
||||
|
||||
if (itemData is ShopGearData shopItem)
|
||||
var itemData = listData.Find(t => t != null);
|
||||
|
||||
if (itemData is ShopGearData)
|
||||
{
|
||||
return ShopGearItem.URL;
|
||||
}
|
||||
|
||||
if (itemData is ListClassifyData item)
|
||||
{
|
||||
return ListTitleItem.URL;
|
||||
}
|
||||
|
||||
return List.defaultItem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class CommonMenu : GLabel
|
||||
{
|
||||
public event Action OnClose;
|
||||
public event Action<int> OnTabChange;
|
||||
private void OnInited()
|
||||
{
|
||||
BtnClose.onClick.Add(OnClickClose);
|
||||
List.onClickItem.Add(OnClickItem);
|
||||
}
|
||||
|
||||
public void SetTabs(List<TabListData> tabList,int selectIndex = 0)
|
||||
{
|
||||
List.RemoveChildrenToPool();
|
||||
for (int i = 0; i < tabList.Count; i++)
|
||||
{
|
||||
var tabData = tabList[i];
|
||||
var tabItem = List.AddItemFromPool().asButton;
|
||||
tabItem.title = tabData.TabName;
|
||||
}
|
||||
Log.Info($"Set tab index={List.selectedIndex}");
|
||||
List.selectedIndex = selectIndex;
|
||||
OnClickItem();
|
||||
}
|
||||
|
||||
|
||||
private void OnClickItem()
|
||||
{
|
||||
OnTabChange?.Invoke(List.selectedIndex);
|
||||
}
|
||||
|
||||
private void OnClickClose()
|
||||
{
|
||||
OnClose?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/GMPanel.Designer.cs
generated
@@ -17,7 +17,7 @@ namespace NBF
|
||||
public GButton BtnOk;
|
||||
[AutoFind(Name = "Dir")]
|
||||
public GComboBox Dir;
|
||||
public override string[] GetDependPackages(){ return new string[] {"Main"}; }
|
||||
public override string[] GetDependPackages(){ return new string[] {}; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8042079334b43394ca275c4a2189dbfb
|
||||
@@ -1,27 +0,0 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class ListTitleItem : ListItemBase
|
||||
{
|
||||
public ListClassifyData ClassifyData;
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnSetData(object showData)
|
||||
{
|
||||
width = parent.width - 40;
|
||||
ClassifyData = showData as ListClassifyData;
|
||||
if (ClassifyData == null)
|
||||
{
|
||||
ClassifyData = new ListClassifyData(string.Empty);
|
||||
}
|
||||
title = ClassifyData.Title;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d1c42293e0f4ae546ba4419aa2ed199c
|
||||
@@ -1,30 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public class TabListData
|
||||
{
|
||||
public string TabName;
|
||||
public bool Selected;
|
||||
public List<object> ListData;
|
||||
|
||||
public void AddTestData(int index)
|
||||
{
|
||||
ListData = new List<object>();
|
||||
TabName = $"标题-{index + 1}";
|
||||
var count1 = Random.Range(5, 10);
|
||||
var count2 = Random.Range(10, 30);
|
||||
for (int i = 0; i < count1; i++)
|
||||
{
|
||||
ListData.Add(new ListClassifyData($"Title-{i}"));
|
||||
for (int j = 0; j < count2; j++)
|
||||
{
|
||||
var item = new ShopGearData();
|
||||
item.title = $"Item {i}-" + j;
|
||||
ListData.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/UI/Common/Menu.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d49e5e796ac4b4487b72a164e22ba73
|
||||
timeCreated: 1748093228
|
||||
27
Assets/Scripts/UI/Common/Menu/BottomMenu.Designer.cs
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class BottomMenu
|
||||
{
|
||||
public const string URL = "ui://6hgkvlau9mf1z";
|
||||
|
||||
public GList List;
|
||||
public GList LeftList;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
List = (GList)GetChild("List");
|
||||
LeftList = (GList)GetChild("LeftList");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 172ed53c6c409e04c8a993c9fae4c820
|
||||
79
Assets/Scripts/UI/Common/Menu/BottomMenu.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class BottomMenu : GComponent
|
||||
{
|
||||
public event Action OnBack;
|
||||
public event Action OnEnter;
|
||||
public event Action OnTab;
|
||||
public event Action OnUse;
|
||||
|
||||
private void OnInited()
|
||||
{
|
||||
List.onClickItem.Add(OnClickItem);
|
||||
}
|
||||
|
||||
private void OnClickItem(EventContext context)
|
||||
{
|
||||
var item = context.data as BtnTitleInputControl;
|
||||
if (item == null) return;
|
||||
item.OnAction?.Invoke();
|
||||
}
|
||||
|
||||
public void UnUse()
|
||||
{
|
||||
OnBack = null;
|
||||
OnEnter = null;
|
||||
OnTab = null;
|
||||
OnUse = null;
|
||||
|
||||
InputManager.OnUICanceled -= OnAction;
|
||||
}
|
||||
|
||||
public void Use()
|
||||
{
|
||||
List.RemoveChildrenToPool();
|
||||
LeftList.RemoveChildrenToPool();
|
||||
|
||||
InputManager.OnUICanceled += OnAction;
|
||||
|
||||
AddButtonItem(OnUse, "");
|
||||
AddButtonItem(OnTab, InputDef.UI.Tab);
|
||||
AddButtonItem(OnEnter, InputDef.UI.Enter);
|
||||
AddButtonItem(OnBack, InputDef.UI.Back);
|
||||
}
|
||||
|
||||
private void AddButtonItem(Action action, string actionName)
|
||||
{
|
||||
if (action != null)
|
||||
{
|
||||
if (List.AddItemFromPool() is BtnTitleInputControl item)
|
||||
{
|
||||
item.OnAction = action;
|
||||
item.ActionName = actionName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnAction(string action)
|
||||
{
|
||||
var children = List.GetChildren();
|
||||
foreach (var child in children)
|
||||
{
|
||||
if (child is BtnTitleInputControl item)
|
||||
{
|
||||
if (action == item.ActionName)
|
||||
{
|
||||
item.OnAction?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/Menu/BottomMenu.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 94c5df4d4f05c2b40ad72c5c90008295
|
||||
@@ -11,23 +11,19 @@ namespace NBF
|
||||
{
|
||||
public const string URL = "ui://6hgkvlaufcfggr";
|
||||
|
||||
public GImage LongLine;
|
||||
public GList List;
|
||||
public GButton Head;
|
||||
public GTextField TextName;
|
||||
public GComponent Currency;
|
||||
public GButton BtnClose;
|
||||
public GButton BtnUserHead;
|
||||
public BtnInputControl BtnPrev;
|
||||
public BtnInputControl BtnNext;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
LongLine = (GImage)GetChild("LongLine");
|
||||
List = (GList)GetChild("List");
|
||||
Head = (GButton)GetChild("Head");
|
||||
TextName = (GTextField)GetChild("TextName");
|
||||
Currency = (GComponent)GetChild("Currency");
|
||||
BtnClose = (GButton)GetChild("BtnClose");
|
||||
BtnUserHead = (GButton)GetChild("BtnUserHead");
|
||||
BtnPrev = (BtnInputControl)GetChild("BtnPrev");
|
||||
BtnNext = (BtnInputControl)GetChild("BtnNext");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
98
Assets/Scripts/UI/Common/Menu/CommonMenu.cs
Normal file
@@ -0,0 +1,98 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class CommonMenu : GLabel
|
||||
{
|
||||
public event Action<int> OnTabChange;
|
||||
|
||||
private void OnInited()
|
||||
{
|
||||
List.onClickItem.Add(OnClickItem);
|
||||
BtnPrev.onClick.Add(OnClickBtnPrev);
|
||||
BtnNext.onClick.Add(OnClickBtnNext);
|
||||
|
||||
InputManager.OnUICanceled += OnUICanceled;
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
InputManager.OnUICanceled -= OnUICanceled;
|
||||
base.Dispose();
|
||||
}
|
||||
|
||||
private void OnUICanceled(string action)
|
||||
{
|
||||
if (action == InputDef.UI.Prev)
|
||||
{
|
||||
OnClickBtnPrev();
|
||||
}
|
||||
else if (action == InputDef.UI.Next)
|
||||
{
|
||||
OnClickBtnNext();
|
||||
}
|
||||
}
|
||||
|
||||
public void SetTabs(List<TabListData> tabList, int selectIndex = 0)
|
||||
{
|
||||
List.RemoveChildrenToPool();
|
||||
var width = 0f;
|
||||
for (int i = 0; i < tabList.Count; i++)
|
||||
{
|
||||
var tabData = tabList[i];
|
||||
var tabItem = List.AddItemFromPool().asButton;
|
||||
tabItem.title = tabData.Tab.Name;
|
||||
width += tabItem.width;
|
||||
if (i > 0)
|
||||
{
|
||||
width += List.columnGap;
|
||||
}
|
||||
}
|
||||
|
||||
Log.Info($"Set tab index={List.selectedIndex}");
|
||||
List.selectedIndex = selectIndex;
|
||||
List.width = width;
|
||||
OnClickItem();
|
||||
}
|
||||
|
||||
|
||||
private void OnClickItem()
|
||||
{
|
||||
OnTabChange?.Invoke(List.selectedIndex);
|
||||
}
|
||||
|
||||
private void OnClickBtnPrev()
|
||||
{
|
||||
if (List.selectedIndex > 0)
|
||||
{
|
||||
List.selectedIndex -= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
List.selectedIndex = List.numItems - 1;
|
||||
}
|
||||
|
||||
OnClickItem();
|
||||
}
|
||||
|
||||
private void OnClickBtnNext()
|
||||
{
|
||||
if (List.selectedIndex < List.numItems - 1)
|
||||
{
|
||||
List.selectedIndex += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
List.selectedIndex = 0;
|
||||
}
|
||||
|
||||
OnClickItem();
|
||||
}
|
||||
}
|
||||
}
|
||||
29
Assets/Scripts/UI/Common/Menu/CommonSubMenu.Designer.cs
generated
Normal file
@@ -0,0 +1,29 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class CommonSubMenu
|
||||
{
|
||||
public const string URL = "ui://6hgkvlaur03us";
|
||||
|
||||
public GList List;
|
||||
public BtnInputControl BtnPrev;
|
||||
public BtnInputControl BtnNext;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
List = (GList)GetChild("List");
|
||||
BtnPrev = (BtnInputControl)GetChild("BtnPrev");
|
||||
BtnNext = (BtnInputControl)GetChild("BtnNext");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b9116bdcaaf42e4ea12741ceab85742
|
||||
98
Assets/Scripts/UI/Common/Menu/CommonSubMenu.cs
Normal file
@@ -0,0 +1,98 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class CommonSubMenu : GComponent
|
||||
{
|
||||
public event Action<int> OnTabChange;
|
||||
|
||||
private void OnInited()
|
||||
{
|
||||
List.onClickItem.Add(OnClickItem);
|
||||
BtnPrev.onClick.Add(OnClickBtnPrev);
|
||||
BtnNext.onClick.Add(OnClickBtnNext);
|
||||
|
||||
InputManager.OnUICanceled += OnUICanceled;
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
InputManager.OnUICanceled -= OnUICanceled;
|
||||
base.Dispose();
|
||||
}
|
||||
|
||||
private void OnUICanceled(string action)
|
||||
{
|
||||
if (action == InputDef.UI.SubPrev)
|
||||
{
|
||||
OnClickBtnPrev();
|
||||
}
|
||||
else if (action == InputDef.UI.SubNext)
|
||||
{
|
||||
OnClickBtnNext();
|
||||
}
|
||||
}
|
||||
|
||||
public void SetTabs(List<TabSubItemData> subItems, int selectIndex = 0)
|
||||
{
|
||||
List.RemoveChildrenToPool();
|
||||
var width = 0f;
|
||||
for (int i = 0; i < subItems.Count; i++)
|
||||
{
|
||||
var tabData = subItems[i];
|
||||
var tabItem = List.AddItemFromPool().asButton;
|
||||
tabItem.title = tabData.Name;
|
||||
width += tabItem.width;
|
||||
if (i > 0)
|
||||
{
|
||||
width += List.columnGap;
|
||||
}
|
||||
}
|
||||
|
||||
Log.Info($"Set tab index={List.selectedIndex}");
|
||||
List.selectedIndex = selectIndex;
|
||||
List.width = width;
|
||||
OnClickItem();
|
||||
}
|
||||
|
||||
|
||||
private void OnClickItem()
|
||||
{
|
||||
OnTabChange?.Invoke(List.selectedIndex);
|
||||
}
|
||||
|
||||
private void OnClickBtnPrev()
|
||||
{
|
||||
if (List.selectedIndex > 0)
|
||||
{
|
||||
List.selectedIndex -= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
List.selectedIndex = List.numItems - 1;
|
||||
}
|
||||
|
||||
OnClickItem();
|
||||
}
|
||||
|
||||
private void OnClickBtnNext()
|
||||
{
|
||||
if (List.selectedIndex < List.numItems - 1)
|
||||
{
|
||||
List.selectedIndex += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
List.selectedIndex = 0;
|
||||
}
|
||||
|
||||
OnClickItem();
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/Menu/CommonSubMenu.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 93621bc99ea075a4089f13224578d4ef
|
||||
30
Assets/Scripts/UI/Common/MessageBox.Designer.cs
generated
Normal file
@@ -0,0 +1,30 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
/// <summary> </summary>
|
||||
public partial class MessageBox
|
||||
{
|
||||
public GObject this[string aKey] => ContentPane.GetChild(aKey);
|
||||
[AutoFind(Name = "back")]
|
||||
public GImage back;
|
||||
[AutoFind(Name = "box")]
|
||||
public GImage box;
|
||||
[AutoFind(Name = "TextTitle")]
|
||||
public GTextField TextTitle;
|
||||
[AutoFind(Name = "TextContent")]
|
||||
public GTextField TextContent;
|
||||
[AutoFind(Name = "BtnConfirm")]
|
||||
public BtnTitleInputControl BtnConfirm;
|
||||
[AutoFind(Name = "BtnCancel")]
|
||||
public BtnTitleInputControl BtnCancel;
|
||||
public override string[] GetDependPackages(){ return new string[] {}; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/MessageBox.Designer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ce689c460bfe8245948899939807a59
|
||||
@@ -1,9 +1,33 @@
|
||||
namespace NBF
|
||||
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public class MessageBox
|
||||
public partial class MessageBox : UIPanel
|
||||
{
|
||||
public static void Show(string text)
|
||||
public override string UIPackName => "Common";
|
||||
public override string UIResName => "MessageBox";
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
base.OnInit();
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
base.OnShow();
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
base.OnHide();
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e4609ff88d94fa8ad77c3cb17641809
|
||||
timeCreated: 1742483434
|
||||
guid: 8e4609ff88d94fa8ad77c3cb17641809
|
||||
@@ -15,8 +15,9 @@ namespace NBF
|
||||
{
|
||||
base.OnShow();
|
||||
InputManager.OnInteractiveObjectAction += OnInteractiveObjectAction;
|
||||
InputManager.OnUseAction += OnUseAction;
|
||||
InputManager.OnUse2Action += OnUse2Action;
|
||||
InputManager.OnPlayerCanceled += OnPlayerCanceled;
|
||||
// InputManager.OnUseAction += OnUseAction;
|
||||
// InputManager.OnUse2Action += OnUse2Action;
|
||||
}
|
||||
|
||||
protected override void OnUpdate()
|
||||
@@ -38,28 +39,27 @@ namespace NBF
|
||||
}
|
||||
}
|
||||
|
||||
private void OnUseAction()
|
||||
private void OnPlayerCanceled(string action)
|
||||
{
|
||||
if (Interactive.visible)
|
||||
{
|
||||
Interactive.Use1();
|
||||
if (action == "Use1")
|
||||
{
|
||||
Interactive.Use1();
|
||||
}
|
||||
else if (action == "Use2")
|
||||
{
|
||||
Interactive.Use2();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnUse2Action()
|
||||
{
|
||||
if (Interactive.visible)
|
||||
{
|
||||
Interactive.Use2();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
base.OnHide();
|
||||
InputManager.OnInteractiveObjectAction -= OnInteractiveObjectAction;
|
||||
InputManager.OnUseAction -= OnUseAction;
|
||||
InputManager.OnUse2Action -= OnUse2Action;
|
||||
InputManager.OnUICanceled -= OnPlayerCanceled;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,10 +15,14 @@ namespace NBF
|
||||
public GImage back;
|
||||
[AutoFind(Name = "Menu")]
|
||||
public CommonMenu Menu;
|
||||
[AutoFind(Name = "divisionLine")]
|
||||
public GImage divisionLine;
|
||||
[AutoFind(Name = "SubMenu")]
|
||||
public CommonSubMenu SubMenu;
|
||||
[AutoFind(Name = "List")]
|
||||
public ClassifyList List;
|
||||
[AutoFind(Name = "Currencys")]
|
||||
public GComponent Currencys;
|
||||
[AutoFind(Name = "BottomMenu")]
|
||||
public BottomMenu BottomMenu;
|
||||
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ using UIPanel = NBC.UIPanel;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
public class ShopGearData
|
||||
{
|
||||
public string title;
|
||||
@@ -18,14 +17,13 @@ namespace NBF
|
||||
public override string UIPackName => "Shop";
|
||||
public override string UIResName => "FishingShopPanel";
|
||||
|
||||
|
||||
private List<TabListData> _tabList = new List<TabListData>();
|
||||
|
||||
private TabListData _currentTab;
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
base.OnInit();
|
||||
this.AutoAddClick(OnClick);
|
||||
Menu.OnClose += Hide;
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
@@ -35,7 +33,7 @@ namespace NBF
|
||||
}
|
||||
|
||||
Menu.OnTabChange += ChangeTab;
|
||||
|
||||
SubMenu.OnTabChange += ChangeSubTab;
|
||||
List.OnClickItem += OnClickItem;
|
||||
}
|
||||
|
||||
@@ -43,23 +41,35 @@ namespace NBF
|
||||
{
|
||||
base.OnShow();
|
||||
Menu.SetTabs(_tabList);
|
||||
UseBottomMenu();
|
||||
}
|
||||
|
||||
private void UseBottomMenu()
|
||||
{
|
||||
BottomMenu.OnBack += Hide;
|
||||
BottomMenu.Use();
|
||||
}
|
||||
|
||||
private void ChangeTab(int index)
|
||||
{
|
||||
Log.Info($"Change tab index={index}");
|
||||
var listData = _tabList[index];
|
||||
List.SetListData(listData.ListData);
|
||||
var tabListData = _tabList[index];
|
||||
_currentTab = tabListData;
|
||||
SubMenu.SetTabs(_currentTab.SubTab);
|
||||
}
|
||||
|
||||
private void ChangeSubTab(int index)
|
||||
{
|
||||
var subList = _currentTab.SubTab[index];
|
||||
List.SetListData(subList.Items);
|
||||
}
|
||||
|
||||
private void OnClickItem(object item)
|
||||
{
|
||||
if(item is not ShopGearItem shopGearItem) return;
|
||||
if (item is not ShopGearItem shopGearItem) return;
|
||||
Log.Info($"click item ={shopGearItem.GearData.title}");
|
||||
}
|
||||
|
||||
|
||||
private void OnClick(GComponent btn)
|
||||
{
|
||||
// if (btn == BtnClose)
|
||||
@@ -71,11 +81,14 @@ namespace NBF
|
||||
protected override void OnHide()
|
||||
{
|
||||
base.OnHide();
|
||||
BottomMenu.UnUse();
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
Menu.OnTabChange -= ChangeTab;
|
||||
SubMenu.OnTabChange -= ChangeSubTab;
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/Scripts/UI/Shops/ShopGearItem.Designer.cs
generated
@@ -11,15 +11,15 @@ namespace NBF
|
||||
{
|
||||
public const string URL = "ui://146ra2lqoome9";
|
||||
|
||||
public GGraph select;
|
||||
public GGraph over;
|
||||
public GImage back;
|
||||
public GImage ba;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
select = (GGraph)GetChild("select");
|
||||
over = (GGraph)GetChild("over");
|
||||
back = (GImage)GetChild("back");
|
||||
ba = (GImage)GetChild("ba");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="28,28" pivot="0.5,0.5" extention="Button">
|
||||
<component size="23,23" pivot="0.5,0.5" extention="Button">
|
||||
<displayList>
|
||||
<loader id="n10_fcfg" name="icon" xy="0,0" size="28,28" url="ui://6hgkvlaufcfgg1" fill="scale">
|
||||
<loader id="n10_fcfg" name="icon" xy="0,0" size="23,23" url="ui://6hgkvlaufcfgg1" fill="scale">
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</loader>
|
||||
</displayList>
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="30,30" pivot="0.5,0.5" extention="Button">
|
||||
<component size="50,50" pivot="0.5,0.5" extention="Button">
|
||||
<controller name="button" pages="2,up,3,down,6,over,7,selectedOver" selected="2"/>
|
||||
<displayList>
|
||||
<image id="n19_fcfg" name="n19" src="kryob" fileName="Images/Square.png" xy="0,0" size="30,30" alpha="0.3" color="#181c35">
|
||||
<image id="n19_fcfg" name="n19" src="kryob" fileName="Images/Square.png" xy="0,0" size="50,50" alpha="0.1" color="#8bf3ff">
|
||||
<gearLook controller="button" pages="6" values="0.1,0,0,0" default="0.2,0,0,0"/>
|
||||
<gearColor controller="button" pages="3,6" values="#8bf3ff|#8bf3ff" default="#5c748b"/>
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</image>
|
||||
<loader id="n20_fcfg" name="icon" xy="5,5" size="20,20" url="ui://6hgkvlaufcfgg1" fill="scale">
|
||||
<loader id="n20_fcfg" name="icon" xy="13,13" size="23,23" url="ui://6hgkvlaufcfgfz" align="center" vAlign="middle" fill="scale">
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</loader>
|
||||
</displayList>
|
||||
<Button downEffect="scale" downEffectValue=".95"/>
|
||||
<Button/>
|
||||
</component>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="32,32" pivot="0.5,0.5" extention="Button">
|
||||
<controller name="show" pages="0,,1," selected="0"/>
|
||||
<displayList>
|
||||
<loader id="n11_r03u" name="icon" xy="0,0" size="32,32" url="ui://6hgkvlau9mf1jr" align="center" vAlign="middle" autoSize="true" color="#8bf3ff"/>
|
||||
</displayList>
|
||||
<Button downEffect="scale" downEffectValue=".95"/>
|
||||
</component>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="85,32" pivot="0.5,0.5" extention="Button">
|
||||
<controller name="show" pages="0,,1," selected="0"/>
|
||||
<displayList>
|
||||
<loader id="n9_r03u" name="icon" xy="0,0" size="32,32" url="ui://6hgkvlau9mf1jv" align="center" vAlign="middle" autoSize="true" color="#8bf3ff"/>
|
||||
<text id="n10_r03u" name="title" xy="38,0" size="47,32" alpha="0.7" font="ui://6hgkvlaugkm7x" fontSize="22" color="#8bf3ff" text="继续"/>
|
||||
</displayList>
|
||||
<Button downEffect="scale" downEffectValue=".95"/>
|
||||
<relation target="n10_r03u" sidePair="rightext-right"/>
|
||||
</component>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="100,46" extention="Button">
|
||||
<controller name="button" pages="2,up,3,down" selected="0"/>
|
||||
<displayList>
|
||||
<text id="n3_fcfg" name="title" xy="22,0" size="55,36" fontSize="26" color="#7888a0" align="center" vAlign="middle" text="标题">
|
||||
<gearColor controller="button" pages="2,3" values="#7888a0,#000000|#ffffff,#000000"/>
|
||||
</text>
|
||||
<image id="n4_fcfg" name="n4" src="kryob" fileName="Images/Square.png" xy="33,44" size="33,2">
|
||||
<gearDisplay controller="button" pages="3"/>
|
||||
<relation target="" sidePair="center-center,bottom-bottom"/>
|
||||
</image>
|
||||
</displayList>
|
||||
<Button mode="Radio"/>
|
||||
<relation target="n3_fcfg" sidePair="width-width"/>
|
||||
</component>
|
||||
@@ -1,9 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="700,430">
|
||||
<component size="1846,806">
|
||||
<displayList>
|
||||
<list id="n5_oome" name="List" xy="0,0" size="700,430" layout="flow_hz" selectionMode="multiple" overflow="scroll" scrollBarFlags="4" margin="10,10,0,0" scrollBarRes="ui://6hgkvlauoomej," clipSoftness="10,10" lineGap="30" colGap="30" align="center" autoClearItems="true" foldInvisibleItems="true">
|
||||
<list id="n5_oome" name="List" xy="0,1" size="1846,806" layout="flow_hz" selectionMode="multiple" overflow="scroll" scrollBarFlags="4" scrollBarRes="ui://6hgkvlauoomej," clipSoftness="10,10" lineGap="20" colGap="20" autoClearItems="true" foldInvisibleItems="true">
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
<item url="ui://6hgkvlauoomea"/>
|
||||
<item url="ui://146ra2lqoome9"/>
|
||||
<item url="ui://146ra2lqoome9"/>
|
||||
<item url="ui://146ra2lqoome9"/>
|
||||
@@ -29,7 +28,6 @@
|
||||
<item url="ui://146ra2lqoome9"/>
|
||||
<item url="ui://146ra2lqoome9"/>
|
||||
<item url="ui://146ra2lqoome9"/>
|
||||
<item url="ui://6hgkvlauoomea"/>
|
||||
<item url="ui://146ra2lqoome9"/>
|
||||
<item url="ui://146ra2lqoome9"/>
|
||||
<item url="ui://146ra2lqoome9"/>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="22,22">
|
||||
<controller name="type" exported="true" pages="0,银币,1,金币" selected="1"/>
|
||||
<displayList>
|
||||
<image id="n15_fcfg" name="n15" src="fcfgge" fileName="Images/icon_store_4.png" xy="0,0" size="22,22" color="#f2d442">
|
||||
<gearColor controller="type" pages="0,1" values="#e2dddd|#f2d442"/>
|
||||
</image>
|
||||
</displayList>
|
||||
</component>
|
||||
@@ -1,8 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="79,30" extention="Label">
|
||||
<component size="97,32" extention="Label">
|
||||
<displayList>
|
||||
<image id="n13_fcfg" name="n13" src="kryob" fileName="Images/Square.png" xy="0,0" size="79,30" alpha="0.2" color="#000000"/>
|
||||
<component id="n15_fcfg" name="icon" src="fcfggf" fileName="Com/CurrencyIcon.xml" xy="4,4"/>
|
||||
<text id="n17_fcfg" name="title" xy="29,2" size="48,26" fontSize="16" color="#ffffff" autoSize="none" text="58.02"/>
|
||||
<image id="n18_r03u" name="n18" src="r03uj9" fileName="Icon/item/Coins.png" xy="65,0" size="32,32" color="#d8fbff">
|
||||
<relation target="" sidePair="middle-middle,right-right"/>
|
||||
</image>
|
||||
<text id="n17_fcfg" name="title" xy="0,0" pivot="1,0" size="63,32" fontSize="22" color="#8bf3ff" align="right" text="58.02">
|
||||
<relation target="n18_r03u" sidePair="middle-middle,right-right"/>
|
||||
</text>
|
||||
</displayList>
|
||||
</component>
|
||||
@@ -1,9 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="79,30" extention="Label">
|
||||
<controller name="c1" pages="0,银币,1,金币" selected="0"/>
|
||||
<component size="97,32" extention="Label">
|
||||
<displayList>
|
||||
<image id="n13_fcfg" name="n13" src="kryob" fileName="Images/Square.png" xy="0,0" size="79,30" alpha="0.2" color="#000000"/>
|
||||
<component id="n15_fcfg" name="icon" src="fcfggf" fileName="Com/CurrencyIcon.xml" xy="4,4" controller="type,1"/>
|
||||
<text id="n17_fcfg" name="title" xy="29,2" size="48,26" fontSize="16" color="#ffffff" autoSize="none" text="58.02"/>
|
||||
<image id="n18_r03u" name="n18" src="r03uj9" fileName="Icon/item/Coins.png" xy="65,0" size="32,32" color="#8bf3ff">
|
||||
<relation target="" sidePair="middle-middle,right-right"/>
|
||||
</image>
|
||||
<text id="n17_fcfg" name="title" xy="0,0" pivot="1,0" size="63,32" fontSize="22" color="#8bf3ff" align="right" text="58.02">
|
||||
<relation target="n18_r03u" sidePair="middle-middle,right-right"/>
|
||||
</text>
|
||||
</displayList>
|
||||
</component>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="638,47" extention="Button">
|
||||
<displayList>
|
||||
<image id="n9_oome" name="back" src="kryob" fileName="Images/Square.png" xy="3,45" size="635,2" alpha="0.3">
|
||||
<relation target="" sidePair="width-width"/>
|
||||
</image>
|
||||
<text id="n7_oome" name="title" xy="0,0" size="55,36" fontSize="26" color="#ffffff" text="标题"/>
|
||||
</displayList>
|
||||
<Button/>
|
||||
</component>
|
||||
19
FGUIProject/assets/Common/Com/Menu/BottomMenu.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="1920,40">
|
||||
<displayList>
|
||||
<list id="n33_9lmc" name="List" xy="980,0" size="891,40" layout="row" colGap="32" defaultItem="ui://6hgkvlaur03uj0" align="right" vAlign="middle" autoClearItems="true">
|
||||
<relation target="" sidePair="right-right,bottom-bottom"/>
|
||||
<item/>
|
||||
<item/>
|
||||
<item/>
|
||||
<item/>
|
||||
</list>
|
||||
<list id="n34_9mf1" name="LeftList" xy="52,0" size="713,40" layout="row" colGap="32" defaultItem="ui://6hgkvlaur03uj0" vAlign="middle" autoClearItems="true">
|
||||
<relation target="" sidePair="right-right,bottom-bottom"/>
|
||||
<item/>
|
||||
<item/>
|
||||
<item/>
|
||||
<item/>
|
||||
</list>
|
||||
</displayList>
|
||||
</component>
|
||||
26
FGUIProject/assets/Common/Com/Menu/BtnSubIconTab.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="110,50" extention="Button">
|
||||
<controller name="button" pages="2,up,3,down,4,over,5,selectedOver,6,disabled,7,selectedDisabled" selected="3"/>
|
||||
<displayList>
|
||||
<image id="n22_r03u" name="n22" src="r03ui6" fileName="Images/Panels/BasicPanel.png" xy="0,0" size="110,50" alpha="0.55" color="#5c748b">
|
||||
<gearLook controller="button" pages="2,4" values="0.2,0,0,0|0.2,0,0,0" default="0.55,0,0,0"/>
|
||||
<gearColor controller="button" pages="2,3,4,5,6,7" values="#5c748b|#5c748b|#8bf3ff|#5c748b|#666666|#666666"/>
|
||||
<relation target="" sidePair="width-width"/>
|
||||
</image>
|
||||
<image id="n24_r03u" name="n24" src="r03ui7" fileName="Images/Panels/BasicStroke.png" xy="0,0" size="110,50" color="#8bf3ff">
|
||||
<gearDisplay controller="button" pages="3,5"/>
|
||||
<relation target="" sidePair="width-width"/>
|
||||
</image>
|
||||
<text id="n23_r03u" name="title" xy="49,10" pivot="0.5,0.5" size="45,29" font="ui://6hgkvlaugkm7w" fontSize="20" color="#8bf3ff" align="center" vAlign="middle" letterSpacing="2" text="标题">
|
||||
<gearLook controller="button" default="1,0,0,0"/>
|
||||
<gearColor controller="button" pages="3,5,6" values="#8bf3ff,#000000|#8bf3ff,#000000|#cccccc,#000000" default="#d8fbff,#000000"/>
|
||||
<relation target="" sidePair="center-center"/>
|
||||
</text>
|
||||
<loader id="n25_9mf1" name="icon" xy="16,10" size="30,30" url="ui://6hgkvlau9mf1je" align="center" vAlign="middle" fill="scale" color="#8bf3ff">
|
||||
<gearLook controller="button" default="1,0,0,1"/>
|
||||
<gearColor controller="button" pages="3,5,6" values="#8bf3ff|#8bf3ff|#cccccc" default="#d8fbff"/>
|
||||
</loader>
|
||||
</displayList>
|
||||
<Button mode="Radio"/>
|
||||
<relation target="n23_r03u" sidePair="width-width"/>
|
||||
</component>
|
||||
22
FGUIProject/assets/Common/Com/Menu/BtnSubTab.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="84,50" extention="Button">
|
||||
<controller name="button" pages="2,up,3,down,4,over,5,selectedOver,6,disabled,7,selectedDisabled" selected="3"/>
|
||||
<displayList>
|
||||
<image id="n22_r03u" name="n22" src="r03ui6" fileName="Images/Panels/BasicPanel.png" xy="0,0" size="84,50" alpha="0.55" color="#5c748b">
|
||||
<gearLook controller="button" pages="2,4" values="0.2,0,0,0|0.2,0,0,0" default="0.55,0,0,0"/>
|
||||
<gearColor controller="button" pages="2,3,4,5,6,7" values="#5c748b|#5c748b|#8bf3ff|#5c748b|#666666|#666666"/>
|
||||
<relation target="" sidePair="width-width"/>
|
||||
</image>
|
||||
<image id="n24_r03u" name="n24" src="r03ui7" fileName="Images/Panels/BasicStroke.png" xy="0,0" size="84,50" color="#8bf3ff">
|
||||
<gearDisplay controller="button" pages="3,5"/>
|
||||
<relation target="" sidePair="width-width"/>
|
||||
</image>
|
||||
<text id="n23_r03u" name="title" xy="19,10" pivot="0.5,0.5" size="45,29" font="ui://6hgkvlaugkm7w" fontSize="20" color="#8bf3ff" align="center" vAlign="middle" letterSpacing="2" text="标题">
|
||||
<gearLook controller="button" default="1,0,0,0"/>
|
||||
<gearColor controller="button" pages="3,5" values="#8bf3ff,#000000|#8bf3ff,#000000" default="#d8fbff,#000000"/>
|
||||
<relation target="" sidePair="center-center"/>
|
||||
</text>
|
||||
</displayList>
|
||||
<Button mode="Radio"/>
|
||||
<relation target="n23_r03u" sidePair="width-width"/>
|
||||
</component>
|
||||
16
FGUIProject/assets/Common/Com/Menu/ButtonTab.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="79,54" extention="Button">
|
||||
<controller name="button" pages="2,up,3,down" selected="1"/>
|
||||
<displayList>
|
||||
<text id="n3_fcfg" name="title" xy="15,0" size="49,32" fontSize="22" color="#8bf3ff" align="center" vAlign="middle" letterSpacing="2" text="标题">
|
||||
<gearColor controller="button" pages="2,3" values="#d8fbff,#000000|#8bf3ff,#000000"/>
|
||||
<relation target="" sidePair="center-center"/>
|
||||
</text>
|
||||
<image id="n4_fcfg" name="n4" src="kryob" fileName="Images/Square.png" xy="27,52" size="22,2" color="#8bf3ff">
|
||||
<gearDisplay controller="button" pages="3,5"/>
|
||||
<relation target="" sidePair="center-center,bottom-bottom"/>
|
||||
</image>
|
||||
</displayList>
|
||||
<Button mode="Radio"/>
|
||||
<relation target="n3_fcfg" sidePair="width-width"/>
|
||||
</component>
|
||||
29
FGUIProject/assets/Common/Com/Menu/CommonMenu.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="1920,95" extention="Label" designImage="ui://6hgkvlaufcfgh0" designImageAlpha="0">
|
||||
<displayList>
|
||||
<image id="n13_r03u" name="n13" src="r03uij" fileName="Images/Misc/TopGlow.png" xy="222,0" size="1476,93" visible="false" alpha="0.2">
|
||||
<relation target="" sidePair="center-center,top-top"/>
|
||||
</image>
|
||||
<list id="n2_fcfg" name="List" xy="103,41" size="647,54" layout="row" scroll="horizontal" colGap="12" defaultItem="ui://6hgkvlaufcfggs" vAlign="bottom" autoClearItems="true">
|
||||
<relation target="" sidePair="left-left,bottom-bottom"/>
|
||||
<item title="标题三"/>
|
||||
<item/>
|
||||
<item title="标题标题标题"/>
|
||||
<item/>
|
||||
<item/>
|
||||
<item/>
|
||||
</list>
|
||||
<component id="n10_r03u" name="BtnUserHead" src="fcfgfu" fileName="Com/UserTopHead.xml" xy="1830,12" scale="0.7,0.7">
|
||||
<relation target="" sidePair="right-right,top-top"/>
|
||||
</component>
|
||||
<component id="n11_r03u" name="BtnPrev" src="r03ut" fileName="Com/Buttons/BtnInputControl.xml" xy="58,42">
|
||||
<relation target="n2_fcfg" sidePair="left-left,top-top"/>
|
||||
</component>
|
||||
<component id="n12_r03u" name="BtnNext" src="r03ut" fileName="Com/Buttons/BtnInputControl.xml" xy="767,42">
|
||||
<relation target="n2_fcfg" sidePair="right-right,top-top"/>
|
||||
</component>
|
||||
<image id="n14_r03u" name="n14" src="kryob" fileName="Images/Square.png" xy="0,93" pivot="0,1" size="1920,2" alpha="0.5" color="#5c748b">
|
||||
<relation target="" sidePair="width-width,bottom-bottom"/>
|
||||
</image>
|
||||
</displayList>
|
||||
</component>
|
||||
19
FGUIProject/assets/Common/Com/Menu/CommonSubMenu.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="1920,80">
|
||||
<displayList>
|
||||
<list id="n25_r03u" name="List" xy="68,13" size="530,53" layout="row" scroll="horizontal" colGap="14" defaultItem="ui://6hgkvlaur03ur">
|
||||
<item/>
|
||||
<item/>
|
||||
<item url="ui://6hgkvlau9mf1y"/>
|
||||
<item url="ui://6hgkvlau9mf1y"/>
|
||||
<item/>
|
||||
</list>
|
||||
<image id="n26_r03u" name="n26" src="kryob" fileName="Images/Square.png" xy="0,78" pivot="0,1" size="1920,2" alpha="0.5" color="#5c748b">
|
||||
<relation target="" sidePair="width-width,bottom-bottom"/>
|
||||
</image>
|
||||
<component id="n27_r03u" name="BtnPrev" src="r03ut" fileName="Com/Buttons/BtnInputControl.xml" xy="9,24"/>
|
||||
<component id="n28_r03u" name="BtnNext" src="r03ut" fileName="Com/Buttons/BtnInputControl.xml" xy="627,24">
|
||||
<relation target="n25_r03u" sidePair="middle-middle,right-right"/>
|
||||
</component>
|
||||
</displayList>
|
||||
</component>
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="6,200" extention="ScrollBar">
|
||||
<displayList>
|
||||
<graph id="n0_oome" name="n0" xy="0,0" size="6,200" alpha="0.1" touchable="false" type="rect" lineSize="0" fillColor="#fff0f0f0">
|
||||
<graph id="n0_oome" name="n0" xy="0,0" size="6,200" alpha="0.1" touchable="false" type="rect" lineSize="0" fillColor="#ff5c748b">
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</graph>
|
||||
<graph id="n1_oome" name="bar" xy="0,0" size="17,200" alpha="0.1">
|
||||
<relation target="" sidePair="height-height"/>
|
||||
</graph>
|
||||
<component id="n2_oome" name="grip" src="oomei" fileName="VerticalroScrollBar_grip.xml" xy="0,20"/>
|
||||
<component id="n2_oome" name="grip" src="oomei" fileName="Com/ScrollBar/VerticalroScrollBar_grip.xml" xy="0,20"/>
|
||||
</displayList>
|
||||
<ScrollBar/>
|
||||
</component>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="6,20" extention="Button">
|
||||
<displayList>
|
||||
<graph id="n0_oome" name="n0" xy="0,0" size="6,20" alpha="0.8" touchable="false" type="rect" lineSize="0" fillColor="#ffd0d1d7">
|
||||
<graph id="n0_oome" name="n0" xy="0,0" size="6,20" alpha="0.8" touchable="false" type="rect" lineSize="0">
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</graph>
|
||||
</displayList>
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="199,31">
|
||||
<component size="285,50">
|
||||
<displayList>
|
||||
<component id="n13_fcfg" name="n13" src="fcfggh" fileName="Com/CurrencyTag1.xml" xy="0,1"/>
|
||||
<component id="n18_fcfg" name="n18" src="fcfggi" fileName="Com/CurrencyTag2.xml" xy="86,0"/>
|
||||
<component id="n19_fcfg" name="BtnBuy" src="fcfggj" fileName="Com/Buttons/BtnIcon2.xml" xy="169,0">
|
||||
<component id="n13_fcfg" name="n13" src="r03ujb" fileName="Com/Items/CurrencyTag1.xml" xy="12,11">
|
||||
<relation target="" sidePair="middle-middle,right-right"/>
|
||||
</component>
|
||||
<component id="n18_fcfg" name="n18" src="r03uja" fileName="Com/Items/CurrencyTag2.xml" xy="128,11">
|
||||
<relation target="" sidePair="middle-middle,right-right"/>
|
||||
</component>
|
||||
<component id="n19_fcfg" name="BtnBuy" src="fcfggj" fileName="Com/Buttons/BtnIcon2.xml" xy="235,0">
|
||||
<relation target="" sidePair="middle-middle,right-right"/>
|
||||
<Button icon="ui://6hgkvlaufcfgfz"/>
|
||||
</component>
|
||||
</displayList>
|
||||
|
||||
26
FGUIProject/assets/Common/Com/Tags/NoticeItem.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="330,76">
|
||||
<controller name="style" exported="true" pages="0,tips,1,success,2,error,3,warning" selected="0">
|
||||
<remark page="0" value="提示"/>
|
||||
<remark page="1" value="成功"/>
|
||||
<remark page="2" value="错误"/>
|
||||
<remark page="3" value="警告"/>
|
||||
</controller>
|
||||
<displayList>
|
||||
<image id="n0_r03u" name="back" src="kryob" fileName="Images/Square.png" xy="0,0" size="330,76" alpha="0.8" color="#08101b">
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</image>
|
||||
<image id="n1_r03u" name="box" src="r03uif" fileName="Images/Panels/RarityBg.png" xy="0,0" size="330,76" color="#05cfa4">
|
||||
<gearLook controller="style" default="1,0,0,0"/>
|
||||
<gearColor controller="style" pages="0,2,3" values="#05cfa4|#fd6b6d|#faad14" default="#52c41a"/>
|
||||
<relation target="" sidePair="width-width,height-height,left-left"/>
|
||||
</image>
|
||||
<text id="n2_r03u" name="TextTitle" xy="45,10" pivot="0.5,0.5" size="43,29" font="ui://6hgkvlaugkm7v" fontSize="20" color="#8bf3ff" text="成功"/>
|
||||
<text id="n3_r03u" name="TextContent" xy="44,39" size="270,24" font="ui://6hgkvlaugkm7w" fontSize="16" color="#d8fbff" vAlign="middle" autoSize="height" text="这个操作将不能恢复"/>
|
||||
<loader id="n4_r03u" name="icon" xy="14,16" size="22,22" url="ui://6hgkvlaur03uj6" fill="scale">
|
||||
<gearIcon controller="style" pages="0,2,3" values="ui://6hgkvlaur03uj6|ui://6hgkvlaur03uj4|ui://6hgkvlaur03uj5" default="ui://6hgkvlaur03uj3"/>
|
||||
</loader>
|
||||
<component id="n5_r03u" name="BtnClose" src="fcfggb" fileName="Com/Buttons/BtnClose.xml" xy="292,12" scale="0.5,0.5"/>
|
||||
</displayList>
|
||||
<relation target="n3_r03u" sidePair="bottomext-bottom"/>
|
||||
</component>
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="1920,140" extention="Label" designImage="ui://6hgkvlaufcfgh0" designImageAlpha="0">
|
||||
<displayList>
|
||||
<image id="n1_fcfg" name="LongLine" src="kryob" fileName="Images/Square.png" xy="0,137" size="1920,2" alpha="0.3"/>
|
||||
<list id="n2_fcfg" name="List" xy="220,93" pivot="0.5,0.5" size="1479,46" layout="row" scroll="horizontal" defaultItem="ui://6hgkvlaufcfggs" align="center" vAlign="bottom" autoClearItems="true">
|
||||
<relation target="" sidePair="center-center,bottom-bottom"/>
|
||||
<item title="标题三"/>
|
||||
<item/>
|
||||
<item title="标题标题标题"/>
|
||||
<item/>
|
||||
<item/>
|
||||
<item/>
|
||||
</list>
|
||||
<text id="n4_fcfg" name="title" xy="916,19" pivot="0.5,0.5" size="87,56" font="ui://6hgkvlaugkm7v" fontSize="42" color="#ffffff" align="center" vAlign="middle" strokeColor="#000000" text="标题">
|
||||
<relation target="" sidePair="center-center,middle-middle"/>
|
||||
</text>
|
||||
<component id="n5_fcfg" name="Head" src="fcfgfu" fileName="Com/UserTopHead.xml" xy="41,21">
|
||||
<relation target="" sidePair="left-left,top-top"/>
|
||||
</component>
|
||||
<text id="n6_fcfg" name="TextName" xy="158,62" size="135,39" fontSize="28" color="#7888a0" text="Bob.Song">
|
||||
<relation target="" sidePair="left-left,top-top"/>
|
||||
</text>
|
||||
<component id="n8_fcfg" name="Currency" src="fcfggq" fileName="Com/CurrencyGroup.xml" xy="1653,33">
|
||||
<relation target="" sidePair="middle-middle,right-right"/>
|
||||
</component>
|
||||
<component id="n9_fcfg" name="BtnClose" src="fcfggb" fileName="Com/Buttons/BtnClose.xml" xy="1867,33">
|
||||
<relation target="" sidePair="middle-middle,right-right"/>
|
||||
</component>
|
||||
</displayList>
|
||||
</component>
|
||||
BIN
FGUIProject/assets/Common/Icon/item/Coins.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
FGUIProject/assets/Common/Icon/item/Globe.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
FGUIProject/assets/Common/Icon/item/Granade.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
FGUIProject/assets/Common/Icon/item/Gun.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
FGUIProject/assets/Common/Icon/item/Item01.png
Normal file
|
After Width: | Height: | Size: 165 KiB |
BIN
FGUIProject/assets/Common/Icon/item/Item02.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
FGUIProject/assets/Common/Icon/notice/成功.png
Normal file
|
After Width: | Height: | Size: 718 B |
BIN
FGUIProject/assets/Common/Icon/notice/提示.png
Normal file
|
After Width: | Height: | Size: 721 B |
BIN
FGUIProject/assets/Common/Icon/notice/警示.png
Normal file
|
After Width: | Height: | Size: 609 B |
BIN
FGUIProject/assets/Common/Icon/notice/错误.png
Normal file
|
After Width: | Height: | Size: 684 B |
BIN
FGUIProject/assets/Common/Icon/控制图标/ControllerArrowDown.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
FGUIProject/assets/Common/Icon/控制图标/ControllerArrowLeft.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
FGUIProject/assets/Common/Icon/控制图标/ControllerArrowRight.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
FGUIProject/assets/Common/Icon/控制图标/ControllerArrowUp.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 3.6 KiB |
BIN
FGUIProject/assets/Common/Icon/控制图标/icon_controller_123.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
FGUIProject/assets/Common/Icon/控制图标/icon_controller_124.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
FGUIProject/assets/Common/Icon/控制图标/icon_controller_125.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
FGUIProject/assets/Common/Icon/控制图标/icon_controller_127.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
FGUIProject/assets/Common/Icon/控制图标/icon_controller_129.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
FGUIProject/assets/Common/Icon/控制图标/icon_controller_130.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
FGUIProject/assets/Common/Icon/控制图标/icon_controller_19.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 3.6 KiB |
BIN
FGUIProject/assets/Common/Icon/控制图标/icon_controller_20.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 3.4 KiB |