Working! /crt sortX functions there for testing
His Dad [12-22-14 - 05:15]
Working! /crt sortX functions there for testing
diff --git a/lua/CraftResearchTimer.lua b/lua/CraftResearchTimer.lua
index 59cd27d..2aa50b9 100644
--- a/lua/CraftResearchTimer.lua
+++ b/lua/CraftResearchTimer.lua
@@ -503,8 +503,15 @@ function CRT.CommandText_setup(lparam)
d("Shortest: " .. CRT.Converthms(CRT.SV.data.Craft[CRT.playername].shortest))
elseif (lparam == "grid") then
CRT.toggleGRID()
- elseif (lparam == "sort") then
- CRT.GRID_Sort()
+ elseif (lparam == "sortA") then
+ CRT.SortFunction = SortAlphaA
+ CRT.GRID_Sort()
+ elseif (lparam == "sortD") then
+ CRT.SortFunction = SortAlphaD
+ CRT.GRID_Sort()
+ elseif (lparam == "sortT") then
+ CRT.SortFunction = SortTimeA
+ CRT.GRID_Sort()
else
CRT.ToggleUI()
end
diff --git a/lua/GRID.lua b/lua/GRID.lua
index 89e47e9..c2b939e 100644
--- a/lua/GRID.lua
+++ b/lua/GRID.lua
@@ -244,7 +244,7 @@ function CRT.GRID_Sort()
CRT.Char_sort()
- -- for k, v in ipairs(CRT.CharsInOrder) do
- -- CRT.UI.GRID_WD[v][v]:SetAnchor(TOPLEFT,CRT.UI.GRID_TLW,TOPLEFT,0,120*k)
- -- end
+ for k, v in ipairs(CRT.CharsInOrder) do
+ CRT.UI.GRID_WD[v].panel:SetAnchor(TOPLEFT,CRT.UI.GRID_TLW,TOPLEFT,0,120*(k-1))
+ end
end