11---- ---------------------------------------------------------------------------
22-- EUI_QoL.lua
33-- Runtime logic for all Quality-of-Life features toggled in the QoL Features
4- -- tab of Global Settings. No UI code here — only gameplay behaviour.
4+ -- tab of Global Settings. No UI code here -- only gameplay behaviour.
55---- ---------------------------------------------------------------------------
66
77local qolFrame = CreateFrame (" Frame" )
@@ -106,7 +106,7 @@ qolFrame:SetScript("OnEvent", function(self)
106106 -- Food & Drink Macro
107107 ---- -----------------------------------------------------------------------
108108 do
109- -- Only Mage food and actual drinks — NO buff food (stat food stays for raid)
109+ -- Only Mage food and actual drinks -- NO buff food (stat food stays for raid)
110110 local CONSUMABLE_LIST = {
111111 -- Mage food (restores both health and mana, no stat buff)
112112 { id = 113509 }, -- Conjured Mana Bun
@@ -335,7 +335,7 @@ qolFrame:SetScript("OnEvent", function(self)
335335 end
336336
337337 local function OpenAllContainers ()
338- if not ( EllesmereUIDB and EllesmereUIDB .autoOpenContainers ) then return end
338+ if EllesmereUIDB and EllesmereUIDB .autoOpenContainers == false then return end
339339 if InCombatLockdown () then return end
340340 for bag = BACKPACK_CONTAINER , NUM_BAG_SLOTS do
341341 for slot = 1 , C_Container .GetContainerNumSlots (bag ) do
@@ -349,7 +349,7 @@ qolFrame:SetScript("OnEvent", function(self)
349349 local containerFrame = CreateFrame (" Frame" )
350350 containerFrame :RegisterEvent (" BAG_UPDATE_DELAYED" )
351351 containerFrame :SetScript (" OnEvent" , function ()
352- if not ( EllesmereUIDB and EllesmereUIDB .autoOpenContainers ) then return end
352+ if EllesmereUIDB and EllesmereUIDB .autoOpenContainers == false then return end
353353 if not pendingOpen then
354354 pendingOpen = true
355355 C_Timer .After (0.3 , function ()
@@ -367,7 +367,7 @@ qolFrame:SetScript("OnEvent", function(self)
367367 local function ApplyScreenshotStatus ()
368368 local actionStatus = _G .ActionStatus
369369 if not actionStatus then return end
370- if EllesmereUIDB and EllesmereUIDB .hideScreenshotStatus then
370+ if not EllesmereUIDB or EllesmereUIDB .hideScreenshotStatus ~= false then
371371 actionStatus :UnregisterEvent (" SCREENSHOT_STARTED" )
372372 actionStatus :UnregisterEvent (" SCREENSHOT_SUCCEEDED" )
373373 actionStatus :UnregisterEvent (" SCREENSHOT_FAILED" )
@@ -465,14 +465,12 @@ qolFrame:SetScript("OnEvent", function(self)
465465 trainBtn :SetScript (" OnEnter" , function (self )
466466 local n , gold = TrainableSummary ()
467467 if n <= 0 then return end
468- GameTooltip :SetOwner (self , " ANCHOR_TOP" , 0 , 4 )
469- GameTooltip :ClearLines ()
470- GameTooltip :AddLine (string.format (" Learn %d skill%s for %s" ,
468+ local msg = string.format (" Learn %d skill%s for %s" ,
471469 n , n == 1 and " " or " s" ,
472- C_CurrencyInfo .GetCoinTextureString (gold )))
473- GameTooltip : Show ( )
470+ C_CurrencyInfo .GetCoinTextureString (gold ))
471+ EllesmereUI . ShowWidgetTooltip ( self , msg )
474472 end )
475- trainBtn :SetScript (" OnLeave" , GameTooltip_Hide )
473+ trainBtn :SetScript (" OnLeave" , function () EllesmereUI . HideWidgetTooltip () end )
476474
477475 if not hooked then
478476 hooksecurefunc (" ClassTrainerFrame_Update" , RefreshButton )
@@ -549,7 +547,7 @@ qolFrame:SetScript("OnEvent", function(self)
549547 if CanMerchantRepair () then
550548 local cost , canRepair = GetRepairAllCost ()
551549 if canRepair and cost > 0 then
552- local useGuild = EllesmereUIDB .autoRepairGuild
550+ local useGuild = ( EllesmereUIDB .autoRepairGuild ~= false )
553551 and IsInGuild ()
554552 and CanGuildBankRepair ()
555553 and cost <= GetGuildBankWithdrawMoney ()
@@ -581,7 +579,7 @@ qolFrame:SetScript("OnEvent", function(self)
581579 lootFrame :RegisterEvent (" LOOT_READY" )
582580 lootFrame :SetScript (" OnEvent" , function ()
583581 if not (EllesmereUIDB and EllesmereUIDB .quickLoot ) then return end
584- if EllesmereUIDB . quickLootShiftSkip and IsShiftKeyDown () then return end
582+ if IsShiftKeyDown () then return end
585583 for i = 1 , GetNumLootItems () do
586584 local index = i
587585 C_Timer .After (0.05 * index , function ()
@@ -605,8 +603,7 @@ qolFrame:SetScript("OnEvent", function(self)
605603 local editBox = self .editBox or (self .GetEditBox and self :GetEditBox ())
606604 if not editBox then return end
607605 editBox :SetText (DELETE_ITEM_CONFIRM_STRING )
608- editBox :ClearFocus ()
609- editBox :SetAutoFocus (false )
606+ editBox :SetFocus ()
610607 end )
611608 end
612609 end
@@ -759,7 +756,7 @@ qolFrame:SetScript("OnEvent", function(self)
759756 ---- -----------------------------------------------------------------------
760757 do
761758 local function InsertKeystone ()
762- if not ( EllesmereUIDB and EllesmereUIDB .autoInsertKeystone ) then return end
759+ if EllesmereUIDB and EllesmereUIDB .autoInsertKeystone == false then return end
763760 if C_ChallengeMode .GetSlottedKeystoneInfo () then return end
764761 for bag = BACKPACK_CONTAINER , NUM_BAG_SLOTS do
765762 local slots = C_Container .GetContainerNumSlots (bag )
0 commit comments