Relese 1.0.20
- Added str/dex/int to side bar - Enhanced skill gem list in a few ways - MASSIVELY improved interactions with item list/DB controls - Add mana cost to side bar
This commit is contained in:
@@ -69,8 +69,9 @@ function ButtonClass:OnKeyUp(key)
|
||||
return
|
||||
end
|
||||
if key == "LEFTBUTTON" and self.clicked then
|
||||
self.clicked = false
|
||||
if self:IsMouseOver() then
|
||||
self.onClick()
|
||||
return self.onClick()
|
||||
end
|
||||
end
|
||||
self.clicked = false
|
||||
|
||||
@@ -55,12 +55,18 @@ function ControlClass:GetPos()
|
||||
local y = self:GetProperty("y")
|
||||
if self.anchor.other then
|
||||
local otherX, otherY = self.anchor.other:GetPos()
|
||||
local otherW, otherH = self.anchor.other:GetSize()
|
||||
local width, height = self:GetSize()
|
||||
local otherW, otherH = 0, 0
|
||||
local width, height = 0, 0
|
||||
local otherPos = anchorPos[self.anchor.otherPoint]
|
||||
assert(otherPos, "invalid anchor position '"..tostring(self.anchor.otherPoint).."'")
|
||||
if self.anchor.otherPoint ~= "TOPLEFT" then
|
||||
otherW, otherH = self.anchor.other:GetSize()
|
||||
end
|
||||
local pos = anchorPos[self.anchor.point]
|
||||
assert(pos, "invalid anchor position '"..tostring(self.anchor.point).."'")
|
||||
if self.anchor.point ~= "TOPLEFT" then
|
||||
width, height = self:GetSize()
|
||||
end
|
||||
x = m_floor(otherX + otherW * otherPos[1] + x - width * pos[1])
|
||||
y = m_floor(otherY + otherH * otherPos[2] + y - height * pos[2])
|
||||
end
|
||||
|
||||
@@ -180,6 +180,12 @@ function ItemDBClass:Draw(viewPort)
|
||||
local orderList = self.orderList
|
||||
local scrollBar = self.controls.scrollBar
|
||||
scrollBar:SetContentDimension(#orderList * 16, height - 4)
|
||||
if self.selItem and self.selDragging then
|
||||
local cursorX, cursorY = GetCursorPos()
|
||||
if not self.selDragActive and (cursorX-self.selCX)*(cursorX-self.selCX)+(cursorY-self.selCY)*(cursorY-self.selCY) > 100 then
|
||||
self.selDragActive = true
|
||||
end
|
||||
end
|
||||
if self.hasFocus then
|
||||
SetDrawColor(1, 1, 1)
|
||||
else
|
||||
@@ -251,11 +257,37 @@ function ItemDBClass:OnKeyDown(key, doubleClick)
|
||||
if selItem then
|
||||
self.selItem = selItem
|
||||
self.selIndex = index
|
||||
if doubleClick then
|
||||
if IsKeyDown("CTRL") then
|
||||
-- Immediately add and equip it
|
||||
self.itemsTab:CreateDisplayItemFromRaw(selItem.raw)
|
||||
local newItem = self.itemsTab.displayItem
|
||||
self.itemsTab:AddDisplayItem(true)
|
||||
local slotName = itemLib.getPrimarySlotForItem(newItem)
|
||||
if slotName and self.itemsTab.slots[slotName] then
|
||||
if IsKeyDown("SHIFT") then
|
||||
local altSlot = slotName:gsub("1","2")
|
||||
if self.itemsTab:IsItemValidForSlot(newItem, altSlot) then
|
||||
slotName = altSlot
|
||||
end
|
||||
end
|
||||
if self.itemsTab.slots[slotName].selItemId ~= newItem.id then
|
||||
self.itemsTab.slots[slotName].selItemId = newItem.id
|
||||
self.itemsTab:PopulateSlots()
|
||||
self.itemsTab:AddUndoState()
|
||||
self.itemsTab.build.buildFlag = true
|
||||
end
|
||||
end
|
||||
elseif doubleClick then
|
||||
self.itemsTab:CreateDisplayItemFromRaw(selItem.raw)
|
||||
end
|
||||
end
|
||||
end
|
||||
if self.selItem then
|
||||
self.selCX = cursorX
|
||||
self.selCY = cursorY
|
||||
self.selDragging = true
|
||||
self.selDragActive = false
|
||||
end
|
||||
elseif key == "c" and IsKeyDown("CTRL") then
|
||||
if self.selItem then
|
||||
Copy(self.selItem.raw)
|
||||
@@ -272,6 +304,36 @@ function ItemDBClass:OnKeyUp(key)
|
||||
self.controls.scrollBar:Scroll(1)
|
||||
elseif key == "WHEELUP" then
|
||||
self.controls.scrollBar:Scroll(-1)
|
||||
elseif self.selItem then
|
||||
if key == "LEFTBUTTON" then
|
||||
self.selDragging = false
|
||||
if self.selDragActive then
|
||||
self.selDragActive = false
|
||||
if self.itemsTab.controls.itemList:IsMouseOver() and self.itemsTab.controls.itemList.selDragIndex then
|
||||
self.itemsTab:CreateDisplayItemFromRaw(self.selItem.raw)
|
||||
local newItem = self.itemsTab.displayItem
|
||||
self.itemsTab:AddDisplayItem()
|
||||
t_remove(self.itemsTab.orderList, #self.itemsTab.orderList)
|
||||
t_insert(self.itemsTab.orderList, self.itemsTab.controls.itemList.selDragIndex, newItem.id)
|
||||
else
|
||||
for slotName, slot in pairs(self.itemsTab.slots) do
|
||||
if not slot.inactive and slot:IsMouseOver() then
|
||||
if self.itemsTab:IsItemValidForSlot(self.selItem, slotName) then
|
||||
self.itemsTab:CreateDisplayItemFromRaw(self.selItem.raw)
|
||||
local newItem = self.itemsTab.displayItem
|
||||
self.itemsTab:AddDisplayItem(true)
|
||||
slot.selItemId = newItem.id
|
||||
self.itemsTab:PopulateSlots()
|
||||
self.itemsTab:AddUndoState()
|
||||
self.itemsTab.build.buildFlag = true
|
||||
end
|
||||
self.selItem = nil
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return self
|
||||
end
|
||||
@@ -48,18 +48,22 @@ function ItemListClass:Draw(viewPort)
|
||||
local orderList = self.itemsTab.orderList
|
||||
local scrollBar = self.controls.scrollBar
|
||||
scrollBar:SetContentDimension(#orderList * 16, height - 4)
|
||||
local cursorX, cursorY = GetCursorPos()
|
||||
self.selDragIndex = nil
|
||||
if self.selItem and self.selDragging then
|
||||
local cursorX, cursorY = GetCursorPos()
|
||||
if not self.selDragActive and (cursorX-self.selCX)*(cursorX-self.selCX)+(cursorY-self.selCY)*(cursorY-self.selCY) > 100 then
|
||||
self.selDragActive = true
|
||||
end
|
||||
if self.selDragActive then
|
||||
if cursorX >= x + 2 and cursorY >= y + 2 and cursorX < x + width - 18 and cursorY < y + height - 2 then
|
||||
local index = math.floor((cursorY - y - 2 + scrollBar.offset) / 16 + 0.5) + 1
|
||||
if index < self.selIndex or index > self.selIndex + 1 then
|
||||
self.selDragIndex = m_min(index, #orderList + 1)
|
||||
end
|
||||
elseif (self.itemsTab.controls.uniqueDB:IsShown() and self.itemsTab.controls.uniqueDB.selDragActive) or (self.itemsTab.controls.rareDB:IsShown() and self.itemsTab.controls.rareDB.selDragActive) then
|
||||
self.selDragActive = true
|
||||
else
|
||||
self.selDragActive = false
|
||||
end
|
||||
if self.selDragActive then
|
||||
if cursorX >= x + 2 and cursorY >= y + 2 and cursorX < x + width - 18 and cursorY < y + height - 2 then
|
||||
local index = math.floor((cursorY - y - 2 + scrollBar.offset) / 16 + 0.5) + 1
|
||||
if not self.selDragging or index < self.selIndex or index > self.selIndex + 1 then
|
||||
self.selDragIndex = m_min(index, #orderList + 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -145,7 +149,26 @@ function ItemListClass:OnKeyDown(key, doubleClick)
|
||||
if selItemId then
|
||||
self.selItem = self.itemsTab.list[selItemId]
|
||||
self.selIndex = index
|
||||
if doubleClick then
|
||||
if IsKeyDown("CTRL") then
|
||||
-- Equip it
|
||||
local slotName = itemLib.getPrimarySlotForItem(self.selItem)
|
||||
if slotName and self.itemsTab.slots[slotName] then
|
||||
if IsKeyDown("SHIFT") then
|
||||
local altSlot = slotName:gsub("1","2")
|
||||
if self.itemsTab:IsItemValidForSlot(self.selItem, altSlot) then
|
||||
slotName = altSlot
|
||||
end
|
||||
end
|
||||
if self.itemsTab.slots[slotName].selItemId == selItemId then
|
||||
self.itemsTab.slots[slotName].selItemId = 0
|
||||
else
|
||||
self.itemsTab.slots[slotName].selItemId = selItemId
|
||||
end
|
||||
self.itemsTab:PopulateSlots()
|
||||
self.itemsTab:AddUndoState()
|
||||
self.itemsTab.build.buildFlag = true
|
||||
end
|
||||
elseif doubleClick then
|
||||
self.itemsTab:SetDisplayItem(copyTable(self.selItem))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -55,9 +55,12 @@ function ItemSlotClass:Draw(viewPort)
|
||||
local width, height = self:GetSize()
|
||||
DrawString(x - 2, y + 2, "RIGHT_X", height - 4, "VAR", "^7"..self.label..":")
|
||||
self.DropDownControl:Draw()
|
||||
if self.itemsTab.controls.itemList.selDragActive and self.itemsTab:IsItemValidForSlot(self.itemsTab.controls.itemList.selItem, self.slotName) then
|
||||
SetDrawColor(0, 1, 0, 0.25)
|
||||
DrawImage(nil, x, y, width, height)
|
||||
for _, control in pairs({self.itemsTab.controls.itemList, self.itemsTab.controls.uniqueDB, self.itemsTab.controls.rareDB}) do
|
||||
if control:IsShown() and control.selDragging and control.selDragActive and self.itemsTab:IsItemValidForSlot(control.selItem, self.slotName) then
|
||||
SetDrawColor(0, 1, 0, 0.25)
|
||||
DrawImage(nil, x, y, width, height)
|
||||
break
|
||||
end
|
||||
end
|
||||
if self.nodeId and (self.dropped or (self:IsMouseOver() and not self.itemsTab.selControl)) then
|
||||
SetDrawLayer(nil, 10)
|
||||
|
||||
@@ -59,7 +59,8 @@ local ItemsTabClass = common.NewClass("ItemsTab", "UndoHandler", "ControlHost",
|
||||
end
|
||||
|
||||
-- Display item
|
||||
self.controls.displayItemTip = common.New("LabelControl", {"TOPLEFT",self.controls.itemList,"TOPRIGHT"}, 20, 0, 100, 16, "^7Double-click an item from one of the lists,\nor copy and paste an item from in game\nto view/edit the item and add it to your build.")
|
||||
self.controls.displayItemTip = common.New("LabelControl", {"TOPLEFT",self.controls.itemList,"TOPRIGHT"}, 20, 0, 100, 16,
|
||||
"^7Double-click an item from one of the lists,\nor copy and paste an item from in game\nto view/edit the item and add it to your build.\nYou can Control + Click an item to equip it, or drag it onto the slot.\nThis will also add it to your build if it's from the unique/template list.\nIf there's 2 slots an item can go in, holding Shift will put it in the second.")
|
||||
self.controls.displayItemTip.shown = function()
|
||||
return self.displayItem == nil
|
||||
end
|
||||
@@ -263,7 +264,7 @@ function ItemsTabClass:UpdateDisplayItemRangeLines()
|
||||
end
|
||||
|
||||
-- Adds the current display item to the build's item list
|
||||
function ItemsTabClass:AddDisplayItem()
|
||||
function ItemsTabClass:AddDisplayItem(noAutoEquip)
|
||||
if not self.displayItem.id then
|
||||
-- Find an unused item ID
|
||||
self.displayItem.id = 1
|
||||
@@ -274,11 +275,13 @@ function ItemsTabClass:AddDisplayItem()
|
||||
-- Add it to the end of the display order list
|
||||
t_insert(self.orderList, self.displayItem.id)
|
||||
|
||||
-- Autoequip it
|
||||
for _, slotName in ipairs(baseSlots) do
|
||||
if self.slots[slotName].selItemId == 0 and self:IsItemValidForSlot(self.displayItem, slotName) then
|
||||
self.slots[slotName].selItemId = self.displayItem.id
|
||||
break
|
||||
if not noAutoEquip then
|
||||
-- Autoequip it
|
||||
for _, slotName in ipairs(baseSlots) do
|
||||
if self.slots[slotName].selItemId == 0 and self:IsItemValidForSlot(self.displayItem, slotName) then
|
||||
self.slots[slotName].selItemId = self.displayItem.id
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -463,7 +466,7 @@ function ItemsTabClass:AddItemTooltip(item, slot, dbMode)
|
||||
local compareSlots = { }
|
||||
for slotName, slot in pairs(self.slots) do
|
||||
local selItem = self.list[slot.selItemId]
|
||||
if self:IsItemValidForSlot(item, slotName) and not slot.inactive and (item ~= selItem or item.type == "Jewel") then
|
||||
if self:IsItemValidForSlot(item, slotName) and not slot.inactive then
|
||||
t_insert(compareSlots, slot)
|
||||
end
|
||||
end
|
||||
@@ -490,7 +493,7 @@ function ItemsTabClass:AddItemTooltip(item, slot, dbMode)
|
||||
local output = calcFunc(slot.slotName, item ~= selItem and item)
|
||||
local header
|
||||
if item == selItem then
|
||||
header = "^7Removing this jewel will give you:"
|
||||
header = "^7Removing this item will give you:"
|
||||
else
|
||||
header = string.format("^7Equipping this item in %s%s will give you:", slot.label, selItem and " (replacing "..data.colorCodes[selItem.rarity]..selItem.name.."^7)" or "")
|
||||
end
|
||||
|
||||
@@ -33,6 +33,7 @@ local SkillListClass = common.NewClass("SkillList", "Control", "ControlHost", fu
|
||||
self.selIndex = #self.skillsTab.list
|
||||
self.skillsTab:SetDisplaySkill(newSkill)
|
||||
self.skillsTab:AddUndoState()
|
||||
return self.skillsTab.gemSlots[1].nameSpec
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
@@ -198,10 +198,22 @@ function SkillsTabClass:UpdateGemSlots(viewPort)
|
||||
self:CreateGemSlot(slotIndex)
|
||||
end
|
||||
local slot = self.gemSlots[slotIndex]
|
||||
slot.nameSpec.inactiveCol = "^8"
|
||||
if slotIndex == #self.displaySkill.gemList + 1 then
|
||||
slot.nameSpec:SetText("")
|
||||
slot.level:SetText("")
|
||||
slot.quality:SetText("")
|
||||
else
|
||||
local gemData = self.displaySkill.gemList[slotIndex].data
|
||||
if gemData then
|
||||
if gemData.strength then
|
||||
slot.nameSpec.inactiveCol = data.colorCodes.STRENGTH
|
||||
elseif gemData.dexterity then
|
||||
slot.nameSpec.inactiveCol = data.colorCodes.DEXTERITY
|
||||
elseif gemData.intelligence then
|
||||
slot.nameSpec.inactiveCol = data.colorCodes.INTELLIGENCE
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
79
Classes/TextListControl.lua
Normal file
79
Classes/TextListControl.lua
Normal file
@@ -0,0 +1,79 @@
|
||||
-- Path of Building
|
||||
--
|
||||
-- Class: Text List
|
||||
-- Simple list control for displaying a block of text
|
||||
--
|
||||
local launch, main = ...
|
||||
|
||||
local TextListClass = common.NewClass("TextListControl", "Control", "ControlHost", function(self, anchor, x, y, width, height, columns, list)
|
||||
self.Control(anchor, x, y, width, height)
|
||||
self.ControlHost()
|
||||
self.controls.scrollBar = common.New("ScrollBarControl", {"RIGHT",self,"RIGHT"}, -1, 0, 18, 0, 40)
|
||||
self.controls.scrollBar.height = function()
|
||||
local width, height = self:GetSize()
|
||||
return height - 2
|
||||
end
|
||||
self.columns = columns or { { x = 0, align = "LEFT" } }
|
||||
self.list = list or { }
|
||||
end)
|
||||
|
||||
function TextListClass:IsMouseOver()
|
||||
if not self:IsShown() then
|
||||
return
|
||||
end
|
||||
if self:GetMouseOverControl() then
|
||||
return true
|
||||
end
|
||||
local x, y = self:GetPos()
|
||||
local width, height = self:GetSize()
|
||||
local cursorX, cursorY = GetCursorPos()
|
||||
return cursorX >= x and cursorY >= y and cursorX < x + width and cursorY < y + height
|
||||
end
|
||||
|
||||
function TextListClass:Draw(viewPort)
|
||||
local x, y = self:GetPos()
|
||||
local width, height = self:GetSize()
|
||||
local scrollBar = self.controls.scrollBar
|
||||
local contentHeight = 0
|
||||
for _, lineInfo in pairs(self.list) do
|
||||
contentHeight = contentHeight + lineInfo.height
|
||||
end
|
||||
scrollBar:SetContentDimension(contentHeight, height - 4)
|
||||
SetDrawColor(0.66, 0.66, 0.66)
|
||||
DrawImage(nil, x, y, width, height)
|
||||
SetDrawColor(0.05, 0.05, 0.05)
|
||||
DrawImage(nil, x + 1, y + 1, width - 2, height - 2)
|
||||
self:DrawControls(viewPort)
|
||||
SetViewport(x + 2, y + 2, width - 20, height - 4)
|
||||
for colIndex, colInfo in pairs(self.columns) do
|
||||
local lineY = -scrollBar.offset
|
||||
for _, lineInfo in ipairs(self.list) do
|
||||
if lineInfo[colIndex] then
|
||||
DrawString(colInfo.x, lineY, colInfo.align, lineInfo.height, "VAR", lineInfo[colIndex])
|
||||
end
|
||||
lineY = lineY + lineInfo.height
|
||||
end
|
||||
end
|
||||
SetViewport()
|
||||
end
|
||||
|
||||
function TextListClass:OnKeyDown(key, doubleClick)
|
||||
if not self:IsShown() or not self:IsEnabled() then
|
||||
return
|
||||
end
|
||||
local mOverControl = self:GetMouseOverControl()
|
||||
if mOverControl and mOverControl.OnKeyDown then
|
||||
return mOverControl:OnKeyDown(key)
|
||||
end
|
||||
end
|
||||
|
||||
function TextListClass:OnKeyUp(key)
|
||||
if not self:IsShown() or not self:IsEnabled() then
|
||||
return
|
||||
end
|
||||
if key == "WHEELDOWN" then
|
||||
self.controls.scrollBar:Scroll(1)
|
||||
elseif key == "WHEELUP" then
|
||||
self.controls.scrollBar:Scroll(-1)
|
||||
end
|
||||
end
|
||||
@@ -8,6 +8,7 @@ local launch, main = ...
|
||||
local pairs = pairs
|
||||
local ipairs = ipairs
|
||||
local t_insert = table.insert
|
||||
local m_min = math.min
|
||||
|
||||
local buildMode = common.New("ControlHost")
|
||||
|
||||
@@ -137,21 +138,21 @@ function buildMode:Init(dbFileName, buildName)
|
||||
self.modFlag = true
|
||||
self.buildFlag = true
|
||||
end)
|
||||
self.controls.banditNormalLabel = common.New("LabelControl", {"BOTTOMLEFT",self.controls.banditNormal,"TOPLEFT"}, 0, 0, 0, 14, "Normal Bandit:")
|
||||
self.controls.banditNormalLabel = common.New("LabelControl", {"BOTTOMLEFT",self.controls.banditNormal,"TOPLEFT"}, 0, 0, 0, 14, "^7Normal Bandit:")
|
||||
self.controls.banditCruel = common.New("DropDownControl", {"LEFT",self.controls.banditNormal,"RIGHT"}, 0, 0, 100, 16,
|
||||
{{val="None",label="Passive point"},{val="Oak",label="Oak (Phys Dmg)"},{val="Kraityn",label="Kraityn (Att. Speed)"},{val="Alira",label="Alira (Cast Speed)"}}, function(sel,val)
|
||||
self.banditCruel = val.val
|
||||
self.modFlag = true
|
||||
self.buildFlag = true
|
||||
end)
|
||||
self.controls.banditCruelLabel = common.New("LabelControl", {"BOTTOMLEFT",self.controls.banditCruel,"TOPLEFT"}, 0, 0, 0, 14, "Cruel Bandit:")
|
||||
self.controls.banditCruelLabel = common.New("LabelControl", {"BOTTOMLEFT",self.controls.banditCruel,"TOPLEFT"}, 0, 0, 0, 14, "^7Cruel Bandit:")
|
||||
self.controls.banditMerciless = common.New("DropDownControl", {"LEFT",self.controls.banditCruel,"RIGHT"}, 0, 0, 100, 16,
|
||||
{{val="None",label="Passive point"},{val="Oak",label="Oak (Endurance)"},{val="Kraityn",label="Kraityn (Frenzy)"},{val="Alira",label="Alira (Power)"}}, function(sel,val)
|
||||
self.banditMerciless = val.val
|
||||
self.modFlag = true
|
||||
self.buildFlag = true
|
||||
end)
|
||||
self.controls.banditMercilessLabel = common.New("LabelControl", {"BOTTOMLEFT",self.controls.banditMerciless,"TOPLEFT"}, 0, 0, 0, 14, "Merciless Bandit:")
|
||||
self.controls.banditMercilessLabel = common.New("LabelControl", {"BOTTOMLEFT",self.controls.banditMerciless,"TOPLEFT"}, 0, 0, 0, 14, "^7Merciless Bandit:")
|
||||
self.controls.mainSkillLabel = common.New("LabelControl", {"TOPLEFT",self.anchorSideBar,"TOPLEFT"}, 0, 95, 300, 16, "^7Main Skill:")
|
||||
self.controls.mainSkillDrop = common.New("DropDownControl", {"TOPLEFT",self.controls.mainSkillLabel,"BOTTOMLEFT"}, 0, 2, 300, 16, nil, function(index)
|
||||
self.mainSkillIndex = index
|
||||
@@ -163,6 +164,11 @@ function buildMode:Init(dbFileName, buildName)
|
||||
self.modFlag = true
|
||||
self.buildFlag = true
|
||||
end)
|
||||
self.controls.statBox = common.New("TextListControl", {"TOPLEFT",self.controls.mainSkillDrop,"BOTTOMLEFT"}, 0, 20, 300, 0, {{x=170,align="RIGHT_X"},{x=174,align="LEFT"}})
|
||||
self.controls.statBox.height = function(control)
|
||||
local x, y = control:GetPos()
|
||||
return main.screenH - 30 - y
|
||||
end
|
||||
|
||||
-- Initialise class dropdown
|
||||
for classId, class in pairs(self.tree.classes) do
|
||||
@@ -184,6 +190,11 @@ function buildMode:Init(dbFileName, buildName)
|
||||
{ mod = "bleed_dps", label = "Bleed DPS", fmt = ".1f" },
|
||||
{ mod = "ignite_dps", label = "Ignite DPS", fmt = ".1f" },
|
||||
{ mod = "poison_dps", label = "Poison DPS", fmt = ".1f" },
|
||||
{ mod = "total_manaCost", label = "Mana Cost", fmt = "d" },
|
||||
{ },
|
||||
{ mod = "total_str", label = "Strength", fmt = "d" },
|
||||
{ mod = "total_dex", label = "Dexterity", fmt = "d" },
|
||||
{ mod = "total_int", label = "Intelligence", fmt = "d" },
|
||||
{ },
|
||||
{ mod = "total_life", label = "Total Life", fmt = "d" },
|
||||
{ mod = "spec_lifeInc", label = "%Inc Life from Tree", fmt = "d%%", condFunc = function(v,o) return v > 0 and o.total_life > 1 end },
|
||||
@@ -248,6 +259,7 @@ function buildMode:Init(dbFileName, buildName)
|
||||
|
||||
-- Build calculation output tables
|
||||
self.calcsTab:BuildOutput()
|
||||
self:RefreshStatList()
|
||||
|
||||
--[[
|
||||
local start = GetTime()
|
||||
@@ -326,6 +338,7 @@ function buildMode:OnFrame(inputEvents)
|
||||
-- Rebuild calculation output tables
|
||||
self.buildFlag = false
|
||||
self.calcsTab:BuildOutput()
|
||||
self:RefreshStatList()
|
||||
end
|
||||
|
||||
-- Update contents of main skill dropdown
|
||||
@@ -372,6 +385,8 @@ function buildMode:OnFrame(inputEvents)
|
||||
self.calcsTab:Draw(tabViewPort, inputEvents)
|
||||
end
|
||||
|
||||
self.unsaved = self.modFlag or self.spec.modFlag or self.skillsTab.modFlag or self.itemsTab.modFlag or self.calcsTab.modFlag
|
||||
|
||||
-- Draw top bar background
|
||||
SetDrawColor(0.2, 0.2, 0.2)
|
||||
DrawImage(nil, 0, 0, main.screenW, 28)
|
||||
@@ -385,23 +400,20 @@ function buildMode:OnFrame(inputEvents)
|
||||
SetDrawColor(0.85, 0.85, 0.85)
|
||||
DrawImage(nil, sideBarWidth - 4, 32, 4, main.screenH - 32)
|
||||
|
||||
self.unsaved = self.modFlag or self.spec.modFlag or self.skillsTab.modFlag or self.itemsTab.modFlag or self.calcsTab.modFlag
|
||||
|
||||
self:DrawControls(viewPort)
|
||||
end
|
||||
|
||||
-- Draw side bar stats
|
||||
local x = 170
|
||||
local y = select(2, self.controls.mainSkillDrop:GetPos()) + 40
|
||||
function buildMode:RefreshStatList()
|
||||
-- Build list of side bar stats
|
||||
wipeTable(self.controls.statBox.list)
|
||||
for index, statData in ipairs(self.displayStats) do
|
||||
if statData.mod then
|
||||
local modVal = self.calcsTab.mainOutput[statData.mod]
|
||||
if modVal and ((statData.condFunc and statData.condFunc(modVal,self.calcsTab.mainOutput)) or (not statData.condFunc and modVal ~= 0)) then
|
||||
DrawString(x, y, "RIGHT_X", 16, "VAR", "^7"..statData.label..":")
|
||||
DrawString(x + 4, y, "LEFT", 16, "VAR", string.format("%s%"..statData.fmt, modVal > 0 and "^7" or data.colorCodes.NEGATIVE, modVal * (statData.pc and 100 or 1)))
|
||||
y = y + 16
|
||||
t_insert(self.controls.statBox.list, { height = 16, "^7"..statData.label..":", string.format("%s%"..statData.fmt, modVal > 0 and "^7" or data.colorCodes.NEGATIVE, modVal * (statData.pc and 100 or 1)) })
|
||||
end
|
||||
else
|
||||
y = y + 12
|
||||
t_insert(self.controls.statBox.list, { height = 10 })
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -32,6 +32,7 @@ local classList = {
|
||||
"DropDownControl",
|
||||
"ScrollBarControl",
|
||||
"SliderControl",
|
||||
"TextListControl",
|
||||
-- Misc
|
||||
"PopupDialog",
|
||||
"UndoHandler",
|
||||
|
||||
@@ -368,6 +368,8 @@ local specialModList = {
|
||||
["enemies you curse take (%d+)%% increased damage"] = function(num) return { CondMod_EnemyCursed_effective_damageTakenInc = num } end,
|
||||
["grants armour equal to (%d+)%% of your reserved life to you and nearby allies"] = function(num) return { armourFromReservedLife = num } end,
|
||||
["grants maximum energy shield equal to (%d+)%% of your reserved mana to you and nearby allies"] = function(num) return { energyShieldFromReservedMana = num } end,
|
||||
["you and nearby allies deal (%d+)%% increased damage"] = function(num) return { damageInc = num } end,
|
||||
["you and nearby allies have (%d+)%% increased movement speed"] = function(num) return { movementSpeedInc = num } end,
|
||||
-- Special node types
|
||||
["(%d+)%% of block chance applied to spells"] = function(num) return { blockChanceConv = num } end,
|
||||
["(%d+)%% additional block chance with staves"] = function(num) return { CondMod_UsingStaff_blockChance = num } end,
|
||||
|
||||
@@ -86,6 +86,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Classes", "Classes", "{7EE4
|
||||
Classes\SkillsTab.lua = Classes\SkillsTab.lua
|
||||
Classes\SliderControl.lua = Classes\SliderControl.lua
|
||||
Classes\SlotSelectControl.lua = Classes\SlotSelectControl.lua
|
||||
Classes\TextListControl.lua = Classes\TextListControl.lua
|
||||
Classes\TreeTab.lua = Classes\TreeTab.lua
|
||||
Classes\UndoHandler.lua = Classes\UndoHandler.lua
|
||||
EndProjectSection
|
||||
|
||||
10
README.md
10
README.md
@@ -48,6 +48,16 @@ Head over to the [Releases](https://github.com/Openarl/PathOfBuilding/releases)
|
||||

|
||||
|
||||
## Changelog
|
||||
### 1.0.20 - 2016/09/02
|
||||
* Added Str/Dex/Int to side bar stat list (which also now has a scroll bar for users running low resolutions)
|
||||
* Skill gems list in the skills tab now colours the gem name according to the gem's colour
|
||||
* Now shows "Removing this item will give you" section for all items, not just jewels
|
||||
* You can now equip items from both the "All Items" list and the uniques/templates list by Control+Clicking the item
|
||||
* If there's two slots the item can go in, holding Shift as well will equip it in the second slot instead
|
||||
* Jewels cannot be equipped in this way (since it'll probably put them in the wrong socket) but they will still be added to your build if you Ctrl-Click them in the uniques or templates lists
|
||||
* You can also now drag items from the databases straight into item slots to add and equip them in one go!
|
||||
* And also drag items from the databases into the main items list
|
||||
|
||||
### 1.0.19 - 2016/09/02
|
||||
* Fixed error that would occur if you set your character level to 0
|
||||
* Added support for "while Unarmed" modifiers
|
||||
|
||||
25
manifest.xml
25
manifest.xml
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PoBVersion>
|
||||
<Version number="1.0.19"/>
|
||||
<Version number="1.0.20"/>
|
||||
<Source part="program" url="https://raw.githubusercontent.com/Openarl/PathOfBuilding/{branch}/"/>
|
||||
<Source part="tree" url="https://raw.githubusercontent.com/Openarl/PathOfBuilding/{branch}/tree.zip"/>
|
||||
<Source url="https://raw.githubusercontent.com/Openarl/PathOfBuilding/{branch}/runtime-win32.zip" part="runtime" platform="win32"/>
|
||||
@@ -8,19 +8,19 @@
|
||||
<File sha1="769b039de92cbad79837d7522991afd8801f4d2a" name="UpdateCheck.lua" part="program"/>
|
||||
<File sha1="4f17937f2b37784e169a3792b235f2a0a3961e61" name="UpdateApply.lua" part="program"/>
|
||||
<File sha1="aef7145f378d0a1d5dc6f5f2d3c08d2a1b6ef264" name="Classes/BuildListControl.lua" part="program"/>
|
||||
<File sha1="293118049829adcce48e771c440029600c67a21b" name="Classes/ButtonControl.lua" part="program"/>
|
||||
<File sha1="34fdf53db3b3231ce446749227e178847b982771" name="Classes/ButtonControl.lua" part="program"/>
|
||||
<File sha1="ffe8c54a8006cb7acc34ba5c6e50772081a0a694" name="Classes/CalcsTab.lua" part="program"/>
|
||||
<File sha1="02d11638a2ada37b8521cb946512009c468028a1" name="Classes/CheckBoxControl.lua" part="program"/>
|
||||
<File sha1="b95462f5fcd90b69e5a09c5ec86f58943fc26ffa" name="Classes/Control.lua" part="program"/>
|
||||
<File sha1="e71f8367d62de41b0b80b764ddced8fb80f50ce7" name="Classes/Control.lua" part="program"/>
|
||||
<File sha1="1d35e3a3d8427d30254e7d8983562d0d4d8dc733" name="Classes/ControlHost.lua" part="program"/>
|
||||
<File sha1="7c23b2ae9eb3b9b02a5da8afce64e2cb191b36b3" name="Classes/DropDownControl.lua" part="program"/>
|
||||
<File sha1="40c44fc6371bf664a887cf0a81f1d76e0ffa17f1" name="Classes/EditControl.lua" part="program"/>
|
||||
<File sha1="c8774a6e9a39fe8f2d434889abe2533aee78fc47" name="Classes/Grid.lua" part="program"/>
|
||||
<File sha1="85aae0489332ca754538757560ec1adaf3383fc2" name="Classes/ImportTab.lua" part="program"/>
|
||||
<File sha1="2a3001d92c8f788a7d487643fbfcc4fa93419f4a" name="Classes/ItemDBControl.lua" part="program"/>
|
||||
<File sha1="0cb467a1a8643e5297d8e1cdc1a3808686ffc9ef" name="Classes/ItemListControl.lua" part="program"/>
|
||||
<File sha1="b78b8fd05d201aff7e0da1b3a70acdedef9bf60d" name="Classes/ItemSlotControl.lua" part="program"/>
|
||||
<File sha1="d13986f1aacf7732375e3aa8a8a19dab0a8708d3" name="Classes/ItemsTab.lua" part="program"/>
|
||||
<File sha1="b0b313cca6ba333c0c98b73ed0c0d3a640e28c20" name="Classes/ItemDBControl.lua" part="program"/>
|
||||
<File sha1="42f43054cd0a8fca8484fbe8d0f10cbd80d555d3" name="Classes/ItemListControl.lua" part="program"/>
|
||||
<File sha1="f2416d1613f3318acbd85f776213fe62f488342d" name="Classes/ItemSlotControl.lua" part="program"/>
|
||||
<File sha1="8337d41c93a08d354e9f09abe75aaa5f7684b708" name="Classes/ItemsTab.lua" part="program"/>
|
||||
<File sha1="e577edeea7685cb2b0cd0d00b901a458ae45add0" name="Classes/LabelControl.lua" part="program"/>
|
||||
<File sha1="6f8f98d6ee505af53441c1fe9ad74fbff86d56ad" name="Classes/PassiveSpec.lua" part="program"/>
|
||||
<File sha1="03dde914f7ad75d26f2ba0845b11986d198b6e94" name="Classes/PassiveTree.lua" part="program"/>
|
||||
@@ -28,21 +28,22 @@
|
||||
<File sha1="b5d4e4e7cedcabefa029cdefc74db5ac0a82d87f" name="Classes/PopupDialog.lua" part="program"/>
|
||||
<File sha1="f2f2bda4a5a26e54cce51614e3ad48b6f7182671" name="Classes/ScrollBarControl.lua" part="program"/>
|
||||
<File sha1="261dcf54a4542e6160fd7024d8edf4fc095d9c71" name="Classes/SectionControl.lua" part="program"/>
|
||||
<File sha1="6131965219f17fd2e6dafc225e08699cf921d15c" name="Classes/SkillListControl.lua" part="program"/>
|
||||
<File sha1="ff86e798a2fd2c5f883f6fd983ff8c0014953db9" name="Classes/SkillsTab.lua" part="program"/>
|
||||
<File sha1="81129a808a9a49730959b6e80f9548d96b108729" name="Classes/SkillListControl.lua" part="program"/>
|
||||
<File sha1="67f89f3ce93c8e3f71eb4d0ad880fddefbcbdd6f" name="Classes/SkillsTab.lua" part="program"/>
|
||||
<File sha1="6317bd9ba391832dccafcb62409a5ce2988d1928" name="Classes/SliderControl.lua" part="program"/>
|
||||
<File sha1="80527e0e05c986355ce7af2ba026538aec99a63a" name="Classes/SlotSelectControl.lua" part="program"/>
|
||||
<File sha1="844b8915ca0f2e6af82f2d15978af131a33ad50e" name="Classes/TextListControl.lua" part="program"/>
|
||||
<File sha1="787ac0d738443206c15ec36544089465eec87048" name="Classes/TreeTab.lua" part="program"/>
|
||||
<File sha1="4b7675c8b4fe71cade7dd3d70793df1ed8022d01" name="Classes/UndoHandler.lua" part="program"/>
|
||||
<File sha1="26526eb610e68fa710c3fc7ed2658808b1fad9a1" name="Modules/Build.lua" part="program"/>
|
||||
<File sha1="e7964ce5353a63baf04f4c38e7a1c0e9e82cc7dc" name="Modules/Build.lua" part="program"/>
|
||||
<File sha1="c03a7796aea3e9aa832fbb92c1f674ef5af690ca" name="Modules/BuildList.lua" part="program"/>
|
||||
<File sha1="e89ce0e2e347e2a75f7b9646ef0b4bab5056170f" name="Modules/Calcs.lua" part="program"/>
|
||||
<File sha1="d4439a94dda4c3d3aa23ac123ba378a35174e425" name="Modules/CalcsView.lua" part="program"/>
|
||||
<File sha1="3fd280d8abfa60264495daad42f8ccaa92cdcd46" name="Modules/Common.lua" part="program"/>
|
||||
<File sha1="cb25bd581587ba5b35f77ca7b245334be1e5186a" name="Modules/Data.lua" part="program"/>
|
||||
<File sha1="73e1c9410aba9b218cd9d0ff6b13062e9b8de915" name="Modules/ItemTools.lua" part="program"/>
|
||||
<File sha1="51b4fca862b219d1e953a73a362cd48147aafdff" name="Modules/Main.lua" part="program"/>
|
||||
<File sha1="137ea04eb1e5236ebbd046ea315626cad09407a4" name="Modules/ModParser.lua" part="program"/>
|
||||
<File sha1="b8d2ad481e20f73b6e34bc50c7cd482f41c85d8f" name="Modules/Main.lua" part="program"/>
|
||||
<File sha1="37cdd0c2588fe0ff1164a69592f97f6d58dba781" name="Modules/ModParser.lua" part="program"/>
|
||||
<File sha1="bc49ce1b5e15da40476a9c99c4c690b323c0e7ad" name="Modules/ModTools.lua" part="program"/>
|
||||
<File sha1="e7ee7e5b6388facb7bf568517ecc401590757df7" name="Assets/ring.png" part="program"/>
|
||||
<File sha1="056de4fc6178320cc019ad1bacba09d689a87a56" name="Data/New.lua" part="program"/>
|
||||
|
||||
Reference in New Issue
Block a user