@@ -2271,74 +2271,27 @@ function CompareTabClass:LayoutCalcsSkillControls(vp, compareEntry)
22712271 leftY = leftY + rowH
22722272 rightY = rightY + rowH
22732273
2274- -- Socket Group
2275- layoutRow (self .controls .primCalcsSocketGroup , leftX , leftY , controlW )
2276- layoutRow (self .controls .cmpCalcsSocketGroup , rightX , rightY , controlW )
2277- leftY = leftY + rowH
2278- rightY = rightY + rowH
2279-
2280- -- Active Skill
2281- if layoutRow (self .controls .primCalcsMainSkill , leftX , leftY , controlW ) then
2282- leftY = leftY + rowH
2283- end
2284- if layoutRow (self .controls .cmpCalcsMainSkill , rightX , rightY , controlW ) then
2285- rightY = rightY + rowH
2286- end
2287-
2288- -- Skill Part
2289- if layoutRow (self .controls .primCalcsSkillPart , leftX , leftY , controlW ) then
2290- leftY = leftY + rowH
2291- end
2292- if layoutRow (self .controls .cmpCalcsSkillPart , rightX , rightY , controlW ) then
2293- rightY = rightY + rowH
2294- end
2295-
2296- -- Stage Count
2297- if layoutRow (self .controls .primCalcsStageCount , leftX , leftY ) then
2298- leftY = leftY + rowH
2299- end
2300- if layoutRow (self .controls .cmpCalcsStageCount , rightX , rightY ) then
2301- rightY = rightY + rowH
2302- end
2303-
2304- -- Mine Count
2305- if layoutRow (self .controls .primCalcsMineCount , leftX , leftY ) then
2306- leftY = leftY + rowH
2307- end
2308- if layoutRow (self .controls .cmpCalcsMineCount , rightX , rightY ) then
2309- rightY = rightY + rowH
2310- end
2311-
2312- -- Show Minion Stats
2313- if layoutRow (self .controls .primCalcsShowMinion , leftX , leftY ) then
2314- leftY = leftY + rowH
2315- end
2316- if layoutRow (self .controls .cmpCalcsShowMinion , rightX , rightY ) then
2317- rightY = rightY + rowH
2318- end
2319-
2320- -- Minion
2321- if layoutRow (self .controls .primCalcsMinion , leftX , leftY , controlW ) then
2322- leftY = leftY + rowH
2323- end
2324- if layoutRow (self .controls .cmpCalcsMinion , rightX , rightY , controlW ) then
2325- rightY = rightY + rowH
2326- end
2327-
2328- -- Minion Skill
2329- if layoutRow (self .controls .primCalcsMinionSkill , leftX , leftY , controlW ) then
2330- leftY = leftY + rowH
2331- end
2332- if layoutRow (self .controls .cmpCalcsMinionSkill , rightX , rightY , controlW ) then
2333- rightY = rightY + rowH
2274+ -- { suffix, useControlW, alwaysAdvance }
2275+ local calcsRows = {
2276+ { " SocketGroup" , true , true },
2277+ { " MainSkill" , true , false },
2278+ { " SkillPart" , true , false },
2279+ { " StageCount" , false , false },
2280+ { " MineCount" , false , false },
2281+ { " ShowMinion" , false , false },
2282+ { " Minion" , true , false },
2283+ { " MinionSkill" , true , false },
2284+ { " Mode" , false , true },
2285+ }
2286+ for _ , row in ipairs (calcsRows ) do
2287+ local suffix , useControlW , alwaysAdvance = row [1 ], row [2 ], row [3 ]
2288+ local width = useControlW and controlW or nil
2289+ local primShown = layoutRow (self .controls [" primCalcs" .. suffix ], leftX , leftY , width )
2290+ local cmpShown = layoutRow (self .controls [" cmpCalcs" .. suffix ], rightX , rightY , width )
2291+ if primShown or alwaysAdvance then leftY = leftY + rowH end
2292+ if cmpShown or alwaysAdvance then rightY = rightY + rowH end
23342293 end
23352294
2336- -- Calc Mode
2337- layoutRow (self .controls .primCalcsMode , leftX , leftY )
2338- layoutRow (self .controls .cmpCalcsMode , rightX , rightY )
2339- leftY = leftY + rowH
2340- rightY = rightY + rowH
2341-
23422295 -- Account for text info lines (Aura/Buffs, Combat Buffs, Curses) + separator
23432296 local textLinesHeight = 2 -- padding before text
23442297 local primaryEnv = self .primaryBuild .calcsTab and self .primaryBuild .calcsTab .calcsEnv
0 commit comments