Added Hud Offset config option and fixed config changes made by MCM not being saved correctly
This commit is contained in:
1 parent
5838e8f2e4
commit
bc04732263
4 files changed
+19
-20
No files matched your search
+5
-5
@@ -6,7 +6,6 @@ local MCMCompat_isDisplayingDummyMCMObj = false
|
||||
local MCMCompat_oldPermanentObj = false
|
||||
EID.MCMLoaded = MCMLoaded
|
||||
local colorNameArray = {}
|
||||
EID.MCMHudOffset = 10
|
||||
|
||||
local function renderDummyDesc()
|
||||
MCMCompat_oldPermanentObj = EID.permanentDisplayTextObj
|
||||
@@ -29,11 +28,12 @@ end
|
||||
|
||||
function EID:renderMCMDummyDescription()
|
||||
if MCMLoaded then
|
||||
EID.MCMHudOffset = ModConfigMenu.Config["General"].HudOffset
|
||||
if EID.MCMHudOffset == nil and ScreenHelper then
|
||||
EID.MCMHudOffset = ScreenHelper.GetOffset()
|
||||
local hudOffset = ModConfigMenu.Config["General"].HudOffset
|
||||
if hudOffset == nil and ScreenHelper then
|
||||
hudOffset = ScreenHelper.GetOffset()
|
||||
end
|
||||
EID:addTextPosModifier("MCM_HudOffset", Vector((EID.MCMHudOffset * 2) - 20, EID.MCMHudOffset - 10))
|
||||
EID.Config["HUDOffset"] = hudOffset
|
||||
EID:addTextPosModifier("HudOffset", Vector((hudOffset * 2) - 20, hudOffset - 10))
|
||||
if MCM.IsVisible and EID.MCMCompat_isDisplayingEIDTab ~= "" then
|
||||
if EID.MCMCompat_isDisplayingEIDTab == "Mouse" and EID.Config["EnableMouseControls"] then
|
||||
clearRenderDummyDesc()
|
||||
|
||||
Reference in new issue
Block a user