Browse Source

add return button and add return history for see the histroy change

Jidongchen 3 years ago
parent
commit
4769b24721

+ 36 - 14
Assets/GameMain/Scripts/UI/UICustom.cs

@@ -54,6 +54,11 @@ namespace MetaClient
         [Header("滑块")]
         public Scrollbar scrollbar;
 
+
+        [Header("颜色选择界面")]
+        public GameObject colorView;
+
+
        // [Header("顺序")]
         private EButtonShunXu eButtonShunXu = EButtonShunXu.None;
         
@@ -82,7 +87,7 @@ namespace MetaClient
         [SerializeField]
         private List<string> histroy;
 
-        //用来判断是否是例如颜色框 滑块 调色板等额外的弹窗;
+        //用来判断是否是例如颜色框  调色板等额外的弹窗;
         private bool histroyextra;
 
         private int part = 0;
@@ -178,12 +183,13 @@ namespace MetaClient
                 case 2:
                     Debug.Log("进入选择界面");
                     histroy.RemoveAt(histroy.Count - 1);
-                    Back_TwoFun();
+                    Back_TwoFun(true);
                     break;
                 default:
                     Debug.Log("进入自定义或颜色");
-                    histroy.RemoveAt(histroy.Count - 1);
+                   // histroy.RemoveAt(histroy.Count - 1);
                     Back_ThreeFun();
+                    histroy.RemoveAt(histroy.Count - 1);
                     break;
 
             }
@@ -222,21 +228,22 @@ namespace MetaClient
             _obj.transform.GetChild(0).gameObject.SetActive(_bo);
             _obj.transform.GetChild(2).gameObject.SetActive(!_bo);
         }
-        void Back_TwoFun()
+        void Back_TwoFun(bool _bo)
         {
-            int _choose = int.Parse(histroy[1]);
-            switch ((ECustomStyple)_choose)
+           // int _choose = int.Parse(histroy[1]);
+           // switch ((ECustomStyple)_choose)
+           switch(eCustomStyple)
             {
                 case ECustomStyple.Body:
-                    BackView_Extra(bodyView, true);
+                    BackView_Extra(bodyView,_bo);
                     break;
                 case ECustomStyple.Cloth:
-                    BackView_Extra(clothView, true);
+                    BackView_Extra(clothView, _bo);
                     break;
                 case ECustomStyple.None:
                     break;
                 case ECustomStyple.NieLian:
-                    BackView_Extra(nieLianView, true);
+                    BackView_Extra(nieLianView, _bo);
                     break;
             }
             //toolView.SetActive(true);
@@ -246,10 +253,25 @@ namespace MetaClient
         }
         void Back_ThreeFun()
         {
-            toolView.SetActive(true);
-            bodyView.SetActive(false);
-            nieLianView.SetActive(false);
-            clothView.SetActive(false);
+            string[] _strArrary = histroy[histroy.Count - 1].Split(',');
+            if (_strArrary[0] == "Color")
+            {
+                colorView.SetActive(false);
+                rightView.SetActive(true);
+            }
+            else if (_strArrary[0] == "ziDingyi")
+            {
+                int _chooseId = int.Parse(_strArrary[1]);
+                ClickBtnFun(eCustomStyple, _chooseId, false);
+            }
+            else
+            {
+                Debug.Log("缺少当前情况需要添加>>>>");
+            }
+            //toolView.SetActive(true);
+            //bodyView.SetActive(false);
+            //nieLianView.SetActive(false);
+            //clothView.SetActive(false);
         }
 
         /// <summary>
@@ -278,7 +300,7 @@ namespace MetaClient
             //    return;
             //}
             whitebg.SetActive(true);
-
+            scrollbar.gameObject.SetActive(false);
             this.eCustomStyple = eCustomStyple;
 
          

+ 2 - 1
Assets/GameMain/Scripts/UI/UICustomBtn.cs

@@ -82,11 +82,12 @@ namespace MetaClient
             }
             else
             {
+                uICustom.HistoryAdd("ziDingyi" + "," + id + "");
                  //object[] _objects = new object[]{ eCustomStyple, id };
                 // uICustom.ClickBotton(_objects);
                 uICustom.ClickBotton(eCustomStyple, id,isZDYPart);
                 int _numIsZDYPart = isZDYPart ? 1 : 0;
-                uICustom.HistoryAdd(eCustomStyple + "," + isZDYPart + "");
+                //uICustom.HistoryAdd(eCustomStyple + "," + isZDYPart + "");
             }
         }
         // Update is called once per frame

+ 32 - 31
Assets/GameMain/UI/UIForms/CustomRole.prefab

@@ -62,6 +62,7 @@ MonoBehaviour:
   whitebg: {fileID: 8602108025138452691}
   buttonItem: {fileID: 1663957051}
   scrollbar: {fileID: 6113850133271156823}
+  colorView: {fileID: 0}
   colItem: {fileID: 1941601955}
   tween_leftMax: 0
   tween_leftMin: -250
@@ -159,7 +160,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &24594466
 RectTransform:
   m_ObjectHideFlags: 0
@@ -254,10 +255,10 @@ RectTransform:
   m_Father: {fileID: 1854935388}
   m_RootOrder: 4
   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: 0, y: 0}
+  m_AnchorMin: {x: 0, y: 1}
+  m_AnchorMax: {x: 0, y: 1}
+  m_AnchoredPosition: {x: 77.06, y: -774.1}
+  m_SizeDelta: {x: 100, y: 145}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &35753081
 CanvasRenderer:
@@ -1014,10 +1015,10 @@ RectTransform:
   m_Father: {fileID: 1854935388}
   m_RootOrder: 0
   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: 0, y: 0}
+  m_AnchorMin: {x: 0, y: 1}
+  m_AnchorMax: {x: 0, y: 1}
+  m_AnchoredPosition: {x: 77.06, y: -72.5}
+  m_SizeDelta: {x: 100, y: 145}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &395517480
 CanvasRenderer:
@@ -1693,10 +1694,10 @@ RectTransform:
   m_Father: {fileID: 1854935388}
   m_RootOrder: 2
   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: 0, y: 0}
+  m_AnchorMin: {x: 0, y: 1}
+  m_AnchorMax: {x: 0, y: 1}
+  m_AnchoredPosition: {x: 77.06, y: -423.3}
+  m_SizeDelta: {x: 100, y: 145}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &726504655
 CanvasRenderer:
@@ -1725,7 +1726,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_Sprite: {fileID: 21300000, guid: 0bb00879f70ec2d4aacc7a060e55b649, type: 3}
+  m_Sprite: {fileID: 21300000, guid: fd6ba078b127dda4f8e71588e165a6c3, type: 3}
   m_Type: 0
   m_PreserveAspect: 0
   m_FillCenter: 1
@@ -2761,10 +2762,10 @@ RectTransform:
   m_Father: {fileID: 1854935388}
   m_RootOrder: 3
   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: 0, y: 0}
+  m_AnchorMin: {x: 0, y: 1}
+  m_AnchorMax: {x: 0, y: 1}
+  m_AnchoredPosition: {x: 77.06, y: -598.7}
+  m_SizeDelta: {x: 100, y: 145}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &961865426
 CanvasRenderer:
@@ -4903,10 +4904,10 @@ RectTransform:
   m_Father: {fileID: 1854935388}
   m_RootOrder: 5
   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: 0, y: 0}
+  m_AnchorMin: {x: 0, y: 1}
+  m_AnchorMax: {x: 0, y: 1}
+  m_AnchoredPosition: {x: 77.06, y: -949.5}
+  m_SizeDelta: {x: 100, y: 145}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &1892633047
 CanvasRenderer:
@@ -5329,10 +5330,10 @@ RectTransform:
   m_Father: {fileID: 1854935388}
   m_RootOrder: 1
   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: 0, y: 0}
+  m_AnchorMin: {x: 0, y: 1}
+  m_AnchorMax: {x: 0, y: 1}
+  m_AnchoredPosition: {x: 77.06, y: -247.9}
+  m_SizeDelta: {x: 100, y: 145}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &2061839041
 CanvasRenderer:
@@ -5467,10 +5468,10 @@ RectTransform:
   m_Father: {fileID: 1854935388}
   m_RootOrder: 6
   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: 0, y: 0}
+  m_AnchorMin: {x: 0, y: 1}
+  m_AnchorMax: {x: 0, y: 1}
+  m_AnchoredPosition: {x: 77.06, y: -1124.9}
+  m_SizeDelta: {x: 100, y: 145}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &2097224964
 CanvasRenderer:
@@ -8077,7 +8078,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 0
+  m_IsActive: 1
 --- !u!224 &1008530018602769499
 RectTransform:
   m_ObjectHideFlags: 0

BIN
Assets/GameMain/UI/UISprites/CustomRole/xiongbu_.png


+ 0 - 128
Assets/GameMain/UI/UISprites/CustomRole/xiongbu_.png.meta

@@ -1,128 +0,0 @@
-fileFormatVersion: 2
-guid: 0bb00879f70ec2d4aacc7a060e55b649
-TextureImporter:
-  internalIDToNameTable: []
-  externalObjects: {}
-  serializedVersion: 11
-  mipmaps:
-    mipMapMode: 0
-    enableMipMap: 0
-    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
-  isReadable: 0
-  streamingMipmaps: 0
-  streamingMipmapsPriority: 0
-  grayScaleToAlpha: 0
-  generateCubemap: 6
-  cubemapConvolution: 0
-  seamlessCubemap: 0
-  textureFormat: 1
-  maxTextureSize: 2048
-  textureSettings:
-    serializedVersion: 2
-    filterMode: 1
-    aniso: 1
-    mipBias: 0
-    wrapU: 1
-    wrapV: 1
-    wrapW: 0
-  nPOTScale: 0
-  lightmap: 0
-  compressionQuality: 50
-  spriteMode: 1
-  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: 1
-  spriteTessellationDetail: -1
-  textureType: 8
-  textureShape: 1
-  singleChannelComponent: 0
-  maxTextureSizeSet: 0
-  compressionQualitySet: 0
-  textureFormatSet: 0
-  applyGammaDecoding: 0
-  platformSettings:
-  - serializedVersion: 3
-    buildTarget: DefaultTexturePlatform
-    maxTextureSize: 2048
-    resizeAlgorithm: 0
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-    androidETC2FallbackOverride: 0
-    forceMaximumCompressionQuality_BC6H_BC7: 0
-  - serializedVersion: 3
-    buildTarget: Standalone
-    maxTextureSize: 2048
-    resizeAlgorithm: 0
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-    androidETC2FallbackOverride: 0
-    forceMaximumCompressionQuality_BC6H_BC7: 0
-  - serializedVersion: 3
-    buildTarget: iPhone
-    maxTextureSize: 2048
-    resizeAlgorithm: 0
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-    androidETC2FallbackOverride: 0
-    forceMaximumCompressionQuality_BC6H_BC7: 0
-  - serializedVersion: 3
-    buildTarget: Android
-    maxTextureSize: 2048
-    resizeAlgorithm: 0
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-    androidETC2FallbackOverride: 0
-    forceMaximumCompressionQuality_BC6H_BC7: 0
-  spriteSheet:
-    serializedVersion: 2
-    sprites: []
-    outline: []
-    physicsShape: []
-    bones: []
-    spriteID: 5e97eb03825dee720800000000000000
-    internalID: 0
-    vertices: []
-    indices: 
-    edges: []
-    weights: []
-    secondaryTextures: []
-  spritePackingTag: 
-  pSDRemoveMatte: 0
-  pSDShowRemoveMatteOption: 0
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: