configure 'textboxWidth' for each font
This commit is contained in:
1 parent
14f76982d5
commit
06a35103d4
5 files changed
+5
-3
No files matched your search
@@ -16,7 +16,7 @@ EID.descriptions[languageCode].custom = {} -- table for custom entity descriptio
|
|||||||
EID.descriptions[languageCode].languageName = "English"
|
EID.descriptions[languageCode].languageName = "English"
|
||||||
|
|
||||||
-- Fonts to be used with this language pack
|
-- Fonts to be used with this language pack
|
||||||
EID.descriptions[languageCode].fonts = {{name="default", lineHeight=11}, {name="inverted", lineHeight=11}, {name="borderless", lineHeight=11}}
|
EID.descriptions[languageCode].fonts = {{name="default", lineHeight=11, textboxWidth = 115}, {name="inverted", lineHeight=11, textboxWidth = 115}, {name="borderless", lineHeight=11, textboxWidth = 115}}
|
||||||
|
|
||||||
---------- Collectibles ----------
|
---------- Collectibles ----------
|
||||||
EID.descriptions[languageCode].collectibles={
|
EID.descriptions[languageCode].collectibles={
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ EID.descriptions[languageCode].languageName = "Korean"
|
|||||||
|
|
||||||
korean_galmoori9, korean_galmoori11 is added for community request.
|
korean_galmoori9, korean_galmoori11 is added for community request.
|
||||||
]]
|
]]
|
||||||
EID.descriptions[languageCode].fonts = {{name="korean_hcrdotum", lineHeight=11}, {name="korean_lanapixel", lineHeight=12}, {name="korean_soyakkoma", lineHeight=13}, {name="korean_soyakkoma_borderless", lineHeight=13}, {name="korean_soyakkoma_inverted", lineHeight=13}, {name="korean_soyanon", lineHeight=12}, {name="korean_galmoori9", lineHeight=12}, {name="korean_galmoori11", lineHeight=14}}
|
EID.descriptions[languageCode].fonts = {{name="korean_hcrdotum", lineHeight=11, textboxWidth = 115}, {name="korean_lanapixel", lineHeight=12, textboxWidth = 115}, {name="korean_soyakkoma", lineHeight=13, textboxWidth = 115}, {name="korean_soyakkoma_borderless", lineHeight=13, textboxWidth = 115}, {name="korean_soyakkoma_inverted", lineHeight=13, textboxWidth = 115}, {name="korean_soyanon", lineHeight=12, textboxWidth = 115}, {name="korean_galmoori9", lineHeight=12, textboxWidth = 115}, {name="korean_galmoori11", lineHeight=14, textboxWidth = 115}}
|
||||||
|
|
||||||
---------- Collectibles ----------
|
---------- Collectibles ----------
|
||||||
EID.descriptions[languageCode].collectibles={
|
EID.descriptions[languageCode].collectibles={
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ EID.descriptions[languageCode].custom = {} -- table for custom entity descriptio
|
|||||||
EID.descriptions[languageCode].languageName = "Chinese"
|
EID.descriptions[languageCode].languageName = "Chinese"
|
||||||
|
|
||||||
-- Fonts to be used with this languagepack
|
-- Fonts to be used with this languagepack
|
||||||
EID.descriptions[languageCode].fonts = {{name = "default_cn", lineHeight = 14}}
|
EID.descriptions[languageCode].fonts = {{name = "default_cn", lineHeight = 14, textboxWidth = 150}}
|
||||||
|
|
||||||
---------- Collectibles ----------
|
---------- Collectibles ----------
|
||||||
EID.descriptions[languageCode].collectibles={
|
EID.descriptions[languageCode].collectibles={
|
||||||
|
|||||||
@@ -1111,6 +1111,7 @@ function EID:fixDefinedFont()
|
|||||||
end
|
end
|
||||||
EID.Config["FontType"] = EID.descriptions[curLang].fonts[1].name
|
EID.Config["FontType"] = EID.descriptions[curLang].fonts[1].name
|
||||||
EID.lineHeight = EID.descriptions[curLang].fonts[1].lineHeight
|
EID.lineHeight = EID.descriptions[curLang].fonts[1].lineHeight
|
||||||
|
EID.Config["TextboxWidth"] = EID.descriptions[curLang].fonts[1].textboxWidth
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1014,6 +1014,7 @@ if MCMLoaded then
|
|||||||
OnChange = function(currentNum)
|
OnChange = function(currentNum)
|
||||||
EID.Config["FontType"] = fontNames[currentNum]
|
EID.Config["FontType"] = fontNames[currentNum]
|
||||||
EID.lineHeight = fonts[currentNum].lineHeight
|
EID.lineHeight = fonts[currentNum].lineHeight
|
||||||
|
EID.Config["TextboxWidth"] = fonts[currentNum].textboxWidth
|
||||||
EID:fixDefinedFont()
|
EID:fixDefinedFont()
|
||||||
local fontFile = EID.Config["FontType"] or "default"
|
local fontFile = EID.Config["FontType"] or "default"
|
||||||
EID:loadFont(EID.modPath .. "resources/font/eid_"..fontFile..".fnt")
|
EID:loadFont(EID.modPath .. "resources/font/eid_"..fontFile..".fnt")
|
||||||
|
|||||||
Reference in new issue
Block a user