Skip to content
Merged
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
4 changes: 3 additions & 1 deletion src/Classes/GemSelectControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,9 @@ function GemSelectClass:AddCommonGemInfo(gemInstance, grantedEffect, addReq, mer
if launch.devModeAlt then
line = line .. " ^1" .. lineMap[line]
end
self.tooltip:AddLine(16, colorCodes.UNSUPPORTED .. line)
local line = colorCodes.UNSUPPORTED .. line
line = main.notSupportedModTooltips and (line .. main.notSupportedTooltipText) or line
self.tooltip:AddLine(line)
end
end
end
Expand Down
24 changes: 21 additions & 3 deletions src/Classes/ItemsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,13 @@ holding Shift will put it in the second.]])
if node.sd[1] then
tooltip:AddLine(16, "")
for i, line in ipairs(node.sd) do
tooltip:AddLine(16, ((node.mods[i].extra or not node.mods[i].list) and colorCodes.UNSUPPORTED or colorCodes.MAGIC)..line)
if line ~= " " and (node.mods[i].extra or not node.mods[i].list) then
local line = colorCodes.UNSUPPORTED .. line
line = main.notSupportedModTooltips and (line .. main.notSupportedTooltipText) or line
tooltip:AddLine(16, line)
else
tooltip:AddLine(16, colorCodes.MAGIC..line)
end
end
end

Expand Down Expand Up @@ -3338,7 +3344,13 @@ function ItemsTabClass:AddItemTooltip(tooltip, item, slot, dbMode)
main:StatColor(flaskData.chargesMax, base.flask.chargesMax), flaskData.chargesMax
))
for _, modLine in pairs(item.buffModLines) do
tooltip:AddLine(16, (modLine.extra and colorCodes.UNSUPPORTED or colorCodes.MAGIC) .. modLine.line)
if modLine.extra then
local line = colorCodes.UNSUPPORTED..modLine.line
line = main.notSupportedModTooltips and (line .. main.notSupportedTooltipText) or line
tooltip:AddLine(16, line)
else
tooltip:AddLine(16, colorCodes.MAGIC..modLine.line)
end
end
elseif base.tincture then
-- Tincture-specific info
Expand All @@ -3351,7 +3363,13 @@ function ItemsTabClass:AddItemTooltip(tooltip, item, slot, dbMode)
tooltip:AddLine(16, s_format("^x7F7F7FInflicts Mana Burn every %s%.2f ^x7F7F7FSeconds", main:StatColor(tinctureData.manaBurn, base.tincture.manaBurn), tinctureData.manaBurn))
tooltip:AddLine(16, s_format("^x7F7F7F%s%.2f ^x7F7F7FSecond Cooldown When Deactivated", main:StatColor(tinctureData.cooldown, base.tincture.cooldown), tinctureData.cooldown))
for _, modLine in pairs(item.buffModLines) do
tooltip:AddLine(16, (modLine.extra and colorCodes.UNSUPPORTED or colorCodes.MAGIC) .. modLine.line)
if modLine.extra then
local line = colorCodes.UNSUPPORTED..modLine.line
line = main.notSupportedModTooltips and (line .. main.notSupportedTooltipText) or line
tooltip:AddLine(16, line)
else
tooltip:AddLine(16, colorCodes.MAGIC..modLine.line)
end
end
elseif item.type == "Jewel" then
-- Jewel-specific info
Expand Down
8 changes: 7 additions & 1 deletion src/Classes/NotableDBControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,13 @@ function NotableDBClass:AddValueTooltip(tooltip, index, node)
if node.sd[1] then
tooltip:AddLine(16, "")
for i, line in ipairs(node.sd) do
tooltip:AddLine(16, ((node.mods[i].extra or not node.mods[i].list) and colorCodes.UNSUPPORTED or colorCodes.MAGIC)..line)
if line ~= " " and (node.mods[i].extra or not node.mods[i].list) then
local line = colorCodes.UNSUPPORTED..modLine.line
line = main.notSupportedModTooltips and (line .. main.notSupportedTooltipText) or line
tooltip:AddLine(16, line)
else
tooltip:AddLine(16, colorCodes.MAGIC..line)
end
end
end

Expand Down
8 changes: 7 additions & 1 deletion src/Classes/PassiveTreeView.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,13 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build)
line = line .. " " .. modStr
end
end
tooltip:AddLine(16, ((node.mods[i].extra or not node.mods[i].list) and colorCodes.UNSUPPORTED or colorCodes.MAGIC)..line)
if line ~= " " and (node.mods[i].extra or not node.mods[i].list) then
local line = colorCodes.UNSUPPORTED..line
line = main.notSupportedModTooltips and (line .. main.notSupportedTooltipText) or line
tooltip:AddLine(16, line)
else
tooltip:AddLine(16, colorCodes.MAGIC..line)
end
end
end

Expand Down
4 changes: 3 additions & 1 deletion src/Classes/SkillsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,9 @@ function SkillsTabClass:CreateGemSlot(index)
if grantedEffect.statMap[qual[1]] or self.build.data.skillStatMap[qual[1]] then
tooltip:AddLine(16, colorCodes.MAGIC..line)
else
tooltip:AddLine(16, colorCodes.UNSUPPORTED..line)
local line = colorCodes.UNSUPPORTED..line
line = main.notSupportedModTooltips and (line .. main.notSupportedTooltipText) or line
tooltip:AddLine(16, line)
end
end
end
Expand Down
15 changes: 6 additions & 9 deletions src/Classes/Tooltip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ end)
function TooltipClass:Clear()
wipeTable(self.lines)
wipeTable(self.blocks)
if self.updateParams then
wipeTable(self.updateParams)
end
self.recipe = nil
self.center = false
self.color = { 0.5, 0.3, 0 }
Expand All @@ -63,17 +60,17 @@ function TooltipClass:CheckForUpdate(...)
if not self.updateParams then
self.updateParams = { }
end

for i = 1, select('#', ...) do
if self.updateParams[i] ~= select(i, ...) then
local temp = select(i, ...)
if self.updateParams[i] ~= temp then
self.updateParams[i] = temp
doUpdate = true
break
end
end
if doUpdate then
if doUpdate or self.updateParams.notSupportedModTooltips ~= main.notSupportedModTooltips then
self.updateParams.notSupportedModTooltips = main.notSupportedModTooltips
self:Clear()
for i = 1, select('#', ...) do
self.updateParams[i] = select(i, ...)
end
return true
end
end
Expand Down
1 change: 1 addition & 0 deletions src/Modules/ItemTools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ function itemLib.formatModLine(modLine, dbMode)
local colorCode
if modLine.extra then
colorCode = colorCodes.UNSUPPORTED
line = main.notSupportedModTooltips and (line .. main.notSupportedTooltipText) or line
if launch.devModeAlt then
line = line .. " ^1'" .. modLine.extra .. "'"
end
Expand Down
15 changes: 15 additions & 0 deletions src/Modules/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ function main:Init()
self.showTitlebarName = true
self.showWarnings = true
self.slotOnlyTooltips = true
self.notSupportedModTooltips = true
self.notSupportedTooltipText = " ^8(Not supported in PoB yet)"
self.POESESSID = ""
self.showPublicBuilds = true

Expand Down Expand Up @@ -606,6 +608,9 @@ function main:LoadSettings(ignoreBuild)
if node.attrib.slotOnlyTooltips then
self.slotOnlyTooltips = node.attrib.slotOnlyTooltips == "true"
end
if node.attrib.notSupportedModTooltips then
self.notSupportedModTooltips = node.attrib.notSupportedModTooltips == "true"
end
if node.attrib.POESESSID then
self.POESESSID = node.attrib.POESESSID or ""
end
Expand Down Expand Up @@ -725,6 +730,7 @@ function main:SaveSettings()
lastExportWebsite = self.lastExportWebsite,
showWarnings = tostring(self.showWarnings),
slotOnlyTooltips = tostring(self.slotOnlyTooltips),
notSupportedModTooltips = tostring(self.notSupportedModTooltips),
POESESSID = self.POESESSID,
invertSliderScrollDirection = tostring(self.invertSliderScrollDirection),
disableDevAutoSave = tostring(self.disableDevAutoSave),
Expand Down Expand Up @@ -969,6 +975,13 @@ function main:OpenOptionsPopup()
end)
controls.slotOnlyTooltips.state = self.slotOnlyTooltips

nextRow()
controls.notSupportedModTooltips = new("CheckBoxControl", { "TOPLEFT", nil, "TOPLEFT" }, { defaultLabelPlacementX, currentY, 20 }, "^7Show tooltip for unsupported mods :", function(state)
self.notSupportedModTooltips = state
end)
controls.notSupportedModTooltips.tooltipText = "Show ^8(Not supported in PoB yet) ^7next to unsupported mods\nRequires PoB to restart for it to take effect"
controls.notSupportedModTooltips.state = self.notSupportedModTooltips

nextRow()
controls.invertSliderScrollDirection = new("CheckBoxControl", { "TOPLEFT", nil, "TOPLEFT" }, { defaultLabelPlacementX, currentY, 20 }, "^7Invert slider scroll direction:", function(state)
self.invertSliderScrollDirection = state
Expand Down Expand Up @@ -1004,6 +1017,7 @@ function main:OpenOptionsPopup()
local initialDefaultItemAffixQuality = self.defaultItemAffixQuality or 0.5
local initialShowWarnings = self.showWarnings
local initialSlotOnlyTooltips = self.slotOnlyTooltips
local initialNotSupportedModTooltips = self.notSupportedModTooltips
local initialInvertSliderScrollDirection = self.invertSliderScrollDirection
local initialDisableDevAutoSave = self.disableDevAutoSave
local initialShowPublicBuilds = self.showPublicBuilds
Expand Down Expand Up @@ -1054,6 +1068,7 @@ function main:OpenOptionsPopup()
self.defaultItemAffixQuality = initialDefaultItemAffixQuality
self.showWarnings = initialShowWarnings
self.slotOnlyTooltips = initialSlotOnlyTooltips
self.notSupportedModTooltips = initialNotSupportedModTooltips
self.invertSliderScrollDirection = initialInvertSliderScrollDirection
self.disableDevAutoSave = initialDisableDevAutoSave
self.showPublicBuilds = initialShowPublicBuilds
Expand Down