The Hidden state is now stored between sessions and can be modified with MCM

This commit is contained in:
Wofsauge committed 2021-06-14 19:22:31 +02:00
1 parent 042be37766
commit 2e70f83fff
2 files changed
+28

No files matched your search

+27
View File
@@ -65,6 +65,10 @@ if MCMLoaded then
MCM.AddText("EID", "Info", function() return "Version "..EID.Config.Version.." ("..EID.GameVersion..")" end)
MCM.AddSpace("EID", "Info")
MCM.AddText("EID", "Info", function() return "by Wofsauge" end)
MCM.AddSpace("EID", "Info")
MCM.AddText("EID", "Info", function() return EID.isHidden and"~~~~~~~~~~~~~~~~~~~~~~~~~~~" or "" end)
MCM.AddText("EID", "Info", function() return EID.isHidden and"~~~~~ CURRENTLY HIDDEN! ~~~~~" or "" end)
MCM.AddText("EID", "Info", function() return EID.isHidden and"~~~~~~~~ F2 to show ~~~~~~~~~" or "" end)
---------------------------------------------------------------------------
---------------------------------General-----------------------------------
@@ -113,6 +117,29 @@ if MCMLoaded then
)
MCM.AddSpace("EID", "General")
-- Initial hiding
MCM.AddSetting(
"EID",
"General",
{
Type = ModConfigMenu.OptionType.BOOLEAN,
CurrentSetting = function()
return EID.isHidden
end,
Display = function()
local onOff = "False"
if EID.isHidden then
onOff = "True"
end
return 'Is Hidden: ' .. onOff
end,
OnChange = function(currentBool)
EID.Config["Hidden"] = currentBool
EID.isHidden = currentBool
end
}
)
-- Disable on Curse
MCM.AddSetting(
"EID",