Skip to content

Commit

Permalink
LDB: change label instead of text
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbuds authored and Rottenbeer committed May 23, 2021
1 parent 1bb8eee commit 39130d3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions ItemRack/ItemRack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]]
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions ItemRack/ItemRackEvents.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 39130d3

Please sign in to comment.