Skip to content

Commit 5c51287

Browse files
committed
remove ascendancy and secondaryAscendancy/bloodline from the top bar to fit Loadouts on smaller screens
small resize changes to fit a little more Loadouts into the thinnest resolution small fix for bottom bar in TreeTab to line up because why wasn't it before
1 parent 3acd910 commit 5c51287

2 files changed

Lines changed: 8 additions & 67 deletions

File tree

src/Classes/TreeTab.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ function TreeTabClass:Draw(viewPort, inputEvents)
479479
SetDrawLayer(1)
480480

481481
SetDrawColor(0.05, 0.05, 0.05)
482-
DrawImage(nil, viewPort.x, viewPort.y + viewPort.height - (28 + bottomDrawerHeight + linesHeight), viewPort.width, 28 + bottomDrawerHeight + linesHeight)
482+
DrawImage(nil, viewPort.x, viewPort.y + viewPort.height - (30 + bottomDrawerHeight + linesHeight), viewPort.width, 30 + bottomDrawerHeight + linesHeight)
483483
if self.showConvert then
484484
local height = viewPort.width < convertMaxWidth and (bottomDrawerHeight + linesHeight) or 0
485485
SetDrawColor(0.05, 0.05, 0.05)
@@ -489,7 +489,7 @@ function TreeTabClass:Draw(viewPort, inputEvents)
489489
end
490490
-- let white lines overwrite the black sections, regardless of showConvert
491491
SetDrawColor(0.85, 0.85, 0.85)
492-
DrawImage(nil, viewPort.x, viewPort.y + viewPort.height - (32 + bottomDrawerHeight + linesHeight), viewPort.width, 4)
492+
DrawImage(nil, viewPort.x, viewPort.y + viewPort.height - (34 + bottomDrawerHeight + linesHeight), viewPort.width, 4)
493493

494494
self:DrawControls(viewPort)
495495
end

src/Modules/Build.lua

Lines changed: 6 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ function buildMode:Init(dbFileName, buildName, buildXML, convertBuild, importLin
181181
local x, y = control:GetPos()
182182
local width, height = control:GetSize()
183183
SetDrawColor(1, 1, 1)
184-
DrawImage(nil, x, y, width, height)
184+
DrawImage(nil, x, y, width + 2, height)
185185
SetDrawColor(0, 0, 0)
186-
DrawImage(nil, x + 1, y + 1, width - 2, height - 2)
186+
DrawImage(nil, x + 1, y + 1, width, height - 2)
187187
SetDrawColor(1, 1, 1)
188188
DrawString(x + 4, y + 2, "LEFT", 16, "FIXED", control.str)
189189
if control:IsMouseInBounds() then
@@ -194,14 +194,14 @@ function buildMode:Init(dbFileName, buildName, buildXML, convertBuild, importLin
194194
SetDrawLayer(nil, 0)
195195
end
196196
end
197-
self.controls.levelScalingButton = new("ButtonControl", {"LEFT",self.controls.pointDisplay,"RIGHT"}, {12, 0, 50, 20}, self.characterLevelAutoMode and "Auto" or "Manual", function()
197+
self.controls.levelScalingButton = new("ButtonControl", {"LEFT",self.controls.pointDisplay,"RIGHT"}, {10, 0, 50, 20}, self.characterLevelAutoMode and "Auto" or "Manual", function()
198198
self.characterLevelAutoMode = not self.characterLevelAutoMode
199199
self.controls.levelScalingButton.label = self.characterLevelAutoMode and "Auto" or "Manual"
200200
self.configTab:BuildModList()
201201
self.modFlag = true
202202
self.buildFlag = true
203203
end)
204-
self.controls.characterLevel = new("EditControl", {"LEFT",self.controls.levelScalingButton,"RIGHT"}, {8, 0, 106, 20}, "", "Level", "%D", 3, function(buf)
204+
self.controls.characterLevel = new("EditControl", {"LEFT",self.controls.levelScalingButton,"RIGHT"}, {5, 0, 106, 20}, "", "Level", "%D", 3, function(buf)
205205
self.characterLevel = m_min(m_max(tonumber(buf) or 1, 1), 100)
206206
self.configTab:BuildModList()
207207
self.modFlag = true
@@ -238,7 +238,7 @@ function buildMode:Init(dbFileName, buildName, buildXML, convertBuild, importLin
238238
end
239239
end
240240
end
241-
self.controls.classDrop = new("DropDownControl", {"LEFT",self.controls.characterLevel,"RIGHT"}, {8, 0, 100, 20}, nil, function(index, value)
241+
self.controls.classDrop = new("DropDownControl", {"LEFT",self.controls.characterLevel,"RIGHT"}, {5, 0, 85, 20}, nil, function(index, value)
242242
if value.classId ~= self.spec.curClassId then
243243
if self.spec:CountAllocNodes() == 0 or self.spec:IsClassConnected(value.classId) then
244244
self.spec:SelectClass(value.classId)
@@ -262,28 +262,7 @@ function buildMode:Init(dbFileName, buildName, buildXML, convertBuild, importLin
262262
end
263263
end
264264
end)
265-
self.controls.ascendDrop = new("DropDownControl", {"LEFT",self.controls.classDrop,"RIGHT"}, {8, 0, 120, 20}, nil, function(index, value)
266-
self.spec:SelectAscendClass(value.ascendClassId)
267-
self.spec:AddUndoState()
268-
self.spec:SetWindowTitleWithBuildClass()
269-
self.buildFlag = true
270-
end)
271-
self.controls.secondaryAscendDrop = new("DropDownControl", {"LEFT",self.controls.ascendDrop,"RIGHT"}, {8, 0, 160, 20}, {
272-
{ label = "None", ascendClassId = 0 },
273-
}, function(index, value)
274-
if not value or not self.spec then
275-
return
276-
end
277-
self.spec:SelectSecondaryAscendClass(value.ascendClassId)
278-
self.spec:AddUndoState()
279-
self.spec:SetWindowTitleWithBuildClass()
280-
self.buildFlag = true
281-
end)
282-
self.controls.secondaryAscendDrop.enableDroppedWidth = true
283-
self.controls.secondaryAscendDrop.maxDroppedWidth = 360
284-
local initialSecondarySelection = (self.spec and self.spec.curSecondaryAscendClassId) or 0
285-
self.controls.secondaryAscendDrop:SelByValue(initialSecondarySelection, "ascendClassId")
286-
self.controls.buildLoadouts = new("DropDownControl", {"LEFT",self.controls.secondaryAscendDrop,"RIGHT"}, {8, 0, 190, 20}, {}, function(index, value)
265+
self.controls.buildLoadouts = new("DropDownControl", {"LEFT",self.controls.classDrop,"RIGHT"}, {5, 0, 190, 20}, {}, function(index, value)
287266
if value == "^7^7Loadouts:" or value == "^7^7-----" then
288267
self.controls.buildLoadouts:SetSel(1)
289268
return
@@ -1112,44 +1091,6 @@ function buildMode:OnFrame(inputEvents)
11121091
self:ProcessControlsInput(inputEvents, main.viewPort)
11131092

11141093
self.controls.classDrop:SelByValue(self.spec.curClassId, "classId")
1115-
self.controls.ascendDrop.list = self.controls.classDrop:GetSelValueByKey("ascendancies")
1116-
self.controls.ascendDrop:SelByValue(self.spec.curAscendClassId, "ascendClassId")
1117-
self.controls.ascendDrop:CheckDroppedWidth(true)
1118-
local secondaryDrop = self.controls.secondaryAscendDrop
1119-
if secondaryDrop then
1120-
local legacyAlternateAscendancyIds = {
1121-
Warden = true,
1122-
Warlock = true,
1123-
Primalist = true,
1124-
}
1125-
local entries = {
1126-
{ label = "None", ascendClassId = 0 },
1127-
}
1128-
local selection = (self.spec and self.spec.curSecondaryAscendClassId) or 0
1129-
if self.spec and self.spec.tree then
1130-
local altAscendancies = self.spec.tree.alternate_ascendancies
1131-
if altAscendancies then
1132-
local sortable = { }
1133-
for ascendClassId, ascendClass in pairs(altAscendancies) do
1134-
if ascendClass and ascendClass.id then
1135-
if not legacyAlternateAscendancyIds[ascendClass.id] or ascendClassId == selection then
1136-
t_insert(sortable, { label = ascendClass.name, ascendClassId = ascendClassId })
1137-
end
1138-
end
1139-
end
1140-
t_sort(sortable, function(a, b)
1141-
return a.label < b.label
1142-
end)
1143-
for _, entry in ipairs(sortable) do
1144-
t_insert(entries, entry)
1145-
end
1146-
end
1147-
end
1148-
secondaryDrop:SetList(entries)
1149-
secondaryDrop:SelByValue(selection, "ascendClassId")
1150-
secondaryDrop:CheckDroppedWidth(true)
1151-
secondaryDrop.enabled = self.spec ~= nil and #entries > 1
1152-
end
11531094

11541095
if self.buildFlag then
11551096
-- Wipe Global Cache

0 commit comments

Comments
 (0)