Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions src/Classes/Tooltip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,19 @@ function TooltipClass:AddSeparator(size)

if self.tooltipHeader then
local rarity = tostring(self.tooltipHeader):upper()
-- spell-checker: disable
local separatorConfigs = {
RELIC = "Assets/itemsseparatorfoil.png",
UNIQUE = "Assets/itemsseparatorunique.png",
RARE = "Assets/itemsseparatorrare.png",
MAGIC = "Assets/itemsseparatormagic.png",
NORMAL = "Assets/itemsseparatorwhite.png",
GEM = "Assets/itemsseparatorgem.png",
RELIC = "Assets/ItemsSeparatorFoil.png",
UNIQUE = "Assets/ItemsSeparatorUnique.png",
RARE = "Assets/ItemsSeparatorRare.png",
MAGIC = "Assets/ItemsSeparatorMagic.png",
NORMAL = "Assets/ItemsSeparatorWhite.png",
GEM = "Assets/ItemsSeparatorGem.png",
}
-- spell-checker: enable
local separatorPath = separatorConfigs[rarity] or separatorConfigs.NORMAL

if not self.separatorImage or self.separatorImagePath ~= separatorPath then
self.separatorImage = NewImageHandle()
self.separatorImage:Load(separatorPath)
self.separatorImage:Load(separatorPath:lower())
self.separatorImagePath = separatorPath
end

Expand Down Expand Up @@ -386,13 +384,13 @@ function TooltipClass:Draw(x, y, w, h, viewPort)

if not self.headerLeft or self.headerLeftPath ~= config.left then
self.headerLeft = NewImageHandle()
self.headerLeft:Load(config.left)
self.headerLeft:Load(config.left:lower())
self.headerLeftPath = config.left
self.headerMiddle = NewImageHandle()
self.headerMiddle:Load(config.middle)
self.headerMiddle:Load(config.middle:lower())
self.headerMiddlePath = config.middle
self.headerRight = NewImageHandle()
self.headerRight:Load(config.right)
self.headerRight:Load(config.right:lower())
self.headerRightPath = config.right
end

Expand Down
13 changes: 13 additions & 0 deletions src/Classes/Tooltip.lua.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff a/src/Classes/Tooltip.lua b/src/Classes/Tooltip.lua (rejected hunks)
@@ -385,9 +383,9 @@ function TooltipClass:Draw(x, y, w, h, viewPort)
local headerMiddleAreaWidth = m_max(0, headerTotalWidth - 2 * headerSideWidth)
if self.influenceHeader1 then
self.influenceIcon1 = NewImageHandle()
- self.influenceIcon1:Load(headerInfluence[self.influenceHeader1])
+ self.influenceIcon1:Load(headerInfluence[self.influenceHeader1]:lower())
self.influenceIcon2 = NewImageHandle()
- self.influenceIcon2:Load(headerInfluence[self.influenceHeader2])
+ self.influenceIcon2:Load(headerInfluence[self.influenceHeader2]:lower())
end

if main.showFlavourText then