From 39130d3045a651b3c9e32ba68c3d12ab2f0f2ef3 Mon Sep 17 00:00:00 2001 From: Buds Date: Sat, 22 May 2021 19:06:56 +0200 Subject: [PATCH] LDB: change label instead of text --- ItemRack/ItemRack.lua | 11 +++++++++-- ItemRack/ItemRackEvents.lua | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ItemRack/ItemRack.lua b/ItemRack/ItemRack.lua index eecd683..c771f12 100644 --- a/ItemRack/ItemRack.lua +++ b/ItemRack/ItemRack.lua @@ -518,7 +518,7 @@ function ItemRack.UpdateCurrentSet() ItemRackButton20Name:SetText(setname) end ItemRack.Broker.icon = texture - ItemRack.Broker.label = setname + ItemRack.Broker.text = setname end --[[ Item info gathering ]] @@ -1731,7 +1731,8 @@ function ItemRack.InitBroker() text = "ItemRack", icon = texture, OnClick = ItemRack.MinimapOnClick, - OnEnter = ItemRack.MinimapOnEnter + OnEnter = ItemRack.MinimapOnEnter, + OnLeave = ItemRack.MinimapOnLeave }) ItemRackSettings.minimap = ItemRackSettings.minimap or { hide = false } LDBIcon:Register("ItemRack", ItemRack.Broker, ItemRackSettings.minimap) @@ -1776,6 +1777,12 @@ function ItemRack.MinimapOnEnter(self) end end +function ItemRack.MinimapOnLeave(self) + if ItemRackSettings.MinimapTooltip=="ON" then + GameTooltip:Hide() + end +end + --[[ Non-LoD options support ]] function ItemRack.ToggleOptions(self,tab) diff --git a/ItemRack/ItemRackEvents.lua b/ItemRack/ItemRackEvents.lua index 851deaf..bca0261 100644 --- a/ItemRack/ItemRackEvents.lua +++ b/ItemRack/ItemRackEvents.lua @@ -461,14 +461,14 @@ function ItemRack.ReflectEventsRunning() prevIcon = ItemRack.Broker.icon prevText = ItemRack.Broker.text ItemRack.Broker.icon = [[Interface\AddOns\ItemRack\ItemRackGear]] - ItemRack.Broker.label = "..." + ItemRack.Broker.text = "..." else if ItemRackUser.Buttons[20] then ItemRackButton20Queue:Hide() end if prevIcon then ItemRack.Broker.icon = prevIcon - ItemRack.Broker.label = prevText + ItemRack.Broker.text = prevText end end end