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
28 changes: 14 additions & 14 deletions src/Classes/ItemsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -932,30 +932,30 @@ holding Shift will put it in the second.]])
end)

for i = 1, 20 do
local prevControl = i == 1 and self.controls.displayItemSectionRange or self.controls["displayItemStackedRangeLine"..(i-1)]
local baseControl = i == 1 and self.controls.displayItemSectionRange or self.controls["displayItemStackedRangeSlider"..(i-1)]

self.controls["displayItemStackedRangeLine"..i] = new("LabelControl", {"TOPLEFT",prevControl,"TOPLEFT"}, {0, function()
self.controls["displayItemStackedRangeSlider"..i] = new("SliderControl", {"TOPLEFT",baseControl,"TOPLEFT"}, {0, function()
return i == 1 and 2 or 22
end, 350, 14}, function()
if self.displayItem and self.displayItem.rangeLineList[i] then
return "^7" .. self.displayItem.rangeLineList[i].line
end
return ""
end)
self.controls["displayItemStackedRangeLine"..i].shown = function()
return main.showAllItemAffixes and self.displayItem and self.displayItem.rarity == "UNIQUE" and self.displayItem.rangeLineList[i] ~= nil
end

self.controls["displayItemStackedRangeSlider"..i] = new("SliderControl", {"LEFT",self.controls["displayItemStackedRangeLine"..i],"RIGHT"}, {8, 0, 100, 18}, function(val)
end, 100, 18}, function(val)
if self.displayItem and self.displayItem.rangeLineList[i] then
self.displayItem.rangeLineList[i].range = val
self.displayItem:BuildAndParseRaw()
self:UpdateDisplayItemTooltip()
self:UpdateCustomControls()
end
end)
self.controls["displayItemStackedRangeLine"..i] = new("LabelControl", {"LEFT",self.controls["displayItemStackedRangeSlider"..i],"RIGHT"}, {8, -2, 350, 14}, function()
if self.displayItem and self.displayItem.rangeLineList[i] then
return "^7" .. self.displayItem.rangeLineList[i].line
end
return ""
end)
self.controls["displayItemStackedRangeSlider"..i].shown = function()
return self.controls["displayItemStackedRangeLine"..i]:IsShown()
return main.showAllItemAffixes and self.displayItem and self.displayItem.rarity == "UNIQUE" and self.displayItem.rangeLineList[i] ~= nil
end

self.controls["displayItemStackedRangeLine"..i].shown = function()
return self.controls["displayItemStackedRangeSlider"..i]:IsShown()
end
end

Expand Down
16 changes: 8 additions & 8 deletions src/Modules/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ function main:Init()
self.showPublicBuilds = true
self.showFlavourText = true
self.showAnimations = true
self.errorReadingSettings = false
self.showAllItemAffixes = false
self.showAllItemAffixes = true
self.errorReadingSettings = false

if not SetDPIScaleOverridePercent then SetDPIScaleOverridePercent = function(scale) end end

Expand Down Expand Up @@ -655,10 +655,10 @@ function main:LoadSettings(ignoreBuild)
if node.attrib.showFlavourText then
self.showFlavourText = node.attrib.showFlavourText == "true"
end
if node.attrib.showAnimations then
if node.attrib.showAnimations then
self.showAnimations = node.attrib.showAnimations == "true"
end
if node.attrib.showAllItemAffixes then
if node.attrib.showAllItemAffixes then
self.showAllItemAffixes = node.attrib.showAllItemAffixes == "true"
end
if node.attrib.dpiScaleOverridePercent then
Expand Down Expand Up @@ -794,7 +794,7 @@ function main:SaveSettings()
showPublicBuilds = tostring(self.showPublicBuilds),
showFlavourText = tostring(self.showFlavourText),
showAnimations = tostring(self.showAnimations),
showAllItemAffixes = tostring(self.showAllItemAffixes),
showAllItemAffixes = tostring(self.showAllItemAffixes),
dpiScaleOverridePercent = tostring(self.dpiScaleOverridePercent),
} })
local res, errMsg = common.xml.SaveXMLFile(setXML, self.userPath.."Settings.xml")
Expand Down Expand Up @@ -1099,7 +1099,7 @@ function main:OpenOptionsPopup()
controls.showPublicBuilds.state = self.showPublicBuilds
controls.showFlavourText.state = self.showFlavourText
controls.showAnimations.state = self.showAnimations
controls.showAllItemAffixes.state = self.showAllItemAffixes
controls.showAllItemAffixes.state = self.showAllItemAffixes
local initialNodePowerTheme = self.nodePowerTheme
local initialColorPositive = self.colorPositive
local initialColorNegative = self.colorNegative
Expand All @@ -1121,7 +1121,7 @@ function main:OpenOptionsPopup()
local initialShowPublicBuilds = self.showPublicBuilds
local initialShowFlavourText = self.showFlavourText
local initialShowAnimations = self.showAnimations
local initialShowAllItemAffixes = self.showAllItemAffixes
local initialShowAllItemAffixes = self.showAllItemAffixes
local initialDpiScaleOverridePercent = self.dpiScaleOverridePercent

-- last line with buttons has more spacing
Expand Down Expand Up @@ -1177,7 +1177,7 @@ function main:OpenOptionsPopup()
self.showPublicBuilds = initialShowPublicBuilds
self.showFlavourText = initialShowFlavourText
self.showAnimations = initialShowAnimations
self.showAllItemAffixes = initialShowAllItemAffixes
self.showAllItemAffixes = initialShowAllItemAffixes
self.dpiScaleOverridePercent = initialDpiScaleOverridePercent
SetDPIScaleOverridePercent(self.dpiScaleOverridePercent)
main:ClosePopup()
Expand Down