Skip to content
Open
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
4 changes: 2 additions & 2 deletions src/Classes/TreeTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ function TreeTabClass:Draw(viewPort, inputEvents)
SetDrawLayer(1)

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

self:DrawControls(viewPort)
end
Expand Down
71 changes: 6 additions & 65 deletions src/Modules/Build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ function buildMode:Init(dbFileName, buildName, buildXML, convertBuild, importLin
local x, y = control:GetPos()
local width, height = control:GetSize()
SetDrawColor(1, 1, 1)
DrawImage(nil, x, y, width, height)
DrawImage(nil, x, y, width + 2, height)
SetDrawColor(0, 0, 0)
DrawImage(nil, x + 1, y + 1, width - 2, height - 2)
DrawImage(nil, x + 1, y + 1, width, height - 2)
SetDrawColor(1, 1, 1)
DrawString(x + 4, y + 2, "LEFT", 16, "FIXED", control.str)
if control:IsMouseInBounds() then
Expand All @@ -194,14 +194,14 @@ function buildMode:Init(dbFileName, buildName, buildXML, convertBuild, importLin
SetDrawLayer(nil, 0)
end
end
self.controls.levelScalingButton = new("ButtonControl", {"LEFT",self.controls.pointDisplay,"RIGHT"}, {12, 0, 50, 20}, self.characterLevelAutoMode and "Auto" or "Manual", function()
self.controls.levelScalingButton = new("ButtonControl", {"LEFT",self.controls.pointDisplay,"RIGHT"}, {10, 0, 50, 20}, self.characterLevelAutoMode and "Auto" or "Manual", function()
self.characterLevelAutoMode = not self.characterLevelAutoMode
self.controls.levelScalingButton.label = self.characterLevelAutoMode and "Auto" or "Manual"
self.configTab:BuildModList()
self.modFlag = true
self.buildFlag = true
end)
self.controls.characterLevel = new("EditControl", {"LEFT",self.controls.levelScalingButton,"RIGHT"}, {8, 0, 106, 20}, "", "Level", "%D", 3, function(buf)
self.controls.characterLevel = new("EditControl", {"LEFT",self.controls.levelScalingButton,"RIGHT"}, {5, 0, 106, 20}, "", "Level", "%D", 3, function(buf)
self.characterLevel = m_min(m_max(tonumber(buf) or 1, 1), 100)
self.configTab:BuildModList()
self.modFlag = true
Expand Down Expand Up @@ -238,7 +238,7 @@ function buildMode:Init(dbFileName, buildName, buildXML, convertBuild, importLin
end
end
end
self.controls.classDrop = new("DropDownControl", {"LEFT",self.controls.characterLevel,"RIGHT"}, {8, 0, 100, 20}, nil, function(index, value)
self.controls.classDrop = new("DropDownControl", {"LEFT",self.controls.characterLevel,"RIGHT"}, {5, 0, 85, 20}, nil, function(index, value)
if value.classId ~= self.spec.curClassId then
if self.spec:CountAllocNodes() == 0 or self.spec:IsClassConnected(value.classId) then
self.spec:SelectClass(value.classId)
Expand All @@ -262,28 +262,7 @@ function buildMode:Init(dbFileName, buildName, buildXML, convertBuild, importLin
end
end
end)
self.controls.ascendDrop = new("DropDownControl", {"LEFT",self.controls.classDrop,"RIGHT"}, {8, 0, 120, 20}, nil, function(index, value)
self.spec:SelectAscendClass(value.ascendClassId)
self.spec:AddUndoState()
self.spec:SetWindowTitleWithBuildClass()
self.buildFlag = true
end)
self.controls.secondaryAscendDrop = new("DropDownControl", {"LEFT",self.controls.ascendDrop,"RIGHT"}, {8, 0, 160, 20}, {
{ label = "None", ascendClassId = 0 },
}, function(index, value)
if not value or not self.spec then
return
end
self.spec:SelectSecondaryAscendClass(value.ascendClassId)
self.spec:AddUndoState()
self.spec:SetWindowTitleWithBuildClass()
self.buildFlag = true
end)
self.controls.secondaryAscendDrop.enableDroppedWidth = true
self.controls.secondaryAscendDrop.maxDroppedWidth = 360
local initialSecondarySelection = (self.spec and self.spec.curSecondaryAscendClassId) or 0
self.controls.secondaryAscendDrop:SelByValue(initialSecondarySelection, "ascendClassId")
self.controls.buildLoadouts = new("DropDownControl", {"LEFT",self.controls.secondaryAscendDrop,"RIGHT"}, {8, 0, 190, 20}, {}, function(index, value)
self.controls.buildLoadouts = new("DropDownControl", {"LEFT",self.controls.classDrop,"RIGHT"}, {5, 0, 190, 20}, {}, function(index, value)
if value == "^7^7Loadouts:" or value == "^7^7-----" then
self.controls.buildLoadouts:SetSel(1)
return
Expand Down Expand Up @@ -1112,44 +1091,6 @@ function buildMode:OnFrame(inputEvents)
self:ProcessControlsInput(inputEvents, main.viewPort)

self.controls.classDrop:SelByValue(self.spec.curClassId, "classId")
self.controls.ascendDrop.list = self.controls.classDrop:GetSelValueByKey("ascendancies")
self.controls.ascendDrop:SelByValue(self.spec.curAscendClassId, "ascendClassId")
self.controls.ascendDrop:CheckDroppedWidth(true)
local secondaryDrop = self.controls.secondaryAscendDrop
if secondaryDrop then
local legacyAlternateAscendancyIds = {
Warden = true,
Warlock = true,
Primalist = true,
}
local entries = {
{ label = "None", ascendClassId = 0 },
}
local selection = (self.spec and self.spec.curSecondaryAscendClassId) or 0
if self.spec and self.spec.tree then
local altAscendancies = self.spec.tree.alternate_ascendancies
if altAscendancies then
local sortable = { }
for ascendClassId, ascendClass in pairs(altAscendancies) do
if ascendClass and ascendClass.id then
if not legacyAlternateAscendancyIds[ascendClass.id] or ascendClassId == selection then
t_insert(sortable, { label = ascendClass.name, ascendClassId = ascendClassId })
end
end
end
t_sort(sortable, function(a, b)
return a.label < b.label
end)
for _, entry in ipairs(sortable) do
t_insert(entries, entry)
end
end
end
secondaryDrop:SetList(entries)
secondaryDrop:SelByValue(selection, "ascendClassId")
secondaryDrop:CheckDroppedWidth(true)
secondaryDrop.enabled = self.spec ~= nil and #entries > 1
end

if self.buildFlag then
-- Wipe Global Cache
Expand Down