Usable Fonts can now be defined per languagepack

This commit is contained in:
Wofsauge committed 2022-01-09 01:47:10 +01:00
1 parent 2e47c85dbe
commit f91fcf23be
4 files changed
+53 -10

No files matched your search

+13
View File
@@ -945,6 +945,19 @@ function EID:getEntityData(entity, str)
return nil
end
-- Function to fix font compatibility. Resets config font to a value compatible with your current language
function EID:fixDefinedFont()
local curLang = EID.Config["Language"]
local curFont = EID.Config["FontType"]
for _, v in ipairs(EID.descriptions[curLang].fonts) do
if curFont == v then
return false
end
end
EID.Config["FontType"] = EID.descriptions[curLang].fonts[1]
return true
end
-- Creates a copy of a KColor object. This prevents overwriting existing
function EID:copyKColor(colorObj)
return KColor(colorObj.Red, colorObj.Green, colorObj.Blue, colorObj.Alpha)