Fixed Local mode issues and added right alligned text mode for local mode

This commit is contained in:
Wofsauge committed 2021-12-04 22:12:13 +01:00
1 parent b5e0736479
commit 881c2cfd7b
3 files changed
+67 -43

No files matched your search

+42 -30
View File
@@ -870,27 +870,31 @@ if MCMLoaded then
}
)
-- LOCAL MODE
-- Display Mode
local displayModes = {"default", "local"}
local displayModeTips = {"default: text will be displayed in the top-left of the screen.", "local: text will be displayed under the described object."}
MCM.AddSetting(
"EID",
"Visuals",
{
Type = ModConfigMenu.OptionType.BOOLEAN,
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
return EID.Config["LocalMode"]
return AnIndexOf(displayModes, EID.Config["DisplayMode"])
end,
Minimum = 1,
Maximum = #displayModes,
Display = function()
local onOff = "False"
if EID.Config["LocalMode"] then
onOff = "True"
end
return "Local Mode: " .. onOff
return "Display mode: " .. EID.Config["DisplayMode"]
end,
OnChange = function(currentBool)
EID.Config["LocalMode"] = currentBool
OnChange = function(currentNum)
EID.Config["DisplayMode"] = displayModes[currentNum]
end,
Info = {"Sets the local rendering mode of the description text below currently inspected object"}
Info = function()
return {"Changes display mode of descriptions", displayModeTips[AnIndexOf(displayModes, EID.Config["DisplayMode"])]}
end
}
)
-- SCALE
local textScales = {0.5, 0.75, 1, 1.25, 1.5, 2}
MCM.AddSetting(
@@ -899,46 +903,54 @@ if MCMLoaded then
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
return AnIndexOf(textScales, EID.Config["Scale"])
if EID.Config["DisplayMode"] == "local" then
return AnIndexOf(textScales, EID.Config["LocalScale"])
else
return AnIndexOf(textScales, EID.Config["Scale"])
end
end,
Minimum = 1,
Maximum = 6,
Display = function()
if EID.Config["LocalMode"] then
return "Text Size (Pickup Description): " .. EID.Config["LocalScale"]
if EID.Config["DisplayMode"] == "local" then
return "Text Size (Local mode): " .. EID.Config["LocalScale"]
else
return "Text Size (All Description): " .. EID.Config["Scale"]
return "Text Size: " .. EID.Config["Scale"]
end
end,
OnChange = function(currentNum)
EID.Config["Scale"] = textScales[currentNum]
if EID.Config["DisplayMode"] == "local" then
EID.Config["LocalScale"] = textScales[currentNum]
else
EID.Config["Scale"] = textScales[currentNum]
end
EID.Scale = textScales[currentNum]
end,
Info = {"Change text size. CAN BE HARD TO READ IN SOME SETTINGS!"}
}
)
local textScales = {0.5, 0.75, 1, 1.25, 1.5, 2}
-- Transparency
MCM.AddSetting(
"EID",
"Visuals",
{
Type = ModConfigMenu.OptionType.NUMBER,
Type = ModConfigMenu.OptionType.BOOLEAN,
CurrentSetting = function()
return AnIndexOf(textScales, EID.Config["Scale"])
return EID.Config["LocalModeCentered"]
end,
Minimum = 1,
Maximum = 6,
Display = function()
if EID.Config["LocalMode"] then
return "Text Size (Room Description): " .. EID.Config["Scale"]
else
return ""
local onOff = "False"
if EID.Config["LocalModeCentered"] then
onOff = "True"
end
return "Local mode centered: " .. onOff
end,
OnChange = function(currentNum)
EID.Config["Scale"] = textScales[currentNum]
end,
Info = {"Change text size. CAN BE HARD TO READ IN SOME SETTINGS!"}
OnChange = function(currentBool)
EID.Config["LocalModeCentered"] = currentBool
end
}
)
)
-- Transparency
local transparencies = {0.1, 0.175, 0.25, 0.3, 0.4, 0.5, 0.6, 0.75, 0.8, 0.9, 1}
MCM.AddSetting(