【本地化】添加按比例缩小文字的方法
parent
84ae606ee9
commit
16486a13b5
|
@ -1771,6 +1771,17 @@ function GetCurLanguage()
|
|||
return PlayerPrefs.GetInt("language")
|
||||
end
|
||||
|
||||
-- 文字大小比例缩放
|
||||
FontSizeScaleToZh = {
|
||||
[0] = 1,
|
||||
[1] = 0.9,
|
||||
[2] = 0.8
|
||||
}
|
||||
function LanguageFontSizeFilter(text, size)
|
||||
local l = GetCurLanguage()
|
||||
text.fontSize = math.floor(size * FontSizeScaleToZh[l])
|
||||
end
|
||||
|
||||
function SetHeroIcon(heroData,icon,heroConfig)
|
||||
-- LogGreen("heroData.skinId:"..tostring(heroData.skinId))
|
||||
if not heroData.skinId or heroData.skinId == 0 then
|
||||
|
|
Loading…
Reference in New Issue