diff --git a/features/eid_repentogon.lua b/features/eid_repentogon.lua index 409a605d..2a6afc4c 100644 --- a/features/eid_repentogon.lua +++ b/features/eid_repentogon.lua @@ -69,6 +69,9 @@ end local skipItemIDs = {} function EID:OnMenuRender() if EID.Config["RGON_ShowOnCollectionPage"] and MenuManager:GetActiveMenu() == MainMenuType.COLLECTION then + EID:HandleRenderingKeys() + if EID.isHidden then return end + if #skipItemIDs == 0 then -- build list of items not listed in the collectionpage local itemConfig = Isaac.GetItemConfig() for i = 1, EID:GetMaxCollectibleID(), 1 do diff --git a/main.lua b/main.lua index 785975d9..cd0b6628 100644 --- a/main.lua +++ b/main.lua @@ -402,6 +402,14 @@ function EID:CheckVoidAbsorbs(_, _, player) end EID:AddCallback(ModCallbacks.MC_PRE_USE_ITEM, EID.CheckVoidAbsorbs, CollectibleType.COLLECTIBLE_VOID) +function EID:HandleRenderingKeys() + -- scale key must be handled before resetting to non-local mode + EID:HandleScaleKey() + if Input.IsButtonTriggered(EID.Config["HideKey"], 0) or (EID.player and Input.IsButtonTriggered(EID.Config["HideButton"], EID.player.ControllerIndex)) then + EID.isHidden = not EID.isHidden + end +end + --------------------------------------------------------------------------- --------------------------Handle Scale Shortcut---------------------------- @@ -411,7 +419,7 @@ local scaleSpeed = 0.01 -- scale size per frame local scaleToBigger = true EID.CurrentScaleType = "Size" -- Size or LocalModeSize; checked by EID:getTextPosition() to not apply modifiers in local mode local scaleHoldFrame = 0 -local function handleScaleKey() +function EID:HandleScaleKey() local scaleKey = EID.Config["SizeHotkey"] -- press and hold ScaleKey @@ -1323,11 +1331,7 @@ function EID:OnRender() -- Do not check our hide or scale hotkeys while a tab that can modify them is open if EID.MCMCompat_isDisplayingEIDTab ~= "General" then - -- scale key must be handled before resetting to non-local mode - handleScaleKey() - if Input.IsButtonTriggered(EID.Config["HideKey"], 0) or Input.IsButtonTriggered(EID.Config["HideButton"], EID.player.ControllerIndex) then - EID.isHidden = not EID.isHidden - end + EID:HandleRenderingKeys() end EID.TabPreviewID = 0 EID.TabDescThisFrame = false