Added feature to change font type. added 2 new font types
This commit is contained in:
1 parent
ff19520056
commit
0990d2e048
8 files changed
+30
-3
No files matched your search
@@ -12,6 +12,9 @@ EIDConfig = {
|
|||||||
-- Russian (https://steamcommunity.com/sharedfiles/filedetails/?id=1552851879)
|
-- Russian (https://steamcommunity.com/sharedfiles/filedetails/?id=1552851879)
|
||||||
-- If you want to make a translation, please contact me :)
|
-- If you want to make a translation, please contact me :)
|
||||||
["Language"] = "en_us",
|
["Language"] = "en_us",
|
||||||
|
-- Change font type. Values are [default, borderless, inverted]
|
||||||
|
-- Default = "default"
|
||||||
|
["FontType"] = "default",
|
||||||
-- Change Width of the info boxes. (In characters)
|
-- Change Width of the info boxes. (In characters)
|
||||||
-- Default = 25
|
-- Default = 25
|
||||||
["TextboxWidth"] = 25,
|
["TextboxWidth"] = 25,
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ EID.modPath = string.gsub(EID.modPath, "\\", "/")
|
|||||||
EID.modPath = string.gsub(EID.modPath, ":/", ":\\")
|
EID.modPath = string.gsub(EID.modPath, ":/", ":\\")
|
||||||
|
|
||||||
EID.font = Font() -- init font object
|
EID.font = Font() -- init font object
|
||||||
EID:loadFont(EID.modPath .. "resources/font/eid_default.fnt")
|
local fontFile = EIDConfig["FontType"] or "default"
|
||||||
|
EID:loadFont(EID.modPath .. "resources/font/eid_"..fontFile..".fnt")
|
||||||
|
|
||||||
--Makes textscale smaller, when using detailed english descriptions
|
--Makes textscale smaller, when using detailed english descriptions
|
||||||
if EIDConfig["Language"] == "en_us_detailed" and EIDConfig["Scale"] > 0.5 then
|
if EIDConfig["Language"] == "en_us_detailed" and EIDConfig["Scale"] > 0.5 then
|
||||||
|
|||||||
+25
-2
@@ -7,7 +7,7 @@ if ModConfigMenu then
|
|||||||
end
|
end
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Language
|
-- Language
|
||||||
local displayLanguage = {"English", "English (detailed)", "French", "Portuguese", "Russian", "Spanish", "Bulgarian (WIP)", "Polish (WIP)", "Turkish (WIP)"}
|
local displayLanguage = {"English", "English (detailed)", "French", "Portuguese", "Russian", "Spanish", "Bulgarian (WIP)", "Polish (WIP)", "Turkish (WIP)"}
|
||||||
local langLookup = {"en_us", "en_us_detailed", "fr", "pt", "ru", "spa", "bul", "pl", "turkish"}
|
local langLookup = {"en_us", "en_us_detailed", "fr", "pt", "ru", "spa", "bul", "pl", "turkish"}
|
||||||
@@ -29,7 +29,7 @@ if ModConfigMenu then
|
|||||||
end
|
end
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
-- Disable on Curse
|
-- Disable on Curse
|
||||||
ModConfigMenu.AddSetting(
|
ModConfigMenu.AddSetting(
|
||||||
"EID",
|
"EID",
|
||||||
@@ -333,6 +333,29 @@ if ModConfigMenu then
|
|||||||
end
|
end
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
local fontTypes = {"default","borderless","inverted"}
|
||||||
|
ModConfigMenu.AddSetting(
|
||||||
|
"EID",
|
||||||
|
"Display",
|
||||||
|
{
|
||||||
|
Type = ModConfigMenuOptionType.NUMBER,
|
||||||
|
CurrentSetting = function()
|
||||||
|
return AnIndexOf(fontTypes, EIDConfig["FontType"])
|
||||||
|
end,
|
||||||
|
Minimum = 1,
|
||||||
|
Maximum = #fontTypes,
|
||||||
|
Display = function()
|
||||||
|
return "Font Type: " .. EIDConfig["FontType"]
|
||||||
|
end,
|
||||||
|
OnChange = function(currentNum)
|
||||||
|
EIDConfig["FontType"] = fontTypes[currentNum]
|
||||||
|
local fontFile = EIDConfig["FontType"] or "default"
|
||||||
|
EID:loadFont(EID.modPath .. "resources/font/eid_"..fontFile..".fnt")
|
||||||
|
end
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
--------ShowItemName---------
|
--------ShowItemName---------
|
||||||
ModConfigMenu.AddSetting(
|
ModConfigMenu.AddSetting(
|
||||||
"EID",
|
"EID",
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 143 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 167 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 143 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 238 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
Reference in new issue
Block a user