Kaynağa Gözat

选中丹药添加一个选择框

lzx 3 hafta önce
ebeveyn
işleme
60e247a0c2

+ 16 - 2
Assets/Art/UIAssets/decorate/dec_duihua_05.png.meta

@@ -52,7 +52,7 @@ TextureImporter:
   alignment: 0
   spritePivot: {x: 0.5, y: 0.5}
   spritePixelsToUnits: 100
-  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteBorder: {x: 45, y: 30, z: 46, w: 30}
   spriteGenerateFallbackPhysicsShape: 1
   alphaUsage: 1
   alphaIsTransparency: 1
@@ -168,6 +168,20 @@ TextureImporter:
     ignorePlatformSupport: 0
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: WeixinMiniGame
+    maxTextureSize: 2048
+    maxPlaceholderSize: 32
+    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: []
@@ -175,7 +189,7 @@ TextureImporter:
     physicsShape: []
     bones: []
     spriteID: 5e97eb03825dee720800000000000000
-    internalID: 0
+    internalID: 1537655665
     vertices: []
     indices: 
     edges: []

+ 10 - 10
Assets/Res/UI/HeroInformainPanel/ElixirItemWidget.prefab

@@ -26,7 +26,7 @@ RectTransform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 3347246602672913365}
-  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
@@ -35,7 +35,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 1}
   m_AnchorMax: {x: 0.5, y: 1}
-  m_AnchoredPosition: {x: -0.0000047684, y: -88.4}
+  m_AnchoredPosition: {x: -0, y: -95.66685}
   m_SizeDelta: {x: 96.5152, y: 21.1661}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &3905750986573029075
@@ -106,7 +106,7 @@ RectTransform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 4112643019947403192}
-  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
@@ -115,7 +115,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 1}
   m_AnchorMax: {x: 0.5, y: 1}
-  m_AnchoredPosition: {x: -0.0000047684, y: -68}
+  m_AnchoredPosition: {x: -0, y: -75.266846}
   m_SizeDelta: {x: 96.5152, y: 21.1661}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &1777460896920078153
@@ -195,7 +195,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 1}
   m_AnchorMax: {x: 0.5, y: 1}
-  m_AnchoredPosition: {x: -1.7, y: -27.9}
+  m_AnchoredPosition: {x: -1.7, y: -35.166847}
   m_SizeDelta: {x: 58.8736, y: 58.874}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &2951448184634106011
@@ -279,7 +279,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: -0.6708, y: 10.9056}
+  m_AnchoredPosition: {x: -0.6708, y: 6.6}
   m_SizeDelta: {x: 108.7948, y: 112.2233}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &1056657389458859072
@@ -354,7 +354,7 @@ RectTransform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 7207111898009413214}
-  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
@@ -363,7 +363,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 1}
   m_AnchorMax: {x: 0.5, y: 1}
-  m_AnchoredPosition: {x: -0.0000047684, y: -111.4}
+  m_AnchoredPosition: {x: -0, y: -118.66685}
   m_SizeDelta: {x: 96.5152, y: 21.1661}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &5306016382557740786
@@ -448,8 +448,8 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 100, y: 123.1889}
+  m_AnchoredPosition: {x: 5.65329, y: 2.9611816}
+  m_SizeDelta: {x: 111.3066, y: 129.1114}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &4734795346950593431
 CanvasRenderer:

+ 90 - 0
Assets/Res/UI/HeroInformainPanel/SelectElixirPanel.prefab

@@ -188,6 +188,90 @@ MonoBehaviour:
   m_OnValueChanged:
     m_PersistentCalls:
       m_Calls: []
+--- !u!1 &1533423449779780183
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 7
+  m_Component:
+  - component: {fileID: 8003648020153173292}
+  - component: {fileID: 4005131581280527188}
+  - component: {fileID: 2686141389901042108}
+  m_Layer: 5
+  m_HasEditorInfo: 1
+  m_Name: Icon_Select
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!224 &8003648020153173292
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1533423449779780183}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 1528319131332351769}
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0.5, y: 0.5}
+  m_AnchorMax: {x: 0.5, y: 0.5}
+  m_AnchoredPosition: {x: -223.8963, y: -11.0403805}
+  m_SizeDelta: {x: 109.18, y: 111.577}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &4005131581280527188
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1533423449779780183}
+  m_CullTransparentMesh: 1
+--- !u!114 &2686141389901042108
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1533423449779780183}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 3c247620ca3a1fd4ab2a2f3a5b287e07, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 0.8950032, b: 0, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_Sprite: {fileID: 0}
+  m_Type: 1
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
+  m_UseSpriteMesh: 0
+  m_PixelsPerUnitMultiplier: 1
+  _icon_name: dec_duihua_05
+  isNotLoadDeftIcon: 0
+  CurrSpriteAtlas: {fileID: 100100200, guid: af8b6f708ee6b254b9e6976ea8852a55, type: 3}
+  packInfo:
+    packName: event
+    packgJsonPath: /Art/UIAssets/TextrueJson\event.txt
+    packgSpritePath: Assets/Res/UIAtlas/event.spriteatlasv2
+    lasetJsonGUID: df80f818a4f258d33b8038600af6f215
 --- !u!1 &2045547269994920904
 GameObject:
   m_ObjectHideFlags: 0
@@ -710,6 +794,7 @@ RectTransform:
   - {fileID: 725548104741330431}
   - {fileID: 5378836280953730899}
   - {fileID: 7313993460370242381}
+  - {fileID: 8003648020153173292}
   m_Father: {fileID: 5318323102501209997}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
@@ -1146,6 +1231,11 @@ MonoBehaviour:
     isAssetBundle: 0
     isList: 0
     ListCollectorDatas: []
+  - key: Icon_Select
+    gameObject: {fileID: 1533423449779780183}
+    isAssetBundle: 0
+    isList: 0
+    ListCollectorDatas: []
   isAssetBundle: 1
 --- !u!1 &7472297620610942561
 GameObject:

+ 21 - 0
Assets/Scripts/GameUI/UI/HeroInformationPanel/SelectElixirPanel.cs

@@ -6,6 +6,7 @@ using Fort23.Core;
 using Fort23.UTool;
 using GameLogic.Bag;
 using log4net.Util;
+using UnityEngine;
 using Transform = UnityEngine.Transform;
 
 namespace Fort23.Mono
@@ -91,6 +92,7 @@ namespace Fort23.Mono
                 elixirItems.Add(elixirItemWidget);
             }
 
+            SelectWidget(elixirItemWidget);
             RefenceBl();
         }
 
@@ -101,15 +103,33 @@ namespace Fort23.Mono
             if (elixirItemWidget == this.elixirItemWidget)
             {
                 this.elixirItemWidget = null;
+                SelectWidget(null);
             }
             else
             {
                 this.elixirItemWidget = elixirItemWidget;
+                SelectWidget(elixirItemWidget);
             }
 
             RefenceBl();
         }
 
+        private void SelectWidget(ElixirItemWidget elixirItemWidget)
+        {
+            if (elixirItemWidget == null)
+            {
+                Icon_Select.transform.SetParent(transform);
+
+                Icon_Select.SetActive(false);
+            }
+            else
+            {
+                Icon_Select.transform.SetParent(elixirItemWidget.transform);
+                Icon_Select.GetComponent<RectTransform>().anchoredPosition = new Vector2(-0.48f,6.1f);
+                Icon_Select.SetActive(true);
+            }
+        }
+
 
         private void RefenceBl()
         {
@@ -134,6 +154,7 @@ namespace Fort23.Mono
             breakthrough.transform.SetParent(weidgetFater);
             breakthrough = null;
             weidgetFater = null;
+            SelectWidget(null);
             base.Close();
         }
 

+ 11 - 0
Assets/Scripts/GameUI/UI/HeroInformationPanel/SelectElixirPanelData.cs

@@ -74,6 +74,17 @@ namespace Fort23.Mono
 	      return _Btn_Close;
 	     }
 	   }
+	  private GameObject _Icon_Select;
+	  public GameObject Icon_Select
+	   {
+	   get{
+	      if (_Icon_Select == null)
+	       {
+	         _Icon_Select  = GetUIUnit<GameObject>("Icon_Select"); 
+	       }
+	      return _Icon_Select;
+	     }
+	   }
 	  #endregion 自定义数据结束 
 	 public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
 	{