This commit is contained in:
puxuan 2025-08-08 17:13:56 +08:00
parent 6ab80119eb
commit 9eeb439375
4 changed files with 294 additions and 280 deletions

View File

@ -14,7 +14,7 @@ function AccountBindUI:onLoadRootComplete()
self.uiMap["account_bind_ui.title_bg_img.title_text"]:setText(I18N:getGlobalText(I18N.GlobalConst.MESSAGE_BOX_TITLE))
self.uiMap["account_bind_ui.title_bg_img.bg.content_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.BIND_TIPS_DESC))
self:initBindBtn()
self.uiMap["account_bind_ui.close_btn"]:addClickListener(function()
self.uiMap["account_bind_ui.title_bg_img.close_btn"]:addClickListener(function()
self:closeUI()
end)

View File

@ -3,9 +3,9 @@ local LanguageCell = class("LanguageCell", BaseCell)
function LanguageCell:refresh(language)
local uiMap = self:getUIMap()
if language == I18N:getCurLanguage() then
uiMap["language_cell.bg"]:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_3")
uiMap["language_cell.bg"]:setSprite(GConst.ATLAS_PATH.UI_SETTING, "setting_bg_2")
else
uiMap["language_cell.bg"]:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_dark_4")
uiMap["language_cell.bg"]:setSprite(GConst.ATLAS_PATH.UI_SETTING, "setting_bg_1")
end
uiMap["language_cell.name_bg"]:setSprite(GConst.ATLAS_PATH.UI_SETTING, "language_" .. language)
end

View File

@ -31,7 +31,7 @@ function GameSettingUI:onPressBackspace()
end
function GameSettingUI:_display()
self.uiMap["game_setting_ui.bg.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC))
self.uiMap["game_setting_ui.bg.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC))
self.uiMap["game_setting_ui.bg.music_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC_MUSIC))
self.uiMap["game_setting_ui.bg.voice_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC_VOICE))
self.uiMap["game_setting_ui.bg.language_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC_LANGUAGE))
@ -59,8 +59,8 @@ end
function GameSettingUI:initLoginBtn()
self:initGoogleLoginBtn()
self:initAppleLoginBtn()
local deleteBtn = self.uiMap["game_setting_ui.bg.delete_btn"]
deleteBtn:addClickListener(function()
local deleteTx = self.uiMap["game_setting_ui.bg.delete_tx"]
deleteTx:addClickListener(function()
ModuleManager.AccountManager:showDeleteUI()
end)
self:refreshAccountInfo()
@ -152,15 +152,15 @@ function GameSettingUI:initCDKeyBtn()
end
function GameSettingUI:initSupportBtn()
if GFunc.isShenhe() then
self.uiMap["game_setting_ui.bg.support_tx"]:setAnchoredPositionY(-370)
self.uiMap["game_setting_ui.bg.support_icon"]:setAnchoredPositionY(-370)
self.uiMap["game_setting_ui.bg.support_btn"]:setAnchoredPositionY(-370)
else
self.uiMap["game_setting_ui.bg.support_tx"]:setAnchoredPositionY(-450)
self.uiMap["game_setting_ui.bg.support_icon"]:setAnchoredPositionY(-450)
self.uiMap["game_setting_ui.bg.support_btn"]:setAnchoredPositionY(-450)
end
-- if GFunc.isShenhe() then
-- self.uiMap["game_setting_ui.bg.support_tx"]:setAnchoredPositionY(-370)
-- self.uiMap["game_setting_ui.bg.support_icon"]:setAnchoredPositionY(-370)
-- self.uiMap["game_setting_ui.bg.support_btn"]:setAnchoredPositionY(-370)
-- else
-- self.uiMap["game_setting_ui.bg.support_tx"]:setAnchoredPositionY(-450)
-- self.uiMap["game_setting_ui.bg.support_icon"]:setAnchoredPositionY(-450)
-- self.uiMap["game_setting_ui.bg.support_btn"]:setAnchoredPositionY(-450)
-- end
self.uiMap["game_setting_ui.bg.support_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUPPORT_DESC_1))
self.uiMap["game_setting_ui.bg.support_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUPPORT_DESC_2))
@ -203,6 +203,18 @@ function GameSettingUI:_addListeners()
self:refreshVoice()
end)
self.uiMap["game_setting_ui.bg.shake_bg"]:addClickListener(function()
-- local status = AudioManager:isEffectEnabled()
-- if not status then
-- AudioManager:setEffectVolume(1)
-- else
-- AudioManager:setEffectVolume(0)
-- end
-- self:refreshVoice()
GFunc.showToast("震动")
end)
self.uiMap["game_setting_ui.bg.language_btn"]:addClickListener(function()
ModuleManager.GameSettingManager:showLanguageUI()
end)
@ -213,11 +225,13 @@ function GameSettingUI:_addListeners()
end)
self.uiMap["game_setting_ui.bg.tx_1"]:addClickListener(function()
GFunc.openUrl("https://perfeggsgame.com/tos.html")
-- GFunc.openUrl("https://perfeggsgame.com/tos.html")
GFunc.openUrl("https://www.baidu.com")
end)
self.uiMap["game_setting_ui.bg.tx_2"]:addClickListener(function()
GFunc.openUrl("https://perfeggsgame.com/pp.html")
-- GFunc.openUrl("https://perfeggsgame.com/pp.html")
GFunc.openUrl("https://www.baidu.com")
end)
end
@ -275,11 +289,11 @@ function GameSettingUI:refreshLinkBtns()
curLanguage = GConst.LANGUAGE.ENGLISH
end
if not GameSettingConst.COMMUNITY_URL[curLanguage] then
bg:setSizeDeltaY(BG_DEFAULT_H)
-- bg:setSizeDeltaY(BG_DEFAULT_H)
node:setVisible(false)
return
end
bg:setSizeDeltaY(BG_DEFAULT_H + 100)
-- bg:setSizeDeltaY(BG_DEFAULT_H + 100)
node:setVisible(true)
local communityDesc = uiMap["game_setting_ui.bg.community_node.discord_desc"]
local communityBtn = uiMap["game_setting_ui.bg.community_node.discord"]