【自选箱】遮盖文字修改

dev_chengFeng
ZhangBiao 2021-04-08 14:44:08 +08:00
parent 31d0a4ea93
commit adc2d56559
2 changed files with 81 additions and 73 deletions

View File

@ -416,17 +416,18 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 637834703727152052}
- {fileID: 7517760599986904646}
- {fileID: 5270166641082040520}
- {fileID: 5905118992494067694}
- {fileID: 6226173992747795047}
m_Father: {fileID: 1759585470645775885}
m_RootOrder: 1
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_SizeDelta: {x: 1000, y: 106.1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &6247518587750639663
MonoBehaviour:
@ -595,10 +596,11 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 5015516532085505041}
- {fileID: 5829916578949271985}
- {fileID: 5507831709790327530}
m_Father: {fileID: 3370490708620513293}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@ -636,7 +638,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8126913021008556213}
m_RootOrder: 0
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@ -792,16 +794,16 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2054878914328124516}
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_Children: []
m_Father: {fileID: 6511887680599684502}
m_RootOrder: 2
m_Father: {fileID: 1759585470645775885}
m_RootOrder: 0
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, y: 468}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 873, y: 9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4519970242043103155
@ -1148,9 +1150,9 @@ RectTransform:
m_Father: {fileID: 637834703727152052}
m_RootOrder: 0
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: -311.6, y: 1}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 135, y: -50}
m_SizeDelta: {x: 130, y: 130}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4469237718377244165
@ -1350,7 +1352,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1759585470645775885}
- component: {fileID: 8667020804098659826}
- component: {fileID: 5295426865880325664}
m_Layer: 5
m_Name: topBar
m_TagString: Untagged
@ -1369,17 +1371,19 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 309584511185322528}
- {fileID: 4747820371664025850}
- {fileID: 8126913021008556213}
- {fileID: 152542477848530146}
m_Father: {fileID: 3370490708620513293}
m_RootOrder: 2
m_RootOrder: 1
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: 3.125, y: 510}
m_AnchoredPosition: {x: 3.125, y: 498}
m_SizeDelta: {x: 1000, y: 150}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &8667020804098659826
--- !u!114 &5295426865880325664
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -1388,7 +1392,7 @@ MonoBehaviour:
m_GameObject: {fileID: 3210126133790844263}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -2095666955, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
@ -1396,13 +1400,12 @@ MonoBehaviour:
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 4
m_StartCorner: 0
m_StartAxis: 1
m_CellSize: {x: 1000, y: 70}
m_Spacing: {x: 0, y: 0}
m_Constraint: 0
m_ConstraintCount: 2
m_ChildAlignment: 1
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 0
m_ChildControlHeight: 0
--- !u!1 &3618873862045003760
GameObject:
m_ObjectHideFlags: 0
@ -1434,7 +1437,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8126913021008556213}
m_RootOrder: 2
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@ -1550,12 +1553,12 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1759585470645775885}
m_RootOrder: 0
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_SizeDelta: {x: 1000, y: 70}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4460466962581947724
CanvasRenderer:
@ -1633,7 +1636,7 @@ RectTransform:
m_Children:
- {fileID: 3822487912886530788}
m_Father: {fileID: 4236749662161848168}
m_RootOrder: 1
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@ -1763,16 +1766,16 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4001342544747786228}
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_Children: []
m_Father: {fileID: 6511887680599684502}
m_RootOrder: 4
m_Father: {fileID: 1759585470645775885}
m_RootOrder: 3
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, y: 619}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 873, y: 9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5090162482616603168
@ -1845,7 +1848,7 @@ RectTransform:
- {fileID: 4573148065754767848}
- {fileID: 8488049129122355319}
m_Father: {fileID: 4236749662161848168}
m_RootOrder: 0
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@ -2006,7 +2009,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8126913021008556213}
m_RootOrder: 3
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@ -2492,7 +2495,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8126913021008556213}
m_RootOrder: 1
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@ -2610,12 +2613,12 @@ RectTransform:
m_Children:
- {fileID: 773274248527752682}
m_Father: {fileID: 3370490708620513293}
m_RootOrder: 3
m_RootOrder: 2
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, y: 415.5}
m_SizeDelta: {x: 934, y: 879.9}
m_AnchoredPosition: {x: 0, y: 376.9}
m_SizeDelta: {x: 934, y: 841.3}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &949843400318720597
CanvasRenderer:
@ -2765,16 +2768,16 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6081017597432231517}
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_Children: []
m_Father: {fileID: 6511887680599684502}
m_RootOrder: 3
m_Father: {fileID: 4236749662161848168}
m_RootOrder: 0
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, y: -418.7}
m_AnchoredPosition: {x: 0, y: 141.40002}
m_SizeDelta: {x: 873, y: 9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1762291241638071745
@ -2924,9 +2927,6 @@ RectTransform:
m_Children:
- {fileID: 7958799936517173215}
- {fileID: 6759450002509949190}
- {fileID: 309584511185322528}
- {fileID: 5015516532085505041}
- {fileID: 152542477848530146}
m_Father: {fileID: 3370490708620513293}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -3003,7 +3003,6 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 6511887680599684502}
- {fileID: 637834703727152052}
- {fileID: 1759585470645775885}
- {fileID: 4197229008271411681}
- {fileID: 4236749662161848168}
@ -3316,6 +3315,7 @@ GameObject:
- component: {fileID: 637834703727152052}
- component: {fileID: 2328468656031041480}
- component: {fileID: 3532038031257137951}
- component: {fileID: 2586843587707289929}
m_Layer: 5
m_Name: di
m_TagString: Untagged
@ -3330,17 +3330,17 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7641199780265015042}
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_Children:
- {fileID: 5247935428401062656}
m_Father: {fileID: 3370490708620513293}
m_RootOrder: 1
m_Father: {fileID: 8126913021008556213}
m_RootOrder: 0
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, y: 473}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 900, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2328468656031041480
@ -3380,6 +3380,26 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &2586843587707289929
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7641199780265015042}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &9122350590757992458
GameObject:
m_ObjectHideFlags: 0

View File

@ -29,8 +29,8 @@ function RewardBoxPanel:InitComponent()
this.name = Util.GetGameObject(this.gameObject,"bg/bg/name"):GetComponent("Text")
this.tip = Util.GetGameObject(this.gameObject,"bg/topBar/tip")
this.selectBar = Util.GetGameObject(this.gameObject,"bg/topBar/selectBar")
this.selectBtn = Util.GetGameObject(this.gameObject,"bg/di/selectBtn")
this.di = Util.GetGameObject(this.gameObject,"bg/di")
this.selectBtn = Util.GetGameObject(this.gameObject,"bg/topBar/selectBar/di/selectBtn")
this.di = Util.GetGameObject(this.gameObject,"bg/topBar/selectBar/di")
this.slider = Util.GetGameObject(this.gameObject,"bg/bottomBar/slider")
this.Slider = Util.GetGameObject(this.gameObject,"bg/bottomBar/slider/Slider")
this.btnReduce = Util.GetGameObject(this.gameObject,"bg/bottomBar/slider/btnReduce")
@ -49,7 +49,7 @@ function RewardBoxPanel:InitComponent()
this.ScrollView.moveTween.Strength = 2
this.selectList ={}
for n = 0, this.selectBar.transform.childCount-1 do--设置当前页签
for n = 1, this.selectBar.transform.childCount-1 do--设置当前页签
table.insert(this.selectList,this.selectBar.transform:GetChild(n).gameObject)
end
end
@ -114,11 +114,9 @@ function RewardBoxPanel:OnOpen(...)
this.rewardGroup = itemConfig[data[2]].RewardGroup
this.itemId = itemConfig[data[2]].Id
end
this.scroll.gameObject:GetComponent("RectTransform").sizeDelta = #this.rewardGroup ~= 1 and Vector2.New(940, 880) or Vector2.New(940, 1000)
this.scroll.gameObject:GetComponent("RectTransform").anchoredPosition = #this.rewardGroup ~= 1 and Vector2.New(0, 415) or Vector2.New(0, 542.6)
this.ScrollView.gameObject:GetComponent("RectTransform").sizeDelta = #this.rewardGroup ~= 1 and Vector2.New(940, 900) or Vector2.New(940, 1000)
Util.GetGameObject(this.gameObject,"bg/bg/huangtiao"):SetActive(#this.rewardGroup ~= 1)
this.scroll.gameObject:GetComponent("RectTransform").sizeDelta = #this.rewardGroup ~= 1 and Vector2.New(940, 836.8) or Vector2.New(940, 900)
this.scroll.gameObject:GetComponent("RectTransform").anchoredPosition = #this.rewardGroup ~= 1 and Vector2.New(0, 376) or Vector2.New(0, 444)
this.ScrollView.gameObject:GetComponent("RectTransform").sizeDelta = #this.rewardGroup ~= 1 and Vector2.New(940, 830) or Vector2.New(940, 900)
end
-- 打开,重新打开时回调
@ -131,7 +129,8 @@ function RewardBoxPanel:OnShow()
end
function RewardBoxPanel:RefreshData()
RewardBoxPanel:SetTopBar()
this.selectBar:SetActive(#this.rewardGroup ~= 1)--设置顶部属性条
this.tip:SetActive(BagManager.isBagPanel)
RewardBoxPanel:SetGiftData()
RewardBoxPanel:SetBottom()
end
@ -194,17 +193,6 @@ function RewardBoxPanel:SetSingleGiftData(index,item,boxId,tagNum)
end)
end
--设置头部属性标签显示
function RewardBoxPanel:SetTopBar()
this.selectBar:SetActive(#this.rewardGroup ~= 1)--设置顶部属性条
this.di:SetActive(#this.rewardGroup ~= 1)
this.tip:SetActive(BagManager.isBagPanel)
this.di.transform.localPosition = Vector3.New(0, 473, 0)
if #this.rewardGroup ~= 1 and not BagManager.isBagPanel then
this.di.transform.localPosition = Vector3.New(0, 510, 0)
end
end
--设置底部滑动条
function RewardBoxPanel:SetBottom()--设置底部滑动条
this.num.text = 1