Release 1.2.16

- Added sort dropdown to build list
- Save prompt can now show when closing program
- Fixed issue caused by right-clicking a jewel socket on the passive tree when there's no jewels in the build
This commit is contained in:
Openarl
2016-11-26 02:04:48 +10:00
parent 32911059bb
commit 9c203c595a
10 changed files with 133 additions and 32 deletions

View File

@@ -128,6 +128,7 @@ function buildMode:Init(dbFileName, buildName)
end
self.controls.characterLevel = common.New("EditControl", {"LEFT",self.anchorTopBarRight,"RIGHT"}, 0, 0, 106, 20, "", "Level", "%D", 3, function(buf)
self.characterLevel = m_min(tonumber(buf) or 1, 100)
self.modFlag = true
self.buildFlag = true
end)
self.controls.characterLevel.tooltip = function()
@@ -380,6 +381,28 @@ function buildMode:Init(dbFileName, buildName)
self.abortSave = false
end
function buildMode:CanExit()
if not self.unsaved then
return true
end
main:OpenPopup(280, 100, "Save Changes", {
common.New("LabelControl", nil, 0, 20, 0, 16, "^7This build has unsaved changes.\nDo you want to save them before exiting?"),
common.New("ButtonControl", nil, -90, 70, 80, 20, "Save", function()
self:SaveDBFile()
main:ClosePopup()
Exit()
end),
common.New("ButtonControl", nil, 0, 70, 80, 20, "Don't Save", function()
main:ClosePopup()
Exit()
end),
common.New("ButtonControl", nil, 90, 70, 80, 20, "Cancel", function()
main:ClosePopup()
end),
})
return false
end
function buildMode:Shutdown()
if launch.devMode and not self.abortSave then
self:SaveDBFile()