2424function TooltipClass :Clear ()
2525 wipeTable (self .lines )
2626 wipeTable (self .blocks )
27- self .itemTooltip = false
27+ self .tooltipHeader = false
2828 self .titleYOffset = 0
2929 self .recipe = nil
3030 self .center = false
@@ -86,8 +86,8 @@ function TooltipClass:AddSeparator(size)
8686
8787 local separatorImage = nil
8888
89- if self .itemTooltip then
90- local rarity = tostring (self .itemTooltip ):upper ()
89+ if self .tooltipHeader then
90+ local rarity = tostring (self .tooltipHeader ):upper ()
9191 local separatorConfigs = {
9292 RELIC = " Assets/ItemsSeparatorFoil.png" ,
9393 UNIQUE = " Assets/ItemsSeparatorUnique.png" ,
@@ -258,8 +258,8 @@ function TooltipClass:Draw(x, y, w, h, viewPort)
258258 end
259259 local ttW , ttH = self :GetSize ()
260260
261- -- ensure ttW is at least title width + 50 pixels, this fixes the header image for Magic items and some Tree passives. NOT WORKING NOW?????
262- if self .itemTooltip and self .lines [1 ] and self .lines [1 ].text then
261+ -- ensure ttW is at least title width + 50 pixels, this fixes the header image for Magic items and some Tree passives.
262+ if self .tooltipHeader and self .lines [1 ] and self .lines [1 ].text then
263263 local titleW = DrawStringWidth (self .lines [1 ].size , " VAR" , self .lines [1 ].text )
264264 if titleW + 50 > ttW then
265265 ttW = titleW + 50
@@ -276,10 +276,11 @@ function TooltipClass:Draw(x, y, w, h, viewPort)
276276 NOTABLE = {left = " Assets/NotablePassiveHeaderLeft.png" ,middle = " Assets/NotablePassiveHeaderMiddle.png" ,right = " Assets/NotablePassiveHeaderRight.png" ,height = 38 ,sideWidth = 38 ,middleWidth = 32 ,textYOffset = 2 },
277277 PASSIVE = {left = " Assets/NormalPassiveHeaderLeft.png" ,middle = " Assets/NormalPassiveHeaderMiddle.png" ,right = " Assets/NormalPassiveHeaderRight.png" ,height = 38 ,sideWidth = 32 ,middleWidth = 32 ,textYOffset = 2 },
278278 KEYSTONE = {left = " Assets/KeystonePassiveHeaderLeft.png" ,middle = " Assets/KeystonePassiveHeaderMiddle.png" ,right = " Assets/KeystonePassiveHeaderRight.png" ,height = 38 ,sideWidth = 32 ,middleWidth = 32 ,textYOffset = 2 },
279+ ASCENDANCY = {left = " Assets/AscendancyPassiveHeaderLeft.png" ,middle = " Assets/AscendancyPassiveHeaderMiddle.png" ,right = " Assets/AscendancyPassiveHeaderRight.png" ,height = 38 ,sideWidth = 32 ,middleWidth = 32 ,textYOffset = 2 },
279280 }
280281 local config
281- if self .itemTooltip and main .showFlavourText and self .lines [1 ] and self .lines [1 ].text then
282- local rarity = tostring (self .itemTooltip ):upper ()
282+ if self .tooltipHeader and main .showFlavourText and self .lines [1 ] and self .lines [1 ].text then
283+ local rarity = tostring (self .tooltipHeader ):upper ()
283284 config = headerConfigs [rarity ] or headerConfigs .NORMAL
284285 self .titleYOffset = config .textYOffset or 0
285286 end
@@ -310,8 +311,8 @@ function TooltipClass:Draw(x, y, w, h, viewPort)
310311 SetDrawColor (1 , 1 , 1 )
311312
312313 -- Item header (drawn within borders)
313- if self .itemTooltip and main .showFlavourText and self .lines [1 ] and self .lines [1 ].text then
314- local rarity = tostring (self .itemTooltip ):upper ()
314+ if self .tooltipHeader and main .showFlavourText and self .lines [1 ] and self .lines [1 ].text then
315+ local rarity = tostring (self .tooltipHeader ):upper ()
315316 local config = headerConfigs [rarity ] or headerConfigs .NORMAL
316317
317318 self .titleYOffset = config .textYOffset or 0
@@ -365,7 +366,7 @@ function TooltipClass:Draw(x, y, w, h, viewPort)
365366 local skip = false
366367 if line [1 ] and type (line [1 ]) == " table" and line [1 ].isSeparator then
367368 -- Only skip first separator for items and skill gems
368- local tooltipType = self .itemTooltip and tostring (self .itemTooltip ):upper () or " "
369+ local tooltipType = self .tooltipHeader and tostring (self .tooltipHeader ):upper () or " "
369370 if main .showFlavourText and not firstSeparatorSkipped and
370371 (tooltipType == " RELIC" or tooltipType == " UNIQUE" or tooltipType == " RARE" or tooltipType == " MAGIC" or tooltipType == " GEM" ) then
371372 firstSeparatorSkipped = true
0 commit comments