设置界面跳转链接处理
This commit is contained in:
parent
8c3ce37bbe
commit
a0fedc60ad
@ -271,11 +271,10 @@ function GameSettingUI:refreshLinkBtns()
|
|||||||
local bg = uiMap["game_setting_ui.bg"]
|
local bg = uiMap["game_setting_ui.bg"]
|
||||||
local node = uiMap["game_setting_ui.bg.community_node"]
|
local node = uiMap["game_setting_ui.bg.community_node"]
|
||||||
local curLanguage = I18N:getCurLanguage()
|
local curLanguage = I18N:getCurLanguage()
|
||||||
local showLinkBtns = false
|
if not GameSettingConst.COMMUNITY_URL[curLanguage] then
|
||||||
if GameSettingConst.COMMUNITY_URL[curLanguage] then
|
curLanguage = GConst.LANGUAGE.ENGLISH
|
||||||
showLinkBtns = true
|
|
||||||
end
|
end
|
||||||
if not showLinkBtns then
|
if not GameSettingConst.COMMUNITY_URL[curLanguage] then
|
||||||
bg:setSizeDeltaY(BG_DEFAULT_H)
|
bg:setSizeDeltaY(BG_DEFAULT_H)
|
||||||
node:setVisible(false)
|
node:setVisible(false)
|
||||||
return
|
return
|
||||||
@ -288,6 +287,11 @@ function GameSettingUI:refreshLinkBtns()
|
|||||||
local socialBtn = uiMap["game_setting_ui.bg.community_node.facebook"]
|
local socialBtn = uiMap["game_setting_ui.bg.community_node.facebook"]
|
||||||
|
|
||||||
communityDesc:setText(I18N:getGlobalText(GameSettingConst.COMMUNITY_TXT[curLanguage]))
|
communityDesc:setText(I18N:getGlobalText(GameSettingConst.COMMUNITY_TXT[curLanguage]))
|
||||||
|
if I18N:getCurLanguage() == GConst.LANGUAGE.KOREAN then -- 韩国特殊处理
|
||||||
|
communityDesc:setVisible(false)
|
||||||
|
else
|
||||||
|
communityDesc:setVisible(true)
|
||||||
|
end
|
||||||
communityBtn:addClickListener(function()
|
communityBtn:addClickListener(function()
|
||||||
local url = GameSettingConst.COMMUNITY_URL[I18N:getCurLanguage()]
|
local url = GameSettingConst.COMMUNITY_URL[I18N:getCurLanguage()]
|
||||||
if not url then
|
if not url then
|
||||||
@ -295,10 +299,14 @@ function GameSettingUI:refreshLinkBtns()
|
|||||||
end
|
end
|
||||||
GFunc.openUrl(url)
|
GFunc.openUrl(url)
|
||||||
end)
|
end)
|
||||||
|
if I18N:getCurLanguage() == GConst.LANGUAGE.KOREAN then -- 韩国特殊处理
|
||||||
|
communityBtn:setVisible(false)
|
||||||
|
else
|
||||||
communityBtn:setVisible(false)
|
communityBtn:setVisible(false)
|
||||||
communityBtn:setSprite(GConst.ATLAS_PATH.UI_SETTING, GameSettingConst.COMMUNITY_ICON[curLanguage], function()
|
communityBtn:setSprite(GConst.ATLAS_PATH.UI_SETTING, GameSettingConst.COMMUNITY_ICON[curLanguage], function()
|
||||||
communityBtn:setVisible(true)
|
communityBtn:setVisible(true)
|
||||||
end)
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
socialDesc:setText(I18N:getGlobalText(GameSettingConst.SOCIAL_DESC[curLanguage]))
|
socialDesc:setText(I18N:getGlobalText(GameSettingConst.SOCIAL_DESC[curLanguage]))
|
||||||
socialBtn:addClickListener(function()
|
socialBtn:addClickListener(function()
|
||||||
@ -312,6 +320,14 @@ function GameSettingUI:refreshLinkBtns()
|
|||||||
socialBtn:setSprite(GConst.ATLAS_PATH.UI_SETTING, GameSettingConst.SOCIAL_ICON[curLanguage], function()
|
socialBtn:setSprite(GConst.ATLAS_PATH.UI_SETTING, GameSettingConst.SOCIAL_ICON[curLanguage], function()
|
||||||
socialBtn:setVisible(true)
|
socialBtn:setVisible(true)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
if I18N:getCurLanguage() == GConst.LANGUAGE.KOREAN then -- 韩国特殊处理
|
||||||
|
socialDesc:setAnchoredPositionX(100.5)
|
||||||
|
socialBtn:setAnchoredPositionX(296)
|
||||||
|
else
|
||||||
|
socialDesc:setAnchoredPositionX(15)
|
||||||
|
socialBtn:setAnchoredPositionX(210.5)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return GameSettingUI
|
return GameSettingUI
|
||||||
Loading…
x
Reference in New Issue
Block a user