Skip to content

Commit b22ca6a

Browse files
committed
Fix indentation atrocities
1 parent 7e0df0c commit b22ca6a

1 file changed

Lines changed: 56 additions & 56 deletions

File tree

src/Modules/Main.lua

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -822,31 +822,31 @@ function main:OpenOptionsPopup(savedState)
822822
-- Check for `savedState` or assign initial values
823823
-- NOTE: update both this and the `controls.cancel` section below, when adding new options
824824
savedState = savedState or {
825-
nodePowerTheme = self.nodePowerTheme,
826-
colorPositive = self.colorPositive,
827-
colorNegative = self.colorNegative,
828-
colorHighlight = self.colorHighlight,
829-
showThousandsSeparators = self.showThousandsSeparators,
830-
thousandsSeparator = self.thousandsSeparator,
831-
decimalSeparator = self.decimalSeparator,
832-
showTitlebarName = self.showTitlebarName,
833-
betaTest = self.betaTest,
834-
edgeSearchHighlight = self.edgeSearchHighlight,
835-
defaultGemQuality = self.defaultGemQuality or 0,
836-
defaultCharLevel = self.defaultCharLevel or 1,
837-
defaultItemAffixQuality = self.defaultItemAffixQuality or 0.5,
838-
showWarnings = self.showWarnings,
839-
slotOnlyTooltips = self.slotOnlyTooltips,
840-
migrateEldritchImplicits = self.migrateEldritchImplicits,
841-
notSupportedModTooltips = self.notSupportedModTooltips,
842-
invertSliderScrollDirection = self.invertSliderScrollDirection,
843-
disableDevAutoSave = self.disableDevAutoSave,
844-
showPublicBuilds = self.showPublicBuilds,
845-
showFlavourText = self.showFlavourText,
846-
showAnimations = self.showAnimations,
847-
showAllItemAffixes = self.showAllItemAffixes,
848-
dpiScaleOverridePercent = self.dpiScaleOverridePercent
849-
}
825+
nodePowerTheme = self.nodePowerTheme,
826+
colorPositive = self.colorPositive,
827+
colorNegative = self.colorNegative,
828+
colorHighlight = self.colorHighlight,
829+
showThousandsSeparators = self.showThousandsSeparators,
830+
thousandsSeparator = self.thousandsSeparator,
831+
decimalSeparator = self.decimalSeparator,
832+
showTitlebarName = self.showTitlebarName,
833+
betaTest = self.betaTest,
834+
edgeSearchHighlight = self.edgeSearchHighlight,
835+
defaultGemQuality = self.defaultGemQuality or 0,
836+
defaultCharLevel = self.defaultCharLevel or 1,
837+
defaultItemAffixQuality = self.defaultItemAffixQuality or 0.5,
838+
showWarnings = self.showWarnings,
839+
slotOnlyTooltips = self.slotOnlyTooltips,
840+
migrateEldritchImplicits = self.migrateEldritchImplicits,
841+
notSupportedModTooltips = self.notSupportedModTooltips,
842+
invertSliderScrollDirection = self.invertSliderScrollDirection,
843+
disableDevAutoSave = self.disableDevAutoSave,
844+
showPublicBuilds = self.showPublicBuilds,
845+
showFlavourText = self.showFlavourText,
846+
showAnimations = self.showAnimations,
847+
showAllItemAffixes = self.showAllItemAffixes,
848+
dpiScaleOverridePercent = self.dpiScaleOverridePercent
849+
}
850850

851851
-- NOTE: Height needs to be adjusted if more menu options are added
852852
local oneColumnHeightReq = 850 -- Min height required to not split menu into two columns
@@ -857,11 +857,11 @@ function main:OpenOptionsPopup(savedState)
857857
local currentX = 0 -- initialized at `0`, only used for two-column layouts
858858

859859
-- Determine layout limits and modes
860-
local useTwoColumns = self.screenH < oneColumnHeightReq and self.screenW >= columnWidth * 2
861-
local useScrollBar = self.screenH < oneColumnHeightReq and not useTwoColumns
860+
local useTwoColumns = self.screenH < oneColumnHeightReq and self.screenW >= columnWidth * 2
861+
local useScrollBar = self.screenH < oneColumnHeightReq and not useTwoColumns
862862
local scrollBarWidth = useScrollBar and 18 or 0
863-
864-
local popupWidth = useTwoColumns and columnWidth * 2 or columnWidth
863+
864+
local popupWidth = useTwoColumns and columnWidth * 2 or columnWidth
865865

866866
-- Scrollbar anchor
867867
controls.sectionAnchor = new("Control", { "TOPLEFT", nil, "TOPLEFT" }, { 0, 0, popupWidth, 0 })
@@ -979,7 +979,7 @@ function main:OpenOptionsPopup(savedState)
979979
"The default value is " .. tostring(defaultColorCodes.NEGATIVE:gsub('^(^)', '0')) .. ".\nIf updating while inside a build, please re-load the build after saving."
980980

981981
nextRow()
982-
982+
983983
controls.colorHighlight = new("EditControl", { "TOPLEFT", controls.sectionAnchor, "TOPLEFT" }, { currentX + defaultLabelPlacementX, currentY, 100, 18 }, tostring(self.colorHighlight:gsub('^(^)', '0')), nil, nil, 8, function(buf)
984984
local match = string.match(buf, "0x%x+")
985985
if match and #match == 8 then
@@ -1215,34 +1215,34 @@ function main:OpenOptionsPopup(savedState)
12151215

12161216
-- Modify draw controls to "clip" elements in case the scrollbar is used
12171217
popup.DrawControls = function(self, viewPort)
1218-
if not useScrollBar then
1219-
return originalDrawControls(self, viewPort)
1220-
end
1218+
if not useScrollBar then
1219+
return originalDrawControls(self, viewPort)
1220+
end
12211221
-- define clipping area
12221222
local x, y = self:GetPos()
12231223
local width, height = self:GetSize()
1224-
local clipY_top = y + 20 -- just below title
1225-
local clipY_bottom = y + height - 40 -- just above buttons
1226-
1227-
for id, control in pairs(self.controls) do
1228-
-- always draw static UI elements
1229-
if control == controls.scrollBar or control == controls.save or control == controls.cancel then
1230-
if control:IsShown() and control.Draw then
1231-
control:Draw(viewPort, (self.selControl and self.selControl.hasFocus and self.selControl ~= control) or nil)
1232-
end
1233-
else
1234-
-- hide elements outside clipping area
1235-
if control:IsShown() and control.Draw then
1236-
local cx, cy = control:GetPos()
1237-
local cw, ch = control:GetSize()
1238-
1239-
if cy >= clipY_top and (cy + ch) <= clipY_bottom then
1240-
control:Draw(viewPort, (self.selControl and self.selControl.hasFocus and self.selControl ~= control) or nil)
1241-
end
1242-
end
1243-
end
1244-
end
1245-
end
1224+
local clipY_top = y + 20 -- just below title
1225+
local clipY_bottom = y + height - 40 -- just above buttons
1226+
1227+
for id, control in pairs(self.controls) do
1228+
-- always draw static UI elements
1229+
if control == controls.scrollBar or control == controls.save or control == controls.cancel then
1230+
if control:IsShown() and control.Draw then
1231+
control:Draw(viewPort, (self.selControl and self.selControl.hasFocus and self.selControl ~= control) or nil)
1232+
end
1233+
else
1234+
-- hide elements outside clipping area
1235+
if control:IsShown() and control.Draw then
1236+
local cx, cy = control:GetPos()
1237+
local cw, ch = control:GetSize()
1238+
1239+
if cy >= clipY_top and (cy + ch) <= clipY_bottom then
1240+
control:Draw(viewPort, (self.selControl and self.selControl.hasFocus and self.selControl ~= control) or nil)
1241+
end
1242+
end
1243+
end
1244+
end
1245+
end
12461246
end
12471247

12481248
function main:SetManifestBranch(branchName)
@@ -1357,7 +1357,7 @@ function main:OpenAboutPopup(helpSectionIndex)
13571357
else
13581358
local Lines = self:WrapString(line, textSize, popupWidth - 135)
13591359
for i, line2 in ipairs(Lines) do
1360-
t_insert(helpList, { height = textSize, (dev and "^x8888FF" or "^7")..(i > 1 and " " or "")..line2 })
1360+
t_insert(helpList, { height = textSize, (dev and "^x8888FF" or "^7")..(i > 1 and " " or "")..line2 })
13611361
end
13621362
end
13631363
end

0 commit comments

Comments
 (0)