Merge remote-tracking branch 'origin/0功能/1月6_版本优化' into master_xma_local

dev_chengFeng
gaoxin 2021-01-04 16:57:31 +08:00
commit 0a32818c92
3 changed files with 4 additions and 4 deletions

View File

@ -88,7 +88,7 @@ function this.RefreshPanel()
compoundNum= compoundNum>=compoundMaxNum and compoundMaxNum or compoundNum compoundNum= compoundNum>=compoundMaxNum and compoundMaxNum or compoundNum
Log("compoundNum "..compoundNum) Log("compoundNum "..compoundNum)
this.Slider:GetComponent("Slider").value=compoundNum this.Slider:GetComponent("Slider").value=compoundNum
this.Slider:GetComponent("Slider").minValue=1 this.Slider:GetComponent("Slider").minValue=0
this.Slider:GetComponent("Slider").maxValue=compoundMaxNum this.Slider:GetComponent("Slider").maxValue=compoundMaxNum
this.ShowCompoundNumData(compoundNum) this.ShowCompoundNumData(compoundNum)
end end

View File

@ -117,14 +117,14 @@ function QuickCommonPurchasePart:Init()
self.maxValue = self.maxValue > 999 and 999 or self.maxValue self.maxValue = self.maxValue > 999 and 999 or self.maxValue
self.progressBar.enabled = self.maxValue > 1 self.progressBar.enabled = self.maxValue > 1
self.progressBar.maxValue = self.maxValue self.progressBar.maxValue = self.maxValue
self.progressBar.minValue = 1 self.progressBar.minValue = 0
self.buyCountValue = self.maxValue > 0 and 1 or 0 self.buyCountValue = self.maxValue > 0 and 1 or 0
-- 设置颜色 -- 设置颜色
self:OnBuyValueChanged() self:OnBuyValueChanged()
self.buyCountText.color = self.maxValue > 0 and Color.New(0.55,0.59,0.62,1) or UIColor.NOT_ENOUGH_RED self.buyCountText.color = self.maxValue > 0 and Color.New(0.55,0.59,0.62,1) or UIColor.NOT_ENOUGH_RED
Util.SetGray(self.confirmBtn.gameObject, self.maxValue <= 0) Util.SetGray(self.confirmBtn.gameObject, self.maxValue <= 0)
--self.confirmBtn.enabled = self.maxValue > 0 self.confirmBtn.enabled = self.maxValue > 0
end end
function QuickCommonPurchasePart:SetBasicInfo(context) function QuickCommonPurchasePart:SetBasicInfo(context)

View File

@ -108,7 +108,7 @@ function QuickSpecialPurchasePart:Init()
local canBuyMaxValue = ShopManager.GetShopItemMaxBuy(SHOP_TYPE.FUNCTION_SHOP, purChaseTypeIdDef[self.context.type][i]) local canBuyMaxValue = ShopManager.GetShopItemMaxBuy(SHOP_TYPE.FUNCTION_SHOP, purChaseTypeIdDef[self.context.type][i])
self.purChasePart[i].maxValue = math.min(self.purChasePart[i].remainBuyTimes, canBuyMaxValue) self.purChasePart[i].maxValue = math.min(self.purChasePart[i].remainBuyTimes, canBuyMaxValue)
self.purChasePart[i].maxValue = self.purChasePart[i].maxValue > MaxBuyCount[i] and MaxBuyCount[i] or self.purChasePart[i].maxValue self.purChasePart[i].maxValue = self.purChasePart[i].maxValue > MaxBuyCount[i] and MaxBuyCount[i] or self.purChasePart[i].maxValue
self.purChasePart[i].progressBar.minValue = 1 self.purChasePart[i].progressBar.minValue = 0
self.purChasePart[i].progressBar.maxValue = self.purChasePart[i].maxValue self.purChasePart[i].progressBar.maxValue = self.purChasePart[i].maxValue
self.purChasePart[i].progressBar.enabled = self.purChasePart[i].maxValue >= 1 self.purChasePart[i].progressBar.enabled = self.purChasePart[i].maxValue >= 1
self.purChasePart[i].progressBar.value = self.purChasePart[i].maxValue > 0 and 1 or 0 self.purChasePart[i].progressBar.value = self.purChasePart[i].maxValue > 0 and 1 or 0