From 5345453b7c62ad77d0df28e47ef600e1f54fbb35 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Sun, 6 Feb 2022 00:21:59 -0500 Subject: [PATCH] fix Local Mode having modifiers applied --- main.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.lua b/main.lua index bf7ebc2d..8df9e104 100644 --- a/main.lua +++ b/main.lua @@ -384,7 +384,7 @@ local scaleMin = 0.1 local scaleMax = 2 local scaleSpeed = 0.01 -- scale size per frame local scaleToBigger = true -local scaleConfigName = "Size" +EID.CurrentScaleType = "Size" -- Size or LocalModeSize; checked by EID:getTextPosition() to not apply modifiers in local mode local scaleHoldFrame = 0 local function handleScaleKey() local scaleKey = EID.Config["SizeHotkey"] @@ -406,7 +406,7 @@ local function handleScaleKey() end end EID.Scale = newScale - EID.Config[scaleConfigName] = newScale + EID.Config[EID.CurrentScaleType] = newScale else scaleHoldFrame = scaleHoldFrame + 1 end @@ -426,7 +426,7 @@ local function handleScaleKey() scale = 1 end - EID.Config[scaleConfigName] = scale + EID.Config[EID.CurrentScaleType] = scale EID.Scale = scale end end @@ -736,7 +736,7 @@ function EID:PositionLocalMode(entity) -- don't use Local Mode for descriptions without an entity (or dice floors) if EID.Config["DisplayMode"] == "local" and entity and entity.Variant ~= EffectVariant.DICE_FLOOR then EID.Scale = EID.Config["LocalModeSize"] - scaleConfigName = "LocalModeSize" + EID.CurrentScaleType = "LocalModeSize" local textBoxWidth = EID.Config["LocalModeCentered"] and tonumber(EID.Config["TextboxWidth"])/2 * EID.Scale or -30 local textPosOffset = Vector(-textBoxWidth, 20) EID:alterTextPos(Isaac.WorldToScreen(entity.Position + textPosOffset)) @@ -750,7 +750,7 @@ function EID:PositionLocalMode(entity) end else EID.Scale = EID.Config["Size"] - scaleConfigName = "Size" + EID.CurrentScaleType = "Size" EID.UsedPosition = Vector(EID.Config["XPosition"], EID.Config["YPosition"]) end end