diff --git a/manifest.xml b/manifest.xml
index 4ce5c19581..63e5dbcc60 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -5,7 +5,7 @@
-
+
@@ -115,9 +115,9 @@
-
+
-
+
@@ -132,13 +132,13 @@
-
+
-
+
@@ -150,9 +150,9 @@
-
+
-
+
@@ -177,7 +177,7 @@
-
+
@@ -188,7 +188,7 @@
-
+
@@ -199,14 +199,14 @@
-
+
-
+
@@ -220,49 +220,49 @@
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
+
@@ -1014,15 +1014,15 @@
-
+
-
+
-
+
@@ -1036,7 +1036,7 @@
-
+
@@ -1057,19 +1057,19 @@
-
+
-
-
-
+
+
+
-
+
-
+
@@ -1080,7 +1080,7 @@
-
+
@@ -1689,8 +1689,8 @@
-
-
+
+
diff --git a/src/Classes/GemSelectControl.lua b/src/Classes/GemSelectControl.lua
index 4d6e43c95f..90e3ac7450 100644
--- a/src/Classes/GemSelectControl.lua
+++ b/src/Classes/GemSelectControl.lua
@@ -463,6 +463,7 @@ function GemSelectClass:Draw(viewPort, noTooltip)
local calcFunc, calcBase = self.skillsTab.build.calcsTab:GetMiscCalculator(self.build)
if calcFunc then
self.tooltip:Clear()
+ self.tooltip.maxWidth = 500
local gemData = self.gems[self.list[self.hoverSel]]
local output = self:CalcOutputWithThisGem(calcFunc, gemData, self.skillsTab.sortGemsByDPSField == "FullDPS", nil, calcBase)
local gemInstance = {
@@ -508,6 +509,7 @@ function GemSelectClass:Draw(viewPort, noTooltip)
local gemInstance = self.skillsTab.displayGroup.gemList[self.index]
local cursorX, cursorY = GetCursorPos()
self.tooltip:Clear()
+ self.tooltip.maxWidth = 600
if gemInstance and gemInstance.gemData then
self:AddGemTooltip(gemInstance)
else
diff --git a/src/Classes/GemTooltip.lua b/src/Classes/GemTooltip.lua
index e72c8634e6..4151391e2a 100644
--- a/src/Classes/GemTooltip.lua
+++ b/src/Classes/GemTooltip.lua
@@ -195,10 +195,7 @@ local function addGrantedEffectInfo(tooltip, build, gemInstance, grantedEffect,
tooltip.center = true
if grantedEffect.description then
tooltip:AddSeparator(10)
- local wrap = main:WrapString(grantedEffect.description, 16, m_max(DrawStringWidth(fontSizeBig, "VAR", gemInstance.gemData.tagString), 400))
- for _, line in ipairs(wrap) do
- tooltip:AddLine(fontSizeBig, colorCodes.GEMDESCRIPTION .. line, "FONTIN ITALIC")
- end
+ tooltip:AddLine(fontSizeBig, colorCodes.GEMDESCRIPTION .. grantedEffect.description, "FONTIN ITALIC")
end
if displayInstance.corrupted == true then
tooltip:AddSeparator(10)
diff --git a/src/Classes/ItemSlotControl.lua b/src/Classes/ItemSlotControl.lua
index 570648aa3d..9cd603237b 100644
--- a/src/Classes/ItemSlotControl.lua
+++ b/src/Classes/ItemSlotControl.lua
@@ -62,7 +62,7 @@ local ItemSlotClass = newClass("ItemSlotControl", "DropDownControl", function(se
-- not selControl.ListControl allows hover when All Items or Unique/Rare DB Sections are in focus
if main.popups[1] or mode == "OUT" or not item or (not self.dropped and itemsTab.selControl and itemsTab.selControl ~= self.controls.activate and not itemsTab.selControl.ListControl) then
tooltip:Clear(true)
- elseif tooltip:CheckForUpdate(item, launch.devModeAlt, itemsTab.build.outputRevision) then
+ elseif tooltip:CheckForUpdate(item, launch.devModeAlt, itemsTab.build.outputRevision, IsKeyDown("SHIFT")) then
itemsTab:AddItemTooltip(tooltip, item, self)
end
end
diff --git a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua
index d3ffb571c6..6d51425256 100644
--- a/src/Classes/ItemsTab.lua
+++ b/src/Classes/ItemsTab.lua
@@ -15,6 +15,7 @@ local m_ceil = math.ceil
local m_floor = math.floor
local m_modf = math.modf
+local gemTooltip = LoadModule("Classes/GemTooltip")
local rarityDropList = {
{ label = colorCodes.NORMAL.."Normal", rarity = "NORMAL" },
{ label = colorCodes.MAGIC.."Magic", rarity = "MAGIC" },
@@ -3637,6 +3638,49 @@ function ItemsTabClass:AddItemTooltip(tooltip, item, slot, dbMode, maxWidth)
tooltip:AddSeparator(14)
end
+ -- Skill tooltip. We add child tooltips, which will be rendered to the right of the main
+ -- tooltip, growing downwards
+ if not tooltip.childTooltips then
+ tooltip.childTooltips = {}
+ end
+ local gemMaxWidth = 450
+ for _, tt in ipairs(tooltip.childTooltips) do
+ tt:Clear()
+ tt.maxWidth = gemMaxWidth
+ end
+ if item.grantedSkills and #item.grantedSkills > 0 then
+ tooltip:AddSeparator(14)
+ tooltip:AddLine(14,
+ colorCodes.TIP ..
+ "Tip: Hold Shift to display a tooltip for the granted skill" ..
+ (#item.grantedSkills > 1 and "s" or "") .. ".")
+ for i, itemSkill in ipairs(item.grantedSkills) do
+ if not tooltip.childTooltips[i] then
+ tooltip.childTooltips[i] = new("Tooltip")
+ tooltip.childTooltips[i].maxWidth = gemMaxWidth
+ end
+ -- find gem since the item data only contains the skill id
+ local skill = data.skills[itemSkill.skillId]
+ if skill and skill.id and IsKeyDown("SHIFT") then
+ for grantedEffect, gemId in pairs(data.gemForSkill) do
+ if grantedEffect.id == skill.id then
+ local gem = data.gems[gemId]
+ local gemInst = {
+ gemData = gem,
+ level = itemSkill.level or 1,
+ quality = 0,
+ grantedEffect =
+ grantedEffect
+ }
+ gemTooltip.AddGemTooltip(tooltip.childTooltips[i], self.build, gemInst, {
+ includeQualityRange = true,
+ })
+ break
+ end
+ end
+ end
+ end
+ end
-- Stat differences
if not self.showStatDifferences then
tooltip:AddSeparator(14)
diff --git a/src/Classes/PassiveTreeView.lua b/src/Classes/PassiveTreeView.lua
index 2728b190ef..8c1aa57644 100644
--- a/src/Classes/PassiveTreeView.lua
+++ b/src/Classes/PassiveTreeView.lua
@@ -1826,6 +1826,7 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build, incSmallPassi
end
-- add child tooltip for skills
self.skillTooltip:Clear()
+ self.skillTooltip.maxWidth = 600
for _, mod in ipairs(mNode.finalModList or mNode.modList or {}) do
if mod.name == "ExtraSkill" then
for grantedEffect, gemId in pairs(data.gemForSkill) do
diff --git a/src/Classes/Tooltip.lua b/src/Classes/Tooltip.lua
index 0875bfdff1..364937447a 100644
--- a/src/Classes/Tooltip.lua
+++ b/src/Classes/Tooltip.lua
@@ -670,5 +670,30 @@ function TooltipClass:Draw(x, y, w, h, viewPort)
DrawImage(nil, ttX, ttY, totalDrawWidth, BORDER_WIDTH) -- top
DrawImage(nil, ttX, ttY + maxColumnHeight - BORDER_WIDTH, totalDrawWidth, BORDER_WIDTH) -- bottom
+ -- draw child tooltips for item skills. these are placed directly to the right of the main
+ -- tooltip, growing downwards, unless they would go outside the viewport, in which case they
+ -- will draw over the main tooltip
+ if self.childTooltips then
+ local totalH = 0
+ -- we will move the tooltips up as a group, so get the total height
+ for _, tt in ipairs(self.childTooltips) do
+ local _, childH = tt:GetSize(viewPort)
+ totalH = totalH + childH
+ end
+ -- if the whole group would go over the bottom edge, we apply a negative offset to keep them
+ -- in
+ local yOffset = math.min(0, viewPort.height - totalH - ttY / 2)
+ -- movement to the left happens individually. i.e. the right edges are aligned
+ local yPos = ttY
+ for _, tt in ipairs(self.childTooltips) do
+ local childW, childH = tt:GetSize(viewPort)
+ local furthestAllowedX = viewPort.width - childW / 2
+ local furthestAllowedY = -totalH / 2
+ tt:Draw(math.min(ttX + 4 + ttW, furthestAllowedX), math.max(yPos + yOffset, 0), nil, nil,
+ viewPort)
+ -- next tooltip goes below this one
+ yPos = yPos + childH + 2
+ end
+ end
return ttW, ttH
end