Skip to content

Commit 0f5514b

Browse files
committed
comments
1 parent 30cdcfb commit 0f5514b

2 files changed

Lines changed: 17 additions & 13 deletions

File tree

src/Classes/GemSelectControl.lua

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -541,19 +541,19 @@ function GemSelectClass:Draw(viewPort, noTooltip)
541541
self.tooltip:AddLine(16, self.imbuedSelect and imbuedTooltipText or toolTipText)
542542
end
543543

544-
colorS = 0.5
545-
colorA = 0.5
546-
if cursorX > (x + width - 18) then
547-
colorS = 1
548-
self.tooltip:Clear()
549-
self.tooltip:AddLine(16, "Only show Support gems")
550-
elseif (cursorX > (x + width - 40) and cursorX < (cursorX + width - 20)) then
551-
colorA = 1
552-
self.tooltip:Clear()
553-
self.tooltip:AddLine(16, "Only show Active gems")
554-
end
555-
556544
if not self.imbuedSelect then
545+
colorS = 0.5
546+
colorA = 0.5
547+
if cursorX > (x + width - 18) then
548+
colorS = 1
549+
self.tooltip:Clear()
550+
self.tooltip:AddLine(16, "Only show Support gems")
551+
elseif (cursorX > (x + width - 40) and cursorX < (cursorX + width - 20)) then
552+
colorA = 1
553+
self.tooltip:Clear()
554+
self.tooltip:AddLine(16, "Only show Active gems")
555+
end
556+
557557
-- support shortcut
558558
sx = x + width - 16 - 2
559559
SetDrawColor(colorS,colorS,colorS)

src/Classes/SkillsTab.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ local SkillsTabClass = newClass("SkillsTab", "UndoHandler", "ControlHost", "Cont
212212
self.build.buildFlag = true
213213
end)
214214

215+
-- self.imbuedSupportBySlot is used by CalcSetup to add an ExtraSupport mod of the selected gem
216+
-- Each displayGroup has its own "imbuedSupport" and is saved to the xml to load when changing sockets or loading a build
217+
-- "slotName" is used on import, which uses builtInSupport to get the gemData and pass in here
218+
-- buildFlag to true triggers the reload/run the CalcSetup to add on the support
219+
-- the last var in the GemSelectControl init, the true, sets imbuedSelect to true which sets the level to 1 and support filtering
215220
self.imbuedSupportBySlot = { }
216221
self.controls.imbuedSupportLabel = new("LabelControl", { "LEFT", self.controls.includeInFullDPS, "RIGHT" }, { 12, 0, 0, 16 }, colorCodes.POSITIVE.."Imbued Support:")
217222
self.controls.imbuedSupport = new("GemSelectControl", { "LEFT", self.controls.imbuedSupportLabel, "RIGHT" }, { 8, 0, 250, 20 }, self, 1, function(gemData, _, _, slotName) -- slotName used on Import
@@ -243,7 +248,6 @@ local SkillsTabClass = newClass("SkillsTab", "UndoHandler", "ControlHost", "Cont
243248
self.controls.imbuedSupport:SetText("")
244249
self.displayGroup.imbuedSupport = nil
245250
self.imbuedSupportBySlot[self.displayGroup.slot] = nil
246-
247251
self.build.buildFlag = true
248252
end)
249253
self.controls.imbuedSupportClear.tooltipText = "Remove this imbued support."

0 commit comments

Comments
 (0)