diff --git a/HitPoints/engaged.lua b/HitPoints/engaged.lua index 6fdd26d..9bd2dba 100644 --- a/HitPoints/engaged.lua +++ b/HitPoints/engaged.lua @@ -58,7 +58,8 @@ engaged.DrawWindow = function() windowFlags = bit.bor(windowFlags, ImGuiWindowFlags_NoMove); end if (imgui.Begin('HitPoints - Engaged', true, windowFlags)) then - imgui.SetWindowFontScale(engagedSettings.textScale); + local fontSize = imgui.GetFontSize(); + imgui.PushFont(nil, fontSize * engagedSettings.textScale); local winStartX, _ = imgui.GetWindowPos(); local playerTarget = AshitaCore:GetMemoryManager():GetTarget(); local targetIndex; @@ -153,16 +154,18 @@ engaged.DrawWindow = function() imgui.Separator(); - -- Create a clickable area for the entire target entry (after all content is drawn) - local entryHeight = yDist + engagedSettings.bgPadding; - -- Use InvisibleButton positioned exactly over the background area - imgui.SetCursorScreenPos({winX + cornerOffset, winY + cornerOffset}); - if imgui.InvisibleButton('TargetEntry'..k, {rectLength - cornerOffset, entryHeight}) then - -- Handle click - target this entity - local serverId = AshitaCore:GetMemoryManager():GetEntity():GetServerId(k); - local decimalId = tonumber(serverId); - if decimalId and decimalId > 0 then - AshitaCore:GetChatManager():QueueCommand(-1, '/target ' .. decimalId); + if not gShowConfig[1] then + -- Create a clickable area for the entire target entry (after all content is drawn) + local entryHeight = yDist + engagedSettings.bgPadding; + -- Use InvisibleButton positioned exactly over the background area + imgui.SetCursorScreenPos({winX + cornerOffset, winY + cornerOffset}); + if imgui.InvisibleButton('TargetEntry'..k, {rectLength - cornerOffset, entryHeight}) then + -- Handle click - target this entity + local serverId = AshitaCore:GetMemoryManager():GetEntity():GetServerId(k); + local decimalId = tonumber(serverId); + if decimalId and decimalId > 0 then + AshitaCore:GetChatManager():QueueCommand(-1, '/target ' .. decimalId); + end end end @@ -173,6 +176,7 @@ engaged.DrawWindow = function() end end end + imgui.PopFont(); end imgui.End(); end diff --git a/HitPoints/hitpoints.lua b/HitPoints/hitpoints.lua index 4b5df5d..8ee0f72 100644 --- a/HitPoints/hitpoints.lua +++ b/HitPoints/hitpoints.lua @@ -27,7 +27,7 @@ addon.name = 'HitPoints'; addon.author = 'Tirem'; -addon.version = '2.1'; +addon.version = '2.13'; addon.desc = 'Displays information bars about the target and engaged enemies.'; addon.link = 'https://github.com/tirem/hitpoints' @@ -232,6 +232,8 @@ local function DrawConfig() end imgui.EndTabItem(); end + + imgui.EndTabBar(); end imgui.End(); end