Update for suggested changes
This commit is contained in:
@@ -572,7 +572,7 @@ function CalcBreakdownClass:DrawBreakdownTable(viewPort, x, y, section)
|
||||
viewer.zoomX = -ttNode.x / scale
|
||||
viewer.zoomY = -ttNode.y / scale
|
||||
SetViewport(viewerX + 2, viewerY + 2, 300, 300)
|
||||
viewer:Draw(self.calcsTab.build, nil, { x = 0, y = 0, width = 300, height = 300 }, { })
|
||||
viewer:Draw(self.calcsTab.build, { x = 0, y = 0, width = 300, height = 300 }, { })
|
||||
SetDrawLayer(nil, 30)
|
||||
SetDrawColor(1, 0, 0)
|
||||
DrawImage(viewer.highlightRing, 135, 135, 30, 30)
|
||||
|
||||
@@ -142,7 +142,7 @@ function ItemSlotClass:Draw(viewPort)
|
||||
viewer.zoomX = -node.x / scale
|
||||
viewer.zoomY = -node.y / scale
|
||||
SetViewport(viewerX + 2, viewerY + 2, 300, 300)
|
||||
viewer:Draw(self.itemsTab.build, nil, { x = 0, y = 0, width = 300, height = 300 }, { })
|
||||
viewer:Draw(self.itemsTab.build, { x = 0, y = 0, width = 300, height = 300 }, { })
|
||||
SetDrawLayer(nil, 30)
|
||||
SetDrawColor(1, 1, 1, 0.2)
|
||||
DrawImage(nil, 149, 0, 2, 300)
|
||||
|
||||
@@ -93,12 +93,10 @@ function PassiveTreeViewClass:Save(xml)
|
||||
}
|
||||
end
|
||||
|
||||
function PassiveTreeViewClass:Draw(build, compareSpec, viewPort, inputEvents)
|
||||
function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
|
||||
local spec = build.spec
|
||||
local tree = spec.tree
|
||||
|
||||
local isComparing = compareSpec and true or false;
|
||||
|
||||
local cursorX, cursorY = GetCursorPos()
|
||||
local mOver = cursorX >= viewPort.x and cursorX < viewPort.x + viewPort.width and cursorY >= viewPort.y and cursorY < viewPort.y + viewPort.height
|
||||
|
||||
@@ -378,8 +376,8 @@ function PassiveTreeViewClass:Draw(build, compareSpec, viewPort, inputEvents)
|
||||
end
|
||||
local state = getState(node1, node2);
|
||||
local baseState = state
|
||||
if isComparing then
|
||||
local cNode1, cNode2 = compareSpec.nodes[connector.nodeId1], compareSpec.nodes[connector.nodeId2]
|
||||
if self.compareSpec then
|
||||
local cNode1, cNode2 = self.compareSpec.nodes[connector.nodeId1], self.compareSpec.nodes[connector.nodeId2]
|
||||
if cNode1 and cNode2 then
|
||||
baseState = getState(cNode1,cNode2)
|
||||
end
|
||||
@@ -440,10 +438,10 @@ function PassiveTreeViewClass:Draw(build, compareSpec, viewPort, inputEvents)
|
||||
-- Draw the nodes
|
||||
for nodeId, node in pairs(spec.nodes) do
|
||||
-- Determine the base and overlay images for this node based on type and state
|
||||
local compareNode = isComparing and compareSpec.nodes[nodeId] or nil
|
||||
local compareNode = self.compareSpec and self.compareSpec.nodes[nodeId] or nil
|
||||
|
||||
local base, overlay
|
||||
local isAlloc = node.alloc or build.calcsTab.mainEnv.grantedPassives[nodeId] or (isComparing and compareNode and compareNode.alloc)
|
||||
local isAlloc = node.alloc or build.calcsTab.mainEnv.grantedPassives[nodeId] or (compareNode and compareNode.alloc)
|
||||
SetDrawLayer(nil, 25)
|
||||
if node.type == "ClassStart" then
|
||||
overlay = isAlloc and node.startArt or "PSStartNodeBackgroundInactive"
|
||||
@@ -553,7 +551,7 @@ function PassiveTreeViewClass:Draw(build, compareSpec, viewPort, inputEvents)
|
||||
end
|
||||
end
|
||||
else
|
||||
if isComparing then
|
||||
if compareNode then
|
||||
if compareNode.alloc and not node.alloc then
|
||||
-- Base has, current has not, color green (take these nodes to match)
|
||||
SetDrawColor(0, 1, 0)
|
||||
@@ -578,7 +576,7 @@ function PassiveTreeViewClass:Draw(build, compareSpec, viewPort, inputEvents)
|
||||
SetDrawColor(0, 0, 0)
|
||||
end
|
||||
else
|
||||
if isComparing and compareNode then
|
||||
if compareNode then
|
||||
if compareNode.alloc and not node.alloc then
|
||||
-- Base has, current has not, color green (take these nodes to match)
|
||||
SetDrawColor(0, 1, 0)
|
||||
|
||||
@@ -212,7 +212,8 @@ function TreeTabClass:Draw(viewPort, inputEvents)
|
||||
self.viewer:Focus(self.jumpToX, self.jumpToY, treeViewPort, self.build)
|
||||
self.jumpToNode = false
|
||||
end
|
||||
self.viewer:Draw(self.build, self.isComparing and self.specList[self.activeCompareSpec] or nil, treeViewPort, inputEvents)
|
||||
self.viewer.compareSpec = self.isComparing and self.specList[self.activeCompareSpec] or nil
|
||||
self.viewer:Draw(self.build, treeViewPort, inputEvents)
|
||||
|
||||
self.controls.compareSelect.selIndex = self.activeCompareSpec
|
||||
wipeTable(self.controls.compareSelect.list)
|
||||
@@ -340,7 +341,6 @@ function TreeTabClass:SetActiveSpec(specId)
|
||||
end
|
||||
|
||||
function TreeTabClass:SetCompareSpec(specId)
|
||||
local prevSpec = self.compareSpec
|
||||
self.activeCompareSpec = m_min(specId, #self.specList)
|
||||
local curSpec = self.specList[self.activeCompareSpec]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user