设置界面里的邮箱加一个开启限制
This commit is contained in:
parent
40fef6069a
commit
284f7ce3c7
@ -65,6 +65,7 @@ ModuleManager.MODULE_KEY = {
|
|||||||
DAILY_CHALLENGE = "daily_challenge", -- 每日挑战
|
DAILY_CHALLENGE = "daily_challenge", -- 每日挑战
|
||||||
FUND = "act_level_gift", -- 成长基金
|
FUND = "act_level_gift", -- 成长基金
|
||||||
ACT_GIFT_SHOW_OPEN = "act_gift_show_open", -- 弹窗礼包通用开启条件
|
ACT_GIFT_SHOW_OPEN = "act_gift_show_open", -- 弹窗礼包通用开启条件
|
||||||
|
MAIL = "mail_open", -- 邮件
|
||||||
}
|
}
|
||||||
|
|
||||||
local _moduleMgrs = {}
|
local _moduleMgrs = {}
|
||||||
|
|||||||
@ -190,7 +190,7 @@ local const = {
|
|||||||
["value"]=7
|
["value"]=7
|
||||||
},
|
},
|
||||||
["model_daily_challenge"]={
|
["model_daily_challenge"]={
|
||||||
["value"]=8000
|
["value"]=6000
|
||||||
},
|
},
|
||||||
["level_fund_hero_1"]={
|
["level_fund_hero_1"]={
|
||||||
["value"]=24001
|
["value"]=24001
|
||||||
|
|||||||
@ -54,9 +54,13 @@ local func_open = {
|
|||||||
["new_player_gift"]={
|
["new_player_gift"]={
|
||||||
["stage"]=2,
|
["stage"]=2,
|
||||||
["pop_ups"]=1
|
["pop_ups"]=1
|
||||||
|
},
|
||||||
|
["mail_open"]={
|
||||||
|
["stage"]=2,
|
||||||
|
["pop_ups"]=1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
data=func_open,count=14
|
data=func_open,count=15
|
||||||
}
|
}
|
||||||
return config
|
return config
|
||||||
@ -1,5 +1,8 @@
|
|||||||
local SelectOtherBtnUI = class("SelectOtherBtnUI", BaseUI)
|
local SelectOtherBtnUI = class("SelectOtherBtnUI", BaseUI)
|
||||||
|
|
||||||
|
local BTN_OFFSET = 32
|
||||||
|
local BTN_INTERVAL = 16
|
||||||
|
|
||||||
function SelectOtherBtnUI:ctor()
|
function SelectOtherBtnUI:ctor()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -21,6 +24,14 @@ function SelectOtherBtnUI:onLoadRootComplete()
|
|||||||
ModuleManager.MailManager:showMailUI()
|
ModuleManager.MailManager:showMailUI()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
local cellHeight = self.uiMap["select_other_btn_ui.bg.setting_btn"]:getRectHeight()
|
||||||
|
local cellCount = 0
|
||||||
|
local y = -BTN_OFFSET
|
||||||
|
if DataManager.MailData:getIsOpen() then
|
||||||
|
cellCount = cellCount + 1
|
||||||
|
self.uiMap["select_other_btn_ui.bg.mail_btn"]:setVisible(true)
|
||||||
|
self.uiMap["select_other_btn_ui.bg.mail_btn"]:setAnchoredPositionY(y)
|
||||||
|
y = y - BTN_INTERVAL - cellHeight
|
||||||
local redPoint, isAdRedPoint = DataManager.MailData:getRedPoint()
|
local redPoint, isAdRedPoint = DataManager.MailData:getRedPoint()
|
||||||
if redPoint then
|
if redPoint then
|
||||||
if isAdRedPoint then
|
if isAdRedPoint then
|
||||||
@ -31,14 +42,19 @@ function SelectOtherBtnUI:onLoadRootComplete()
|
|||||||
else
|
else
|
||||||
self.uiMap["select_other_btn_ui.bg.mail_btn"]:removeRedPoint()
|
self.uiMap["select_other_btn_ui.bg.mail_btn"]:removeRedPoint()
|
||||||
end
|
end
|
||||||
|
|
||||||
self.uiMap["select_other_btn_ui.bg.mail_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.MAIL_NAME))
|
self.uiMap["select_other_btn_ui.bg.mail_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.MAIL_NAME))
|
||||||
|
else
|
||||||
|
self.uiMap["select_other_btn_ui.bg.mail_btn"]:setVisible(false)
|
||||||
|
end
|
||||||
|
cellCount = cellCount + 1
|
||||||
|
self.uiMap["select_other_btn_ui.bg.setting_btn"]:setAnchoredPositionY(y)
|
||||||
self.uiMap["select_other_btn_ui.bg.setting_btn"]:addClickListener(function()
|
self.uiMap["select_other_btn_ui.bg.setting_btn"]:addClickListener(function()
|
||||||
self:closeUI()
|
self:closeUI()
|
||||||
ModuleManager.GameSettingManager:showSettingUI()
|
ModuleManager.GameSettingManager:showSettingUI()
|
||||||
end)
|
end)
|
||||||
self.uiMap["select_other_btn_ui.bg.setting_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC))
|
self.uiMap["select_other_btn_ui.bg.setting_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC))
|
||||||
|
|
||||||
|
self.uiMap["select_other_btn_ui.bg"]:setSizeDeltaY(cellCount*cellHeight + (cellCount - 1)*BTN_INTERVAL + BTN_OFFSET*2)
|
||||||
end
|
end
|
||||||
|
|
||||||
return SelectOtherBtnUI
|
return SelectOtherBtnUI
|
||||||
@ -787,7 +787,7 @@ function MainCityUI:refreshBottomRp()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function MainCityUI:refreshSettingBtn()
|
function MainCityUI:refreshSettingBtn()
|
||||||
if DataManager.MailData:getRedPoint() then
|
if DataManager.MailData:getIsOpen() and DataManager.MailData:getRedPoint() then
|
||||||
self.settingbtn:addRedPoint(40, 40, 0.7)
|
self.settingbtn:addRedPoint(40, 40, 0.7)
|
||||||
else
|
else
|
||||||
self.settingbtn:removeRedPoint()
|
self.settingbtn:removeRedPoint()
|
||||||
|
|||||||
@ -247,10 +247,7 @@ function MailData:setLastMailId()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function MailData:getIsOpen()
|
function MailData:getIsOpen()
|
||||||
if not self.mailIsOpen then
|
return ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MAIL, true)
|
||||||
self.mailIsOpen = ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MAIL_OPEN, true)
|
|
||||||
end
|
|
||||||
return self.mailIsOpen
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return MailData
|
return MailData
|
||||||
Loading…
x
Reference in New Issue
Block a user