Merge branch 'wofsauge:master' into master
This commit is contained in:
32 files changed
+2998
-1164
No files matched your search
+97
-9
@@ -27,26 +27,28 @@ local colorNameArray = {}
|
||||
local function renderDummyDesc()
|
||||
MCMCompat_oldPermanentObj = EID.permanentDisplayTextObj
|
||||
local demoDescObj = EID:getDescriptionObj(5, 100, 33)
|
||||
demoDescObj.Name = "Demo Object Name"
|
||||
demoDescObj.Transformation = "Demo Transformation"
|
||||
demoDescObj.Description = "A very cool description as a demonstration of the power of EID!#\1 This is also a cool line#This line loves you {{Heart}}"
|
||||
demoDescObj.Name = EID:getDescriptionEntry("MCM","DemoObjectName")
|
||||
demoDescObj.Transformation = EID:getDescriptionEntry("MCM","DemoObjectTransformation")
|
||||
demoDescObj.Description = EID:getDescriptionEntry("MCM","DemoObjectText")
|
||||
EID:displayPermanentText(demoDescObj)
|
||||
end
|
||||
|
||||
-- get list of all defined fonts per language file
|
||||
local fonts = {}
|
||||
local fontNames = {}
|
||||
for k, pack in pairs(EID.descriptions) do
|
||||
if pack.fonts then
|
||||
for _,fontToAdd in ipairs(pack.fonts) do
|
||||
local exists = false
|
||||
for _,font in ipairs(fonts) do
|
||||
if font == fontToAdd then
|
||||
for _,font in ipairs(fontNames) do
|
||||
if font == fontToAdd.name then
|
||||
exists = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if not exists then
|
||||
table.insert(fonts, fontToAdd)
|
||||
table.insert(fontNames, fontToAdd.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -217,7 +219,7 @@ if MCMLoaded then
|
||||
Minimum = 1,
|
||||
Maximum = #(EID.Languages),
|
||||
Display = function()
|
||||
EID.MCMCompat_isDisplayingEIDTab = "";
|
||||
EID.MCMCompat_isDisplayingEIDTab = "Visuals"
|
||||
return "Language: " .. displayLanguage[AnIndexOf(EID.Languages, EID.Config["Language"])]
|
||||
end,
|
||||
OnChange = function(currentNum)
|
||||
@@ -306,6 +308,48 @@ if MCMLoaded then
|
||||
Info = {"Default = 45"}
|
||||
}
|
||||
)
|
||||
-- Line Height
|
||||
MCM.AddSetting(
|
||||
"EID",
|
||||
"General",
|
||||
{
|
||||
Type = ModConfigMenu.OptionType.NUMBER,
|
||||
CurrentSetting = function()
|
||||
return EID.lineHeight
|
||||
end,
|
||||
Minimum = 1,
|
||||
Maximum = 100,
|
||||
Display = function()
|
||||
return "Line Height: " .. EID.lineHeight
|
||||
end,
|
||||
OnChange = function(currentNum)
|
||||
EID.lineHeight = currentNum
|
||||
end,
|
||||
Info = {"Default = 11","Lineheight will automatically change when changing a font/language"}
|
||||
}
|
||||
)
|
||||
-- Textbox Width
|
||||
MCM.AddSetting(
|
||||
"EID",
|
||||
"General",
|
||||
{
|
||||
Type = ModConfigMenu.OptionType.NUMBER,
|
||||
CurrentSetting = function()
|
||||
return EID.Config["TextboxWidth"]
|
||||
end,
|
||||
Minimum = 1,
|
||||
Maximum = 500,
|
||||
ModifyBy = 5,
|
||||
Display = function()
|
||||
return "Textbox Width: " .. EID.Config["TextboxWidth"]
|
||||
end,
|
||||
OnChange = function(currentNum)
|
||||
EID.Config["TextboxWidth"] = currentNum
|
||||
end,
|
||||
Info = {"Default = 100","Width of the EID textbox, in pixels"}
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
MCM.AddSpace("EID", "General")
|
||||
|
||||
@@ -959,16 +1003,17 @@ if MCMLoaded then
|
||||
{
|
||||
Type = ModConfigMenu.OptionType.NUMBER,
|
||||
CurrentSetting = function()
|
||||
return AnIndexOf(fonts, EID.Config["FontType"])
|
||||
return AnIndexOf(fontNames, EID.Config["FontType"])
|
||||
end,
|
||||
Minimum = 1,
|
||||
Maximum = #fonts,
|
||||
Maximum = #fontNames,
|
||||
Display = function()
|
||||
EID.MCMCompat_isDisplayingEIDTab = "Visuals";
|
||||
return "Font Type: " .. EID.Config["FontType"]
|
||||
end,
|
||||
OnChange = function(currentNum)
|
||||
EID.Config["FontType"] = fonts[currentNum]
|
||||
EID.Config["FontType"] = fontNames[currentNum]
|
||||
EID.lineHeight = fonts[currentNum].lineHeight
|
||||
EID:fixDefinedFont()
|
||||
local fontFile = EID.Config["FontType"] or "default"
|
||||
EID:loadFont(EID.modPath .. "resources/font/eid_"..fontFile..".fnt")
|
||||
@@ -1208,6 +1253,26 @@ if MCMLoaded then
|
||||
}
|
||||
)
|
||||
end
|
||||
-------Mod indicator for modded items---------
|
||||
local modIndicatorDisplays = {"Both","Name only","Icon only", "None"}
|
||||
MCM.AddSetting(
|
||||
"EID",
|
||||
"Visuals",
|
||||
{
|
||||
Type = ModConfigMenu.OptionType.NUMBER,
|
||||
CurrentSetting = function()
|
||||
return AnIndexOf(modIndicatorDisplays, EID.Config["ModIndicatorDisplay"])
|
||||
end,
|
||||
Minimum = 1,
|
||||
Maximum = #modIndicatorDisplays,
|
||||
Display = function()
|
||||
return "Mod indicator displayed for: " .. EID.Config["ModIndicatorDisplay"]
|
||||
end,
|
||||
OnChange = function(currentNum)
|
||||
EID.Config["ModIndicatorDisplay"] = modIndicatorDisplays[currentNum]
|
||||
end
|
||||
}
|
||||
)
|
||||
-------Object ID---------
|
||||
MCM.AddSetting(
|
||||
"EID",
|
||||
@@ -1567,4 +1632,27 @@ if MCMLoaded then
|
||||
Info = {"Changes the color of error messages like Unknown pills"}
|
||||
}
|
||||
)
|
||||
-- Mod indicator Color
|
||||
MCM.AddSetting(
|
||||
"EID",
|
||||
"Colors",
|
||||
{
|
||||
Type = ModConfigMenu.OptionType.NUMBER,
|
||||
CurrentSetting = function()
|
||||
return AnIndexOf(colorNameArray, EID.Config["ModIndicatorTextColor"])
|
||||
end,
|
||||
Minimum = 0,
|
||||
Maximum = 1000,
|
||||
Display = function()
|
||||
if EID.Config["ModIndicatorTextColor"] == nil then EID.Config["TextColor"] = EID.DefaultConfig["ModIndicatorTextColor"] end
|
||||
return "Mod Indicator: " .. string.gsub(EID.Config["ModIndicatorTextColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["ModIndicatorTextColor"]).."/"..#colorNameArray..")"
|
||||
end,
|
||||
OnChange = function(currentNum)
|
||||
if currentNum == 0 then currentNum = #colorNameArray end
|
||||
if currentNum > #colorNameArray then currentNum = 1 end
|
||||
EID.Config["ModIndicatorTextColor"] = colorNameArray[currentNum]
|
||||
end,
|
||||
Info = {"Changes the color of mod indicator texts (as long as they are enabled)."}
|
||||
}
|
||||
)
|
||||
end
|
||||
Reference in new issue
Block a user