Fix EID toggle key getting triggered while setting it
This commit is contained in:
1 parent
cc3edf0aa2
commit
69b3a178b4
1 file changed
+7
-6
@@ -387,7 +387,6 @@ local scaleToBigger = true
|
|||||||
local scaleConfigName = "Size"
|
local scaleConfigName = "Size"
|
||||||
local scaleHoldFrame = 0
|
local scaleHoldFrame = 0
|
||||||
local function handleScaleKey()
|
local function handleScaleKey()
|
||||||
if not ModConfigMenu or not ModConfigMenu.IsVisible then
|
|
||||||
local scaleKey = EID.Config["SizeHotkey"]
|
local scaleKey = EID.Config["SizeHotkey"]
|
||||||
|
|
||||||
-- press and hold ScaleKey
|
-- press and hold ScaleKey
|
||||||
@@ -431,7 +430,6 @@ local function handleScaleKey()
|
|||||||
EID.Scale = scale
|
EID.Scale = scale
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
---------------------------Printing Functions------------------------------
|
---------------------------Printing Functions------------------------------
|
||||||
@@ -944,17 +942,20 @@ local function onRender(t)
|
|||||||
EID.OptionChanged = EID.MCM_OptionChanged
|
EID.OptionChanged = EID.MCM_OptionChanged
|
||||||
EID.MCM_OptionChanged = false
|
EID.MCM_OptionChanged = false
|
||||||
EID:resumeCoroutines()
|
EID:resumeCoroutines()
|
||||||
|
|
||||||
|
-- Do not check our hotkeys while MCM is open, or they will be triggered while rebinding
|
||||||
|
if not ModConfigMenu or not ModConfigMenu.IsVisible then
|
||||||
handleScaleKey()
|
handleScaleKey()
|
||||||
|
if Input.IsButtonTriggered(EID.Config["HideKey"], 0) or Input.IsButtonTriggered(EID.Config["HideButton"], EID.player.ControllerIndex) then
|
||||||
|
EID.isHidden = not EID.isHidden
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
EID.isDisplaying = false
|
EID.isDisplaying = false
|
||||||
EID:setPlayer()
|
EID:setPlayer()
|
||||||
EID:PositionLocalMode() -- default to non-local mode to fix MCM / Bag errors
|
EID:PositionLocalMode() -- default to non-local mode to fix MCM / Bag errors
|
||||||
EID.TabPreviewID = 0
|
EID.TabPreviewID = 0
|
||||||
|
|
||||||
if Input.IsButtonTriggered(EID.Config["HideKey"], 0) or Input.IsButtonTriggered(EID.Config["HideButton"], EID.player.ControllerIndex) then
|
|
||||||
EID.isHidden = not EID.isHidden
|
|
||||||
end
|
|
||||||
|
|
||||||
if ModConfigMenu and ModConfigMenu.IsVisible and ModConfigMenu.Config["Mod Config Menu"].HideHudInMenu and EID.MCMCompat_isDisplayingEIDTab ~= "Visuals" and EID.MCMCompat_isDisplayingEIDTab ~= "Crafting" then --if the mod config menu exists, is opened and Hide Hud is enabled, and ModConfigMenu isn't currently in the "Visuals" or "Crafting" tab of EID
|
if ModConfigMenu and ModConfigMenu.IsVisible and ModConfigMenu.Config["Mod Config Menu"].HideHudInMenu and EID.MCMCompat_isDisplayingEIDTab ~= "Visuals" and EID.MCMCompat_isDisplayingEIDTab ~= "Crafting" then --if the mod config menu exists, is opened and Hide Hud is enabled, and ModConfigMenu isn't currently in the "Visuals" or "Crafting" tab of EID
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user