【进度条优化】当进度条上限为1时,将进度条所在位置显示在最右侧
parent
f4ca18ff74
commit
048f1bafb9
|
@ -315,7 +315,7 @@ function this.OnShowLayout3Data()
|
|||
compoundNum= compoundNum>=compoundMaxNum and compoundMaxNum or compoundNum
|
||||
if compoundMaxNum > 0 then
|
||||
this.Slider:GetComponent("Slider").value=1
|
||||
this.Slider:GetComponent("Slider").minValue=1
|
||||
this.Slider:GetComponent("Slider").minValue=0
|
||||
else
|
||||
this.Slider:GetComponent("Slider").value=0
|
||||
this.Slider:GetComponent("Slider").minValue=0
|
||||
|
|
|
@ -206,7 +206,7 @@ function RewardBoxPanel:SetBottom()--设置底部滑动条
|
|||
maxOwnNum = BagManager.GetItemCountById(this.itemId)--拥有的最大数量
|
||||
maxNum = gameSetting[1].OpenBoxLimits--最大领取数量(配表)
|
||||
this.Slider:GetComponent("Slider").value=1
|
||||
this.Slider:GetComponent("Slider").minValue = 1
|
||||
this.Slider:GetComponent("Slider").minValue = 0
|
||||
this.Slider:GetComponent("Slider").maxValue = maxOwnNum >= maxNum and maxNum or maxOwnNum--当前物品总数量
|
||||
end
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ function ShopBuyPopup:OnOpen(shopType, shopItemId)
|
|||
-- 设置滑动范围
|
||||
this.slider.enabled = this.maxNum > 1
|
||||
this.slider.maxValue = this.maxNum
|
||||
this.slider.minValue = 1
|
||||
this.slider.minValue = 0
|
||||
this.slider.value = this.maxNum > 0 and 1 or 0
|
||||
-- 设置颜色
|
||||
this.buyNumLab.color = this.maxNum > 0 and Color.New(0.55,0.59,0.62,1) or UIColor.NOT_ENOUGH_RED
|
||||
|
|
Loading…
Reference in New Issue