Добавлена алавитная сортировка в TreeView

This commit is contained in:
Igor Timofeev
2017-03-20 14:22:03 +03:00
parent a79f22adf6
commit 932d018d0a
2 changed files with 8 additions and 2 deletions

View File

@@ -300,7 +300,7 @@
name="lib/GUI.lua",
url="IgorTimofeev/OpenComputers/master/lib/GUI.lua",
type="Library",
version=1.46,
version=1.47,
},
{
name="lib/windows.lua",

View File

@@ -1621,7 +1621,8 @@ end
local function treeViewUpdateFileList(treeView)
treeView.fileList = {}
updateFileList(treeView, 1, treeView.workPath)
table.sort(treeView.fileList, function(a, b) return unicode.lower(a.path) < unicode.lower(b.path) end)
return treeView
end
@@ -1853,6 +1854,11 @@ end
--------------------------------------------------------------------------------------------------------------------------------
-- buffer.start()
-- buffer.clear(0x262626)
-- GUI.treeView(2, 2, 50, 40, 0xFFFFFF, 0x0, 0x262626, 0x555555, 0x888888, 0xFF4444, 0x44FF44, "/MineOS/Desktop/3DTest.app/"):draw()
-- buffer.draw(true)
-- buffer.start()
-- local x, y, width, height = 10, 10, 32, 16
-- local chart = GUI.chart(x, y, width, height, 0xFFFFFF, 0xBBBBBB, 0x777777, 0xFF4444, 0.1, 0.15, "%", " RF/t", true, {})