Added MCM for Position and fixed MCM Hud Offset calculation
This commit is contained in:
1 parent
57fb191533
commit
8a4a2420ef
2 files changed
+50
-2
No files matched your search
@@ -705,6 +705,7 @@ if EID.MCMLoaded or REPENTANCE then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
EID.isHidden = EID.Config["Hidden"]
|
EID.isHidden = EID.Config["Hidden"]
|
||||||
|
EID.UsedPosition = Vector(EID.Config["XPosition"], EID.Config["YPosition"])
|
||||||
EID:loadFont(EID.modPath .. "resources/font/eid_"..EID.Config["FontType"]..".fnt")
|
EID:loadFont(EID.modPath .. "resources/font/eid_"..EID.Config["FontType"]..".fnt")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+49
-2
@@ -33,7 +33,7 @@ function EID:renderMCMDummyDescription()
|
|||||||
if EID.MCMHudOffset == nil and ScreenHelper then
|
if EID.MCMHudOffset == nil and ScreenHelper then
|
||||||
EID.MCMHudOffset = ScreenHelper.GetOffset()
|
EID.MCMHudOffset = ScreenHelper.GetOffset()
|
||||||
end
|
end
|
||||||
EID:addTextPosModifier("MCM_HudOffset", Vector(EID.MCMHudOffset * 2, EID.MCMHudOffset))
|
EID:addTextPosModifier("MCM_HudOffset", Vector((EID.MCMHudOffset * 2) - 20, EID.MCMHudOffset - 10))
|
||||||
if MCM.IsVisible and EID.MCMCompat_isDisplayingEIDTab ~= "" then
|
if MCM.IsVisible and EID.MCMCompat_isDisplayingEIDTab ~= "" then
|
||||||
if EID.MCMCompat_isDisplayingEIDTab == "Mouse" and EID.Config["EnableMouseControls"] then
|
if EID.MCMCompat_isDisplayingEIDTab == "Mouse" and EID.Config["EnableMouseControls"] then
|
||||||
clearRenderDummyDesc()
|
clearRenderDummyDesc()
|
||||||
@@ -130,6 +130,54 @@ if MCMLoaded then
|
|||||||
Info = {"If translated names are available,","this changes how item names are displayed."}
|
Info = {"If translated names are available,","this changes how item names are displayed."}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
MCM.AddSpace("EID", "General")
|
||||||
|
|
||||||
|
-- Position X
|
||||||
|
MCM.AddSetting(
|
||||||
|
"EID",
|
||||||
|
"General",
|
||||||
|
{
|
||||||
|
Type = ModConfigMenu.OptionType.NUMBER,
|
||||||
|
CurrentSetting = function()
|
||||||
|
return EID.Config["XPosition"]
|
||||||
|
end,
|
||||||
|
Minimum = 0,
|
||||||
|
Maximum = 500,
|
||||||
|
ModifyBy = 5,
|
||||||
|
Display = function()
|
||||||
|
return "Position X: " .. EID.Config["XPosition"]
|
||||||
|
end,
|
||||||
|
OnChange = function(currentNum)
|
||||||
|
EID.Config["XPosition"] = currentNum
|
||||||
|
EID.UsedPosition = Vector(EID.Config["XPosition"], EID.Config["YPosition"])
|
||||||
|
end,
|
||||||
|
Info = {"Default = 60"}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
-- Position Y
|
||||||
|
MCM.AddSetting(
|
||||||
|
"EID",
|
||||||
|
"General",
|
||||||
|
{
|
||||||
|
Type = ModConfigMenu.OptionType.NUMBER,
|
||||||
|
CurrentSetting = function()
|
||||||
|
return EID.Config["YPosition"]
|
||||||
|
end,
|
||||||
|
Minimum = 0,
|
||||||
|
Maximum = 500,
|
||||||
|
ModifyBy = 5,
|
||||||
|
Display = function()
|
||||||
|
return "Position Y: " .. EID.Config["YPosition"]
|
||||||
|
end,
|
||||||
|
OnChange = function(currentNum)
|
||||||
|
EID.Config["YPosition"] = currentNum
|
||||||
|
EID.UsedPosition = Vector(EID.Config["XPosition"], EID.Config["YPosition"])
|
||||||
|
end,
|
||||||
|
Info = {"Default = 45"}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
MCM.AddSpace("EID", "General")
|
MCM.AddSpace("EID", "General")
|
||||||
|
|
||||||
-- Initial hiding
|
-- Initial hiding
|
||||||
@@ -263,7 +311,6 @@ if MCMLoaded then
|
|||||||
)
|
)
|
||||||
|
|
||||||
MCM.AddSpace("EID", "General")
|
MCM.AddSpace("EID", "General")
|
||||||
|
|
||||||
--indicator
|
--indicator
|
||||||
local indicators = {"arrow", "blink", "border", "highlight", "none"}
|
local indicators = {"arrow", "blink", "border", "highlight", "none"}
|
||||||
MCM.AddSetting(
|
MCM.AddSetting(
|
||||||
|
|||||||
Reference in new issue
Block a user