Merge branch 'xma/dev-b' of http://60.1.1.230/gaoxin/JL_Client into xma/dev-b

dev_chengFeng
ZhangBiao 2021-04-08 20:48:31 +08:00
commit 3edd56034a
7 changed files with 65 additions and 24 deletions

View File

@ -16,6 +16,7 @@ local rechargeBgDef = {
[3] = "r_mrcz_zi_33_zh",
[4] = "r_mrcz_zi_4_zh",
}
local cursortingOrder
local isFirstOpen = false
function DailyRechargePanel:InitComponent()
@ -24,8 +25,10 @@ function DailyRechargePanel:InitComponent()
self.extraIcon = Util.GetGameObject(self.transform,"frame/bg/descbg/extraIcon"):GetComponent("Image")
self.desc = Util.GetGameObject(self.transform, "frame/bg/descbg/value"):GetComponent("Text")
self.desc.text = ""
self.dollar = Util.GetGameObject(self.transform,"frame/bg/descbg/dollar")
self.dollar:SetActive(false)
self.rewardContent = {}
self.rewardContentEffect = {}
self.rewardList = {}
@ -36,6 +39,17 @@ function DailyRechargePanel:InitComponent()
self.rewardList[i] = SubUIManager.Open(SubUIConfig.ItemView, self.rewardContent[i].transform)
end
if not self.moneyNum then
local dailyActInfo = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.DailyRecharge)
local actRewardConfig = ConfigManager.GetConfigData(ConfigName.ActivityRewardConfig, dailyActInfo.mission[1].missionId)
self.moneyNum = SubUIManager.Open(SubUIConfig.MoneyNumView, Util.GetGameObject(self.transform,"frame/bg/descbg").transform,
actRewardConfig.Values[1][1], MoneyNumViewType.Image_Horizontal, "LevelFont", 42, 1, Vector2.New(60, 100), Vector2.New(20, 0), MoneyNumViewImageType.Big_1)
end
self.moneyNum:SetOffsetPosition(Vector2.New(480, -90))
self.moneyNum:SetOffsetRotation(Vector3.New(0, 0, -10))
self.moneyNum.transform:SetSiblingIndex(2)
self.dealBtn = Util.GetGameObject(self.transform, "frame/bg/dealBtn")
self.dealText = Util.GetGameObject(self.dealBtn, "Text"):GetComponent("Text")
self.UI_effect_DailyRechargePanel_particle = Util.GetGameObject(self.transform, "frame/UI_effect_DailyRechargePanel_particle")
@ -43,17 +57,6 @@ function DailyRechargePanel:InitComponent()
local titleText = Util.GetGameObject(parent, "Text"):GetComponent("Text")
titleText.text = Language[12109]
SetTextVerTial(titleText,Vector3.New(102.07,18.2,0))
local yuanIma = Util.GetGameObject(self.transform, "frame/bg/descbg/dollar"):GetComponent("Image")
local yuanText = Util.GetGameObject(self.transform, "frame/bg/descbg/value")
if MoneyUtil.MT == MoneyType.RMB then
yuanIma.sprite = Util.LoadSprite("c_czlb_yuan1")
yuanIma.transform.localPosition = Vector3.New(163,10,0)
yuanText.transform.localPosition = Vector3.New(78,21,0)
else
yuanIma.sprite = Util.LoadSprite("c_czlb_yuan2")
yuanIma.transform.localPosition = Vector3.New(75.21,25.8,0)
yuanText.transform.localPosition = Vector3.New(166.34,15.9,0)
end
end
function DailyRechargePanel:BindEvent()
@ -99,28 +102,25 @@ function DailyRechargePanel:RefreshPanel()
if self.missionInfo.state == 0 then
if DailyRechargeManager.GetRechargeValue()==0 then
self.extraIcon.sprite = Util.LoadSprite(rechargeBgDef[4])
self.dollar:SetActive(true)
self.desc.text = actRewardConfig.Values[1][1]
self.dealText.text = Language[10420]
self.moneyNum.gameObject:SetActive(true)
else
if DailyRechargeManager.ReceivedEnabled() then
self.extraIcon.sprite = Util.LoadSprite(rechargeBgDef[3])
self.dollar:SetActive(false)
self.dealText.text = Language[10018]
self.desc.text = ""
self.moneyNum.gameObject:SetActive(false)
else
self.extraIcon.sprite = Util.LoadSprite(rechargeBgDef[4])
self.dollar:SetActive(true)
-- local remainValue = actRewardConfig.Values[1][1] - DailyRechargeManager.GetRechargeValue()
-- remainValue = remainValue < 0 and 0 or remainValue
self.desc.text = actRewardConfig.Values[1][1]--remainValue
self.dealText.text = Language[10420]
self.moneyNum.gameObject:SetActive(true)
end
end
else
self.dealText.text = Language[10101]
self.extraIcon.sprite = Util.LoadSprite(rechargeBgDef[4])
self.dollar:SetActive(true)
self.moneyNum.gameObject:SetActive(true)
end
self.extraIcon:SetNativeSize()
table.walk(self.rewardContent, function(rewardPosItem)

View File

@ -17,6 +17,7 @@ end
function LingShowTeHui:InitComponent(gameObject)
this.time = Util.GetGameObject(gameObject, "time/times"):GetComponent("Text")
this.buyBtn = Util.GetGameObject(gameObject, "layout/buyBtn")
this.buyBtnText = Util.GetGameObject(gameObject, "layout/buyBtn/Text"):GetComponent("Text")
this.scrollItem = Util.GetGameObject(gameObject, "scroller/grid")
this.buytimes = Util.GetGameObject(gameObject, "layout/buytimes"):GetComponent("Text")
this.giftItemView = {}
@ -72,6 +73,7 @@ function LingShowTeHui:OnShowData()
local activityConfig = ConfigManager.GetConfigData(ConfigName.GlobalActivity,activityId)
rechargeConfigId = activityConfig.CanBuyRechargeId[1]
allData = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,rechargeConfigId)
this.buyBtnText.text = MoneyUtil.GetMoneyUnitNameWithMoney(allData.Price)
if not itemsGrid then
itemsGrid = {}
end

View File

@ -99,7 +99,7 @@ function EightDayGiftPanel:SetBg(i)
this.btnPreview:SetActive(false)
elseif i > 3 then
ren.transform.localPosition = Vector3.New(-35,258,0)
text = "b_baridenglu_slogan08_zh 1"--文字
text = "b_baridenglu_slogan08_zh_1_zh"--文字
id = day_picture[i][4]--itemviewId
bgName = "b_baridenglu_slogan08_4geren"--动效资源名字
tip.sprite = Util.LoadSprite(text)
@ -133,7 +133,7 @@ function EightDayGiftPanel:SetBg(i)
elseif curDay > 3 or (curDay == 3 and rewardData.mission[3].state == 1) then
this.btnPreview:SetActive(false)
ren.transform.localPosition = Vector3.New(-35,258,0)
text = "b_baridenglu_slogan08_zh 1"--文字
text = "b_baridenglu_slogan08_zh_1_zh"--文字
id = day_picture[3][4]--itemviewId
bgName = "b_baridenglu_slogan08_4geren"--动效资源名字
tip.sprite = Util.LoadSprite(text)

View File

@ -148,7 +148,7 @@ function this.SingleHeroDataShow(_go, _heroData)
--if cueSelectHeroDid == heroData.dynamicId then
-- choosed:SetActive(true)
--end
Util.GetGameObject(go, "info/frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(heroData.heroConfig.Quality))
Util.GetGameObject(go, "info/frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(heroData.heroConfig.Quality,heroData.star))
Util.GetGameObject(go, "info/icon"):GetComponent("Image").sprite = Util.LoadSprite(heroData.icon)
Util.GetGameObject(go, "info/lv/Text"):GetComponent("Text").text = heroData.lv
Util.GetGameObject(go, "info/icon"):GetComponent("Image").sprite = Util.LoadSprite(heroData.icon)

View File

@ -187,6 +187,7 @@ function GuildInfoPopup:BindEvent()
MsgPanel.ShowTwo(Language[10901],nil, function()
MyGuildManager.RequestQuitGuild(function()
this:ClosePanel()
GuildManager.RefreshGuildAllRedState()
end)
end)
end)

View File

@ -188,5 +188,22 @@ function GuildManager.CheckGuildTip()
_TipTimer:Start()
end
end
function this.RefreshGuildAllRedState()
CheckRedPointStatus(RedPointType.Guild_Aid)
CheckRedPointStatus(RedPointType.Guild_AidBox)
CheckRedPointStatus(RedPointType.Guild_AidMy)
CheckRedPointStatus(RedPointType.Guild_Apply)
CheckRedPointStatus(RedPointType.Guild_DeathPos)
CheckRedPointStatus(RedPointType.Guild_Fete)
CheckRedPointStatus(RedPointType.Guild_House)
CheckRedPointStatus(RedPointType.Guild_House_Apply)
CheckRedPointStatus(RedPointType.Guild_RedPacket)
CheckRedPointStatus(RedPointType.Guild_Shop)
CheckRedPointStatus(RedPointType.Guild_Skill)
CheckRedPointStatus(RedPointType.Guild_Transcript)
CheckRedPointStatus(RedPointType.Guild_Boss)
CheckRedPointStatus(RedPointType.Guild_AidGuild)
CheckRedPointStatus(RedPointType.Gui)
CheckRedPointStatus(RedPointType.Guild_Shop)
end
return GuildManager

View File

@ -204,6 +204,13 @@ function MoneyNumView:SetOffsetPosition(position)
self:RefreshOffsetPosition()
end
function MoneyNumView:SetOffsetRotation(rotation)
if not rotation then
return
end
self.offsetRotation = rotation
self:RefreshOffsetRotation()
end
--
-- function MoneyNumView:Update()
-- -- 延迟3帧刷新大小
@ -225,10 +232,10 @@ function MoneyNumView:RefreshSize()
self.transform.sizeDelta = self.Image_Num_Horizontal.transform.sizeDelta
end
end
-- 刷新组件大小
-- 修正组件位置
function MoneyNumView:RefreshOffsetPosition()
if not self.offsetPosition then
self.offsetPosition = Vector3.New(0, 0)
self.offsetPosition = Vector2.New(0, 0)
return
end
if self.viewType == MoneyNumViewType.Text_Vertical or self.viewType == MoneyNumViewType.Text_Horizontal then
@ -239,6 +246,20 @@ function MoneyNumView:RefreshOffsetPosition()
self.Image_Num_Horizontal.transform.localPosition = self.offsetPosition
end
end
-- 修正组件角度
function MoneyNumView:RefreshOffsetRotation()
if not self.offsetRotation then
self.offsetRotation = Vector3.New(0, 0, 0)
return
end
if self.viewType == MoneyNumViewType.Text_Vertical or self.viewType == MoneyNumViewType.Text_Horizontal then
self.Text_Num.transform.rotation = Quaternion.Euler(self.offsetRotation)
elseif self.viewType == MoneyNumViewType.Image_Vertical then
self.Image_Num_Vertical.transform.rotation = Quaternion.Euler(self.offsetRotation)
elseif self.viewType == MoneyNumViewType.Image_Horizontal then
self.Image_Num_Horizontal.transform.rotation = Quaternion.Euler(self.offsetRotation)
end
end
--界面关闭时调用(用于子类重写)
function MoneyNumView:OnClose()