Skip to content

Commit

Permalink
Fix the tooltip did not show issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zesming committed Sep 22, 2021
1 parent 9cee4ff commit 6a0baec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
24 changes: 16 additions & 8 deletions BestInSlot/BISBrowser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ local modName = ...;
local iconCutoff = 6
local iconPath = "Interface\\GLUES\\CHARACTERCREATE\\UI-CharacterCreate-Classes" -- Classes icon path

bb = CreateFrame("Frame",modName,UIParent,BackdropTemplateMixin and "BackdropTemplate"); -- 9.0.1: Using BackdropTemplate
bb = CreateFrame("Frame",modName,UIParent,BackdropTemplateMixin and "BackdropTemplate");
tinsert(UISpecialFrames, modName); -- Make frame closeable with ESC

bb.items = {}
bb.classItems = {}
bb.showedClassTitle = {}
Expand Down Expand Up @@ -69,7 +71,7 @@ local function gearItem(itemInfo, index)
end

item:SetScript("OnEnter", function()
if (itemLink) then
if (itemInfo.itemLink) then
GameTooltip:SetOwner(gearItemString, "ANCHOR_TOP")
GameTooltip:SetHyperlink(itemInfo.itemLink)
GameTooltip:Show()
Expand Down Expand Up @@ -189,7 +191,7 @@ local function classItem(class, spec, index)

local classString = item:CreateFontString(nil,"ARTWORK","GameFontHighlight");
classString:SetPoint("TOPLEFT", 2, 0)
classString:SetFont(classString:GetFont(),16,"THICKOUTLINE");
classString:SetFont(classString:GetFont(), 15,"THICKOUTLINE");
classString:SetText(classIconString .. " " .. class .. " " .. spec)
classString:SetTextColor(color.r, color.g, color.b)

Expand Down Expand Up @@ -289,11 +291,17 @@ bb.leftContainer:SetPoint("TOPLEFT", bb.container, "TOPRIGHT", 12, 0);
bb.leftContainer:SetPoint("BOTTOMRIGHT", -12, 42);
bb.leftContainer:SetBackdropColor(0.1,0.1,0.2,1);

bb.footer = bb:CreateFontString(nil,"ARTWORK","GameFontHighlight");
bb.footer:SetPoint("BOTTOMRIGHT",-12,12);
bb.footer:SetFont(bb.footer:GetFont(),10,"THICKOUTLINE");
bb.footer:SetText('Powered by zesming, a.k.a 明子 @辛洛斯 - 娱乐夜不眠')
bb.footer:SetTextColor(1, 1, 1, 0.5)
bb.quote = bb:CreateFontString(nil,"ARTWORK","GameFontHighlight");
bb.quote:SetPoint("BOTTOMLEFT", 12, 12);
bb.quote:SetFont(bb.quote:GetFont(),10,"THICKOUTLINE");
bb.quote:SetText('BIS data from @蓝色隐士 / @俏俏')
bb.quote:SetTextColor(1, 1, 1, 0.5)

bb.author = bb:CreateFontString(nil,"ARTWORK","GameFontHighlight");
bb.author:SetPoint("BOTTOMRIGHT",-12, 12);
bb.author:SetFont(bb.author:GetFont(),10,"THICKOUTLINE");
bb.author:SetText('Powered by zesming, a.k.a 明子 @辛洛斯 - 娱乐夜不眠')
bb.author:SetTextColor(1, 1, 1, 0.5)

_G["SLASH_".."BB".."1"] = "/bb";
_G["SLASH_".."BB".."2"] = "/ybm";
Expand Down
1 change: 0 additions & 1 deletion BestInSlot/Data/WarriorProtection.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ BIS:BISItem(bis, "32263", "Legs", "", 3)
BIS:BISItem(bis, "32268", "Feet", "", 3)
BIS:BISItem(bis, "32261", "Finger", "", 3)
BIS:BISItem(bis, "30083", "Finger", "", 3)
BIS:BISItem(bis, "30501", "Trinket", "", 3)
BIS:BISItem(bis, "30629", "Trinket", "", 3)
BIS:BISItem(bis, "33669", "MainHand", "", 3)
BIS:BISItem(bis, "32375", "SecondaryHand", "", 3)
Expand Down

0 comments on commit 6a0baec

Please sign in to comment.